Переглянути джерело

产品,合同过流程bug优化

ch 3 роки тому
батько
коміт
d500f728dd

+ 59 - 20
sc-service/src/main/java/com/huyi/service/contract/controller/ContractControllers.java

@@ -140,16 +140,35 @@ public class ContractControllers extends BaseController {
 
             return AjaxResult.error("请选择资金方");
         }
-        //签署主体
-        String zfcSubject = CommonUtil.objToString(map.get("zfcSubject"));
-        if(CommonUtil.isEmpty(zfcSubject)){
-            return AjaxResult.error("请选择签署主体");
-        }
+//        //签署主体
+//        String zfcSubject = CommonUtil.objToString(map.get("zfcSubject"));
+//        if(CommonUtil.isEmpty(zfcSubject)){
+//            return AjaxResult.error("请选择签署主体");
+//        }
         //签署节点
-        String zfcNode = CommonUtil.objToString(map.get("zfcNode"));
-        if(CommonUtil.isEmpty(zfcNode)){
+        String zfcNode = "";
+        List <Map<String, String>> nodeList = (List<Map<String, String>>) map.get("nodeList");
+        if(nodeList.size() == 0){
             return AjaxResult.error("请选择签署节点");
         }
+        //盖章关键字
+        String zfcSignKeyword = "";
+        for(int i = 0 ; i < nodeList.size();i++){
+            Map<String,String> node = nodeList.get(i);
+            String getNode = node.get("zfcCode");
+            String getSignKeyword = node.get("zfcSignKeyword");
+            if(CommonUtil.isEmpty(getSignKeyword)){
+                return AjaxResult.error("请输入盖章关键字");
+            }
+            //判断是否为最后一个
+            if(i == nodeList.size() - 1){
+                zfcNode += getNode;
+                zfcSignKeyword += getSignKeyword;
+            }else{
+                zfcNode += getNode +",";
+                zfcSignKeyword += getSignKeyword + ",";
+            }
+        }
         //合同描述
         String zfcDesc = CommonUtil.objToString(map.get("zfcDesc"));
         //合同状态
@@ -173,10 +192,10 @@ public class ContractControllers extends BaseController {
                 }
             }
         }
-        //截取符合要求的附件url
-        if (CommonUtil.isNotEmpty(zfcFile)) {
-            zfcFile = zfcFile.substring(0,zfcFile.indexOf("getBytes/")+41);
-        }
+//        //截取符合要求的附件url
+//        if (CommonUtil.isNotEmpty(zfcFile)) {
+//            zfcFile = zfcFile.substring(0,zfcFile.indexOf("getBytes/")+41);
+//        }
         //主键
         String zfcId = IdUtils.fastUUID();
         //新增合同信息
