Преглед изворни кода

新增 股东征信自动生成pdf

Administrator пре 11 месеци
родитељ
комит
5ee28f3b98

+ 12 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/loan/ShareholderFjController.java

@@ -46,6 +46,18 @@ public class ShareholderFjController extends BaseController {
         return getDataTable(list);
     }
 
+    /**
+     * 只查询股东是企业的
+     * @param shareholderFj
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('system:shareholderFj:listNoPage')")
+    @GetMapping("/listNoPage")
+    public AjaxResult listNoPage(ShareholderFj shareholderFj) {
+        List<ShareholderFj> list = shareholderFjService.selectShareholderFjList(shareholderFj);
+        return AjaxResult.success(list);
+    }
+
     /**
      * 导出全体股东附件列表
      */

+ 20 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/loan/LoanApplication.java

@@ -213,6 +213,10 @@ public class LoanApplication extends BaseEntity
     /** 反担保人配偶手机号 */
     @Excel(name = "反担保人配偶手机号")
     private String guaranteeSpousePhone;
+    /** 反担保企业股东名称 */
+    private String guaranteeShareholderName;
+    /** 反担保企业股东身份证 */
+    private String guaranteeShareholderIdCard;
 
     /** 申请人用户ID */
     @Excel(name = "申请人用户ID")
@@ -301,6 +305,22 @@ public class LoanApplication extends BaseEntity
      */
     private Map<String,List<LoanApplicationFj>> otherFj;
 
+    public String getGuaranteeShareholderName() {
+        return guaranteeShareholderName;
+    }
+
+    public void setGuaranteeShareholderName(String guaranteeShareholderName) {
+        this.guaranteeShareholderName = guaranteeShareholderName;
+    }
+
+    public String getGuaranteeShareholderIdCard() {
+        return guaranteeShareholderIdCard;
+    }
+
+    public void setGuaranteeShareholderIdCard(String guaranteeShareholderIdCard) {
+        this.guaranteeShareholderIdCard = guaranteeShareholderIdCard;
+    }
+
     public String getFileType() {
         return fileType;
     }

+ 1 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/loan/IShareholderFjService.java

@@ -29,6 +29,7 @@ public interface IShareholderFjService
      * @return 全体股东附件集合
      */
     public List<ShareholderFj> selectShareholderFjList(ShareholderFj shareholderFj);
+    public List<ShareholderFj> selectShareholderFjListNoPage(ShareholderFj shareholderFj);
 
     /**
      * 新增全体股东附件

+ 13 - 4
ruoyi-system/src/main/java/com/ruoyi/system/service/loan/impl/LoanApplicationServiceImpl.java

@@ -129,17 +129,17 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
      */
     @Override
     public List<LoanApplication> selectLoanApplicationList(LoanApplication loanApplication) {
-        //判断是否是admin或者管理员manager
+/*        //判断是否是admin或者管理员manager
         List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
-        String roleKey = "admin,manager,auditing_risk";
+        String roleKey = "admin,manager,auditing_risk";*/
         List<LoanApplication> loanApplications = new ArrayList<>();
-        for (SysRole role : roles) {
+/*        for (SysRole role : roles) {
             if (roleKey.contains(role.getRoleKey())) {
                 loanApplications = loanApplicationMapper.selectLoanApplicationList(loanApplication);
                 return loanApplications;
             }
         }
-        loanApplication.setUserId(SecurityUtils.getUserId());
+        loanApplication.setUserId(SecurityUtils.getUserId());*/
         loanApplications = loanApplicationMapper.selectLoanApplicationList(loanApplication);
         return loanApplications;
     }
@@ -285,6 +285,8 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
         List<String> sjkgrpozxbg = loanApplicationFjList.stream().filter(e -> "sjkgrpozxbg".equals(e.getType()) && ("png".equals(e.getName().split("\\.")[1]) || "jpg".equals(e.getName().split("\\.")[1]) || "jpeg".equals(e.getName().split("\\.")[1]))).map(LoanApplicationFj::getUrl).collect(Collectors.toList());
         //反担保人个人征信报告
         List<String> fdbrgrzxbg = loanApplicationFjList.stream().filter(e -> "fdbrgrzxbg".equals(e.getType()) && ("png".equals(e.getName().split("\\.")[1]) || "jpg".equals(e.getName().split("\\.")[1]) || "jpeg".equals(e.getName().split("\\.")[1]))).map(LoanApplicationFj::getUrl).collect(Collectors.toList());
+        //反担保企业征信报告
+        List<String> fdbqyzx = loanApplicationFjList.stream().filter(e -> "fdbqyzx".equals(e.getType()) && ("png".equals(e.getName().split("\\.")[1]) || "jpg".equals(e.getName().split("\\.")[1]) || "jpeg".equals(e.getName().split("\\.")[1]))).map(LoanApplicationFj::getUrl).collect(Collectors.toList());
 
         if (gszc.size() > 0) {
             for (int i = 0; i < gszc.size(); i++) {
@@ -336,6 +338,13 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
             }
             createPdfFromImages(loanApplicationFjList, fdbrgrzxbg, loanApplicationNumber, "反担保人个人征信报告_" + Seq.getId(Seq.uploadSeqType), "fdbrgrzxbg");
         }
+        if (fdbqyzx.size() > 0) {
+            for (int i = 0; i < fdbqyzx.size(); i++) {
+                String replaced = fdbqyzx.get(i).replace("/profile/upload", RuoYiConfig.getUploadPath());
+                fdbqyzx.set(i, replaced);
+            }
+            createPdfFromImages(loanApplicationFjList, fdbqyzx, loanApplicationNumber, "反担保企业征信报告_" + Seq.getId(Seq.uploadSeqType), "fdbqyzx");
+        }
         return loanApplicationFjList;
     }
 

