Browse Source

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

ccjgmwz 3 years ago
parent
commit
1cd52184b6

+ 10 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/InOutWarehouseTaskController.java

@@ -145,5 +145,15 @@ public class InOutWarehouseTaskController {
         return inOutWarehouseTaskService.selectInOutWarehouseNo(inOutWarehouseTask);
     }
 
+    /**
+     *
+     * @param compId,warehouseName
+     * @return
+     */
+    @GetMapping("/getContractNo")
+    public InOutWarehouseTask getContractNo(String compId, String warehouseName) {
+        return inOutWarehouseTaskService.getContractNo(compId,warehouseName);
+    }
+
 }
 

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

@@ -247,6 +247,9 @@ public class InOutWarehouseTask extends BaseModel<InOutWarehouseTask> {
     @TableField(exist = false)
     private Float weightIn;
 
+    @TableField(exist = false)
+    private List<ContractManagementInfo> contractManagementInfoList;
+
     /**
      * 退库详情集合
      */

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

@@ -151,6 +151,10 @@ public class StockSaleReceiptReport extends BaseModel<StockSaleReceiptReport> {
      * 未收金额(元/吨)
      */
     private Double amountNotReceivable;
+    /**
+     * 成本
+     */
+    private Double cost;
     /**
      * 收款截图
      */

+ 7 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IInOutWarehouseTaskService.java

@@ -97,4 +97,11 @@ public interface IInOutWarehouseTaskService extends IService<InOutWarehouseTask>
      * @return
      */
     List<InOutWarehouseTask> selectInOutWarehouseNo(InOutWarehouseTask inOutWarehouseTask);
+
+    /**
+     *
+     * @param compId,warehouseName
+     * @return
+     */
+    InOutWarehouseTask getContractNo(String compId, String warehouseName);
 }

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

@@ -28,6 +28,7 @@ import com.yh.saas.plugin.yiliangyiyun.entity.view.WarehouseNumView;
 import com.yh.saas.plugin.yiliangyiyun.exception.YException;
 import com.yh.saas.plugin.yiliangyiyun.exception.YExceptionEnum;
 import com.yh.saas.plugin.yiliangyiyun.mapper.InOutWarehouseTaskMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.IContractManagementInfoService;
 import com.yh.saas.plugin.yiliangyiyun.service.IInOutWarehouseTaskService;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import com.yh.saas.plugin.yiliangyiyun.service.INewWorkflowService;
@@ -61,6 +62,8 @@ public class InOutWarehouseTaskServiceImpl extends ServiceImpl<InOutWarehouseTas
     @Autowired
     private IWarehouseInOutInfoService warehouseInOutInfoService;
     @Autowired
+    private IContractManagementInfoService contractManagementInfoService;
+    @Autowired
     private INoticeService noticeService;
     @Autowired
     private INoticeTaskService noticeTaskService;
@@ -553,4 +556,35 @@ public class InOutWarehouseTaskServiceImpl extends ServiceImpl<InOutWarehouseTas
         }
         return inOutWarehouseTaskList;
     }
+
+    /**
+     *
+     * @param compId,warehouseName
+     * @return
+     */
+    @Override
+    public InOutWarehouseTask getContractNo(String compId,String warehouseName){
+        InOutWarehouseTask inOutWarehouseTask = new InOutWarehouseTask();
+        List<InOutWarehouseTask> stringList = inOutWarehouseTaskService.selectList(new EntityWrapper<InOutWarehouseTask>()
+                .eq("comp_id",compId)
+                .eq("receive_warehouse",warehouseName)
+                .eq("task_status_key","5")
+                .eq("in_out_type_key","3")
+                .eq("delete_flag","0"));
+        if(CollectionUtils.isNotEmpty(stringList)){
+            List<ContractManagementInfo> contractManagementInfoList=new ArrayList<>();
+            for(InOutWarehouseTask inOutWarehouseTask1 : stringList){
+                ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
+                        .eq("contract_no",inOutWarehouseTask1.getMoveTaskNo())
+                        .eq("deliver_type","3")
+                        .eq("delete_flag", "0")
+                );
+                if (contractManagementInfo!=null){
+                    contractManagementInfoList.add(contractManagementInfo);
+                }
+            }
+            inOutWarehouseTask.setContractManagementInfoList(contractManagementInfoList);
+        }
+        return inOutWarehouseTask;
+    }
 }

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

@@ -91,12 +91,6 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
                 if (commonCompany != null) {
                     weighingManagement1.setCompName(commonCompany.getCompName());
                 }
-                ContractManagementInfo contractManagementInfo=contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
-                        .eq("comp_id",weighingManagement1.getCompId())
-                        .eq("contract_no",weighingManagement1.getContractNo()));
-                if (contractManagementInfo!=null){
-                    weighingManagement1.setContractManagement(contractManagementInfo);
-                }
                 PaymentManagement paymentManagement = paymentManagementService.selectOne(new EntityWrapper<PaymentManagement>()
                         .eq("relation_id", weighingManagement1.getRelationId())
                         .eq("comp_id", weighingManagement1.getCompId()));
@@ -318,6 +312,12 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
             if (commonCompany!=null){
                 weighingManagement.setCompName(commonCompany.getCompName());
             }
+            ContractManagementInfo contractManagementInfo=contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
+                    .eq("comp_id",weighingManagement.getCompId())
+                    .eq("contract_no",weighingManagement.getContractNo()));
+            if (contractManagementInfo!=null){
+                weighingManagement.setContractManagement(contractManagementInfo);
+            }
             WarehouseBaseInfo warehouseBaseInfo=warehouseBaseInfoService.selectOne(new EntityWrapper<WarehouseBaseInfo>()
                     .eq("comp_id",weighingManagement.getCompId())
                     .eq("warehouse_name",weighingManagement.getWarehouseName()));