zhangyuewww 3 سال پیش
والد
کامیت
b13caf0af5

+ 6 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranProcessInfoServiceImpl.java

@@ -190,9 +190,13 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
                                     //扣款
                                     if(tranSettlementReport.getLossWeight() <= (tranCarInfo.getLoadNetWeight()/1000)){
                                         tranSettlementReport.setDeductionAmount("0");
+                                        //应付=单价x结算重量-扣款
+                                        tranSettlementReport.setAmountIngPayable(tranSettlementReport.getTransportPrice()*tranSettlementReport.getSettlementWeight());
                                     }
                                     else{
                                         tranSettlementReport.setDeductionAmount(String.format("%.2f",(Float.valueOf(tranCarInfo.getLoadNetWeight()-tranCarInfo.getUnloadNetWeight()) - (tranCarInfo.getLoadNetWeight()/1000)) * Float.valueOf(tranCarInfo.getTranPrice())));
+                                        //应付=单价x结算重量-扣款
+                                        tranSettlementReport.setAmountIngPayable(tranSettlementReport.getTransportPrice()*tranSettlementReport.getSettlementWeight()-Float.valueOf(tranSettlementReport.getDeductionAmount()));
                                     }
                                     tranSettlementReportService.updateById(tranSettlementReport);
                                 }
@@ -226,6 +230,8 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
                                 }
                             }
                             tranSettlementReport.setSettlementWeight(tranCarInfo.getLoadNetWeight());
+                            //应付
+                            tranSettlementReport.setAmountIngPayable(tranProcessInfo.getTranPrice()*tranSettlementReport.getSettlementWeight());
                             tranSettlementReport.setTranCarNo(tranCarInfo.getTranCarNo());
                             tranSettlementReport.setLoadingWeight(tranCarInfo.getLoadNetWeight());
                             tranSettlementReport.setLoadingImg(tranCarInfo.getLoadPoundImg());

+ 2 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranSettlementReportServiceImpl.java

@@ -139,6 +139,8 @@ public class TranSettlementReportServiceImpl extends ServiceImpl<TranSettlementR
             if(tranSettlementReport.getFlag()==0) {
                 tranSettlementReport1.setSettlementWeight(tranSettlementReport.getSettlementWeight());
                 tranSettlementReport1.setManualFlag("1");
+                //应付=单价x结算重量-扣款
+                tranSettlementReport1.setAmountIngPayable(tranSettlementReport1.getTransportPrice()*tranSettlementReport.getSettlementWeight()-Float.valueOf(tranSettlementReport1.getDeductionAmount()!=null?tranSettlementReport1.getDeductionAmount():"0"));
                 //更改汽运结算信息
                 this.updateById(tranSettlementReport1);
                 return "OK";