zhangyuewww 2 years ago
parent
commit
01b962b2a0

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

@@ -308,6 +308,22 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
                                 tranSettlementReport.setTranType("汽运");
                                 tranSettlementReport.setTranType("汽运");
                                 tranSettlementReport.setTranTypeKey("1");
                                 tranSettlementReport.setTranTypeKey("1");
                                 tranSettlementReport.setContractNo(tranTaskInfo.getContractNo());
                                 tranSettlementReport.setContractNo(tranTaskInfo.getContractNo());
+                                ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
+                                        .eq("contract_no", tranSettlementReport.getContractNo())
+                                        .eq("delete_flag", "0"));
+                                if (contractManagementInfo!=null){
+                                    tranSettlementReport.setGrainPrice(contractManagementInfo.getUnitContractPrice());
+                                }
+                                else {
+                                    if ("移库".equals(tranTaskInfo.getTaskType())) {
+                                        ContractManagementInfo contractManagementInfo1 = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
+                                                .eq("contract_no", tranTaskInfo.getSendWarehouse())
+                                                .eq("comp_id", tranTaskInfo.getCompId()));
+                                        if (contractManagementInfo1 != null) {
+                                            tranSettlementReport.setGrainPrice(contractManagementInfo1.getUnitContractPrice());
+                                        }
+                                    }
+                                }
                                 tranSettlementReport.setProcessNo(tranProcessInfo.getProcessNo());
                                 tranSettlementReport.setProcessNo(tranProcessInfo.getProcessNo());
                                 tranSettlementReport.setName(tranCarInfo.getDriver());
                                 tranSettlementReport.setName(tranCarInfo.getDriver());
                                 tranSettlementReport.setPhone(tranCarInfo.getDriverPhone());
                                 tranSettlementReport.setPhone(tranCarInfo.getDriverPhone());
@@ -468,20 +484,34 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
                                         tranSettlementReport1.setSettlementWeight(tranCarInfo.getLoadNetWeight() > tranCarInfo.getUnloadNetWeight() ? tranCarInfo.getUnloadNetWeight() : tranCarInfo.getLoadNetWeight());
                                         tranSettlementReport1.setSettlementWeight(tranCarInfo.getLoadNetWeight() > tranCarInfo.getUnloadNetWeight() ? tranCarInfo.getUnloadNetWeight() : tranCarInfo.getLoadNetWeight());
                                         tranSettlementReport1.setTransportDamage(tranSettlementReport1.getSettlementWeight()*0.001);
                                         tranSettlementReport1.setTransportDamage(tranSettlementReport1.getSettlementWeight()*0.001);
                                     }
                                     }
