提交 6129db97 authored 作者: 刘海泉's avatar 刘海泉

修改履约进度表的挂单吨数计算

上级 f3fa992f
...@@ -19,10 +19,7 @@ import com.clx.performance.dao.OrderGoodsDao; ...@@ -19,10 +19,7 @@ import com.clx.performance.dao.OrderGoodsDao;
import com.clx.performance.dao.PerformanceProgressDao; import com.clx.performance.dao.PerformanceProgressDao;
import com.clx.performance.dao.PerformanceProgressLogDao; import com.clx.performance.dao.PerformanceProgressLogDao;
import com.clx.performance.dto.gd.GdRouteDTO; import com.clx.performance.dto.gd.GdRouteDTO;
import com.clx.performance.enums.OrderChildEnum; import com.clx.performance.enums.*;
import com.clx.performance.enums.OrderEnum;
import com.clx.performance.enums.PerformanceProgressEnum;
import com.clx.performance.enums.ResultEnum;
import com.clx.performance.extranal.user.AddressService; import com.clx.performance.extranal.user.AddressService;
import com.clx.performance.extranal.user.OrderService; import com.clx.performance.extranal.user.OrderService;
import com.clx.performance.model.OrderChild; import com.clx.performance.model.OrderChild;
...@@ -452,7 +449,7 @@ public class PerformanceProgressServiceImpl implements PerformanceProgressServi ...@@ -452,7 +449,7 @@ public class PerformanceProgressServiceImpl implements PerformanceProgressServi
//最后一个挂单中的货单的挂单时间为最早的挂单时间 //最后一个挂单中的货单的挂单时间为最早的挂单时间
firstPendingTime = item.getPendingOrderTime(); firstPendingTime = item.getPendingOrderTime();
pendingWeight = pendingWeight.add(item.getExtractWeight()); pendingWeight = pendingWeight.add(calcPendingWeight(item));
} }
PerformanceProgress update = new PerformanceProgress(); PerformanceProgress update = new PerformanceProgress();
...@@ -463,6 +460,17 @@ public class PerformanceProgressServiceImpl implements PerformanceProgressServi ...@@ -463,6 +460,17 @@ public class PerformanceProgressServiceImpl implements PerformanceProgressServi
update.setPendingWeight(pendingWeight); update.setPendingWeight(pendingWeight);
performanceProgressDao.updateEntityByKey(update); performanceProgressDao.updateEntityByKey(update);
} }
//计算履约进度表货单的挂单吨数
private BigDecimal calcPendingWeight(OrderGoods item){
if(Objects.equals(item.getOrderGoodsStatus(), OrderGoodsStatusEnum.Status.CANCEL.getCode())){
return Objects.nonNull(item.getAlreadyTransportWeight())?item.getAlreadyTransportWeight():BigDecimal.ZERO;
}
return item.getExtractWeight();
}
//履约进度表----运单部分 //履约进度表----运单部分
@Override @Override
public void dealPerformanceProgress4OrderChild(OrderChild data) { public void dealPerformanceProgress4OrderChild(OrderChild data) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论