zhangyuewww 3 gadi atpakaļ
vecāks
revīzija
836700f1cb

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

@@ -36,14 +36,9 @@ public class ContractInventoryDistributionServiceImpl extends ServiceImpl<Contra
                 * contractInventoryDistribution.getPageSize());
         //  公司ID
         pageView.put("compId", AuthSecurityUtils.getCurrentUserInfo().getCompId());
-        //合同库存
-        if("1".equals(contractInventoryDistribution.getInventoryType())){
-            pageView.put("contract_no", contractInventoryDistribution.getContractNo());
-        }
-        //收购库存
-        else{
-            pageView.put("warehouse", contractInventoryDistribution.getWarehouse());
-        }
+        pageView.put("inventoryType", contractInventoryDistribution.getInventoryType());
+        pageView.put("contract_no", contractInventoryDistribution.getContractNo());
+        pageView.put("warehouse", contractInventoryDistribution.getWarehouse());
         pageView.put("pageSize", contractInventoryDistribution.getPageSize());
         pageView.put("currentPage", contractInventoryDistribution.getCurrentPage());
         // 查询服务商总数

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

@@ -306,6 +306,8 @@ public class PaymentManagementServiceImpl extends ServiceImpl<PaymentManagementM
     @Override
     @Transactional(rollbackFor = Exception.class)
     public String editInfo(PaymentManagement paymentManagement) {
+        paymentManagement.setStatus(StatusEnum.SETTLED.getName());
+        paymentManagement.setStatusFlag(StatusEnum.SETTLED.getFlag());
         this.updateById(paymentManagement);
         PaymentManagement paymentManagement1 = this.selectById(paymentManagement.getId());
         paymentManagement1.setSettlementDate(new Date());
@@ -529,7 +531,7 @@ public class PaymentManagementServiceImpl extends ServiceImpl<PaymentManagementM
             warehouseInOutDetail.setMildewGrain(qualityInspectionManagement.getMildewGrain());
             warehouseInOutDetail.setJiaorenli(qualityInspectionManagement.getJiaorenli());
             warehouseInOutDetail.setImperfectGrain(qualityInspectionManagement.getImperfectGrain());
-            List<WarehouseInOutDetail> ll = warehouseInOutDetailService.selectList(new EntityWrapper<WarehouseInOutDetail>().eq("info_id",warehouseInOutInfo.getId()));
+            List<WarehouseInOutDetail> ll = warehouseInOutDetailService.selectList(new EntityWrapper<WarehouseInOutDetail>().eq("info_id",warehouseInOutInfo1.getId()));
             if(ll.size() == 0){
                 warehouseInOutDetailService.insert(warehouseInOutDetail);
             }
@@ -904,6 +906,8 @@ public class PaymentManagementServiceImpl extends ServiceImpl<PaymentManagementM
     public String ReSettlement(PaymentManagement paymentManagement) {
         workflowService.suspendInstance(paymentManagement.getWorkflowId(), paymentManagement.getId());
         paymentManagement.setReverseFlag("1");
+        paymentManagement.setStatus(StatusEnum.TO_BE_SETTLED.getName());
+        paymentManagement.setStatusFlag(StatusEnum.TO_BE_SETTLED.getFlag());
         this.updateById(paymentManagement);
         WarehouseInOutInfo warehouseInOutInfo=warehouseInOutInfoService.selectOne(new EntityWrapper<WarehouseInOutInfo>()
         .eq("payment_id",paymentManagement.getId()));

+ 14 - 16
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/ContractInventoryDistributionMapper.xml

@@ -10,15 +10,14 @@
         WHERE
         ci.comp_id = #{compId}
         AND ci.delete_flag = '0'
-        <if test="inventoryType = '1'">
-            <if test="contractNo != null and contractNo != ''">
-                AND ci.contract_no = #{contractNo}
-            </if>
+        <if test="inventoryType != null and inventoryType != ''">
+            AND ci.inventory_type = #{inventoryType}
         </if>
-        <if test="inventoryType = '3'">
-            <if test="warehouse != null and warehouse != ''">
-                AND ci.warehouse = #{warehouse}
-            </if>
+        <if test="contractNo != null and contractNo != ''">
+            AND ci.contract_no = #{contractNo}
+        </if>
+        <if test="warehouse != null and warehouse != ''">
+            AND ci.warehouse = #{warehouse}
         </if>
     </select>
     <!--合同库存分布列表查询-->
@@ -49,15 +48,14 @@
         WHERE
         ci.comp_id = #{compId}
         AND ci.delete_flag = '0'
-        <if test="inventoryType = '1'">
-            <if test="contractNo != null and contractNo != ''">
-                AND ci.contract_no = #{contractNo}
-            </if>
+        <if test="inventoryType != null and inventoryType != ''">
+            AND ci.inventory_type = #{inventoryType}
+        </if>
+        <if test="contractNo != null and contractNo != ''">
+            AND ci.contract_no = #{contractNo}
         </if>
-        <if test="inventoryType = '3'">
-            <if test="warehouse != null and warehouse != ''">
-                AND ci.warehouse = #{warehouse}
-            </if>
+        <if test="warehouse != null and warehouse != ''">
+            AND ci.warehouse = #{warehouse}
         </if>
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}