-                                    //损耗大于结算重量的1‰时=损耗-结算重量x1‰
-                                    if (tranSettlementReport1.getLossWeight()>tranSettlementReport1.getSettlementWeight()*0.001){
+                                    if(tranSettlementReport1.getLossWeight()<0){
+                                        tranSettlementReport1.setActualLoss(0d);
+                                        tranSettlementReport1.setDeductionAmount("0");
+                                    }
+                                    //损耗大于结算重量的1‰时
+                                    else if (tranSettlementReport1.getLossWeight()>tranSettlementReport1.getSettlementWeight()*0.001){
+                                        //货损=损耗-结算重量x1‰
                                         tranSettlementReport1.setCargoDamage(tranSettlementReport1.getLossWeight()-tranSettlementReport1.getSettlementWeight()*0.001);
                                         tranSettlementReport1.setCargoDamage(tranSettlementReport1.getLossWeight()-tranSettlementReport1.getSettlementWeight()*0.001);
+                                        //实际损耗默认为结算重量的1‰
+                                        tranSettlementReport1.setActualLoss(tranSettlementReport1.getSettlementWeight()*0.001);
+                                        if (tranSettlementReport1.getGrainPrice()!=null){
+                                            tranSettlementReport1.setDeductionAmount(String.valueOf(tranSettlementReport1.getCargoDamage()*tranSettlementReport1.getGrainPrice()));
+                                        }
+                                    }
+                                    //0<损耗<结算重量的1‰时
+                                    else if(tranSettlementReport1.getLossWeight()>0&&tranSettlementReport1.getLossWeight()<tranSettlementReport1.getSettlementWeight()*0.001){
+                                        //实际损耗默认为损耗
+                                        tranSettlementReport1.setActualLoss(Double.valueOf(String.valueOf(tranSettlementReport1.getLossWeight())));
+                                        tranSettlementReport1.setDeductionAmount("0");
                                     }
                                     }
                                     //扣款
                                     //扣款
                                     if (tranSettlementReport1.getLossWeight() <= (tranCarInfo.getLoadNetWeight() / 1000)) {
                                     if (tranSettlementReport1.getLossWeight() <= (tranCarInfo.getLoadNetWeight() / 1000)) {
-                                        tranSettlementReport1.setDeductionAmount("0");
                                         //应付=单价x结算重量-扣款
                                         //应付=单价x结算重量-扣款
                                         tranSettlementReport1.setAmountIngPayable(tranSettlementReport1.getTransportPrice() * tranSettlementReport1.getSettlementWeight());
                                         tranSettlementReport1.setAmountIngPayable(tranSettlementReport1.getTransportPrice() * tranSettlementReport1.getSettlementWeight());
                                         //实付金额
                                         //实付金额
                                         tranSettlementReport1.setAmountActuallyPaid(Double.valueOf(tranSettlementReport1.getTransportPrice()) * tranSettlementReport1.getSettlementWeight()
                                         tranSettlementReport1.setAmountActuallyPaid(Double.valueOf(tranSettlementReport1.getTransportPrice()) * tranSettlementReport1.getSettlementWeight()
                                                 - tranSettlementReport1.getServiceCharge());
                                                 - tranSettlementReport1.getServiceCharge());
                                     } else {
                                     } else {
-                                        tranSettlementReport1.setDeductionAmount(String.format("%.2f", (Float.valueOf(tranCarInfo.getLoadNetWeight() - tranCarInfo.getUnloadNetWeight()) - (tranCarInfo.getLoadNetWeight() / 1000)) * Float.valueOf(tranCarInfo.getTranPrice())));
                                         //应付=单价x结算重量-扣款
                                         //应付=单价x结算重量-扣款
                                         tranSettlementReport1.setAmountIngPayable(tranSettlementReport1.getTransportPrice() * tranSettlementReport1.getSettlementWeight() - Float.valueOf(tranSettlementReport1.getDeductionAmount()));
                                         tranSettlementReport1.setAmountIngPayable(tranSettlementReport1.getTransportPrice() * tranSettlementReport1.getSettlementWeight() - Float.valueOf(tranSettlementReport1.getDeductionAmount()));
                                         //实付金额
                                         //实付金额

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

@@ -276,6 +276,7 @@ public class TranSettlementReportServiceImpl extends ServiceImpl<TranSettlementR
             }
             }
             //1 修改扣款
             //1 修改扣款
             else if (tranSettlementReport.getFlag() == 1) {
             else if (tranSettlementReport.getFlag() == 1) {
+                tranSettlementReport1.setManualIdentification("1");
                 tranSettlementReport1.setDeductionAmount(tranSettlementReport.getDeductionAmount());
                 tranSettlementReport1.setDeductionAmount(tranSettlementReport.getDeductionAmount());
 //                tranSettlementReport1.setAmountIngPayable(tranSettlementReport1.getSettlementWeight()*tranSettlementReport1.getTransportPrice()-Float.valueOf(tranSettlementReport1.getDeductionAmount()));
 //                tranSettlementReport1.setAmountIngPayable(tranSettlementReport1.getSettlementWeight()*tranSettlementReport1.getTransportPrice()-Float.valueOf(tranSettlementReport1.getDeductionAmount()));
 //                tranSettlementReport1.setAmountNotPayable(tranSettlementReport1.getAmountIngPayable()-tranSettlementReport1.getAmountEdPayable());
 //                tranSettlementReport1.setAmountNotPayable(tranSettlementReport1.getAmountIngPayable()-tranSettlementReport1.getAmountEdPayable());
@@ -350,6 +351,34 @@ public class TranSettlementReportServiceImpl extends ServiceImpl<TranSettlementR
                 //更改汽运结算信息
                 //更改汽运结算信息
                 this.updateById(tranSettlementReport1);
                 this.updateById(tranSettlementReport1);
             }
             }
