LIVE_YE vor 11 Monaten
Ursprung
Commit
8d09ef5aab

+ 2 - 0
ruoyi-admin/src/main/resources/application-druid.yml

@@ -14,6 +14,8 @@ ruoyi:
     addressEnabled: false
     # 验证码类型 math 数组计算 char 字符验证
     captchaType: math
+    # 当前环境
+    active: druid
 # 开发环境配置
 server:
     # 服务器的HTTP端口,默认为8080

+ 2 - 0
ruoyi-admin/src/main/resources/application-prod.yml

@@ -14,6 +14,8 @@ ruoyi:
     addressEnabled: false
     # 验证码类型 math 数组计算 char 字符验证
     captchaType: math
+    # 当前环境
+    active: prod
 
 # 开发环境配置
 server:

+ 1 - 1
ruoyi-admin/src/main/resources/application.yml

@@ -20,7 +20,7 @@ spring:
     basename: i18n/messages
   profiles:
     active: druid
-#    active: prod
+    #active: prod
   # 文件上传
   servlet:
     multipart:

+ 11 - 0
ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java

@@ -30,6 +30,9 @@ public class RuoYiConfig
     /** 验证码类型 */
     private static String captchaType;
 
+    /** 当前环境 */
+    private static String active;
+
     public String getName()
     {
         return name;
@@ -88,6 +91,14 @@ public class RuoYiConfig
         RuoYiConfig.captchaType = captchaType;
     }
 
+    public static String getActive() {
+        return active;
+    }
+
+    public static void setActive(String active) {
+        RuoYiConfig.active = active;
+    }
+
     /**
      * 获取导入上传路径
      */

+ 13 - 3
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/LoanApplicationServiceImpl.java

@@ -197,7 +197,14 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
         if (!bl) {
             loanApplication.setUserId(user.getUserId());
         }
-        List<LoanApplication> loanApplications = loanApplicationMapper.conferenceList(loanApplication);
+        List<LoanApplication> loanApplications = new ArrayList<>();
+        if("druid".equals(RuoYiConfig.getActive())){
+            loanApplications = loanApplicationMapper.conferenceList(loanApplication);
+        }else{
+            loanApplications = loanApplicationMapper.conferenceProdList(loanApplication);
+        }
+
+
         for (LoanApplication application : loanApplications) {
             application.setVotingResult(FOR);
             if (redisCache.getCacheObject(application.getLoanApplicationNumber() + "tp") != null) {
@@ -420,7 +427,7 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
                 }
             }
             //需要删除附件表数据
-            if (loanApplicationFjIdList.length > 0) {
+            if (loanApplicationFjIdList!=null && loanApplicationFjIdList.length > 0) {
                 loanApplicationFjMapper.deleteLoanApplicationFjByFjIds(loanApplicationFjIdList);
             }
 
@@ -433,7 +440,7 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
                 AsyncManager.me().execute(AsyncFactory.createPdfFromImagesShareholder(shareholderFjList, loanApplication.getLoanApplicationNumber()));
             }
             //需要删除股东附件表数据
-            if (shareholderFjIdList.length > 0) {
+            if (shareholderFjIdList!=null && shareholderFjIdList.length > 0) {
                 shareholderFjMapper.deleteShareholderFjByShareholderFjIds(shareholderFjIdList);
             }
 
@@ -1589,6 +1596,9 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
                 path = path + "/" + fileName + ".docx";
                 break;
             case "11":
+                //判断有多少公司  股东、反担保人
+
+
                 //params.put("enterpriseName", loanApplication.getEnterpriseName());
                 //path = path + "/委托担保申请书.doc";
                 templatePath = RuoYiConfig.getProfile() + "/mb/股东会决议.docx";

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/LoanApplicationMapper.java

@@ -69,4 +69,6 @@ public interface LoanApplicationMapper
     public int deleteLoanApplicationByLoanApplicationIds(Long[] loanApplicationIds);
 
     List<LoanApplication> conferenceList(LoanApplication loanApplication);
+
+    List<LoanApplication> conferenceProdList(LoanApplication loanApplication);
 }

+ 7 - 3
ruoyi-system/src/main/java/com/ruoyi/system/service/conference/impl/SysUserConferenceServiceImpl.java

