zhangyuewww 2 rokov pred
rodič
commit
fed67a1176

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

@@ -1439,7 +1439,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                                         stockSaleReceiptReport.setTitleNo(warehouseInOutInfo.getTitleNo());
                                     }
                                     //自运出库时手动加的车
-                                    if ("1".equals(warehouseInOutInfo.getSelfLoading())) {
+                                    if ("1".equals(warehouseInOutInfo.getSelfLoading())|| warehouseInOutInfo.getCarId() == null) {
                                         List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
                                                 .eq("contract_no", contractManagementInfo1.getContractNo()).eq("tran_type", "1"));
                                         TranCarInfo tranCarInfo = new TranCarInfo();
@@ -1580,7 +1580,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
 //                                contractInventoryDistributionService.updateById(contractInventoryDistribution);
 //                            }
                             //自运出库时手动加的车
-                            if ("1".equals(warehouseInOutInfo.getSelfLoading())) {
+                            if ("1".equals(warehouseInOutInfo.getSelfLoading())|| warehouseInOutInfo.getCarId() == null) {
                                 List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
                                         .eq("contract_no", warehouseInOutInfo.getContractNo()).eq("tran_type", "1")
                                         .orderBy("create_date", false));
@@ -4099,7 +4099,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                                         stockSaleReceiptReport.setTitleNo(warehouseInOutInfo.getTitleNo());
                                     }
                                     //自运出库时手动加的车
-                                    if ("1".equals(warehouseInOutInfo.getSelfLoading())) {
+                                    if ("1".equals(warehouseInOutInfo.getSelfLoading())|| warehouseInOutInfo.getCarId() == null) {
                                         List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
                                                 .eq("contract_no", contractManagementInfo1.getContractNo()).eq("tran_type", "1"));
                                         TranCarInfo tranCarInfo = new TranCarInfo();
@@ -4242,7 +4242,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
 //                                contractInventoryDistributionService.updateById(contractInventoryDistribution);
 //                            }
                             //自运出库时手动加的车
-                            if ("1".equals(warehouseInOutInfo.getSelfLoading())) {
+                            if ("1".equals(warehouseInOutInfo.getSelfLoading())|| warehouseInOutInfo.getCarId() == null) {
                                 List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
                                         .eq("contract_no", warehouseInOutInfo.getContractNo()).eq("tran_type", "1")
                                         .orderBy("create_date", false));

+ 3 - 9
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WeighingManagementServiceImpl.java

@@ -472,6 +472,9 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
                         warehouseInOutInfoService.selectById(weighingManagement.getWarehouseInOutId());
                 if(warehouseInOutInfo!= null){
                     weighingManagement.setPositionId(warehouseInOutInfo.getPositionId());
+                    weighingManagement.setFreight(warehouseInOutInfo.getFreight());
+                    weighingManagement.setCarId(warehouseInOutInfo.getCarId());
+                    weighingManagement.setTranCarNo(warehouseInOutInfo.getTranCarNo());
                     weighingManagement.setSelfLoading(warehouseInOutInfo.getSelfLoading());
                 }
             }
@@ -507,15 +510,6 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
             if (warehouseInOutDetail!=null){
                 weighingManagement.setInOutDetailId(warehouseInOutDetail.getId());
             }
-            //查询车辆信息
-            TranCarInfo tranCarInfo = tranCarInfoService.selectOne(new EntityWrapper<TranCarInfo>()
-                    .eq("contract_no", weighingManagement.getContractNo())
-                    .eq("car_no",weighingManagement.getCarNumber()));
-            if (tranCarInfo != null){
-                weighingManagement.setCarId(tranCarInfo.getId());
-                weighingManagement.setFreight(Float.valueOf(tranCarInfo.getTranPrice()));
-                weighingManagement.setTranCarNo(tranCarInfo.getTranCarNo());
-            }
             weighingManagement.setCodeUrl(qrCodeUtil.generateQRCodeImage(qualityInspectionManagement.getCompId()+"&"+qualityInspectionManagement.getQualityNo()+"&"+warehouseBaseInfo.getId(),800,800,"",qualityInspectionManagement.getId()));
 
         }