瀏覽代碼

新增审核/撤销/归档/申诉等接口

Administrator 1 年之前
父節點
當前提交
c5438b67c5
共有 18 個文件被更改,包括 1093 次插入133 次删除
  1. 105 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/conference/SysUserConferenceController.java
  2. 28 2
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/loan/LoanApplicationController.java
  3. 13 20
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/review/ReviewCommentsController.java
  4. 140 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/conference/SysUserConference.java
  5. 20 24
      ruoyi-system/src/main/java/com/ruoyi/system/domain/loan/LoanApplication.java
  6. 77 13
      ruoyi-system/src/main/java/com/ruoyi/system/domain/review/ReviewComments.java
  7. 6 2
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/LoanApplicationFjMapper.java
  8. 70 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserConferenceMapper.java
  9. 62 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/conference/ISysUserConferenceService.java
  10. 96 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/conference/impl/SysUserConferenceServiceImpl.java
  11. 21 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/loan/ILoanApplicationService.java
  12. 213 7
      ruoyi-system/src/main/java/com/ruoyi/system/service/loan/impl/LoanApplicationServiceImpl.java
  13. 3 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/loan/impl/LoanScheduleServiceImpl.java
  14. 51 23
      ruoyi-system/src/main/java/com/ruoyi/system/service/review/impl/ReviewCommentsServiceImpl.java
  15. 66 34
      ruoyi-system/src/main/resources/mapper/system/LoanApplicationFjMapper.xml
  16. 7 5
      ruoyi-system/src/main/resources/mapper/system/LoanApplicationMapper.xml
  17. 2 2
      ruoyi-system/src/main/resources/mapper/system/ReviewCommentsMapper.xml
  18. 113 0
      ruoyi-system/src/main/resources/mapper/system/SysUserConferenceMapper.xml

+ 105 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/conference/SysUserConferenceController.java

