瀏覽代碼

可选往来账款条件修改

tudc 3 年之前
父節點
當前提交
5b4c811de4

+ 4 - 4
sc-service/src/main/java/com/huyi/service/credit/controller/OwnCreditController.java

@@ -1033,7 +1033,7 @@ public class OwnCreditController extends BaseController {
         SysUser use = userInfo.getSysUser();
         Map<String,String> map = new HashMap<>();
         //查询非失效,非删除的融信
-        LambdaQueryWrapper<ZcFinanceInf> financeInfLambdaQueryWrapper = new LambdaQueryWrapper<>();
+        /*LambdaQueryWrapper<ZcFinanceInf> financeInfLambdaQueryWrapper = new LambdaQueryWrapper<>();
         List<String> stateList = new ArrayList<>();
         //以下状态关联了账款不可再查询出来
         stateList.add("00");
@@ -1055,7 +1055,7 @@ public class OwnCreditController extends BaseController {
                 List<String> billIdList = CommonUtil.getIdFromList(relList,"zfbrBillId");
                 map.put("billIdList",CommonUtil.listToStr4InSql(billIdList));
             }
-        }
+        }*/
 
 
         //获取公司编号
@@ -1093,7 +1093,7 @@ public class OwnCreditController extends BaseController {
         String companyId = use.getCompanyId();
         Map<String,String> map = new HashMap<>();
         //查询非失效,非删除的融信
-        LambdaQueryWrapper<ZcFinanceInf> financeInfLambdaQueryWrapper = new LambdaQueryWrapper<>();
+        /*LambdaQueryWrapper<ZcFinanceInf> financeInfLambdaQueryWrapper = new LambdaQueryWrapper<>();
         List<String> stateList = new ArrayList<>();
         //以下状态关联了账款不可再查询出来
         stateList.add("00");
@@ -1115,7 +1115,7 @@ public class OwnCreditController extends BaseController {
                 List<String> billIdList = CommonUtil.getIdFromList(relList,"zfbrBillId");
                 map.put("billIdList",CommonUtil.listToStr4InSql(billIdList));
             }
-        }
+        }*/
         //接收方
         if(!CommonUtil.isEmpty(zfiSupplierId)){
             //应收企业

+ 16 - 6
sc-service/src/main/resources/mapper/credit/OwnCreditMapper.xml

@@ -224,10 +224,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
             FROM   zc_bill_inf b
             LEFT JOIN  sys_company y
-            ON y.scy_id = b.zbi_payer_id
+                ON y.scy_id = b.zbi_payer_id
             LEFT JOIN  sys_company s
-            ON s.scy_id = b.zbi_payee_id
+                ON s.scy_id = b.zbi_payee_id
+            LEFT JOIN zc_finance_bill_rel rel
+                ON rel.zfbr_bill_id = b.zbi_id
+            LEFT JOIN zc_finance_inf f
+                ON rel.zfbr_finance_id = f.zfi_id
             WHERE 1=1
+            AND (f.zfi_status IN ('03', '99') OR f.zfi_id IS NULL)
 --             b.zbi_status = '00'
             <if test="paramMap.zbiPayerId != null  and paramMap.zbiPayerId != ''">
                 AND b.zbi_payer_id = #{paramMap.zbiPayerId}
@@ -244,9 +249,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="paramMap.payIdList != null  and paramMap.payIdList != ''">
                 and b.zbi_id  IN (${paramMap.payIdList})
             </if>
-            <if test="paramMap.billIdList != null  and paramMap.billIdList != ''">
+            <!--<if test="paramMap.billIdList != null  and paramMap.billIdList != ''">
                 and b.zbi_id  NOT IN (${paramMap.billIdList})
-            </if>
+            </if>-->
             ORDER BY b.create_time DESC
 
     </select>
@@ -269,7 +274,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             ON y.scy_id = b.zbi_payer_id
             LEFT JOIN  sys_company s
             ON s.scy_id = b.zbi_payee_id
+            LEFT JOIN zc_finance_bill_rel rel
+            ON rel.zfbr_bill_id = b.zbi_id
+            LEFT JOIN zc_finance_inf f
+            ON rel.zfbr_finance_id = f.zfi_id
             WHERE 1=1
+            AND (f.zfi_status IN ('03', '99') OR f.zfi_id IS NULL)
 --             b.zbi_status = '00'
             <if test="paramMap.zbiPayeeId != null  and paramMap.zbiPayeeId != ''">
                 AND b.zbi_payee_id = #{paramMap.zbiPayeeId}
@@ -286,9 +296,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="paramMap.payIdList != null  and paramMap.payIdList != ''">
                 and b.zbi_id  IN (${paramMap.payIdList})
             </if>
-            <if test="paramMap.billIdList != null  and paramMap.billIdList != ''">
+            <!--<if test="paramMap.billIdList != null  and paramMap.billIdList != ''">
                 and b.zbi_id  NOT IN (${paramMap.billIdList})
-            </if>
+            </if>-->
             ORDER BY b.create_time DESC
     </select>