zhangyuewww 3 éve
szülő
commit
24f920d836

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

@@ -298,6 +298,11 @@ public class ContractManagementInfo extends BaseModel<ContractManagementInfo> {
      */
     @TableField(exist = false)
     private String searchType;
+    /**
+     * 确认单数量
+     */
+    @TableField(exist = false)
+    private Integer confirmCount;
 
     @TableField(exist = false)
     private ContractGoodsInfo contractGoodsInfo;

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

@@ -64,6 +64,8 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
     private ITranTaskInfoService tranTaskInfoService;
     @Autowired
     private ITranCarInfoService tranCarInfoService;
+    @Autowired
+    private IPriceConfirmationSheetService priceConfirmationSheetService;
     @Value("${file-root-path}")
     private String localPath;
 
@@ -224,8 +226,8 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
         List<ContractManagementInfo> dataList = baseMapper.getListByCondition(pageView);
         if (!CollectionUtils.isEmpty(dataList)) {
             for (ContractManagementInfo contractManagementInfo1 : dataList) {
-                //自运采购合同
-                if("1".equals(contractManagementInfo1.getDeliverType())&&"2".equals(contractManagementInfo1.getContractType())){
+                //现货自运采购合同
+                if("1".equals(contractManagementInfo1.getGoodsType())&&"1".equals(contractManagementInfo1.getDeliverType())&&"2".equals(contractManagementInfo1.getContractType())){
                     //定义出库量
                     Float outWeight = 0.0f;
                     //查询同名临时库出库量
@@ -254,8 +256,8 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
                     }
                     contractManagementInfo1.setCompletedQuantity(outWeight-returnWeight);
                 }
-                //他运采购合同
-                else if("2".equals(contractManagementInfo1.getDeliverType())&&"2".equals(contractManagementInfo1.getContractType())){
+                //现货他运采购合同
+                else if("1".equals(contractManagementInfo1.getGoodsType())&&"2".equals(contractManagementInfo1.getDeliverType())&&"2".equals(contractManagementInfo1.getContractType())){
                     //定义出库量
                     Float inWeight = 0.0f;
                     //查询同合同编号入库量
@@ -271,6 +273,13 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
                     }
                     contractManagementInfo1.setCompletedQuantity(inWeight);
                 }
+                //期货查确认单数量
+                else if("2".equals(contractManagementInfo1.getGoodsType())){
+                    Integer count = priceConfirmationSheetService.selectCount(new EntityWrapper<PriceConfirmationSheet>()
+                            .eq("contract_no",contractManagementInfo1.getContractNo())
+                            .eq("delete_flag","0"));
+                    contractManagementInfo1.setConfirmCount(count);
+                }
                 //销售合同
                 else{
                     //定义出库量

+ 1 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/ContractManagementInfoMapper.xml

@@ -51,6 +51,7 @@
         m.weight,
         m.deliver_type as deliverType,
         m.contract_type as contractType,
+        m.goods_type as goodsType,
         m.unit_contract_price as unitContractPrice,
         m.packing_method as packingMethod,
         m.buyer,