ccj 2 年之前
父节点
当前提交
fa8f6d8797

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

@@ -516,12 +516,15 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
                     InOutWarehouseTask inOutWarehouseTask =  inOutWarehouseTaskService.selectOne(new EntityWrapper<InOutWarehouseTask>()
                             .eq("comp_id",weighingManagement.getCompId())
                             .eq("in_out_task_no",qualityInspectionManagement.getInOutTaskNo()));
-                    contractManagementInfo=contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
-                            .eq("comp_id",weighingManagement.getCompId())
-                            .eq("contract_no",inOutWarehouseTask.getSendWarehouse()));
-                    if (contractManagementInfo!=null){
-                        weighingManagement.setContractManagement(contractManagementInfo);
+                    if(inOutWarehouseTask != null){
+                        contractManagementInfo=contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
+                                .eq("comp_id",weighingManagement.getCompId())
+                                .eq("contract_no",inOutWarehouseTask.getSendWarehouse()));
+                        if (contractManagementInfo!=null){
+                            weighingManagement.setContractManagement(contractManagementInfo);
+                        }
                     }
+
                 }
             }
             WarehouseInOutDetail warehouseInOutDetail=warehouseInOutDetailService.selectOne(new EntityWrapper<WarehouseInOutDetail>()