Sfoglia il codice sorgente

融资管理 融信管理查询条件

peixh 3 anni fa
parent
commit
3b220b932a

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

@@ -114,6 +114,9 @@ public class OwnCreditController extends BaseController {
             @RequestParam(required=false) Map zfiSignDate,
             @RequestParam(required=false) Map zfiExpireDate,
             @RequestParam(required=false) String zfiRate,
+            @RequestParam (required = false) String zfiTypes,
+            @RequestParam (required = false) String zfiQuery,
+            @RequestParam (required = false) String zfiValue,
             QueryRequest request) {
         //查询当前操作员
         LoginUser userInfo = tokenService.getLoginUser();
@@ -124,8 +127,8 @@ public class OwnCreditController extends BaseController {
         /*if (!SalaryConstants.OPEX.equals(companyId)) {
             map.put("ziiCompanyId", companyId);
         }*/
-        //融信编号
-        map.put("zfiNumber", zfiNumber);
+//        //融信编号
+//        map.put("zfiNumber", zfiNumber);
         //状态
         if(!CommonUtil.isEmpty(zfiStatus)){
             List<String> stateList = new ArrayList<>();
@@ -141,51 +144,69 @@ public class OwnCreditController extends BaseController {
             }
             map.put("stateList",CommonUtil.listToStr4InSql(stateList));
         }
-        //开立企业
-        map.put("openCompany", openCompany);
-        //接收企业
-        map.put("receiveCompany", receiveCompany);
-        //融资产品
-        map.put("zfpName",zfpName);
-        //签收日期
-        map.put("startTime",zfiSignDate.get("zfiSignDate[0]"));
-        map.put("endTime",zfiSignDate.get("zfiSignDate[1]"));
-        //利率
-        if(CommonUtil.isNotEmpty(zfiRate)){
-            map.put("zfiRate",zfiRate);
-        }
-        //承诺还款日
+//        //开立企业
+//        map.put("openCompany", openCompany);
+//        //接收企业
+//        map.put("receiveCompany", receiveCompany);
+//        //融资产品
+//        map.put("zfpName",zfpName);
+//        //签收日期
+//        map.put("startTime",zfiSignDate.get("zfiSignDate[0]"));
+//        map.put("endTime",zfiSignDate.get("zfiSignDate[1]"));
+//        //利率
+//        if(CommonUtil.isNotEmpty(zfiRate)){
+//            map.put("zfiRate",zfiRate);
+//        }
+//        //承诺付款日
         map.put("zfiExpireDateStart",zfiExpireDate.get("zfiExpireDate[0]"));
         map.put("zfiExpireDateEnd",zfiExpireDate.get("zfiExpireDate[1]"));
-        if(!CommonUtil.isEmpty(startAmt)){
-            if(!AmtUtil.isMoney(startAmt)){
-                return R.fail("请输入正确的融信金额开始范围值");
-            }
-            if(CommonUtil.isEmpty(endAmt)){
-                return R.fail("请输入融信金额的结束范围值");
-
-            }
+//        if(!CommonUtil.isEmpty(startAmt)){
+//            if(!AmtUtil.isMoney(startAmt)){
+//                return R.fail("请输入正确的融信金额开始范围值");
+//            }
+//            if(CommonUtil.isEmpty(endAmt)){
+//                return R.fail("请输入融信金额的结束范围值");
+//
+//            }
+//        }
+//        if(!CommonUtil.isEmpty(endAmt)){
+//            if(CommonUtil.isEmpty(startAmt)){
+//                map.put("startAmt","0");
+//            }
+//        }
+//        //合同金额结束范围
+//        if(!CommonUtil.isEmpty(endAmt)){
+//            if(!AmtUtil.isMoney(endAmt)){
+//                return R.fail("请输入正确的融信金额结束范围值");
+//            }
+//
+//        }
+//        if(!CommonUtil.isEmpty(startAmt) && !CommonUtil.isEmpty(endAmt)){
+//            if(CommonUtil.compare(startAmt,endAmt) == 1){
+//                return R.fail("融信金额范围输入有误");
+//            }
+//        }
+//
+//        map.put("startAmt",CommonUtil.objToBigDecimal(startAmt));
+//        map.put("endAmt",CommonUtil.objToBigDecimal(endAmt));
+        //01:我签收的   02:我开立的
+        if ("01".equals(zfiTypes)){
+            map.put("zfiSupplierId",companyId);
+        }else if ("02".equals(zfiTypes)){
+            map.put("zfiCoreId",companyId);
         }
-        if(!CommonUtil.isEmpty(endAmt)){
-            if(CommonUtil.isEmpty(startAmt)){
-                map.put("startAmt","0");
-            }
-        }
-        //合同金额结束范围
-        if(!CommonUtil.isEmpty(endAmt)){
-            if(!AmtUtil.isMoney(endAmt)){
-                return R.fail("请输入正确的融信金额结束范围值");
-            }
-
+        //00:按开立企业名称查询 01:按融资企业名称查询 02按融信编号查询 03:按融信产品查询 04:按融资利率查询
+        if ("00".equals(zfiQuery)) {
+            map.put("coreScyName", zfiValue);
+        }else if ("01".equals(zfiQuery)){
+            map.put("supplierScyName", zfiValue);
+        }else if ("02".equals(zfiQuery)){
+            map.put("zfiNumber", zfiValue);
+        }else if ("03".equals(zfiQuery)){
+            map.put("zfpName", zfiValue);
+        }else if("04".equals(zfiQuery)){
+            map.put("zfiRate", zfiValue);
         }
-        if(!CommonUtil.isEmpty(startAmt) && !CommonUtil.isEmpty(endAmt)){
-            if(CommonUtil.compare(startAmt,endAmt) == 1){
-                return R.fail("融信金额范围输入有误");
-            }
-        }
-
-        map.put("startAmt",CommonUtil.objToBigDecimal(startAmt));
-        map.put("endAmt",CommonUtil.objToBigDecimal(endAmt));
         //获取企业类型
         String companyType =  use.getCompanyType();
         map.put("companyType",companyType);

+ 2 - 2
sc-service/src/main/java/com/huyi/service/financeRecord/controller/FinanceRecordController.java

@@ -133,9 +133,9 @@ public class FinanceRecordController extends BaseController {
         map.put("zfrStatus",zfrStatus);
         //01:我签收的   02:我开立的
         if ("01".equals(zfrTypes)){
-            map.put("zfiSupplierId",zfrTypes);
+            map.put("zfiSupplierId",companyId);
         }else if ("02".equals(zfrTypes)){
-            map.put("zfiCoreId",zfrTypes);
+            map.put("zfiCoreId",companyId);
         }
         //00:按开立企业名称查询 01:按融信编号查询 02:按融资编号查询 03:按融资状态查询 04:按接收企业名称查询
         if ("00".equals(zfrQuery)) {

+ 21 - 11
sc-service/src/main/resources/mapper/credit/OwnCreditMapper.xml

@@ -57,10 +57,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="paramMap.zfiId != null  and paramMap.zfiId != ''">
             and f.zfi_id = #{paramMap.zfiId}
         </if>
-        <if test="paramMap.zfiNumber != null  and paramMap.zfiNumber != ''">
-            and f.zfi_number like concat('%', #{paramMap.zfiNumber}, '%')
-        </if>
-
         <if test="paramMap.stateList != null  and paramMap.stateList != ''">
             and f.zfi_status IN (${paramMap.stateList})
         </if>
@@ -73,13 +69,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             and y.scy_name like concat('%', #{paramMap.receiveCompany}, '%')
         </if>
 
-        <if test="paramMap.zfiRate != null  and paramMap.zfiRate != '' or paramMap.zfiRate == 0">
-            and f.zfi_rate = #{paramMap.zfiRate}
-        </if>
-
-        <if test="paramMap.zfpName != null  and paramMap.zfpName != ''">
-            and p.zfp_name like concat('%', #{paramMap.zfpName}, '%')
-        </if>
 
         <if test="paramMap.startTime != null  and paramMap.startTime != ''">
             and DATE_FORMAT(f.zfi_sign_date, '%Y-%m-%d') &gt;= #{paramMap.startTime}
@@ -100,6 +89,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="paramMap.endAmt != null  and paramMap.endAmt != ''">
             and f.zfi_amount &lt;= #{paramMap.endAmt}
         </if>
+        <if test="paramMap.zfiSupplierId != null  and paramMap.zfiSupplierId != ''">
+            and f.zfi_supplier_id = #{paramMap.companyId}
+        </if>
+        <if test="paramMap.zfiCoreId != null  and paramMap.zfiCoreId != ''">
+            and f.zfi_core_id = #{paramMap.companyId}
+        </if>
+        <if test="paramMap.zfiNumber != null  and paramMap.zfiNumber != ''">
+            and f.zfi_number like concat('%', #{paramMap.zfiNumber}, '%')
+        </if>
+        <if test="paramMap.zfpName != null  and paramMap.zfpName != ''">
+            and p.zfp_name like concat('%', #{paramMap.zfpName}, '%')
+        </if>
+        <if test="paramMap.zfiRate != null  and paramMap.zfiRate != '' or paramMap.zfiRate == 0">
+            and f.zfi_rate like concat('%', #{paramMap.zfiRate}, '%')
+        </if>
+        <if test="paramMap.coreScyName != null  and paramMap.coreScyName != ''">
+            and s.scy_name  like concat('%', #{paramMap.coreScyName}, '%')
+        </if>
+        <if test="paramMap.supplierScyName != null  and paramMap.supplierScyName != ''">
+            and c.scy_name like concat('%', #{paramMap.supplierScyName}, '%')
+        </if>
         order by f.create_time desc
 
     </select>

+ 2 - 2
sc-service/src/main/resources/mapper/financeRecord/FinanceRecordMapper.xml

@@ -63,10 +63,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             and r.zfr_status = #{paramMap.zfrStatus}
         </if>
         <if test="paramMap.zfiSupplierId != null  and paramMap.zfiSupplierId != ''">
-            and i.zfi_supplier_id = #{paramMap.zfiSupplierId}
+            and i.zfi_supplier_id = #{paramMap.companyId}
         </if>
         <if test="paramMap.zfiCoreId != null  and paramMap.zfiCoreId != ''">
-            and i.zfi_core_id = #{paramMap.zfiCoreId}
+            and i.zfi_core_id = #{paramMap.companyId}
         </if>
         <if test="paramMap.coreScyName != null  and paramMap.coreScyName != ''">
             and s.scy_name  like concat('%', #{paramMap.coreScyName}, '%')