+            //7 修改粮食单价
+            else if (tranSettlementReport.getFlag() == 7) {
+                List<TranSettlementReport> tranSettlementReportList=this.selectList(new EntityWrapper<TranSettlementReport>()
+                .eq("contract_no",tranSettlementReport1.getContractNo())
+                .eq("manual_identification","0"));
+                if (!CollectionUtils.isEmpty(tranSettlementReportList)){
+                    for (TranSettlementReport tranSettlementReport2:tranSettlementReportList){
+                        tranSettlementReport2.setGrainPrice(tranSettlementReport.getGrainPrice());
+                        if (tranSettlementReport2.getLossWeight()>tranSettlementReport2.getSettlementWeight()*0.001){
+                            tranSettlementReport2.setDeductionAmount(String.valueOf(tranSettlementReport2.getCargoDamage()*tranSettlementReport2.getGrainPrice()));
+                            //实付金额
+                            tranSettlementReport2.setAmountActuallyPaid(Double.valueOf(tranSettlementReport2.getTransportPrice()) * tranSettlementReport2.getSettlementWeight()
+                                    - Double.valueOf(tranSettlementReport2.getDeductionAmount()) - tranSettlementReport2.getServiceCharge());
+                            //税点
+                            tranSettlementReport2.setTaxPoint(tranSettlementReport2.getAmountActuallyPaid()/0.946*0.054);
+                            //合计应付
+                            tranSettlementReport2.setTotalPayable(tranSettlementReport2.getAmountActuallyPaid()+tranSettlementReport2.getTaxPoint());
+                            //未付金额
+                            Float f = 0.0f;
+                            f = tranSettlementReport2.getTotalPayable().floatValue() - tranSettlementReport2.getAmountEdPayable();
+                            DecimalFormat df1 = new DecimalFormat("#.00");
+                            tranSettlementReport2.setAmountNotPayable(Float.parseFloat(df1.format(f)));
+                        }
+                        //更改汽运结算信息
+                        this.updateById(tranSettlementReport2);
+                    }
+                }
+            }
         }
         }
         return "OK";
         return "OK";
     }
     }

+ 48 - 18
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseInOutInfoServiceImpl.java

@@ -969,21 +969,34 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                                     tranSettlementReport.setSettlementWeight(tranSettlementReport.getLoadingWeight() > tranSettlementReport.getUnloadingWeight() ? tranSettlementReport.getUnloadingWeight() : tranSettlementReport.getLoadingWeight());
                                     tranSettlementReport.setSettlementWeight(tranSettlementReport.getLoadingWeight() > tranSettlementReport.getUnloadingWeight() ? tranSettlementReport.getUnloadingWeight() : tranSettlementReport.getLoadingWeight());
                                     tranSettlementReport.setTransportDamage(tranSettlementReport.getSettlementWeight()*0.001);
                                     tranSettlementReport.setTransportDamage(tranSettlementReport.getSettlementWeight()*0.001);
                                 }
                                 }