+ 11 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/loan/impl/ShareholderFjServiceImpl.java

@@ -1,9 +1,11 @@
 package com.ruoyi.system.service.loan.impl;
 
 import java.util.List;
+import java.util.stream.Collectors;
 
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.system.domain.loan.ShareholderFj;
 import com.ruoyi.system.service.loan.IShareholderFjService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -47,6 +49,15 @@ public class ShareholderFjServiceImpl implements IShareholderFjService
         return shareholderFjMapper.selectShareholderFjList(shareholderFj);
     }
 
+    @Override
+    public List<ShareholderFj> selectShareholderFjListNoPage(ShareholderFj shareholderFj) {
+        List<ShareholderFj> shareholderFjs = shareholderFjMapper.selectShareholderFjList(shareholderFj);
+        if (shareholderFjs != null && shareholderFjs.size() > 0){
+            shareholderFjs = shareholderFjs.stream().filter(e -> StringUtils.isNotEmpty(e.getShareholderBusinessUrl())).collect(Collectors.toList());
+        }
+        return shareholderFjs;
+    }
+
     /**
      * 新增全体股东附件
      * 

+ 9 - 1
ruoyi-system/src/main/resources/mapper/system/LoanApplicationMapper.xml

@@ -53,6 +53,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="guaranteeSpouseName"    column="guarantee_spouse_name"    />
         <result property="guaranteeSpouseIdCard"    column="guarantee_spouse_id_card"    />
         <result property="guaranteeSpousePhone"    column="guarantee_spouse_phone"    />
+        <result property="guaranteeShareholderName"    column="guarantee_shareholder_name"    />
+        <result property="guaranteeShareholderIdCard"    column="guarantee_shareholder_id_card"    />
         <result property="userId"    column="user_id"    />
         <result property="idCard"    column="id_card"    />
         <result property="applicationTime"    column="application_time"    />
@@ -73,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectLoanApplicationVo">
-        select loan_application_id, loan_application_number, application_type,application_amount,enterprise_id, application_bank, usage_period, purpose_funds, repayment_source, enterprise_name, category_type, is_make, is_new, is_small, is_duty, company_introduction, customer_type, corporation_front, corporation_back, corporation_name, corporation_id_card, corporation_phone,corporation_address,corporation_expiration_date, family_population, corporation_job, is_loan, receivable_pay, business_situation, business_efficiency, corporation_marital_status, spouse_front, spouse_back, spouse_name, spouse_id_card, spouse_phone, guarantee_type, guarantee_front, guarantee_back, guarantee_name, guarantee_id_card, guarantee_phone, guarantee_marital_status, guarantee_spouse_front, guarantee_spouse_back, guarantee_spouse_name, guarantee_spouse_id_card, guarantee_spouse_phone, user_id, id_card, application_time, file_time, loan_schedule, audit_schedule, audit_type, loan_application_type, a_user_id, a_user_name, b_user_id, b_user_name, create_by, create_time, update_by, update_time, remark from loan_application
+        select loan_application_id, loan_application_number, application_type,application_amount,enterprise_id,guarantee_shareholder_name,guarantee_shareholder_id_card, application_bank, usage_period, purpose_funds, repayment_source, enterprise_name, category_type, is_make, is_new, is_small, is_duty, company_introduction, customer_type, corporation_front, corporation_back, corporation_name, corporation_id_card, corporation_phone,corporation_address,corporation_expiration_date, family_population, corporation_job, is_loan, receivable_pay, business_situation, business_efficiency, corporation_marital_status, spouse_front, spouse_back, spouse_name, spouse_id_card, spouse_phone, guarantee_type, guarantee_front, guarantee_back, guarantee_name, guarantee_id_card, guarantee_phone, guarantee_marital_status, guarantee_spouse_front, guarantee_spouse_back, guarantee_spouse_name, guarantee_spouse_id_card, guarantee_spouse_phone, user_id, id_card, application_time, file_time, loan_schedule, audit_schedule, audit_type, loan_application_type, a_user_id, a_user_name, b_user_id, b_user_name, create_by, create_time, update_by, update_time, remark from loan_application
     </sql>
 
     <select id="selectLoanApplicationList" parameterType="LoanApplication" resultMap="LoanApplicationResult">
@@ -204,6 +206,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="guaranteeSpouseName != null and guaranteeSpouseName != ''">guarantee_spouse_name,</if>
             <if test="guaranteeSpouseIdCard != null and guaranteeSpouseIdCard != ''">guarantee_spouse_id_card,</if>
             <if test="guaranteeSpousePhone != null and guaranteeSpousePhone != ''">guarantee_spouse_phone,</if>
+            <if test="guaranteeShareholderName != null and guaranteeShareholderName != ''">guarantee_shareholder_name,</if>
+            <if test="guaranteeShareholderIdCard != null and guaranteeShareholderIdCard != ''">guarantee_shareholder_id_card,</if>
             <if test="userId != null">user_id,</if>
             <if test="idCard != null">id_card,</if>
             <if test="applicationTime != null">application_time,</if>
@@ -270,6 +274,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="guaranteeSpouseName != null and guaranteeSpouseName != ''">#{guaranteeSpouseName},</if>
             <if test="guaranteeSpouseIdCard != null and guaranteeSpouseIdCard != ''">#{guaranteeSpouseIdCard},</if>
             <if test="guaranteeSpousePhone != null and guaranteeSpousePhone != ''">#{guaranteeSpousePhone},</if>
+            <if test="guaranteeShareholderName != null and guaranteeShareholderName != ''">#{guaranteeShareholderName},</if>
+            <if test="guaranteeShareholderIdCard != null and guaranteeShareholderIdCard != ''">#{guaranteeShareholderIdCard},</if>
             <if test="userId != null">#{userId},</if>
             <if test="idCard != null">#{idCard},</if>
             <if test="applicationTime != null">#{applicationTime},</if>
@@ -340,6 +346,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="guaranteeSpouseName != null and guaranteeSpouseName != ''">guarantee_spouse_name = #{guaranteeSpouseName},</if>
             <if test="guaranteeSpouseIdCard != null and guaranteeSpouseIdCard != ''">guarantee_spouse_id_card = #{guaranteeSpouseIdCard},</if>
             <if test="guaranteeSpousePhone != null and guaranteeSpousePhone != ''">guarantee_spouse_phone = #{guaranteeSpousePhone},</if>
+            <if test="guaranteeShareholderName != null and guaranteeShareholderName != ''">guarantee_shareholder_name = #{guaranteeShareholderName},</if>
+            <if test="guaranteeShareholderIdCard != null and guaranteeShareholderIdCard != ''">guarantee_shareholder_id_card = #{guaranteeShareholderIdCard},</if>
             <if test="userId != null">user_id = #{userId},</if>
             <if test="idCard != null">id_card = #{idCard},</if>
             <if test="applicationTime != null">application_time = #{applicationTime},</if>