提交 b4038793 authored 作者: 马路路's avatar 马路路

App获取当日--bugfix预估收益-车主信息、司机信息删除,不提示错误

上级 a5db5c29
...@@ -1081,7 +1081,11 @@ public class OrderGoodsServiceImpl implements OrderGoodsService, InitializingBea ...@@ -1081,7 +1081,11 @@ public class OrderGoodsServiceImpl implements OrderGoodsService, InitializingBea
@Override @Override
public OrderGoodsTodaySumVO getTodayOrderGoodsSum() { public OrderGoodsTodaySumVO getTodayOrderGoodsSum() {
// 初始化赋值
OrderGoodsTodaySumVO vo = new OrderGoodsTodaySumVO(); OrderGoodsTodaySumVO vo = new OrderGoodsTodaySumVO();
vo.setTodayOrderGoodsSum(0);
vo.setTodayEstimateProfit(BigDecimal.ZERO);
// 局部变量赋值
Integer ownerTruck = 0; Integer ownerTruck = 0;
BigDecimal ownerWeight = BigDecimal.ZERO; BigDecimal ownerWeight = BigDecimal.ZERO;
Integer driver = 0; Integer driver = 0;
...@@ -1130,8 +1134,7 @@ public class OrderGoodsServiceImpl implements OrderGoodsService, InitializingBea ...@@ -1130,8 +1134,7 @@ public class OrderGoodsServiceImpl implements OrderGoodsService, InitializingBea
private boolean isTruckOwner(Long trunkOwnerUserNo){ private boolean isTruckOwner(Long trunkOwnerUserNo){
// 获取车辆新信息 // 获取车辆新信息
DriverTruckInfoFeignVo driverTruckInfoFeignVo = Optional.ofNullable(driverFeign DriverTruckInfoFeignVo driverTruckInfoFeignVo = Optional.ofNullable(driverFeign
.getDriverTruckInfoByTrunkOwnerUserNo(trunkOwnerUserNo)).filter(Result:: succeed).map(Result::getData) .getDriverTruckInfoByTrunkOwnerUserNo(trunkOwnerUserNo)).filter(Result:: succeed).map(Result::getData).orNull();
.orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
if (Objects.nonNull(driverTruckInfoFeignVo)) { if (Objects.nonNull(driverTruckInfoFeignVo)) {
return true; return true;
} }
...@@ -1146,7 +1149,7 @@ public class OrderGoodsServiceImpl implements OrderGoodsService, InitializingBea ...@@ -1146,7 +1149,7 @@ public class OrderGoodsServiceImpl implements OrderGoodsService, InitializingBea
*/ */
private boolean isDriver(Long driverUserNo) { private boolean isDriver(Long driverUserNo) {
DriverInfoFeignVo driverInfoFeignVo = Optional.ofNullable(driverFeign.getDriverInfo(driverUserNo)).filter(Result:: succeed).map(Result::getData) DriverInfoFeignVo driverInfoFeignVo = Optional.ofNullable(driverFeign.getDriverInfo(driverUserNo)).filter(Result:: succeed).map(Result::getData)
.orElseThrow(PerformanceResultEnum.DATA_NOT_FIND); .orNull();
if (Objects.nonNull(driverInfoFeignVo)) { if (Objects.nonNull(driverInfoFeignVo)) {
return true; return true;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论