Pārlūkot izejas kodu

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun

ccjgmwz 3 gadi atpakaļ
vecāks
revīzija
1b78ddd68b

+ 5 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/WarehouseInOutInfo.java

@@ -418,6 +418,11 @@ public class WarehouseInOutInfo extends BaseModel<WarehouseInOutInfo> {
      */
     @TableField(exist = false)
     private String carId;
+    /**
+     * 收货库
+     */
+    @TableField(exist = false)
+    private String receiveWarehouse;
 
     @TableField(exist = false)
     private ContractManagementInfo contractManagementInfo;

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

@@ -1273,6 +1273,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 new EntityWrapper<ContractManagementInfo>()
                         .eq("contract_no",warehouseInOutInfo.getContractNo())
                         .eq("delete_flag",0));
+        String compId = "";
         if(contractManagementInfo == null){
             InOutWarehouseTask inOutWarehouseTask = iInOutWarehouseTaskService.selectOne(
                     new EntityWrapper<InOutWarehouseTask>()
@@ -1283,10 +1284,19 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                     new EntityWrapper<ContractManagementInfo>()
                             .eq("contract_no",inOutWarehouseTask.getWarehouseName())
                             .eq("delete_flag",0));
+            if (contractManagementInfo != null){
+                warehouseInOutInfo.setContractManagementInfo(contractManagementInfo);
+            }else {
+                compId = inOutWarehouseTask.getCompId();
+                warehouseInOutInfo.setReceiveWarehouse(inOutWarehouseTask.getReceiveWarehouse());
+            }
+        }
+        else {
+            compId=contractManagementInfo.getCompId();
+            warehouseInOutInfo.setContractManagementInfo(contractManagementInfo);
         }
-        warehouseInOutInfo.setContractManagementInfo(contractManagementInfo);
         CommonCompany commonCompany = commonCompanyService.selectOne(new EntityWrapper<CommonCompany>()
-                .eq("comp_id", contractManagementInfo.getCompId())
+                .eq("comp_id",compId)
                 .eq("delete_flag", "0"));
         warehouseInOutInfo.setCompanyName(commonCompany.getCompName());
         return warehouseInOutInfo;