@@ -0,0 +1,105 @@
+package com.ruoyi.web.controller.conference;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.system.domain.conference.SysUserConference;
+import com.ruoyi.system.service.conference.ISysUserConferenceService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 参会人员Controller
+ *
+ * @author boman
+ * @date 2024-05-06
+ */
+@RestController
+@RequestMapping("/conference")
+public class SysUserConferenceController extends BaseController
+{
+    @Autowired
+    private ISysUserConferenceService sysUserConferenceService;
+
+/**
+ * 查询参会人员列表
+ */
+@PreAuthorize("@ss.hasPermi(' c:conference:list')")
+@GetMapping("/list")
+    public TableDataInfo list(SysUserConference sysUserConference)
+    {
+        startPage();
+        List<SysUserConference> list = sysUserConferenceService.selectSysUserConferenceList(sysUserConference);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出参会人员列表
+     */
+    @PreAuthorize("@ss.hasPermi(' c:conference:export')")
+    @Log(title = "参会人员", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysUserConference sysUserConference)
+    {
+        List<SysUserConference> list = sysUserConferenceService.selectSysUserConferenceList(sysUserConference);
+        ExcelUtil<SysUserConference> util = new ExcelUtil<SysUserConference>(SysUserConference.class);
+        util.exportExcel(response, list, "参会人员数据");
+    }
+
+    /**
+     * 获取参会人员详细信息
+     */
+    @PreAuthorize("@ss.hasPermi(' c:conference:query')")
+    @GetMapping(value = "/{conferenceId}")
+    public AjaxResult getInfo(@PathVariable("conferenceId") Long conferenceId)
+    {
+        return success(sysUserConferenceService.selectSysUserConferenceByConferenceId(conferenceId));
+    }
+
+    /**
+     * 新增参会人员
+     */
+    @PreAuthorize("@ss.hasPermi(' c:conference:add')")
+    @Log(title = "参会人员", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody SysUserConference sysUserConference)
+    {
+        return toAjax(sysUserConferenceService.insertSysUserConference(sysUserConference));
+    }
+
+    /**
+     * 修改参会人员
+     */
+    @PreAuthorize("@ss.hasPermi(' c:conference:edit')")
+    @Log(title = "参会人员", businessType = BusinessType.UPDATE)
+    @PostMapping("/put")
+    public AjaxResult edit(@RequestBody SysUserConference sysUserConference)
+    {
+        return toAjax(sysUserConferenceService.updateSysUserConference(sysUserConference));
+    }
+
+    /**
+     * 删除参会人员
+     */
+    @PreAuthorize("@ss.hasPermi(' c:conference:remove')")
+    @Log(title = "参会人员", businessType = BusinessType.DELETE)
+    @GetMapping("/delete/{conferenceIds}")
+    public AjaxResult remove(@PathVariable Long[] conferenceIds)
+    {
+        return toAjax(sysUserConferenceService.deleteSysUserConferenceByConferenceIds(conferenceIds));
+    }
+}

+ 28 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/loan/LoanApplicationController.java

@@ -116,13 +116,39 @@ public class LoanApplicationController extends BaseController {
     public AjaxResult temporary(@RequestBody LoanApplication loanApplication) {
         return toAjax(loanApplicationService.temporary(loanApplication));
     }
-    //审核
-
+    /**
+     * 审核
+     */
     @PreAuthorize("@ss.hasPermi('system:application:sh')")
     @PostMapping("/sh")
     public AjaxResult sh(@RequestBody ReviewComments reviewComments) {
         return loanApplicationService.sh(reviewComments);
     }
+    /**
+     * 申诉
+     */
+    @PreAuthorize("@ss.hasPermi('system:application:ss')")
+    @PostMapping("/ss")
+    public AjaxResult ss(@RequestBody LoanApplication loanApplication) {
+        return loanApplicationService.ss(loanApplication);
+    }
+    /**
+     * 撤销
+     */
+    @PreAuthorize("@ss.hasPermi('system:application:cx')")
+    @PostMapping("/cx")
+    public AjaxResult cx(@RequestBody LoanApplication loanApplication) {
+        return loanApplicationService.cx(loanApplication);
+    }
+
+    /**
+     * 归档
+     */
+    @PreAuthorize("@ss.hasPermi('system:application:gd')")
+    @PostMapping("/gd")
+    public AjaxResult gd(@RequestBody LoanApplication loanApplication) {
+        return loanApplicationService.gd(loanApplication);
+    }
 
     /**
      * 导出模板附件

+ 13 - 20
ruoyi-admin/src/main/java/com/ruoyi/web/controller/review/ReviewCommentsController.java

@@ -27,19 +27,17 @@ import com.ruoyi.common.core.page.TableDataInfo;
  * @date 2024-04-24
  */
 @RestController
-@RequestMapping("/system/comments")
-public class ReviewCommentsController extends BaseController
-{
+@RequestMapping("/comments")
+public class ReviewCommentsController extends BaseController {
     @Autowired
     private IReviewCommentsService reviewCommentsService;
 
-/**
- * 查询业务审核意见列表
- */
-@PreAuthorize("@ss.hasPermi('system:comments:list')")
-@GetMapping("/list")
-    public TableDataInfo list(ReviewComments reviewComments)
-    {
+    /**
+     * 查询业务审核意见列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:comments:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(ReviewComments reviewComments) {
         startPage();
         List<ReviewComments> list = reviewCommentsService.selectReviewCommentsList(reviewComments);
         return getDataTable(list);
@@ -51,8 +49,7 @@ public class ReviewCommentsController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:comments:export')")
     @Log(title = "业务审核意见", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, ReviewComments reviewComments)
-    {
+    public void export(HttpServletResponse response, ReviewComments reviewComments) {
         List<ReviewComments> list = reviewCommentsService.selectReviewCommentsList(reviewComments);
         ExcelUtil<ReviewComments> util = new ExcelUtil<ReviewComments>(ReviewComments.class);
         util.exportExcel(response, list, "业务审核意见数据");
@@ -63,8 +60,7 @@ public class ReviewCommentsController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:comments:query')")
     @GetMapping(value = "/{reviewCommentsId}")
-    public AjaxResult getInfo(@PathVariable("reviewCommentsId") Long reviewCommentsId)
-    {
+    public AjaxResult getInfo(@PathVariable("reviewCommentsId") Long reviewCommentsId) {
         return success(reviewCommentsService.selectReviewCommentsByReviewCommentsId(reviewCommentsId));
     }
 
@@ -74,8 +70,7 @@ public class ReviewCommentsController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:comments:add')")
     @Log(title = "业务审核意见", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody ReviewComments reviewComments)
-    {
+    public AjaxResult add(@RequestBody ReviewComments reviewComments) {
         return toAjax(reviewCommentsService.insertReviewComments(reviewComments));
     }
 
@@ -85,8 +80,7 @@ public class ReviewCommentsController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:comments:edit')")
     @Log(title = "业务审核意见", businessType = BusinessType.UPDATE)
     @PostMapping("/put")
-    public AjaxResult edit(@RequestBody ReviewComments reviewComments)
-    {
+    public AjaxResult edit(@RequestBody ReviewComments reviewComments) {
         return toAjax(reviewCommentsService.updateReviewComments(reviewComments));
     }
 
@@ -96,8 +90,7 @@ public class ReviewCommentsController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:comments:remove')")
     @Log(title = "业务审核意见", businessType = BusinessType.DELETE)
     @GetMapping("/delete/{reviewCommentsIds}")
-    public AjaxResult remove(@PathVariable Long[] reviewCommentsIds)
-    {
+    public AjaxResult remove(@PathVariable Long[] reviewCommentsIds) {
         return toAjax(reviewCommentsService.deleteReviewCommentsByReviewCommentsIds(reviewCommentsIds));
     }
 }

+ 140 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/conference/SysUserConference.java

@@ -0,0 +1,140 @@
+package com.ruoyi.system.domain.conference;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 参会人员对象 sys_user_conference
+ * 
+ * @author boman
+ * @date 2024-05-06
+ */
+public class SysUserConference extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 参会人员表id */
+    private Long conferenceId;
+
+    /** 用户ID */
+    @Excel(name = "用户ID")
+    private Long userId;
+
+    /** 身份证号码 */
+    @Excel(name = "身份证号码")
+    private String idCard;
+
+    /** 真实姓名 */
+    @Excel(name = "真实姓名")
+    private String realName;
+
+    /** 贷款申请id */
+    @Excel(name = "贷款申请id")
+    private Long loanApplicationId;
+
+    /** 贷款申请编号 */
+    @Excel(name = "贷款申请编号")
+    private String loanApplicationNumber;
+
+    /** 是否参会 N:否 Y:是 */
+    @Excel(name = "是否参会 N:否 Y:是")
+    private String isConference;
+
+    /** 原因 */
+    @Excel(name = "原因")
+    private String reason;
+
+    public void setConferenceId(Long conferenceId) 
+    {
+        this.conferenceId = conferenceId;
+    }
+
+    public Long getConferenceId() 
+    {
+        return conferenceId;
+    }
+    public void setUserId(Long userId) 
+    {
+        this.userId = userId;
+    }
+
+    public Long getUserId() 
+    {
+        return userId;
+    }
+    public void setIdCard(String idCard) 
+    {
+        this.idCard = idCard;
+    }
+
+    public String getIdCard() 
+    {
+        return idCard;
+    }
+    public void setRealName(String realName) 
+    {
+        this.realName = realName;
+    }
+
+    public String getRealName() 
+    {
+        return realName;
+    }
+    public void setLoanApplicationId(Long loanApplicationId) 
+    {
+        this.loanApplicationId = loanApplicationId;
+    }
+
+    public Long getLoanApplicationId() 
+    {
+        return loanApplicationId;
+    }
+    public void setLoanApplicationNumber(String loanApplicationNumber) 
+    {
+        this.loanApplicationNumber = loanApplicationNumber;
+    }
+
+    public String getLoanApplicationNumber() 
+    {
+        return loanApplicationNumber;
+    }
+    public void setIsConference(String isConference) 
+    {
+        this.isConference = isConference;
+    }
+
+    public String getIsConference() 
+    {
+        return isConference;
+    }
+    public void setReason(String reason) 
+    {
+        this.reason = reason;
+    }
+
+    public String getReason() 
+    {
+        return reason;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("conferenceId", getConferenceId())
+            .append("userId", getUserId())
+            .append("idCard", getIdCard())
+            .append("realName", getRealName())
+            .append("loanApplicationId", getLoanApplicationId())
+            .append("loanApplicationNumber", getLoanApplicationNumber())
+            .append("isConference", getIsConference())
+            .append("reason", getReason())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

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

@@ -232,19 +232,19 @@ public class LoanApplication extends BaseEntity
     @Excel(name = "归档时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date fileTime;
 
-    /** 贷款申请进度(业务进度表查询进度列表):1:申报提交
+    /** 贷款申请进度(业务进度表查询进度列表):
      2:业务审核/分配 3:担保初审 4:尽职调查 5:初审风险合规 6:评审会 7:合同签约 8:放款合规风险审核 9:放款通知 10:归档 */
     @Excel(name = "贷款申请进度(业务进度表查询进度列表):")
     private String loanSchedule;
     /** 贷款申请进度名称(中文字) */
     private String loanScheduleName;
 
-    /** 审核进度1:担保初审 2:A角色审核 3:B角色审核 4:风险审核 5:尽职调查 6:上会评审 */
-    @Excel(name = "审核进度1:担保初审 2:A角色审核 3:B角色审核 4:风险审核 5:尽职调查 6:上会评审")
+    /** 审核进度1:业务审核/分配 2:A角色审核 3:B角色审核 4:风险审核 5:尽职调查 6:初审风险合规 7:上会评审 */
+    @Excel(name = "审核进度1:业务审核/分配 2:A角色审核 3:B角色审核 4:风险审核 5:尽职调查 6:初审风险合规 7:上会评审")
     private String auditSchedule;
 
-    /** 审核状态 1:待审核 2:已通过 3:未通过 */
-    @Excel(name = "审核状态 1:待审核 2:已通过 3:未通过")
+    /** 审核状态 1:待审核 2:已通过 3:未通过 4:申诉*/
+    @Excel(name = "审核状态 1:待审核 2:已通过 3:未通过 4:申诉")
     private String auditType;
 
     /** 贷款申请状态 1:暂存 2:正常 3:回收站 4:归档 */
@@ -257,7 +257,7 @@ public class LoanApplication extends BaseEntity
 
     /** A角色用户名称 */
     @Excel(name = "A角色用户名称")
-    private Long aUserName;
+    private String aUserName;
 
     /** B角色用户ID */
     @Excel(name = "B角色用户ID")
@@ -265,7 +265,7 @@ public class LoanApplication extends BaseEntity
 
     /** B角色用户名称 */
     @Excel(name = "B角色用户名称")
-    private Long bUserName;
+    private String bUserName;
 
     private String type;
     /**
@@ -296,6 +296,7 @@ public class LoanApplication extends BaseEntity
      */
     private Map<String,List<LoanApplicationFj>> otherFj;
 
+
     public String getType() {
         return type;
     }
@@ -878,33 +879,28 @@ public class LoanApplication extends BaseEntity
     {
         return aUserId;
     }
-    public void setaUserName(Long aUserName) 
-    {
-        this.aUserName = aUserName;
-    }
 
-    public Long getaUserName() 
-    {
+    public String getaUserName() {
         return aUserName;
     }
-    public void setbUserId(Long bUserId) 
-    {
-        this.bUserId = bUserId;
+
+    public void setaUserName(String aUserName) {
+        this.aUserName = aUserName;
     }
 
-    public Long getbUserId() 
-    {
+    public Long getbUserId() {
         return bUserId;
     }
-    public void setbUserName(Long bUserName) 
-    {
-        this.bUserName = bUserName;
+
+    public void setbUserId(Long bUserId) {
+        this.bUserId = bUserId;
     }
 
-    public Long getbUserName() 
-    {
+    public String getbUserName() {
         return bUserName;
     }
 
-
+    public void setbUserName(String bUserName) {
+        this.bUserName = bUserName;
+    }
 }

+ 77 - 13
ruoyi-system/src/main/java/com/ruoyi/system/domain/review/ReviewComments.java

@@ -1,7 +1,11 @@
 package com.ruoyi.system.domain.review;
 
 import java.util.Date;
+import java.util.List;
+
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.system.domain.conference.SysUserConference;
+import com.ruoyi.system.domain.loan.LoanApplicationFj;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
@@ -28,12 +32,12 @@ public class ReviewComments extends BaseEntity
     @Excel(name = "贷款申请编号")
     private String loanApplicationNumber;
 
-    /** 审核进度1:担保初审 2:A角色审核 3:B角色审核 4:风险审核 5:尽职调查 6:上会评审 */
-    @Excel(name = "审核进度1:担保初审 2:A角色审核 3:B角色审核 4:风险审核 5:尽职调查 6:上会评审")
+    /** 审核进度1:业务审核/分配 2:A角色审核 3:B角色审核 4:风险审核 5:尽职调查 6:上会评审 */
+    @Excel(name = "审核进度1:业务审核/分配 2:A角色审核 3:B角色审核 4:风险审核 5:尽职调查 6:上会评审")
     private String auditSchedule;
 
-    /** 审核状态 1:待审核 2:已通过 3:未通过 */
-    @Excel(name = "审核状态 1:待审核 2:已通过 3:未通过")
+    /** 审核状态 1:待审核 2:已通过 3:未通过  4:申诉*/
+    @Excel(name = "审核状态 1:待审核 2:已通过 3:未通过 4:申诉")
     private String auditType;
 
     /** 审核意见 */
@@ -47,13 +51,73 @@ public class ReviewComments extends BaseEntity
 
     /** 审核意见附件URL */
     @Excel(name = "审核意见附件URL")
-    private String fjUrl;
+    private  List<LoanApplicationFj> fjUrl;
 
     /** 审核意见图片多张使用逗号分隔 */
     @Excel(name = "审核意见图片多张使用逗号分隔")
     private String imageUrl;
+    /**
+     * 参会人员集合
+     */
+    private List<SysUserConference> sysUserConferenceList;
+
+    /** A角色用户ID */
+    @Excel(name = "A角色用户ID")
+    private Long aUserId;
+
+    /** A角色用户名称 */
+    @Excel(name = "A角色用户名称")
+    private String aUserName;
+
+    /** B角色用户ID */
+    @Excel(name = "B角色用户ID")
+    private Long bUserId;
+
+    /** B角色用户名称 */
+    @Excel(name = "B角色用户名称")
+    private String bUserName;
+
+    public Long getaUserId() {
+        return aUserId;
+    }
+
+    public void setaUserId(Long aUserId) {
+        this.aUserId = aUserId;
+    }
+
+    public String getaUserName() {
+        return aUserName;
+    }
+
+    public void setaUserName(String aUserName) {
+        this.aUserName = aUserName;
+    }
+
+    public Long getbUserId() {
+        return bUserId;
+    }
+
+    public void setbUserId(Long bUserId) {
+        this.bUserId = bUserId;
+    }
 
-    public void setReviewCommentsId(Long reviewCommentsId) 
+    public String getbUserName() {
+        return bUserName;
+    }
+
+    public void setbUserName(String bUserName) {
+        this.bUserName = bUserName;
+    }
+
+    public List<SysUserConference> getSysUserConferenceList() {
+        return sysUserConferenceList;
+    }
+
+    public void setSysUserConferenceList(List<SysUserConference> sysUserConferenceList) {
+        this.sysUserConferenceList = sysUserConferenceList;
+    }
+
+    public void setReviewCommentsId(Long reviewCommentsId)
     {
         this.reviewCommentsId = reviewCommentsId;
     }
@@ -116,16 +180,16 @@ public class ReviewComments extends BaseEntity
     {
         return auditTime;
     }
-    public void setFjUrl(String fjUrl) 
-    {
-        this.fjUrl = fjUrl;
-    }
 
-    public String getFjUrl() 
-    {
+    public List<LoanApplicationFj> getFjUrl() {
         return fjUrl;
     }
-    public void setImageUrl(String imageUrl) 
+
+    public void setFjUrl(List<LoanApplicationFj> fjUrl) {
+        this.fjUrl = fjUrl;
+    }
+
+    public void setImageUrl(String imageUrl)
     {
         this.imageUrl = imageUrl;
     }

+ 6 - 2
ruoyi-system/src/main/java/com/ruoyi/system/mapper/LoanApplicationFjMapper.java

@@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
 
 import com.ruoyi.system.domain.SysUserPost;
 import com.ruoyi.system.domain.loan.LoanApplicationFj;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -79,8 +80,11 @@ public interface LoanApplicationFjMapper
 
     /**
      * 根据贷款申请id删除所有附件
-     * @param LoanApplicationId
+     * @param loanApplicationId
      * @return
      */
-    public int deleteLoanApplicationFjByLoanApplicationId(Long LoanApplicationId);
+    public int deleteLoanApplicationFjByLoanApplicationId(Long loanApplicationId);
+
+    public int deleteLoanApplicationFjByLoanApplicationIdAndType(@Param("LoanApplicationId") Long loanApplicationId,@Param("type") String type);
+    public List<LoanApplicationFj> selectLoanApplicationFjByLoanApplicationIdAndType(@Param("LoanApplicationId") Long loanApplicationId,@Param("type") String type);
 }

+ 70 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserConferenceMapper.java

@@ -0,0 +1,70 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.conference.SysUserConference;
+
+import java.util.List;
+
+
+/**
+ * 参会人员Mapper接口
+ * 
+ * @author boman
+ * @date 2024-05-06
+ */
+public interface SysUserConferenceMapper 
+{
+    /**
+     * 查询参会人员
+     * 
+     * @param conferenceId 参会人员主键
+     * @return 参会人员
+     */
+    public SysUserConference selectSysUserConferenceByConferenceId(Long conferenceId);
+
+    /**
+     * 查询参会人员列表
+     * 
+     * @param sysUserConference 参会人员
+     * @return 参会人员集合
+     */
+    public List<SysUserConference> selectSysUserConferenceList(SysUserConference sysUserConference);
+
+    /**
+     * 新增参会人员
+     * 
+     * @param sysUserConference 参会人员
+     * @return 结果
+     */
+    public int insertSysUserConference(SysUserConference sysUserConference);
+
+    /**
+     * 批量保存
+     * @param sysUserConferenceList
+     * @return
+     */
+    public int batchSysUserConference(List<SysUserConference> sysUserConferenceList);
+
+    /**
+     * 修改参会人员
+     * 
+     * @param sysUserConference 参会人员
+     * @return 结果
+     */
+    public int updateSysUserConference(SysUserConference sysUserConference);
+
+    /**
+     * 删除参会人员
+     * 
+     * @param conferenceId 参会人员主键
+     * @return 结果
+     */
+    public int deleteSysUserConferenceByConferenceId(Long conferenceId);
+
+    /**
+     * 批量删除参会人员
+     * 
+     * @param conferenceIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysUserConferenceByConferenceIds(Long[] conferenceIds);
+}

+ 62 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/conference/ISysUserConferenceService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.service.conference;
+
+import com.ruoyi.system.domain.conference.SysUserConference;
+
+import java.util.List;
+
+/**
+ * 参会人员Service接口
+ * 
+ * @author boman
+ * @date 2024-05-06
+ */
+public interface ISysUserConferenceService 
+{
+    /**
+     * 查询参会人员
+     * 
+     * @param conferenceId 参会人员主键
+     * @return 参会人员
+     */
+    public SysUserConference selectSysUserConferenceByConferenceId(Long conferenceId);
+
+    /**
+     * 查询参会人员列表
+     * 
+     * @param sysUserConference 参会人员
+     * @return 参会人员集合
+     */
+    public List<SysUserConference> selectSysUserConferenceList(SysUserConference sysUserConference);
+
+    /**
+     * 新增参会人员
+     * 
+     * @param sysUserConference 参会人员
+     * @return 结果
+     */
+    public int insertSysUserConference(SysUserConference sysUserConference);
+
+    /**
+     * 修改参会人员
+     * 
+     * @param sysUserConference 参会人员
+     * @return 结果
+     */
+    public int updateSysUserConference(SysUserConference sysUserConference);
+
+    /**
+     * 批量删除参会人员
+     * 
+     * @param conferenceIds 需要删除的参会人员主键集合
+     * @return 结果
+     */
+    public int deleteSysUserConferenceByConferenceIds(Long[] conferenceIds);
+
+    /**
+     * 删除参会人员信息
+     * 
+     * @param conferenceId 参会人员主键
+     * @return 结果
+     */
+    public int deleteSysUserConferenceByConferenceId(Long conferenceId);
+}

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/conference/impl/SysUserConferenceServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.system.service.conference.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.conference.SysUserConference;
+import com.ruoyi.system.service.conference.ISysUserConferenceService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.SysUserConferenceMapper;
+
+/**
+ * 参会人员Service业务层处理
+ * 
+ * @author boman
+ * @date 2024-05-06
+ */
+@Service
+public class SysUserConferenceServiceImpl implements ISysUserConferenceService
+{
+    @Autowired
+    private SysUserConferenceMapper sysUserConferenceMapper;
+
+    /**
+     * 查询参会人员
+     * 
+     * @param conferenceId 参会人员主键
+     * @return 参会人员
+     */
+    @Override
+    public SysUserConference selectSysUserConferenceByConferenceId(Long conferenceId)
+    {
+        return sysUserConferenceMapper.selectSysUserConferenceByConferenceId(conferenceId);
+    }
+
+    /**
+     * 查询参会人员列表
+     * 
+     * @param sysUserConference 参会人员
+     * @return 参会人员
+     */
+    @Override
+    public List<SysUserConference> selectSysUserConferenceList(SysUserConference sysUserConference)
+    {
+        return sysUserConferenceMapper.selectSysUserConferenceList(sysUserConference);
+    }
+
+    /**
+     * 新增参会人员
+     * 
+     * @param sysUserConference 参会人员
+     * @return 结果
+     */
+    @Override
+    public int insertSysUserConference(SysUserConference sysUserConference)
+    {
+        sysUserConference.setCreateTime(DateUtils.getNowDate());
+        return sysUserConferenceMapper.insertSysUserConference(sysUserConference);
+    }
+
+    /**
+     * 修改参会人员
+     * 
+     * @param sysUserConference 参会人员
+     * @return 结果
+     */
+    @Override
+    public int updateSysUserConference(SysUserConference sysUserConference)
+    {
+        sysUserConference.setUpdateTime(DateUtils.getNowDate());
+        return sysUserConferenceMapper.updateSysUserConference(sysUserConference);
+    }
+
+    /**
+     * 批量删除参会人员
+     * 
+     * @param conferenceIds 需要删除的参会人员主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysUserConferenceByConferenceIds(Long[] conferenceIds)
+    {
+        return sysUserConferenceMapper.deleteSysUserConferenceByConferenceIds(conferenceIds);
+    }
+
+    /**
+     * 删除参会人员信息
+     * 
+     * @param conferenceId 参会人员主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysUserConferenceByConferenceId(Long conferenceId)
+    {
+        return sysUserConferenceMapper.deleteSysUserConferenceByConferenceId(conferenceId);
+    }
+}

+ 21 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/loan/ILoanApplicationService.java

@@ -76,5 +76,26 @@ public interface ILoanApplicationService
      */
     public AjaxResult sh(ReviewComments reviewComments);
 
+    /**
+     * 申诉
+     * @param loanApplication
+     * @return
+     */
+    public AjaxResult ss(LoanApplication loanApplication);
+
+    /**
+     * 撤销
+     * @param loanApplication
+     * @return
+     */
+    public AjaxResult cx(LoanApplication loanApplication);
+
+    /**
+     * 一键归档
+     * @param loanApplication
+     * @return
+     */
+    public AjaxResult gd(LoanApplication loanApplication);
+
     AjaxResult exportMb(LoanApplication loanApplication);
 }

+ 213 - 7
ruoyi-system/src/main/java/com/ruoyi/system/service/loan/impl/LoanApplicationServiceImpl.java

@@ -2,9 +2,11 @@ package com.ruoyi.system.service.loan.impl;
 
 
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysRole;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.SendSmsUtils;
+import com.ruoyi.system.domain.conference.SysUserConference;
 import com.ruoyi.system.domain.enterprise.SysUserEnterprise;
 import com.ruoyi.system.domain.loan.LoanApplication;
 import com.ruoyi.system.domain.loan.LoanApplicationFj;
@@ -13,6 +15,7 @@ import com.ruoyi.system.domain.loan.ShareholderFj;
 import com.ruoyi.system.domain.review.ReviewComments;
 import com.ruoyi.system.mapper.*;
 import com.ruoyi.system.service.loan.ILoanApplicationService;
+import org.apache.commons.lang3.ObjectUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -20,6 +23,7 @@ import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.stream.Collectors;
 
 import static com.ruoyi.common.constant.CommonConstants.*;
@@ -42,6 +46,10 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
     private LoanScheduleMapper loanScheduleMapper;
     @Autowired
     private SysUserEnterpriseMapper sysUserEnterpriseMapper;
+    @Autowired
+    private SysUserConferenceMapper sysUserConferenceMapper;
+    @Autowired
+    private ReviewCommentsMapper reviewCommentsMapper;
 
     /**
      * 查询贷款申请主
@@ -95,7 +103,19 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
      */
     @Override
     public List<LoanApplication> selectLoanApplicationList(LoanApplication loanApplication) {
-        return loanApplicationMapper.selectLoanApplicationList(loanApplication);
+        //判断是否是admin或者管理员manager
+        List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
+        String roleKey = "admin,manager";
+        for (SysRole role : roles) {
+            if (role.getRoleKey().contains(roleKey)) {
+
+                break;
+            }
+        }
+        List<LoanApplication> loanApplications = loanApplicationMapper.selectLoanApplicationList(loanApplication);
+
+
+        return loanApplications;
     }
 
     /**
@@ -112,8 +132,8 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
         //设置申请人用户ID
         loanApplication.setUserId(SecurityUtils.getUserId());
         loanApplication.setApplicationTime(DateUtils.getNowDate());
-        //贷款申请进度进入申报提交
-        loanApplication.setLoanSchedule(ONE);
+        //贷款申请进度进入业务审核/分配
+        loanApplication.setLoanSchedule(TWO);
         loanApplication.setLoanApplicationType(TWO);
         loanApplication.setUserId(SecurityUtils.getUserId());
         int i = loanApplicationMapper.insertLoanApplication(loanApplication);
@@ -156,6 +176,7 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
     public int updateLoanApplication(LoanApplication loanApplication) {
         loanApplication.setUpdateTime(DateUtils.getNowDate());
         loanApplication.setLoanApplicationType(TWO);
+        loanApplication.setApplicationTime(DateUtils.getNowDate());
         Long loanApplicationId = loanApplication.getLoanApplicationId();
         //相关附件先删除
         loanApplicationFjMapper.deleteLoanApplicationFjByLoanApplicationId(loanApplicationId);
@@ -219,7 +240,6 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
         loanApplication.setUserId(SecurityUtils.getUserId());
         //贷款申请进度进入申报提交
         loanApplication.setLoanSchedule(ONE);
-
         int i = loanApplicationMapper.insertLoanApplication(loanApplication);
         List<LoanApplicationFj> loanApplicationFjList = loanApplication.getLoanApplicationFjList();
         if (loanApplicationFjList != null && loanApplicationFjList.size() > 0) {
@@ -265,18 +285,204 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
 
     /**
      * 审核
+     *
      * @param reviewComments
      * @return
      */
     @Override
     public AjaxResult sh(ReviewComments reviewComments) {
-        return null;
+        reviewComments.setAuditTime(DateUtils.getNowDate());
+        List<SysUserConference> sysUserConferenceList = reviewComments.getSysUserConferenceList();
+        //审核进度1:业务审核/分配 2:A角色审核 3:B角色审核 4:风险审核 5:尽职调查 6:初审风险合规 7:上会评审
+        String auditSchedule = reviewComments.getAuditSchedule();
+        //审核状态 1:待审核 2:已通过 3:未通过 4:申诉
+        String auditType = reviewComments.getAuditType();
+        //校验当前项目进度
+        Long loanApplicationId = reviewComments.getLoanApplicationId();
+        //获取数据库中项目详情
+        LoanApplication loanApplication = loanApplicationMapper.selectLoanApplicationByLoanApplicationId(loanApplicationId);
+        String loanScheduleOld = loanApplication.getLoanSchedule();
+        String auditScheduleOld = loanApplication.getAuditSchedule();
+        String auditTypeOld = loanApplication.getAuditType();
+        String loanApplicationType = loanApplication.getLoanApplicationType();
+        //判断是否已归档
+        if (loanApplication.getLoanApplicationType().equals(FOR)) {
+            return AjaxResult.error("当前项目已归档");
+        }
+        //判断是否无需审核
+        if (Integer.parseInt(loanScheduleOld) > 6) {
+            return AjaxResult.error("当前项目无需审核");
+        }
+        if (!Objects.equals(loanApplicationType, TWO)) {
+            return AjaxResult.error("当前贷款申请状态非正常,请检查后重新操作");
+        }
+        if (ObjectUtils.isEmpty(loanApplication)) {
+            return AjaxResult.error("当前贷款申请不存在,请重新刷新");
+        }
+
+        //判断数据库中进度是否小于当前申请进度
+        if (Integer.parseInt(auditSchedule) <= Integer.parseInt(auditScheduleOld) && !Objects.equals(auditTypeOld, ONE)) {
+            return AjaxResult.error("当前进度已审核,请勿重复审核");
+        }
+        List<LoanApplicationFj> fjUrl = reviewComments.getFjUrl();
+        if (fjUrl != null && fjUrl.size() > 0) {
+            StringBuilder type = new StringBuilder();
+            for (LoanApplicationFj loanApplicationFj : fjUrl) {
+                type.append(loanApplicationFj.getType()).append(",");
+            }
+            type.deleteCharAt(type.lastIndexOf(","));
+            loanApplicationFjMapper.deleteLoanApplicationFjByLoanApplicationIdAndType(loanApplicationId, type.toString());
+            //需要删除当前状态下已存在的附件
+            loanApplicationFjMapper.batchLoanApplicationFj(fjUrl);
+        }
+        //业务审核意见
+        reviewCommentsMapper.insertReviewComments(reviewComments);
+        //A角色进度之前审核不通过,直接放入回收站,之后的进入到申诉状态
+        if (THR.equals(auditType) && Integer.parseInt(auditSchedule) < 3) {
+            loanApplication.setAuditType(auditType);
+            loanApplication.setAuditSchedule(auditSchedule);
+            loanApplication.setLoanApplicationType(THR);
+            loanApplicationMapper.updateLoanApplication(loanApplication);
+            return AjaxResult.success();
+        } else if (THR.equals(auditType) && Integer.parseInt(auditSchedule) > 2) {
+            //进入到A角色申诉状态
+            loanApplication.setLoanSchedule(TWO);
+            loanApplication.setAuditType(FOR);
+            loanApplication.setAuditSchedule(TWO);
+            loanApplicationMapper.updateLoanApplication(loanApplication);
+            return AjaxResult.success();
+        }
+        //通过,进入到下一个步骤
+        if (TWO.equals(auditType)) {
+            if (auditSchedule.equals(ONE)) {
+                //设置AB角色id
+                loanApplication.setaUserId(reviewComments.getaUserId());
+                loanApplication.setaUserName(reviewComments.getaUserName());
+                loanApplication.setbUserId(reviewComments.getbUserId());
+                loanApplication.setbUserName(reviewComments.getbUserName());
+            }
+            //保存参会人员数据
+            if (sysUserConferenceList != null && sysUserConferenceList.size() > 0 && auditSchedule.equals(SEV)) {
+                sysUserConferenceMapper.batchSysUserConference(sysUserConferenceList);
+            }
+            //audit_schedule = 2,3的时候贷款申请进度处于担保初审状态
+            if (auditSchedule.equals(TWO) || auditSchedule.equals(THR)) {
+                loanApplication.setLoanSchedule(THR);
+            } else {
+                loanApplication.setLoanSchedule(String.valueOf(Integer.parseInt(loanScheduleOld) + 1));
+            }
+            loanApplication.setAuditSchedule(String.valueOf(Integer.parseInt(auditSchedule) + 1));
+            loanApplication.setAuditType(ONE);
+            loanApplicationMapper.updateLoanApplication(loanApplication);
+            //插入流程记录表
+            LoanSchedule loanSchedule = new LoanSchedule();
+            loanSchedule.setLoanApplicationId(loanApplicationId);
+            loanSchedule.setLoanScheduleValue(loanApplication.getLoanSchedule());
+            loanSchedule.setLoanScheduleScore(Long.parseLong(loanApplication.getLoanSchedule()));
+            loanSchedule.setLoanScheduleTime(DateUtils.getNowDate());
+            loanScheduleMapper.insertLoanSchedule(loanSchedule);
+        }
+        return AjaxResult.success();
+    }
+
+    /**
+     * 申诉
+     *
+     * @param loanApplication
+     * @return
+     */
+    @Override
+    public AjaxResult ss(LoanApplication loanApplication) {
+        //先判断当前人是否是A角色
+        Long userId = SecurityUtils.getUserId();
+        Long aLong = loanApplication.getaUserId();
+        if (!Objects.equals(userId, aLong)) {
+            return AjaxResult.error("当前您无权限申诉,请联系管理员");
+        }
+        loanApplication.setLoanSchedule(TWO);
+        //进入待审核
+        loanApplication.setAuditType(ONE);
+        loanApplication.setAuditSchedule(TWO);
+        loanApplicationMapper.updateLoanApplication(loanApplication);
+        //删除之后的所有附件
+        String type = "jzdcbg," + "dbxmhfhgb," + "psyjqpb,"+ "clhgb," + "gdhyjy";
+        loanApplicationFjMapper.deleteLoanApplicationFjByLoanApplicationIdAndType(loanApplication.getLoanApplicationId(), type);
+        return AjaxResult.success();
     }
 
+    /**
+     * 撤销返回到上一步
+     *
+     * @param loanApplication
+     * @return
+     */
+    @Override
+    public AjaxResult cx(LoanApplication loanApplication) {
+        //获取当前状态
+        String loanSchedule = loanApplication.getLoanSchedule();
+        String auditSchedule = loanApplication.getAuditSchedule();
+        String loanApplicationType = loanApplication.getLoanApplicationType();
+        if (Integer.parseInt(loanSchedule) < 2 || Integer.parseInt(auditSchedule) < 1 || Integer.parseInt(loanApplicationType) != 2) {
+            return AjaxResult.error("当前项目不可撤销");
+        }
+        if (auditSchedule.equals(FOR) || auditSchedule.equals(THR)) {
+            loanApplication.setLoanSchedule(THR);
+        } else {
+            loanApplication.setLoanSchedule(String.valueOf(Integer.parseInt(loanSchedule) - 1));
+        }
+        loanApplication.setAuditSchedule(String.valueOf(Integer.parseInt(auditSchedule) - 1));
+        //进入待审核
+        loanApplication.setAuditType(ONE);
+        loanApplicationMapper.updateLoanApplication(loanApplication);
+
+        String type = "-1";
+        if (auditSchedule.equals(FIV)){
+            type = "jzdcbg";
+        }else if (auditSchedule.equals(SIX)){
+            type = "dbxmhfhgb,clhgb";
+        }else if (auditSchedule.equals(SEV)){
+            type = "psyjqpb,gdhyjy";
+        }
+        //还需要删除附件
+        loanApplicationFjMapper.deleteLoanApplicationFjByLoanApplicationIdAndType(loanApplication.getLoanApplicationId(), type);
+        return AjaxResult.success();
+    }
+
+    /**
+     * 一键归档
+     *
+     * @param loanApplication
+     * @return
+     */
+    @Override
+    public AjaxResult gd(LoanApplication loanApplication) {
+        //判断项目是否能归档
+        String loanSchedule = loanApplication.getLoanSchedule();
+        String loanApplicationType = loanApplication.getLoanApplicationType();
+        if (!NIN.equals(loanSchedule) && !TWO.equals(loanApplicationType)) {
+            return AjaxResult.error("当前项目进度不能归档");
+        }
+        loanApplication.setLoanSchedule(TEN);
+        loanApplication.setLoanApplicationType(FOR);
+        loanApplicationMapper.updateLoanApplication(loanApplication);
+        //插入流程记录表
+        LoanSchedule loanScheduleNew = new LoanSchedule();
+        loanScheduleNew.setLoanApplicationId(loanApplication.getLoanApplicationId());
+        loanScheduleNew.setLoanScheduleValue(loanApplication.getLoanSchedule());
+        loanScheduleNew.setLoanScheduleScore(Long.parseLong(loanApplication.getLoanSchedule()));
+        loanScheduleNew.setLoanScheduleTime(DateUtils.getNowDate());
+        loanScheduleMapper.insertLoanSchedule(loanScheduleNew);
+        return AjaxResult.success();
+    }
+
+
+    /**
+     * 导出模板附件
+     */
     @Override
     public AjaxResult exportMb(LoanApplication loanApplication) {
-        String path="/profile/mb/";
-        if("1".equals(loanApplication.getType())){
+        String path = "/profile/mb/";
+        if ("1".equals(loanApplication.getType())) {
             path = path + "委托担保申请书.doc";
         }
         return AjaxResult.success(path);

+ 3 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/loan/impl/LoanScheduleServiceImpl.java

@@ -67,7 +67,9 @@ public class LoanScheduleServiceImpl implements ILoanScheduleService {
             if (collect != null && collect.size() > 0){
                 List<LoanSchedule> loanSchedulesNew = collect.get(dictValue);
                 if (loanSchedulesNew != null && loanSchedulesNew.size() > 0){
-                    loanScheduleNew.setLoanScheduleTime(collect.get(dictValue).get(0).getLoanScheduleTime());
+                    List<LoanSchedule> loanSchedules1 = collect.get(dictValue);
+                    loanSchedules1.sort(Comparator.comparing(LoanSchedule::getLoanScheduleTime));
+                    loanScheduleNew.setLoanScheduleTime(loanSchedules1.get(0).getLoanScheduleTime());
                 }
             }
             loanScheduleList.add(loanScheduleNew);

+ 51 - 23
ruoyi-system/src/main/java/com/ruoyi/system/service/review/impl/ReviewCommentsServiceImpl.java

@@ -1,96 +1,124 @@
 package com.ruoyi.system.service.review.impl;
 
+import java.util.ArrayList;
 import java.util.List;
+
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.loan.LoanApplicationFj;
 import com.ruoyi.system.domain.review.ReviewComments;
+import com.ruoyi.system.mapper.LoanApplicationFjMapper;
 import com.ruoyi.system.service.review.IReviewCommentsService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.ReviewCommentsMapper;
 
+import static com.ruoyi.common.constant.CommonConstants.*;
+
 /**
  * 业务审核意见Service业务层处理
- * 
+ *
  * @author boman
  * @date 2024-04-24
  */
 @Service
-public class ReviewCommentsServiceImpl implements IReviewCommentsService
-{
+public class ReviewCommentsServiceImpl implements IReviewCommentsService {
     @Autowired
     private ReviewCommentsMapper reviewCommentsMapper;
 
+    @Autowired
+    private LoanApplicationFjMapper loanApplicationFjMapper;
+
     /**
      * 查询业务审核意见
-     * 
+     *
      * @param reviewCommentsId 业务审核意见主键
      * @return 业务审核意见
      */
     @Override
-    public ReviewComments selectReviewCommentsByReviewCommentsId(Long reviewCommentsId)
-    {
-        return reviewCommentsMapper.selectReviewCommentsByReviewCommentsId(reviewCommentsId);
+    public ReviewComments selectReviewCommentsByReviewCommentsId(Long reviewCommentsId) {
+        ReviewComments reviewComments = reviewCommentsMapper.selectReviewCommentsByReviewCommentsId(reviewCommentsId);
+        List<LoanApplicationFj> loanApplicationFjList = selectLoanApplicationFjList(reviewComments);
+        reviewComments.setFjUrl(loanApplicationFjList);
+        return reviewComments;
     }
 
     /**
      * 查询业务审核意见列表
-     * 
+     *
      * @param reviewComments 业务审核意见
      * @return 业务审核意见
      */
     @Override
-    public List<ReviewComments> selectReviewCommentsList(ReviewComments reviewComments)
-    {
-        return reviewCommentsMapper.selectReviewCommentsList(reviewComments);
+    public List<ReviewComments> selectReviewCommentsList(ReviewComments reviewComments) {
+        List<ReviewComments> reviewCommentsList = reviewCommentsMapper.selectReviewCommentsList(reviewComments);
+        if (reviewCommentsList != null && reviewCommentsList.size() > 0) {
+            for (ReviewComments comments : reviewCommentsList) {
+                List<LoanApplicationFj> loanApplicationFjList = selectLoanApplicationFjList(comments);
+                comments.setFjUrl(loanApplicationFjList);
+            }
+        }
+        return reviewCommentsList;
+    }
+
+    //查询审核的对应类型附件
+    public List<LoanApplicationFj> selectLoanApplicationFjList(ReviewComments reviewComments) {
+        String auditSchedule = reviewComments.getAuditSchedule();
+        Long loanApplicationId = reviewComments.getLoanApplicationId();
+        String type = "-1";
+        if (auditSchedule.equals(FIV)){
+            type = "jzdcbg";
+        }else if (auditSchedule.equals(SIX)){
+            type = "dbxmhfhgb,clhgb";
+        }else if (auditSchedule.equals(SEV)){
+            type = "psyjqpb,gdhyjy";
+        }
+        List<LoanApplicationFj> loanApplicationFjList = loanApplicationFjMapper.selectLoanApplicationFjByLoanApplicationIdAndType(loanApplicationId, type);
+        return loanApplicationFjList;
     }
 
     /**
      * 新增业务审核意见
-     * 
+     *
      * @param reviewComments 业务审核意见
      * @return 结果
      */
     @Override
-    public int insertReviewComments(ReviewComments reviewComments)
-    {
+    public int insertReviewComments(ReviewComments reviewComments) {
         reviewComments.setCreateTime(DateUtils.getNowDate());
         return reviewCommentsMapper.insertReviewComments(reviewComments);
     }
 
     /**
      * 修改业务审核意见
-     * 
+     *
      * @param reviewComments 业务审核意见
      * @return 结果
      */
     @Override
-    public int updateReviewComments(ReviewComments reviewComments)
-    {
+    public int updateReviewComments(ReviewComments reviewComments) {
         reviewComments.setUpdateTime(DateUtils.getNowDate());
         return reviewCommentsMapper.updateReviewComments(reviewComments);
     }
 
     /**
      * 批量删除业务审核意见
-     * 
+     *
      * @param reviewCommentsIds 需要删除的业务审核意见主键
      * @return 结果
      */
     @Override
-    public int deleteReviewCommentsByReviewCommentsIds(Long[] reviewCommentsIds)
-    {
+    public int deleteReviewCommentsByReviewCommentsIds(Long[] reviewCommentsIds) {
         return reviewCommentsMapper.deleteReviewCommentsByReviewCommentsIds(reviewCommentsIds);
     }
 
     /**
      * 删除业务审核意见信息
-     * 
+     *
      * @param reviewCommentsId 业务审核意见主键
      * @return 结果
      */
     @Override
-    public int deleteReviewCommentsByReviewCommentsId(Long reviewCommentsId)
-    {
+    public int deleteReviewCommentsByReviewCommentsId(Long reviewCommentsId) {
         return reviewCommentsMapper.deleteReviewCommentsByReviewCommentsId(reviewCommentsId);
     }
 }

+ 66 - 34
ruoyi-system/src/main/resources/mapper/system/LoanApplicationFjMapper.xml

@@ -1,54 +1,75 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.system.mapper.LoanApplicationFjMapper">
-    
+
     <resultMap type="LoanApplicationFj" id="LoanApplicationFjResult">
-        <result property="fjId"    column="fj_id"    />
-        <result property="loanApplicationId"    column="loan_application_id"    />
-        <result property="loanApplicationNumber"    column="loan_application_number"    />
-        <result property="oldName"    column="old_name"    />
-        <result property="name"    column="name"    />
-        <result property="url"    column="url"    />
-        <result property="bigType"    column="big_type"    />
-        <result property="type"    column="type"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-        <result property="remark"    column="remark"    />
+        <result property="fjId" column="fj_id"/>
+        <result property="loanApplicationId" column="loan_application_id"/>
+        <result property="loanApplicationNumber" column="loan_application_number"/>
+        <result property="oldName" column="old_name"/>
+        <result property="name" column="name"/>
+        <result property="url" column="url"/>
+        <result property="bigType" column="big_type"/>
+        <result property="type" column="type"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="remark" column="remark"/>
     </resultMap>
 
     <sql id="selectLoanApplicationFjVo">
-        select fj_id, loan_application_id, loan_application_number, old_name, name, url,big_type, type, create_by, create_time, update_by, update_time, remark from loan_application_fj
+        select fj_id,
+               loan_application_id,
+               loan_application_number,
+               old_name,
+               name,
+               url,
+               big_type,
+               type,
+               create_by,
+               create_time,
+               update_by,
+               update_time,
+               remark
+        from loan_application_fj
     </sql>
 
     <select id="selectLoanApplicationFjList" parameterType="LoanApplicationFj" resultMap="LoanApplicationFjResult">
         <include refid="selectLoanApplicationFjVo"/>
-        <where>  
-            <if test="loanApplicationId != null "> and loan_application_id = #{loanApplicationId}</if>
-            <if test="loanApplicationNumber != null  and loanApplicationNumber != ''"> and loan_application_number = #{loanApplicationNumber}</if>
-            <if test="oldName != null  and oldName != ''"> and old_name like concat('%', #{oldName}, '%')</if>
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
-            <if test="url != null  and url != ''"> and url = #{url}</if>
-            <if test="type != null  and type != ''"> and type = #{type}</if>
-            <if test="bigType != null  and bigType != ''"> and big_type = #{bigType}</if>
+        <where>
+            <if test="loanApplicationId != null ">and loan_application_id = #{loanApplicationId}</if>
+            <if test="loanApplicationNumber != null  and loanApplicationNumber != ''">and loan_application_number =
+                #{loanApplicationNumber}
+            </if>
+            <if test="oldName != null  and oldName != ''">and old_name like concat('%', #{oldName}, '%')</if>
+            <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
+            <if test="url != null  and url != ''">and url = #{url}</if>
+            <if test="type != null  and type != ''">and type = #{type}</if>
+            <if test="bigType != null  and bigType != ''">and big_type = #{bigType}</if>
         </where>
         order by create_time
     </select>
-    
+
     <select id="selectLoanApplicationFjByFjId" parameterType="Long" resultMap="LoanApplicationFjResult">
         <include refid="selectLoanApplicationFjVo"/>
         where fj_id = #{fjId}
     </select>
-    <select id="selectLoanApplicationFjByLoanApplicationId" parameterType="LoanApplicationFj" resultMap="LoanApplicationFjResult">
+    <select id="selectLoanApplicationFjByLoanApplicationId" parameterType="LoanApplicationFj"
+            resultMap="LoanApplicationFjResult">
         <include refid="selectLoanApplicationFjVo"/>
         <where>
-            <if test="loanApplicationId != null "> and loan_application_id = #{loanApplicationId}</if>
+            <if test="loanApplicationId != null ">and loan_application_id = #{loanApplicationId}</if>
         </where>
         order by create_time
     </select>
+    <select id="selectLoanApplicationFjByLoanApplicationIdAndType" parameterType="LoanApplicationFj" resultMap="LoanApplicationFjResult">
+        <include refid="selectLoanApplicationFjVo"/>
+        where loan_application_id = #{loanApplicationId}
+        and type in (#{type})
+    </select>
 
     <insert id="insertLoanApplicationFj" parameterType="LoanApplicationFj" useGeneratedKeys="true" keyProperty="fjId">
         insert into loan_application_fj
@@ -65,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateTime != null">update_time,</if>
             <if test="remark != null">remark,</if>
             create_time
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="loanApplicationId != null">#{loanApplicationId},</if>
             <if test="loanApplicationNumber != null">#{loanApplicationNumber},</if>
@@ -79,10 +100,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
             sysdate()
-         </trim>
+        </trim>
     </insert>
     <insert id="batchLoanApplicationFj">
-        insert into loan_application_fj(loan_application_id, loan_application_number, old_name, name, url,big_type, type, create_by, create_time, update_by, update_time, remark) values
+        insert into loan_application_fj(loan_application_id, loan_application_number, old_name, name, url,big_type,
+        type, create_by, create_time, update_by, update_time, remark) values
         <foreach item="item" index="index" collection="list" separator=",">
             (#{item.loanApplicationId},#{item.loanApplicationNumber},#{item.oldName},#{item.name},#{item.url},#{item.bigType},#{item.type},#{item.createBy},sysdate(),#{item.updateBy},#{item.updateTime},#{item.remark})
         </foreach>
@@ -108,16 +130,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </update>
 
     <delete id="deleteLoanApplicationFjByFjId" parameterType="Long">
-        delete from loan_application_fj where fj_id = #{fjId}
+        delete
+        from loan_application_fj
+        where fj_id = #{fjId}
     </delete>
 
     <delete id="deleteLoanApplicationFjByFjIds" parameterType="String">
-        delete from loan_application_fj where fj_id in 
+        delete from loan_application_fj where fj_id in
         <foreach item="fjId" collection="array" open="(" separator="," close=")">
             #{fjId}
         </foreach>
     </delete>
     <delete id="deleteLoanApplicationFjByLoanApplicationId" parameterType="Long">
-        delete from loan_application_fj where loan_application_id  = #{LoanApplicationId}
+        delete
+        from loan_application_fj
+        where loan_application_id = #{LoanApplicationId}
+    </delete>
+    <delete id="deleteLoanApplicationFjByLoanApplicationIdAndType" parameterType="LoanApplicationFj">
+        delete
+        from loan_application_fj
+        where loan_application_id = #{LoanApplicationId}
+          and type in (#{type})
     </delete>
 </mapper>

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

@@ -131,12 +131,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="auditType != null  and auditType != ''"> and audit_type = #{auditType}</if>
             <if test="loanApplicationType != null  and loanApplicationType != ''"> and loan_application_type = #{loanApplicationType}</if>
             <if test="aUserId != null "> and a_user_id = #{aUserId}</if>
-            <if test="aUserName != null "> and a_user_name like concat('%', #{aUserName}, '%')</if>
+
             <if test="bUserId != null "> and b_user_id = #{bUserId}</if>
-            <if test="bUserName != null "> and b_user_name like concat('%', #{bUserName}, '%')</if>
-            <if test="creatTime != null ">AND date_format(create_time,'%Y') = date_format(#{createTime},'%Y')</if>
+
+            <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(create_time,'%Y') = date_format(#{params.beginTime},'%Y')
+            </if>
         </where>
-        order by application_time
+        order by create_time DESC
     </select>
     
     <select id="selectLoanApplicationByLoanApplicationId" parameterType="Long" resultMap="LoanApplicationResult">
@@ -345,8 +347,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="remark != null">remark = #{remark},</if>
+            update_time = sysdate(),
         </trim>
         where loan_application_id = #{loanApplicationId}
     </update>

+ 2 - 2
ruoyi-system/src/main/resources/mapper/system/ReviewCommentsMapper.xml

@@ -54,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="auditType != null and auditType != ''">audit_type,</if>
             <if test="auditView != null">audit_view,</if>
             <if test="auditTime != null">audit_time,</if>
-            <if test="fjUrl != null">fj_url,</if>
+            <!--<if test="fjUrl != null">fj_url,</if>-->
             <if test="imageUrl != null">image_url,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
@@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="auditType != null and auditType != ''">#{auditType},</if>
             <if test="auditView != null">#{auditView},</if>
             <if test="auditTime != null">#{auditTime},</if>
-            <if test="fjUrl != null">#{fjUrl},</if>
+            <!--<if test="fjUrl != null">#{fjUrl},</if>-->
             <if test="imageUrl != null">#{imageUrl},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>

+ 113 - 0
ruoyi-system/src/main/resources/mapper/system/SysUserConferenceMapper.xml

@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.SysUserConferenceMapper">
+    
+    <resultMap type="SysUserConference" id="SysUserConferenceResult">
+        <result property="conferenceId"    column="conference_id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="idCard"    column="id_card"    />
+        <result property="realName"    column="real_name"    />
+        <result property="loanApplicationId"    column="loan_application_id"    />
+        <result property="loanApplicationNumber"    column="loan_application_number"    />
+        <result property="isConference"    column="is_conference"    />
+        <result property="reason"    column="reason"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectSysUserConferenceVo">
+        select conference_id, user_id, id_card, real_name, loan_application_id, loan_application_number, is_conference, reason, create_by, create_time, update_by, update_time, remark from sys_user_conference
+    </sql>
+
+    <select id="selectSysUserConferenceList" parameterType="SysUserConference" resultMap="SysUserConferenceResult">
+        <include refid="selectSysUserConferenceVo"/>
+        <where>  
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="idCard != null  and idCard != ''"> and id_card = #{idCard}</if>
+            <if test="realName != null  and realName != ''"> and real_name like concat('%', #{realName}, '%')</if>
+            <if test="loanApplicationId != null "> and loan_application_id = #{loanApplicationId}</if>
+            <if test="loanApplicationNumber != null  and loanApplicationNumber != ''"> and loan_application_number = #{loanApplicationNumber}</if>
+            <if test="isConference != null  and isConference != ''"> and is_conference = #{isConference}</if>
+            <if test="reason != null  and reason != ''"> and reason = #{reason}</if>
+        </where>
+        order by create_time
+    </select>
+    
+    <select id="selectSysUserConferenceByConferenceId" parameterType="Long" resultMap="SysUserConferenceResult">
+        <include refid="selectSysUserConferenceVo"/>
+        where conference_id = #{conferenceId}
+    </select>
+        
+    <insert id="insertSysUserConference" parameterType="SysUserConference" useGeneratedKeys="true" keyProperty="conferenceId">
+        insert into sys_user_conference
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="userId != null">user_id,</if>
+            <if test="idCard != null">id_card,</if>
+            <if test="realName != null and realName != ''">real_name,</if>
+            <if test="loanApplicationId != null">loan_application_id,</if>
+            <if test="loanApplicationNumber != null">loan_application_number,</if>
+            <if test="isConference != null">is_conference,</if>
+            <if test="reason != null">reason,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="userId != null">#{userId},</if>
+            <if test="idCard != null">#{idCard},</if>
+            <if test="realName != null and realName != ''">#{realName},</if>
+            <if test="loanApplicationId != null">#{loanApplicationId},</if>
+            <if test="loanApplicationNumber != null">#{loanApplicationNumber},</if>
+            <if test="isConference != null">#{isConference},</if>
+            <if test="reason != null">#{reason},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+    <insert id="batchSysUserConference">
+        insert into sys_user_conference(user_id, id_card, real_name, loan_application_id, loan_application_number, is_conference, reason, create_by, create_time, update_by, update_time, remark) values
+        <foreach item="item" index="index" collection="list" separator=",">
+            (#{item.userId},#{item.idCard},#{item.realName},#{item.loanApplicationId},#{item.loanApplicationNumber},#{item.isConference},#{item.reason},#{item.createBy},sysdate(),#{item.updateBy},#{item.updateTime},#{item.remark})
+        </foreach>
+    </insert>
+
+    <update id="updateSysUserConference" parameterType="SysUserConference">
+        update sys_user_conference
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="idCard != null">id_card = #{idCard},</if>
+            <if test="realName != null and realName != ''">real_name = #{realName},</if>
+            <if test="loanApplicationId != null">loan_application_id = #{loanApplicationId},</if>
+            <if test="loanApplicationNumber != null">loan_application_number = #{loanApplicationNumber},</if>
+            <if test="isConference != null">is_conference = #{isConference},</if>
+            <if test="reason != null">reason = #{reason},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where conference_id = #{conferenceId}
+    </update>
+
+    <delete id="deleteSysUserConferenceByConferenceId" parameterType="Long">
+        delete from sys_user_conference where conference_id = #{conferenceId}
+    </delete>
+
+    <delete id="deleteSysUserConferenceByConferenceIds" parameterType="String">
+        delete from sys_user_conference where conference_id in 
+        <foreach item="conferenceId" collection="array" open="(" separator="," close=")">
+            #{conferenceId}
+        </foreach>
+    </delete>
+</mapper>