提交 dec3412e authored 作者: 艾庆国's avatar 艾庆国

承运优化需求9.25-磅单驳回

上级 c5853455
...@@ -102,15 +102,21 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer ...@@ -102,15 +102,21 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
public void updatePoundAudit(PoundAuditParam param) { public void updatePoundAudit(PoundAuditParam param) {
//运单详情 //运单详情
OrderChild orderChild = orderChildDao.getByChildNo(param.getChildNo()).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND); OrderChild orderChild = orderChildDao.getByChildNo(param.getChildNo()).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
BigDecimal loadNet = param.getLoadRough().subtract(param.getLoadTare());
if (loadNet.compareTo(new BigDecimal(99)) > 0) { BigDecimal loadNet = orderChild.getLoadNet();
throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_LOAD_NET_ERROR); BigDecimal unLoadNet = orderChild.getUnloadNet();
} if (Objects.equals(param.getStatus(), OrderChildPoundAuditEnum.Status.APPROVED.getCode())) {
if (param.getLoadTare().compareTo(param.getLoadRough()) > 0) { loadNet = param.getLoadRough().subtract(param.getLoadTare());
throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_TRACE_GT_ROUGH); if (loadNet.compareTo(new BigDecimal(99)) > 0) {
throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_LOAD_NET_ERROR);
}
if (param.getLoadTare().compareTo(param.getLoadRough()) > 0) {
throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_TRACE_GT_ROUGH);
}
unLoadNet = param.getUnloadRough().subtract(param.getUnloadTare());
} }
BigDecimal unLoadNet = param.getUnloadRough().subtract(param.getUnloadTare());
if(OrderChildEnum.CANCEL_lIST.contains(orderChild.getStatus())){ if(OrderChildEnum.CANCEL_lIST.contains(orderChild.getStatus())){
throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_CANCELED); throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_CANCELED);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论