-                                //损耗大于结算重量的1‰时=损耗-结算重量x1‰
-                                if (tranSettlementReport.getLossWeight()>tranSettlementReport.getSettlementWeight()*0.001){
+                                if(tranSettlementReport.getLossWeight()<0){
+                                    tranSettlementReport.setActualLoss(0d);
+                                    tranSettlementReport.setDeductionAmount("0");
+                                }
+                                //损耗大于结算重量的1‰时
+                                else if (tranSettlementReport.getLossWeight()>tranSettlementReport.getSettlementWeight()*0.001){
+                                    //货损=损耗-结算重量x1‰
                                     tranSettlementReport.setCargoDamage(tranSettlementReport.getLossWeight()-tranSettlementReport.getSettlementWeight()*0.001);
                                     tranSettlementReport.setCargoDamage(tranSettlementReport.getLossWeight()-tranSettlementReport.getSettlementWeight()*0.001);
+                                    //实际损耗默认为结算重量的1‰
+                                    tranSettlementReport.setActualLoss(tranSettlementReport.getSettlementWeight()*0.001);
+                                    if (tranSettlementReport.getGrainPrice()!=null){
+                                        tranSettlementReport.setDeductionAmount(String.valueOf(tranSettlementReport.getCargoDamage()*tranSettlementReport.getGrainPrice()));
+                                    }
+                                }
+                                //0<损耗<=结算重量的1‰时
+                                else if(tranSettlementReport.getLossWeight()>0&&tranSettlementReport.getLossWeight()<=tranSettlementReport.getSettlementWeight()*0.001){
+                                    //实际损耗默认为损耗
+                                    tranSettlementReport.setActualLoss(Double.valueOf(String.valueOf(tranSettlementReport.getLossWeight())));
+                                    tranSettlementReport.setDeductionAmount("0");
                                 }
                                 }
                                 if (tranSettlementReport.getTransportPrice()!=null) {
                                 if (tranSettlementReport.getTransportPrice()!=null) {
-                                    //扣款
                                     if (tranSettlementReport.getLossWeight() <= (tranSettlementReport.getLoadingWeight() / 1000)) {
                                     if (tranSettlementReport.getLossWeight() <= (tranSettlementReport.getLoadingWeight() / 1000)) {
-                                        tranSettlementReport.setDeductionAmount("0");
-                                        //应付=单价x结算重量-扣款
+                                        //应付=单价x结算重量
                                         tranSettlementReport.setAmountIngPayable(tranSettlementReport.getTransportPrice() * tranSettlementReport.getSettlementWeight());
                                         tranSettlementReport.setAmountIngPayable(tranSettlementReport.getTransportPrice() * tranSettlementReport.getSettlementWeight());
                                         //实付金额
                                         //实付金额
                                         tranSettlementReport.setAmountActuallyPaid(Double.valueOf(tranSettlementReport.getTransportPrice()) * tranSettlementReport.getSettlementWeight()
                                         tranSettlementReport.setAmountActuallyPaid(Double.valueOf(tranSettlementReport.getTransportPrice()) * tranSettlementReport.getSettlementWeight()
                                                 - tranSettlementReport.getServiceCharge());
                                                 - tranSettlementReport.getServiceCharge());
                                     } else {
                                     } else {
-                                        tranSettlementReport.setDeductionAmount(String.format("%.2f", (Float.valueOf(tranSettlementReport.getLoadingWeight() - tranSettlementReport.getUnloadingWeight()) - (tranSettlementReport.getLoadingWeight() / 1000)) * Float.valueOf(tranSettlementReport.getTransportPrice())));
                                         //应付=单价x结算重量-扣款
                                         //应付=单价x结算重量-扣款
                                         tranSettlementReport.setAmountIngPayable(tranSettlementReport.getTransportPrice() * tranSettlementReport.getSettlementWeight() - Float.valueOf(tranSettlementReport.getDeductionAmount()));
                                         tranSettlementReport.setAmountIngPayable(tranSettlementReport.getTransportPrice() * tranSettlementReport.getSettlementWeight() - Float.valueOf(tranSettlementReport.getDeductionAmount()));
                                         //实付金额
                                         //实付金额
@@ -1499,6 +1512,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                                     tranSettlementReport.setCarId(warehouseInOutInfo.getCarId());
                                     tranSettlementReport.setCarId(warehouseInOutInfo.getCarId());
                                     tranSettlementReport.setId(IdGenerator.generateUUID());
                                     tranSettlementReport.setId(IdGenerator.generateUUID());
                                     if ("汽运".equals(warehouseInOutInfo.getOutType())) {
                                     if ("汽运".equals(warehouseInOutInfo.getOutType())) {
+                                        tranSettlementReport.setGrainPrice(contractManagementInfo1.getUnitContractPrice());
                                         tranSettlementReport.setTranType("汽运");
                                         tranSettlementReport.setTranType("汽运");
                                         tranSettlementReport.setTranTypeKey("1");
                                         tranSettlementReport.setTranTypeKey("1");
                                         tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
                                         tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
@@ -2129,6 +2143,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                         if (contractManagementInfo1 == null) {
                         if (contractManagementInfo1 == null) {
                             throw new YException(YExceptionEnum.CONTRACT_NO_NOT_EXSITS_ERROR);
                             throw new YException(YExceptionEnum.CONTRACT_NO_NOT_EXSITS_ERROR);
                         }
                         }
+                        warehouseInOutInfo.setGrainPrice(contractManagementInfo1.getUnitContractPrice());
                         Wrapper wrapper = new EntityWrapper<TranCarInfo>()
                         Wrapper wrapper = new EntityWrapper<TranCarInfo>()
                                 .eq("contract_no", warehouseInOutInfo.getContractNo())
                                 .eq("contract_no", warehouseInOutInfo.getContractNo())
                                 .eq("car_no", warehouseInOutInfo.getCarNo())
                                 .eq("car_no", warehouseInOutInfo.getCarNo())
@@ -2234,6 +2249,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                         tranSettlementReport.setId(IdGenerator.generateUUID());
                         tranSettlementReport.setId(IdGenerator.generateUUID());
                         tranSettlementReport.setTranCarNo(warehouseInOutInfo.getTranCarNo());
                         tranSettlementReport.setTranCarNo(warehouseInOutInfo.getTranCarNo());
                         if ("汽运".equals(warehouseInOutInfo.getOutType())) {
                         if ("汽运".equals(warehouseInOutInfo.getOutType())) {
+                            tranSettlementReport.setGrainPrice(warehouseInOutInfo.getGrainPrice());
                             tranSettlementReport.setTranType("汽运");
                             tranSettlementReport.setTranType("汽运");
                             tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
                             tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
                             tranSettlementReport.setServiceCharge(20d);
                             tranSettlementReport.setServiceCharge(20d);
@@ -3778,28 +3794,39 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                                         tranSettlementReport.setSettlementWeight(tranSettlementReport.getLoadingWeight() > tranSettlementReport.getUnloadingWeight() ? tranSettlementReport.getUnloadingWeight() : tranSettlementReport.getLoadingWeight());
                                         tranSettlementReport.setSettlementWeight(tranSettlementReport.getLoadingWeight() > tranSettlementReport.getUnloadingWeight() ? tranSettlementReport.getUnloadingWeight() : tranSettlementReport.getLoadingWeight());
                                         tranSettlementReport.setTransportDamage(tranSettlementReport.getSettlementWeight()*0.001);
                                         tranSettlementReport.setTransportDamage(tranSettlementReport.getSettlementWeight()*0.001);
                                     }
                                     }
-                                    //损耗大于结算重量的1‰时=损耗-结算重量x1‰
-                                    if (tranSettlementReport.getLossWeight()>tranSettlementReport.getSettlementWeight()*0.001){
+                                    if(tranSettlementReport.getLossWeight()<0){
+                                        tranSettlementReport.setActualLoss(0d);
+                                        tranSettlementReport.setDeductionAmount("0");
+                                    }
+                                    //损耗大于结算重量的1‰时
+                                    else if (tranSettlementReport.getLossWeight()>tranSettlementReport.getSettlementWeight()*0.001){
+                                        //货损=损耗-结算重量x1‰
                                         tranSettlementReport.setCargoDamage(tranSettlementReport.getLossWeight()-tranSettlementReport.getSettlementWeight()*0.001);
                                         tranSettlementReport.setCargoDamage(tranSettlementReport.getLossWeight()-tranSettlementReport.getSettlementWeight()*0.001);
+                                        //实际损耗默认为结算重量的1‰
+                                        tranSettlementReport.setActualLoss(tranSettlementReport.getSettlementWeight()*0.001);
+                                        if (tranSettlementReport.getGrainPrice()!=null){
+                                            tranSettlementReport.setDeductionAmount(String.valueOf(tranSettlementReport.getCargoDamage()*tranSettlementReport.getGrainPrice()));
+                                        }
+                                    }
+                                    //0<损耗<=结算重量的1‰时
+                                    else if(tranSettlementReport.getLossWeight()>0&&tranSettlementReport.getLossWeight()<=tranSettlementReport.getSettlementWeight()*0.001){
+                                        //实际损耗默认为损耗
+                                        tranSettlementReport.setActualLoss(Double.valueOf(String.valueOf(tranSettlementReport.getLossWeight())));
+                                        tranSettlementReport.setDeductionAmount("0");
                                     }
                                     }
                                     if (tranSettlementReport.getTransportPrice() != null) {
                                     if (tranSettlementReport.getTransportPrice() != null) {
-                                        //扣款
                                         if (tranSettlementReport.getLossWeight() <= (tranSettlementReport.getLoadingWeight() / 1000)) {
                                         if (tranSettlementReport.getLossWeight() <= (tranSettlementReport.getLoadingWeight() / 1000)) {
-                                            tranSettlementReport.setDeductionAmount("0");
-                                            //应付=单价x结算重量-扣款
+                                            //应付=单价x结算重量
                                             tranSettlementReport.setAmountIngPayable(tranSettlementReport.getTransportPrice() * tranSettlementReport.getSettlementWeight());
                                             tranSettlementReport.setAmountIngPayable(tranSettlementReport.getTransportPrice() * tranSettlementReport.getSettlementWeight());
+                                            //实付金额
+                                            tranSettlementReport.setAmountActuallyPaid(Double.valueOf(tranSettlementReport.getTransportPrice()) * tranSettlementReport.getSettlementWeight()
+                                                    - tranSettlementReport.getServiceCharge());
                                         } else {
                                         } else {
-                                            tranSettlementReport.setDeductionAmount(String.format("%.2f", (Float.valueOf(tranSettlementReport.getLoadingWeight() - tranSettlementReport.getUnloadingWeight()) - (tranSettlementReport.getLoadingWeight() / 1000)) * Float.valueOf(tranSettlementReport.getTransportPrice())));
                                             //应付=单价x结算重量-扣款
                                             //应付=单价x结算重量-扣款
                                             tranSettlementReport.setAmountIngPayable(tranSettlementReport.getTransportPrice() * tranSettlementReport.getSettlementWeight() - Float.valueOf(tranSettlementReport.getDeductionAmount()));
                                             tranSettlementReport.setAmountIngPayable(tranSettlementReport.getTransportPrice() * tranSettlementReport.getSettlementWeight() - Float.valueOf(tranSettlementReport.getDeductionAmount()));
-                                        }
-                                        //实付金额
-                                        if(tranSettlementReport.getDeductionAmount() != null){
+                                            //实付金额
                                             tranSettlementReport.setAmountActuallyPaid(Double.valueOf(tranSettlementReport.getTransportPrice()) * tranSettlementReport.getSettlementWeight()
                                             tranSettlementReport.setAmountActuallyPaid(Double.valueOf(tranSettlementReport.getTransportPrice()) * tranSettlementReport.getSettlementWeight()
                                                     - Double.valueOf(tranSettlementReport.getDeductionAmount()) - tranSettlementReport.getServiceCharge());
                                                     - Double.valueOf(tranSettlementReport.getDeductionAmount()) - tranSettlementReport.getServiceCharge());
-                                        }else{
-                                            tranSettlementReport.setAmountActuallyPaid(Double.valueOf(tranSettlementReport.getTransportPrice()) * tranSettlementReport.getSettlementWeight()
-                                                    - tranSettlementReport.getServiceCharge());
                                         }
                                         }
                                         //税点
                                         //税点
                                         tranSettlementReport.setTaxPoint(tranSettlementReport.getAmountActuallyPaid()/0.946*0.054);
                                         tranSettlementReport.setTaxPoint(tranSettlementReport.getAmountActuallyPaid()/0.946*0.054);
@@ -4424,6 +4451,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                                     tranSettlementReport.setCarId(warehouseInOutInfo.getCarId());
                                     tranSettlementReport.setCarId(warehouseInOutInfo.getCarId());
                                     tranSettlementReport.setId(IdGenerator.generateUUID());
                                     tranSettlementReport.setId(IdGenerator.generateUUID());
                                     if ("汽运".equals(warehouseInOutInfo.getOutType())) {
                                     if ("汽运".equals(warehouseInOutInfo.getOutType())) {
+                                        tranSettlementReport.setGrainPrice(contractManagementInfo1.getUnitContractPrice());
                                         tranSettlementReport.setTranType("汽运");
                                         tranSettlementReport.setTranType("汽运");
                                         tranSettlementReport.setTranTypeKey("1");
                                         tranSettlementReport.setTranTypeKey("1");
                                         tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
                                         tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
@@ -5115,6 +5143,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                         if (contractManagementInfo1 == null) {
                         if (contractManagementInfo1 == null) {
                             throw new YException(YExceptionEnum.CONTRACT_NO_NOT_EXSITS_ERROR);
                             throw new YException(YExceptionEnum.CONTRACT_NO_NOT_EXSITS_ERROR);
                         }
                         }
+                        warehouseInOutInfo.setGrainPrice(contractManagementInfo1.getUnitContractPrice());
                         Wrapper wrapper = new EntityWrapper<TranCarInfo>()
                         Wrapper wrapper = new EntityWrapper<TranCarInfo>()
                                 .eq("contract_no", warehouseInOutInfo.getContractNo())
                                 .eq("contract_no", warehouseInOutInfo.getContractNo())
                                 .eq("car_no", warehouseInOutInfo.getCarNo())
                                 .eq("car_no", warehouseInOutInfo.getCarNo())
@@ -5261,6 +5290,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                         tranSettlementReport.setCarId(warehouseInOutInfo.getCarId());
                         tranSettlementReport.setCarId(warehouseInOutInfo.getCarId());
                         tranSettlementReport.setId(IdGenerator.generateUUID());
                         tranSettlementReport.setId(IdGenerator.generateUUID());
                         if ("汽运".equals(warehouseInOutInfo.getOutType())) {
                         if ("汽运".equals(warehouseInOutInfo.getOutType())) {
+                            tranSettlementReport.setGrainPrice(warehouseInOutInfo.getGrainPrice());
                             tranSettlementReport.setTranType("汽运");
                             tranSettlementReport.setTranType("汽运");
                             tranSettlementReport.setTranTypeKey("1");
                             tranSettlementReport.setTranTypeKey("1");
                             tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
                             tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));