提交 4475f1d4 authored 作者: aiqingguo's avatar aiqingguo

拉运吨数计算

上级 046b240c
......@@ -105,13 +105,17 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
}
}
BigDecimal dif = param.getLoadNet().subtract(orderChild.getWeight());
BigDecimal dif = orderChild.getLoadNet().subtract(orderChild.getWeight());
orderChild.setWeight(orderChildWeightCalc(orderChild));
orderChild.setFreight(orderChildFreightCalc(orderChild));
// 更新装车净重
updateOrderGoodsAmountLoad(orderGoods, dif);
//更新运单数据
orderChild.setPoundStatus(param.getStatus());
orderChildDao.updatePoundAuditStatus(orderChild);
//保存磅单审核数据
orderChildPoundAuditDao.saveEntity(poundAuditDetail);
......@@ -122,10 +126,6 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
//保存磅单审核日志数据
orderChildPoundLogDao.saveEntity(poundLog);
//更新运单数据
orderChild.setPoundStatus(param.getStatus());
orderChildDao.updatePoundAuditStatus(orderChild);
//保存运单日志数据
orderChildLogService.saveOrderChildLog(param.getChildNo(),type,OrderChildLogEnum.Type.getByCode(type).get().getMsg(),
OrderChildLogEnum.CreateType.PLATFORM.getCode(), loginUserInfo.getUserNo(),loginUserInfo.getUserName());
......@@ -136,6 +136,8 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
* 装车补偿
*/
private void updateOrderGoodsAmountLoad(OrderGoods orderGoods, BigDecimal dif){
if (dif.compareTo(BigDecimal.ZERO) == 0){return;}
int count = orderChildDao.countValidByOrderGoodsNo(orderGoods.getOrderGoodsNo())-1;
Integer status = orderGoods.getOrderGoodsStatus();
......
......@@ -953,6 +953,8 @@ public class OrderChildServiceImpl implements OrderChildService {
* 装车补偿
*/
private void updateOrderGoodsAmountLoad(OrderGoods orderGoods, BigDecimal dif){
if (dif.compareTo(BigDecimal.ZERO) == 0){return;}
int count = orderChildDao.countValidByOrderGoodsNo(orderGoods.getOrderGoodsNo())-1;
Integer status = orderGoods.getOrderGoodsStatus();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论