@@ -176,6 +176,10 @@ public class SysUserConferenceServiceImpl implements ISysUserConferenceService {
     @Override
     public AjaxResult timeTist(SysUserConference sysUserConference) {
         List<SysUserConference> sysUserConferences = sysUserConferenceMapper.selectSysUserConferenceList(sysUserConference);
+        List<Map<String,Object>> listMap = new ArrayList<>();
+        if(sysUserConferences==null || sysUserConferences.size()<=0){
+            return AjaxResult.success(listMap);
+        }
         Map<String,List<SysUserConference>> map = sysUserConferences.stream().collect(Collectors.groupingBy(SysUserConference::getConferenceTime));
 
         //根据时间进行升序排序
@@ -183,14 +187,13 @@ public class SysUserConferenceServiceImpl implements ISysUserConferenceService {
         map.entrySet().stream().sorted(Collections.reverseOrder(Map.Entry.comparingByKey())).forEachOrdered(x -> result.put(x.getKey(), x.getValue()));
 
 
-        List<Map<String,Object>> listMap = new ArrayList<>();
+
         for (Map.Entry<String, List<SysUserConference>> entry : result.entrySet()) {
             Map<String,Object> resultMap = new HashMap<>();
             resultMap.put("conferenceTime",entry.getKey());
             resultMap.put("children",entry.getValue());
             listMap.add(resultMap);
         }
-
         return AjaxResult.success(listMap);
     }
 
@@ -250,6 +253,7 @@ public class SysUserConferenceServiceImpl implements ISysUserConferenceService {
             }
 
         }
+        redisCache.setCacheObject(sysUserConference.getLoanApplicationNumber()+"tp",TWO);
         if(bty>=2){
             //修改主表信息 未通过
             LoanApplication loanApplication = new LoanApplication();
@@ -294,7 +298,7 @@ public class SysUserConferenceServiceImpl implements ISysUserConferenceService {
             redisCache.setCacheObject(sysUserConference.getLoanApplicationNumber()+"tp",THR);
             return AjaxResult.success("成功,投票金额不同,请通知管理员重新发起投票");
         }
-        redisCache.setCacheObject(sysUserConference.getLoanApplicationNumber()+"tp",TWO);
+
         if(bty<2){
             //修改主表信息 通过
             LoanApplication loanApplication = new LoanApplication();

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

@@ -168,7 +168,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where loan_application_id = #{loanApplicationId}
     </select>
 
-   <!-- <select id="conferenceList" parameterType="LoanApplication" resultMap="LoanApplicationResult">
+    <select id="conferenceProdList" parameterType="LoanApplication" resultMap="LoanApplicationResult">
         SELECT
         l.loan_application_id, l.loan_application_number, l.application_type,l.application_amount,l.enterprise_id,l.guarantee_shareholder_name,l.guarantee_shareholder_id_card, l.application_bank, l.usage_period, l.purpose_funds, l.repayment_source, l.enterprise_name, l.category_type, l.is_make, l.is_new, l.is_small,
         l.is_duty, l.company_introduction, l.customer_type, l.corporation_front, l.corporation_back, l.corporation_name, l.corporation_id_card, l.corporation_phone,l.corporation_address,l.corporation_expiration_date, l.family_population, l.corporation_job, l.is_loan, l.receivable_pay, l.business_situation, l.business_efficiency,
@@ -178,13 +178,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         from sys_user_conference s
         LEFT JOIN loan_application l on l.loan_application_id = s.loan_application_id
         where l.loan_application_id is not null
-        <if test="userId != null "> and s.user_id = #{userId} = #{userId}</if>
+        <if test="userId != null "> and s.user_id = #{userId} </if>
         <if test="enterpriseName != null  and enterpriseName != ''"> and l.enterprise_name like concat('%', #{enterpriseName}, '%')</if>
         <if test="applicationAmount != null "> and l.application_amount = #{applicationAmount}</if>
         <if test="reviewTime != null "> and l.review_time = #{reviewTime}</if>
         GROUP BY l.loan_application_id
-        ORDER BY review_time desc
-    </select>-->
+        ORDER BY l.review_time desc
+    </select>
 
     <select id="conferenceList" parameterType="LoanApplication" resultMap="LoanApplicationResult">
         SELECT