@@ -184,9 +203,10 @@ public class ContractControllers extends BaseController {
         zcFinanceContract.setZfcId(zfcId);
         zcFinanceContract.setZfcName(zfcName);
         zcFinanceContract.setZfcType(zfcType);
-        zcFinanceContract.setZfcSubject(zfcSubject);
+//        zcFinanceContract.setZfcSubject(zfcSubject);
         zcFinanceContract.setZfcManagementId(zfcManagementId);
         zcFinanceContract.setZfcNode(zfcNode);
+        zcFinanceContract.setZfcSignKeyword(zfcSignKeyword);
         zcFinanceContract.setZfcDesc(zfcDesc);
         zcFinanceContract.setZfcStatus(zfcStatus);
         zcFinanceContract.setZfcFile(zfcFileId);
@@ -220,16 +240,35 @@ public class ContractControllers extends BaseController {
         if(CommonUtil.isEmpty(zfcManagementId)){
             return AjaxResult.error("请选择资金方");
         }
-        //签署主体
-        String zfcSubject = CommonUtil.objToString(map.get("zfcSubject"));
-        if(CommonUtil.isEmpty(zfcSubject)){
-            return AjaxResult.error("请选择签署主体");
-        }
+//        //签署主体
+//        String zfcSubject = CommonUtil.objToString(map.get("zfcSubject"));
+//        if(CommonUtil.isEmpty(zfcSubject)){
+//            return AjaxResult.error("请选择签署主体");
+//        }
         //签署节点
-        String zfcNode = CommonUtil.objToString(map.get("zfcNode"));
-        if(CommonUtil.isEmpty(zfcNode)){
+        String zfcNode = "";
+        List <Map<String, String>> nodeList = (List<Map<String, String>>) map.get("nodeList");
+        if(nodeList.size() == 0){
             return AjaxResult.error("请选择签署节点");
         }
+        //盖章关键字
+        String zfcSignKeyword = "";
+        for(int i = 0 ; i < nodeList.size();i++){
+            Map<String,String> node = nodeList.get(i);
+            String getNode = node.get("zfcCode");
+            String getSignKeyword = node.get("zfcSignKeyword");
+            if(CommonUtil.isEmpty(getSignKeyword)){
+                return AjaxResult.error("请输入盖章关键字");
+            }
+            //判断是否为最后一个
+            if(i == nodeList.size() - 1){
+                zfcNode += getNode;
+                zfcSignKeyword += getSignKeyword;
+            }else{
+                zfcNode += getNode +",";
+                zfcSignKeyword += getSignKeyword + ",";
+            }
+        }
         //合同描述
         String zfcDesc = CommonUtil.objToString(map.get("zfcDesc"));
         //合同状态
@@ -264,9 +303,9 @@ public class ContractControllers extends BaseController {
         zcFinanceContract.setZfcId(zfcId);
         zcFinanceContract.setZfcName(zfcName);
         zcFinanceContract.setZfcType(zfcType);
-        zcFinanceContract.setZfcSubject(zfcSubject);
         zcFinanceContract.setZfcManagementId(zfcManagementId);
         zcFinanceContract.setZfcNode(zfcNode);
+        zcFinanceContract.setZfcSignKeyword(zfcSignKeyword);
         zcFinanceContract.setZfcDesc(zfcDesc);
         zcFinanceContract.setZfcStatus(zfcStatus);
         zcFinanceContract.setZfcFile(zfcFileId);

+ 10 - 11
sc-service/src/main/java/com/huyi/service/financeProduct/controller/FinanceProductControllers.java

@@ -11,12 +11,10 @@ import com.huyi.service.base.service.IZcFinanceProComRelService;
 import com.huyi.service.base.service.IZcFinanceProConRelService;
 import com.huyi.service.base.service.IZcFinanceProductService;
 import com.huyi.service.financeProduct.service.IOwnFinanceProductService;
-import com.keao.tianhu.core.entity.R;
 import com.keao.tianhu.starter.mybatis.plus.entity.QueryRequest;
 import com.tianhu.common.core.utils.CommonUtil;
 import com.tianhu.common.core.utils.DateUtils;
 import com.tianhu.common.core.utils.IdUtils;
-import com.tianhu.common.core.utils.StringUtils;
 import com.tianhu.common.core.web.controller.BaseController;
 import com.tianhu.common.core.web.domain.AjaxResult;
 import com.tianhu.common.log.annotation.Log;
@@ -25,13 +23,14 @@ import com.tianhu.common.security.annotation.PreAuthorize;
 import com.tianhu.common.security.service.TokenService;
 import com.tianhu.system.api.domain.SysUser;
 import com.tianhu.system.api.model.LoginUser;
-import org.checkerframework.checker.units.qual.C;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
-import java.text.SimpleDateFormat;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 融资产品controller
@@ -236,16 +235,16 @@ public class FinanceProductControllers extends BaseController {
         }
         zfpNumber += createTime;
         //合同信息
-        List<Map<String, String>> tableData = (List<Map<String, String>>) map.get("contractList");
-//        if (tableData.size() == 0 ){
-//            return AjaxResult.error("请选择合同");
-//        }
+        List<Map<String, String>> tableData = (List<Map<String, String>>) map.get("contractList1");
+        if (tableData.size() == 0 ){
+            return AjaxResult.error("请选择合同");
+        }
         //新增融资产品合同关联表
         for (int i = 0; i < tableData.size(); i++) {
             String zfcId = tableData.get(i).get("zfcId");
             ZcFinanceProConRel zcFinanceProConRel = new ZcFinanceProConRel();
             zcFinanceProConRel.setZfpcrProductId(zfpId);
-            zcFinanceProConRel.setZfpcrProductId(zfcId);
+            zcFinanceProConRel.setZfpcrContractId(zfcId);
             zcFinanceProConRelService.createZcFinanceProConRel(zcFinanceProConRel);
         }
         //新增融资产品字段
@@ -410,7 +409,7 @@ public class FinanceProductControllers extends BaseController {
             String zfcId = tableData.get(i).get("zfcId");
             ZcFinanceProConRel zcFinanceProConRel = new ZcFinanceProConRel();
             zcFinanceProConRel.setZfpcrProductId(zfpId);
-            zcFinanceProConRel.setZfpcrProductId(zfcId);
+            zcFinanceProConRel.setZfpcrContractId(zfcId);
             zcFinanceProConRelService.createZcFinanceProConRel(zcFinanceProConRel);
         }
         ZcFinanceProduct zcFinanceProduct = new ZcFinanceProduct();

+ 1 - 0
sc-service/src/main/resources/mapper/contract/OwnContractMapper.xml

@@ -10,6 +10,7 @@
             z.zfc_management_id 'zfcManagementId',
             z.zfc_subject 'zfcSubject',
             z.zfc_node 'zfcNode',
+            z.zfc_sign_keyword 'zfcSignKeyword',
             z.zfc_desc 'zfcDesc',
             z.zfc_file 'zfcFile',
             z.zfc_status 'zfcStatus',

+ 1 - 0
sc-service/src/main/resources/mapper/credit/OwnCreditMapper.xml

@@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 DATE_FORMAT(f.zfi_sign_date,'%Y-%m-%d')         'zfiSignDate',
                 DATE_FORMAT(f.zfi_expire_date,'%Y-%m-%d')       'zfiExpireDate',
                 f.zfi_status                                    'zfiStatus',
+                f.zfi_supplier_status                           'zfiSupplierStatus',
                 y.scy_name                                      'receiveName',
                 s.scy_name                                      'openName',
                 p.zfp_name                                      'zfpName',

+ 3 - 3
sc-service/src/main/resources/mapper/repayment/OwnRepaymentMapper.xml

@@ -11,7 +11,7 @@
             r.zfr_loan_amount 'zfrLoanAmount',
             pcr.zfpcr_account 'zfpcrAccount',
             date_format(r.zfr_pay_date,'%Y-%m-%d') 'zfrPayDate',
-            date_format(r.zfr_repayment_date,'%Y-%m-%d')  'zfrRepaymentDate',
+            date_format(i.zfi_expire_date,'%Y-%m-%d')  'zfrRepaymentDate',
             r.zfr_apply_status 'zfrApplyStatus',
             s.scy_name 'scyName',
             y.scy_name 'core',
@@ -47,7 +47,7 @@
                 and r.zfr_number LIKE concat('%', #{paramMap.zfrNumber}, '%')
             </if>
             <if test="paramMap.end != null  and paramMap.end != ''">
-                and r.zfr_repayment_date between
+                and i.zfi_expire_date between
                     #{paramMap.start} and #{paramMap.end}
             </if>
             order by r.create_time desc
@@ -89,7 +89,7 @@
         r.zfr_loan_amount 'zfrLoanAmount',
         pcr.zfpcr_account 'zfpcrAccount',
         date_format(r.zfr_pay_date,'%Y-%m-%d') 'zfrPayDate',
-        date_format(r.zfr_repayment_date,'%Y-%m-%d')  'zfrRepaymentDate',
+        date_format(i.zfi_expire_date,'%Y-%m-%d')  'zfrRepaymentDate',
         r.zfr_apply_status 'zfrApplyStatus',
         s.scy_name 'scyName',
         y.scy_name 'core',