소스 검색

Merge branch 'wq1' of SH-Arbitrate/Mediation-Backend into dev

wangqiong123 2 년 전
부모
커밋
5c0439f1f0
14개의 변경된 파일388개의 추가작업 그리고 83개의 파일을 삭제
  1. 12
    0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/mscase/MsCaseApplicationController.java
  2. 15
    3
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/mscase/MsCaseApplicationPayController.java
  3. 12
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/mscase/CaseConfirmPayDTO.java
  4. 68
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/entity/mscase/MsCaseAudit.java
  5. 4
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationReq.java
  6. 4
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationVO.java
  7. 11
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseApplicationMapper.java
  8. 17
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseAuditMapper.java
  9. 7
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/MsCaseApplicationService.java
  10. 8
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/MsCasePaymentService.java
  11. 44
    22
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java
  12. 166
    54
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCasePaymentServiceImpl.java
  13. 18
    0
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/mscase/MsCaseAuditMapper.xml
  14. 2
    2
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/sendrecord/SendMailRecordMapper.xml

+ 12
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/mscase/MsCaseApplicationController.java 파일 보기

10
 import com.ruoyi.common.core.page.TableDataInfo;
10
 import com.ruoyi.common.core.page.TableDataInfo;
11
 import com.ruoyi.common.exception.EsignDemoException;
11
 import com.ruoyi.common.exception.EsignDemoException;
12
 import com.ruoyi.common.utils.IdCardUtils;
12
 import com.ruoyi.common.utils.IdCardUtils;
13
+import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord;
13
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
14
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
14
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
15
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
15
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.*;
16
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.*;
354
 
355
 
355
         return  success(videoService.reserveConferenceList(caseId));
356
         return  success(videoService.reserveConferenceList(caseId));
356
     }
357
     }
358
+    /**
359
+     * 查询短信发送记录
360
+     * @param smsSendRecord
361
+     * @return
362
+     */
363
+    @PostMapping("/smsRecord")
364
+    public TableDataInfo getSmsSendRecord(@RequestBody SmsSendRecord smsSendRecord){
365
+        startPage();
366
+        List<SmsSendRecord> list = caseApplicationService.getSmsSendRecord(smsSendRecord);
367
+        return getDataTable(list);
368
+    }
357
 }
369
 }

+ 15
- 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/mscase/MsCaseApplicationPayController.java 파일 보기

65
     }
65
     }
66
 
66
 
67
     /**
67
     /**
68
-     * 确认缴费,支持批量(batchNumber不为空,则为批量)
68
+     * 申请人/被申请人确认缴费,支持批量(batchNumber不为空,则为批量)
69
      * @param dto 缴费传入参数
69
      * @param dto 缴费传入参数
70
      * @return 统一响应结果
70
      * @return 统一响应结果
71
      */
71
      */
79
         return casePaymentService.confirmPayment(dto);
79
         return casePaymentService.confirmPayment(dto);
80
     }
80
     }
81
     /**
81
     /**
82
-     * 确认已缴费,支持批量(batchNumber不为空,则为批量)
82
+     * 财务确认已缴费,支持批量(batchNumber不为空,则为批量)
83
      * @param dto 缴费传入参数
83
      * @param dto 缴费传入参数
84
      * @return 统一响应结果
84
      * @return 统一响应结果
85
      */
85
      */
91
         }
91
         }
92
         return casePaymentService.confirmPaid(dto);
92
         return casePaymentService.confirmPaid(dto);
93
     }
93
     }
94
-
94
+    /**
95
+     * 财务确认被申请人已缴费,支持批量(batchNumber不为空,则为批量)
96
+     * @param dto 缴费传入参数
97
+     * @return 统一响应结果
98
+     */
99
+    @PostMapping("/resConfirmPaid")
100
+    public AjaxResult resConfirmPaid(@RequestBody CaseConfirmPayDTO dto) {
101
+        if ((dto.getCaseId() == null && StrUtil.isEmpty(dto.getBatchNumber()))
102
+                || dto.getCaseFlowId() == null) {
103
+            return error("参数校验失败");
104
+        }
105
+        return casePaymentService.confirmPaid(dto);
106
+    }
95
 }
107
 }

+ 12
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/mscase/CaseConfirmPayDTO.java 파일 보기

30
      * 缴费凭证
30
      * 缴费凭证
31
      */
31
      */
32
     private List<MsCaseAttach> payOrderList;
32
     private List<MsCaseAttach> payOrderList;
33
+    /**
34
+     * 是否同意,0-拒绝,1-同意
35
+     */
36
+    private Integer yesOrNo;
37
+    /**
38
+     * 拒绝原因
39
+     */
40
+    private String reason;
41
+    /**
42
+     * 是否申请人确认缴费
43
+     */
44
+    private Boolean applicantConfirm=true;
33
 
45
 
34
 }
46
 }

+ 68
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/entity/mscase/MsCaseAudit.java 파일 보기

1
+package com.ruoyi.wisdomarbitrate.domain.entity.mscase;
2
+
3
+import lombok.Getter;
4
+import lombok.Setter;
5
+import lombok.ToString;
6
+
7
+import javax.persistence.Column;
8
+import javax.persistence.GeneratedValue;
9
+import javax.persistence.Id;
10
+import javax.persistence.Table;
11
+import java.util.Date;
12
+
13
+@Getter
14
+@Setter
15
+@ToString
16
+@Table(name = "ms_case_audit")
17
+public class MsCaseAudit {
18
+    @Id
19
+    @GeneratedValue(generator = "JDBC")
20
+    private Long id;
21
+
22
+    /**
23
+     * 案件申请id
24
+     */
25
+    @Column(name = "case_appli_id")
26
+    private Long caseAppliId;
27
+
28
+    /**
29
+     * 案件节点
30
+     */
31
+    @Column(name = "case_node")
32
+    private Integer caseNode;
33
+
34
+    /**
35
+     * 案件状态
36
+     */
37
+    @Column(name = "case_status_name")
38
+    private String caseStatusName;
39
+
40
+    /**
41
+     * 是否同意,0-拒绝,1-同意,默认1同意
42
+     */
43
+    @Column(name = "yes_or_no")
44
+    private Integer yesOrNo;
45
+
46
+    /**
47
+     * 操作人用户名
48
+     */
49
+    @Column(name = "create_by")
50
+    private String createBy;
51
+
52
+    /**
53
+     * 操作人用户昵称
54
+     */
55
+    @Column(name = "create_nick_name")
56
+    private String createNickName;
57
+
58
+    /**
59
+     * 创建时间
60
+     */
61
+    @Column(name = "create_time")
62
+    private Date createTime;
63
+
64
+    /**
65
+     * 拒绝原因
66
+     */
67
+    private String reason;
68
+}

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationReq.java 파일 보기

95
      * 是否小程序,1-是
95
      * 是否小程序,1-是
96
      */
96
      */
97
     private Integer miniProgressFlag ;
97
     private Integer miniProgressFlag ;
98
+    /**
99
+     * 是否线上调解,1-线上调解
100
+     */
101
+    private Integer mediationMethod ;
98
     /**
102
     /**
99
      * 附件
103
      * 附件
100
      */
104
      */

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationVO.java 파일 보기

69
      * 调解方式名称,1-线上调解,2-线下调解
69
      * 调解方式名称,1-线上调解,2-线下调解
70
      */
70
      */
71
     private String mediationMethodName;
71
     private String mediationMethodName;
72
+    /**
73
+     * 缴费拒绝原因
74
+     */
75
+    private String reason;
72
 
76
 
73
 
77
 
74
 }
78
 }

+ 11
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseApplicationMapper.java 파일 보기

58
             "</if> " +
58
             "</if> " +
59
             "<if test=\"req.caseFlowId != null \">" +
59
             "<if test=\"req.caseFlowId != null \">" +
60
             "    AND c.case_flow_id = #{req.caseFlowId} " +
60
             "    AND c.case_flow_id = #{req.caseFlowId} " +
61
-            "</if> " +
61
+            "</if> "
62
+            +
63
+            "<if test=\"req.mediationMethod != null \">" +
64
+            "    AND c.mediation_method = #{req.mediationMethod} " +
65
+            "</if> "
66
+            +
62
             "<if test=\"req.caseNum != null and req.caseNum != ''\">" +
67
             "<if test=\"req.caseNum != null and req.caseNum != ''\">" +
63
             "    AND c.case_num  like concat('%', #{req.caseNum}, '%') "+
68
             "    AND c.case_num  like concat('%', #{req.caseNum}, '%') "+
64
             "</if> "
69
             "</if> "
82
             "join ms_case_affiliate a on c.id=a.case_appli_id  <where> r.create_by=#{req.userName}  and c.id not in (" +
87
             "join ms_case_affiliate a on c.id=a.case_appli_id  <where> r.create_by=#{req.userName}  and c.id not in (" +
83
             "select c1.id from  ms_case_application c1 JOIN ms_case_affiliate a1 ON a1.case_appli_id = c1.id"
88
             "select c1.id from  ms_case_application c1 JOIN ms_case_affiliate a1 ON a1.case_appli_id = c1.id"
84
             +
89
             +
90
+            "<if test=\"req.mediationMethod != null \">" +
91
+            "    AND c.mediation_method = #{req.mediationMethod} " +
92
+            "</if> "
93
+            +
94
+
85
             "<if test='req.applicantFlag != null and req.applicationOrganIds != null and req.applicationOrganIds.size() > 0  '> and  a.application_id in" +
95
             "<if test='req.applicantFlag != null and req.applicationOrganIds != null and req.applicationOrganIds.size() > 0  '> and  a.application_id in" +
86
             "<foreach item='organId' index='index' collection='req.applicationOrganIds' open='(' separator=',' close=')'>" +
96
             "<foreach item='organId' index='index' collection='req.applicationOrganIds' open='(' separator=',' close=')'>" +
87
             "#{organId}" +
97
             "#{organId}" +

+ 17
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseAuditMapper.java 파일 보기

1
+package com.ruoyi.wisdomarbitrate.mapper.mscase;
2
+
3
+import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAudit;
4
+import org.apache.ibatis.annotations.Param;
5
+import org.apache.ibatis.annotations.Select;
6
+import tk.mybatis.mapper.common.Mapper;
7
+
8
+public interface MsCaseAuditMapper extends Mapper<MsCaseAudit> {
9
+    /**
10
+     * 查询拒绝原因
11
+     * @param id
12
+     * @param caseFlowId
13
+     * @return
14
+     */
15
+    @Select("select reason from ms_case_audit where case_appli_id=#{caseAppliId} and case_node=#{caseFlowId} order by id desc limit 1")
16
+    String selectByCaseId(@Param("caseAppliId") Long id, @Param("caseFlowId") Integer caseFlowId);
17
+}

+ 7
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/MsCaseApplicationService.java 파일 보기

5
 import com.ruoyi.common.core.domain.entity.SysUser;
5
 import com.ruoyi.common.core.domain.entity.SysUser;
6
 import com.ruoyi.common.exception.EsignDemoException;
6
 import com.ruoyi.common.exception.EsignDemoException;
7
 import com.ruoyi.system.domain.entity.flow.MsCaseFlow;
7
 import com.ruoyi.system.domain.entity.flow.MsCaseFlow;
8
+import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord;
8
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
9
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
9
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
10
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
10
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
11
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
220
      * 根据登录人返回用户信息
221
      * 根据登录人返回用户信息
221
      */
222
      */
222
     SysUser getUserInfo();
223
     SysUser getUserInfo();
224
+    /**
225
+     * 查询短信发送记录
226
+     * @param smsSendRecord
227
+     * @return
228
+     */
229
+    List<SmsSendRecord> getSmsSendRecord(SmsSendRecord smsSendRecord);
223
 }
230
 }

+ 8
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/MsCasePaymentService.java 파일 보기

47
      * @param nextFlow
47
      * @param nextFlow
48
      * @param application
48
      * @param application
49
      */
49
      */
50
-    public void confirmPaid(MsCaseFlow currentFlow, MsCaseFlow nextFlow, MsCaseApplication application);
50
+    public void confirmPaid(CaseConfirmPayDTO dto,MsCaseFlow currentFlow, MsCaseFlow nextFlow, MsCaseApplication application);
51
+    /**
52
+     * 被申请人确认已缴费
53
+     * @param dto
54
+     * @return
55
+     */
56
+    AjaxResult resConfirmPaid(CaseConfirmPayDTO dto);
57
+
51
     /**
58
     /**
52
      * 确认缴费
59
      * 确认缴费
53
      *
60
      *

+ 44
- 22
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java 파일 보기

140
     private SealManageMapper sealManageMapper;
140
     private SealManageMapper sealManageMapper;
141
     @Autowired
141
     @Autowired
142
     private MsSealSignRecordMapper sealSignRecordMapper;
142
     private MsSealSignRecordMapper sealSignRecordMapper;
143
+    @Autowired
144
+    private MsCaseAuditMapper auditMapper;
143
     // 案件基本字段
145
     // 案件基本字段
144
     public static final List<String> CASE_BASE_COLUMN = Arrays.asList("caseSubjectAmount", "arbitratClaims", "facts", "requestRule");
146
     public static final List<String> CASE_BASE_COLUMN = Arrays.asList("caseSubjectAmount", "arbitratClaims", "facts", "requestRule");
145
     public static final SimpleDateFormat yyyymmddFormat = new SimpleDateFormat("yyyy-MM-dd");
147
     public static final SimpleDateFormat yyyymmddFormat = new SimpleDateFormat("yyyy-MM-dd");
207
                 }
209
                 }
208
             }
210
             }
209
         }
211
         }
212
+        if(req.getMediationMethod()!=null){
213
+            // 查询视频审理
214
+            req.setCaseFlowId(9);
215
+        }
210
         startPage();
216
         startPage();
211
         // 查询案件列表
217
         // 查询案件列表
212
         return  msCaseApplicationMapper.list(req, caseStatusNames);
218
         return  msCaseApplicationMapper.list(req, caseStatusNames);
226
         // 自定义字段
232
         // 自定义字段
227
         List<MsColumnValueVO> columnValueVOS = columnValueMapper.listByCaseId(id);
233
         List<MsColumnValueVO> columnValueVOS = columnValueMapper.listByCaseId(id);
228
         vo.setColumnValueList(columnValueVOS);
234
         vo.setColumnValueList(columnValueVOS);
235
+        // 查询拒绝原因
236
+        vo.setReason(auditMapper.selectByCaseId(id,caseApplication.getCaseFlowId()));
229
         return vo;
237
         return vo;
230
     }
238
     }
231
 
239
 
314
                 if (StrUtil.isNotEmpty(affiliate.getRespondentEmail())) {
322
                 if (StrUtil.isNotEmpty(affiliate.getRespondentEmail())) {
315
                     affiliate.setRespondentEmail(affiliate.getRespondentEmail().replace("\n", "").replaceAll("\\s", ""));
323
                     affiliate.setRespondentEmail(affiliate.getRespondentEmail().replace("\n", "").replaceAll("\\s", ""));
316
                 }
324
                 }
317
-                msCaseAffiliateMapper.insert(affiliate);
325
+                    msCaseAffiliateMapper.insert(affiliate);
318
                      // 批量生成调解申请书
326
                      // 批量生成调解申请书
319
                     MsCaseApplicationReq req = new MsCaseApplicationReq();
327
                     MsCaseApplicationReq req = new MsCaseApplicationReq();
320
                         req.setCaseFlowId(caseFlow.getId());
328
                         req.setCaseFlowId(caseFlow.getId());
326
                     }
334
                     }
327
                     // 生成调解申请书
335
                     // 生成调解申请书
328
                     req.setTemplateType(TemplateTypeEnum.MEDIATION_APPLICATION.getCode());
336
                     req.setTemplateType(TemplateTypeEnum.MEDIATION_APPLICATION.getCode());
337
+                    req.setTemplateId(String.valueOf(templateId));
329
 
338
 
330
                     caseApplicationService.generateApplication(req);
339
                     caseApplicationService.generateApplication(req);
331
             // 保存案件附件
340
             // 保存案件附件
876
      */
885
      */
877
     @Transactional
886
     @Transactional
878
     public void accept(MsCaseApplication application, MsCaseApplicationVO req, Map<Long, MsCaseAffiliate> affiliateMap) {
887
     public void accept(MsCaseApplication application, MsCaseApplicationVO req, Map<Long, MsCaseAffiliate> affiliateMap) {
879
-
880
-
881
         application.setPaperFlag(req.getPaperFlag());
888
         application.setPaperFlag(req.getPaperFlag());
882
         application.setArbitrateConfirm(req.getArbitrateConfirm());
889
         application.setArbitrateConfirm(req.getArbitrateConfirm());
883
         application.setMediationMethod(req.getMediationMethod());
890
         application.setMediationMethod(req.getMediationMethod());
885
         application.setUpdateTime(new Date());
892
         application.setUpdateTime(new Date());
886
         application.setBatchNumber(null);
893
         application.setBatchNumber(null);
887
         msCaseApplicationMapper.updateByPrimaryKeySelective(application);
894
         msCaseApplicationMapper.updateByPrimaryKeySelective(application);
888
-        MsCaseFlow caseFlow = caseApplicationService.nextFlow(application.getId(), req.getCaseFlowId(),req.getLockStatus());
895
+      //  MsCaseFlow caseFlow = caseApplicationService.nextFlow(application.getId(), req.getCaseFlowId(),req.getLockStatus());
889
         // 给申请人被申请人发送短信
896
         // 给申请人被申请人发送短信
890
         if (affiliateMap.containsKey(application.getId())) {
897
         if (affiliateMap.containsKey(application.getId())) {
891
             MsCaseAffiliate affiliate = affiliateMap.get(application.getId());
898
             MsCaseAffiliate affiliate = affiliateMap.get(application.getId());
892
 
899
 
893
-            if (StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())) {
894
-                String sendContent = "尊敬的" + affiliate.getNameAgent() + "用户,您的" + application.getCaseNum() + "案件,已成功受理,请知晓,如非本人操作,请忽略本短信";
895
-                // 给申请人发送案件受理短信 尊敬的{1}用户,您的{2}仲裁案件,已成功受理,请知晓,如非本人操作,请忽略本短信
896
-                Boolean smsFlag = SmsUtils.sendSms(application.getId(), "2073601", affiliate.getContactTelphoneAgent(), new String[]{affiliate.getNameAgent(), application.getCaseNum()});
897
-             //   CaseLogUtils.insertCaseLog(application.getId(), caseFlow.getNodeId(), caseFlow.getNodeName(), "向申请人发送短信," + sendContent);
898
-                SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), application.getCaseNum(), affiliate.getContactTelphoneAgent(), new Date(), sendContent);
899
-                if (smsFlag) {
900
-                    // 发送成功
901
-                    smsSendRecord.setSendStatus(YesOrNoEnum.YES.getCode());
902
-                } else {
903
-                    smsSendRecord.setSendStatus(YesOrNoEnum.NO.getCode());
904
-                }
905
-                smsRecordMapper.saveSmsSendRecord(smsSendRecord);
906
-            }
900
+//            if (StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())||StrUtil.isNotEmpty(affiliate.getApplicationPhone())) {
901
+//                String sendContent = "尊敬的" + affiliate.getNameAgent() + "用户,您的" + application.getCaseNum() + "案件,已成功受理,请知晓,如非本人操作,请忽略本短信";
902
+//                // 给申请人发送案件受理短信 尊敬的{1}用户,您的{2}仲裁案件,已成功受理,请知晓,如非本人操作,请忽略本短信
903
+//                Boolean smsFlag = SmsUtils.sendSms(application.getId(), "2073601", affiliate.getContactTelphoneAgent(), new String[]{affiliate.getNameAgent(), application.getCaseNum()});
904
+//             //   CaseLogUtils.insertCaseLog(application.getId(), caseFlow.getNodeId(), caseFlow.getNodeName(), "向申请人发送短信," + sendContent);
905
+//                SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), application.getCaseNum(), affiliate.getContactTelphoneAgent(), new Date(), sendContent);
906
+//                if (smsFlag) {
907
+//                    // 发送成功
908
+//                    smsSendRecord.setSendStatus(YesOrNoEnum.YES.getCode());
909
+//                } else {
910
+//                    smsSendRecord.setSendStatus(YesOrNoEnum.NO.getCode());
911
+//                }
912
+//                smsRecordMapper.saveSmsSendRecord(smsSendRecord);
913
+//            }
907
             // 被申请人发送短信
914
             // 被申请人发送短信
908
             if (StrUtil.isNotEmpty(affiliate.getRespondentPhone())) {
915
             if (StrUtil.isNotEmpty(affiliate.getRespondentPhone())) {
909
-                String sendContent = "尊敬的用户,您的" + application.getCaseNum() + "的案件已经受理,请登录调解系统进行缴费处理。请知晓,如非本人操作,请忽略本短信";
910
-                // 给被申请人发送案件受理短信 2068468 待缴费通知      尊敬的用户,您编号为{1}的案件已经受理,请登录调解系统进行缴费处理。请知晓,如非本人操作,请忽略本短信
911
-                Boolean smsFlag = SmsUtils.sendSms(application.getId(), "2068468", affiliate.getRespondentPhone(), new String[]{ application.getCaseNum()});
916
+                String sendContent = "尊敬的用户,您的" + application.getCaseNum() + "的案件已成功提交,请登录调解系统进行缴费处理。请知晓,如非本人操作,请忽略本短信";
917
+                // 给被申请人发送案件受理短信 2074247 待缴费通知      尊敬的用户,您编号为{1}的案件已成功提交,请登录调解系统进行缴费处理。请知晓,如非本人操作,请忽略本短信
918
+                Boolean smsFlag = SmsUtils.sendSms(application.getId(), "2074247", affiliate.getRespondentPhone(), new String[]{ application.getCaseNum()});
912
               //  CaseLogUtils.insertCaseLog(application.getId(), caseFlow.getNodeId(), caseFlow.getNodeName(), "向被申请人发送短信," + sendContent);
919
               //  CaseLogUtils.insertCaseLog(application.getId(), caseFlow.getNodeId(), caseFlow.getNodeName(), "向被申请人发送短信," + sendContent);
913
                 SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), application.getCaseNum(), affiliate.getRespondentPhone(), new Date(), sendContent);
920
                 SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), application.getCaseNum(), affiliate.getRespondentPhone(), new Date(), sendContent);
914
                 if (smsFlag) {
921
                 if (smsFlag) {
1063
         if (currentFlow == null) {
1070
         if (currentFlow == null) {
1064
             return AjaxResult.error("当前流程不存在");
1071
             return AjaxResult.error("当前流程不存在");
1065
         }
1072
         }
1066
-        Integer miniProgressFlag = vo.getMiniProgressFlag() == null ? MediatorTypeEnum.PC.getCode() : vo.getMiniProgressFlag();
1073
+       // Integer miniProgressFlag = vo.getMiniProgressFlag() == null ? MediatorTypeEnum.PC.getCode() : vo.getMiniProgressFlag();
1074
+        // 预约,申请人预约为Null,否则为被申请人预约
1075
+        Integer miniProgressFlag=null;
1076
+        List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
1077
+        if(CollectionUtil.isNotEmpty(roles)){
1078
+            for (SysRole role : roles) {
1079
+                if(role.getRoleName().equals("被申请人")){
1080
+                    miniProgressFlag=YesOrNoEnum.YES.getCode();
1081
+                }
1082
+            }
1083
+        }
1084
+
1067
         // 先删除已选择的调解员,在新增
1085
         // 先删除已选择的调解员,在新增
1068
         Example mediatorExample = new Example(MsCaseMediator.class);
1086
         Example mediatorExample = new Example(MsCaseMediator.class);
1069
         Example.Criteria mediatorCriteria = mediatorExample.createCriteria();
1087
         Example.Criteria mediatorCriteria = mediatorExample.createCriteria();
1314
         }
1332
         }
1315
         return sysUser;
1333
         return sysUser;
1316
     }
1334
     }
1335
+    @Override
1336
+    public List<SmsSendRecord> getSmsSendRecord(SmsSendRecord smsSendRecord) {
1337
+        return smsRecordMapper.getSmsSendRecord(smsSendRecord);
1338
+    }
1317
 
1339
 
1318
     /**
1340
     /**
1319
      * 查询预约信息
1341
      * 查询预约信息

+ 166
- 54
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCasePaymentServiceImpl.java 파일 보기

11
 import com.ruoyi.common.enums.AnnexTypeEnum;
11
 import com.ruoyi.common.enums.AnnexTypeEnum;
12
 import com.ruoyi.common.enums.PaymentStatusEnum;
12
 import com.ruoyi.common.enums.PaymentStatusEnum;
13
 import com.ruoyi.common.enums.YesOrNoEnum;
13
 import com.ruoyi.common.enums.YesOrNoEnum;
14
+import com.ruoyi.common.utils.SecurityUtils;
14
 import com.ruoyi.common.utils.SmsUtils;
15
 import com.ruoyi.common.utils.SmsUtils;
15
 import com.ruoyi.dto.PayRequest;
16
 import com.ruoyi.dto.PayRequest;
16
 import com.ruoyi.dto.PayResponse;
17
 import com.ruoyi.dto.PayResponse;
19
 import com.ruoyi.wisdomarbitrate.domain.dto.mscase.CaseConfirmPayDTO;
20
 import com.ruoyi.wisdomarbitrate.domain.dto.mscase.CaseConfirmPayDTO;
20
 import com.ruoyi.wisdomarbitrate.domain.dto.mscase.CasePayDTO;
21
 import com.ruoyi.wisdomarbitrate.domain.dto.mscase.CasePayDTO;
21
 import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord;
22
 import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord;
22
-import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
23
-import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
24
-import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
25
-import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCasePaymentRecord;
23
+import com.ruoyi.wisdomarbitrate.domain.entity.mscase.*;
26
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.PaymentDetailVO;
24
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.PaymentDetailVO;
27
-import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseAffiliateMapper;
28
-import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseApplicationMapper;
29
-import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseAttachMapper;
30
-import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCasePaymentRecordMapper;
25
+import com.ruoyi.wisdomarbitrate.mapper.mscase.*;
31
 import com.ruoyi.wisdomarbitrate.mapper.sendrecord.SmsRecordMapper;
26
 import com.ruoyi.wisdomarbitrate.mapper.sendrecord.SmsRecordMapper;
32
 import com.ruoyi.wisdomarbitrate.service.mscase.MsCaseApplicationService;
27
 import com.ruoyi.wisdomarbitrate.service.mscase.MsCaseApplicationService;
33
 import com.ruoyi.wisdomarbitrate.service.mscase.MsCasePaymentService;
28
 import com.ruoyi.wisdomarbitrate.service.mscase.MsCasePaymentService;
66
     MsCasePaymentService casePaymentService;
61
     MsCasePaymentService casePaymentService;
67
     @Autowired
62
     @Autowired
68
     private RedisCache redisCache;
63
     private RedisCache redisCache;
64
+    @Autowired
65
+    private MsCaseAuditMapper auditMapper;
69
 
66
 
70
 
67
 
71
     @Override
68
     @Override
273
         if (currentFlow == null) {
270
         if (currentFlow == null) {
274
             return AjaxResult.error("未找到当前流程节点");
271
             return AjaxResult.error("未找到当前流程节点");
275
         }
272
         }
273
+        MsCaseFlow flow =null;
274
+        // 如果同意,查找下一个流程节点,拒绝,查找上一个流程
275
+        if (dto.getYesOrNo().equals(YesOrNoEnum.YES.getCode())) {
276
+            // 同意,根据流程id查找下一个流程节点
277
+            flow = caseFlowMapper.nextFlow(dto.getCaseFlowId());
278
+            if (flow == null) {
279
+                return AjaxResult.error("未找到下一个流程节点");
280
+            }
281
+        } else {
282
+            if (currentFlow.getBackFlowId() == null) {
283
+                return AjaxResult.error("未找到驳回流程");
284
+            }
285
+            // 拒绝,查找驳回流程
286
+            flow = caseFlowMapper.selectByPrimaryKey(currentFlow.getBackFlowId());
287
+            if (flow == null) {
288
+                return AjaxResult.error("未找到驳回流程");
289
+            }
276
 
290
 
277
-        // 根据流程id查找下一个流程节点
278
-        MsCaseFlow nextFlow = caseFlowMapper.nextFlow(dto.getCaseFlowId());
279
-        if (nextFlow == null) {
280
-            return AjaxResult.error("未找到下一个流程节点");
281
         }
291
         }
282
-
283
         if (StrUtil.isNotEmpty(dto.getBatchNumber())) {
292
         if (StrUtil.isNotEmpty(dto.getBatchNumber())) {
284
             // 批量
293
             // 批量
285
             List<MsCaseApplication> applicationList = applicationService.listByBatchNumber(dto.getBatchNumber(), dto.getCaseFlowId());
294
             List<MsCaseApplication> applicationList = applicationService.listByBatchNumber(dto.getBatchNumber(), dto.getCaseFlowId());
286
-            if(CollectionUtil.isEmpty(applicationList)){
295
+            if (CollectionUtil.isEmpty(applicationList)) {
287
                 return AjaxResult.error("该批号下未找到案件");
296
                 return AjaxResult.error("该批号下未找到案件");
288
             }
297
             }
289
             for (MsCaseApplication application : applicationList) {
298
             for (MsCaseApplication application : applicationList) {
290
-                casePaymentService.confirmPaid(currentFlow,nextFlow, application);
299
+                casePaymentService.confirmPaid(dto, currentFlow, flow, application);
291
             }
300
             }
292
-        }else {
293
-            MsCaseApplication caseApplication=new MsCaseApplication();
301
+        } else {
302
+            MsCaseApplication caseApplication = new MsCaseApplication();
294
             caseApplication.setId(dto.getCaseId());
303
             caseApplication.setId(dto.getCaseId());
295
             caseApplication.setLockStatus(YesOrNoEnum.YES.getCode());
304
             caseApplication.setLockStatus(YesOrNoEnum.YES.getCode());
296
-            casePaymentService.confirmPaid(currentFlow,nextFlow,caseApplication );
305
+            casePaymentService.confirmPaid(dto, currentFlow, flow, caseApplication);
297
         }
306
         }
298
 
307
 
299
 
308
 
300
-        return AjaxResult.success("确认缴费成功");
309
+
310
+        return AjaxResult.success();
301
     }
311
     }
302
 
312
 
303
     /**
313
     /**
304
      * 确认已缴费
314
      * 确认已缴费
305
-     * @param nextFlow
315
+     * @param flow
306
      * @param application
316
      * @param application
307
      * @param
317
      * @param
308
      */
318
      */
309
     @Transactional
319
     @Transactional
310
-    public void confirmPaid(MsCaseFlow currentFlow,MsCaseFlow nextFlow, MsCaseApplication application) {
320
+    public void confirmPaid(CaseConfirmPayDTO dto, MsCaseFlow currentFlow, MsCaseFlow flow, MsCaseApplication application) {
311
         // 查询案件
321
         // 查询案件
312
         MsCaseApplication caseAppllication = caseApplicationMapper.selectByPrimaryKey(application.getId());
322
         MsCaseApplication caseAppllication = caseApplicationMapper.selectByPrimaryKey(application.getId());
313
-        if(caseAppllication==null){
323
+        if (caseAppllication == null) {
314
             throw new RuntimeException("未找到该案件");
324
             throw new RuntimeException("未找到该案件");
315
         }
325
         }
316
         //更改记录表里的支付状态和支付时间
326
         //更改记录表里的支付状态和支付时间
317
         MsCasePaymentRecord casePaymentRecord = new MsCasePaymentRecord();
327
         MsCasePaymentRecord casePaymentRecord = new MsCasePaymentRecord();
318
-        casePaymentRecord.setPaymentStatus(1);
328
+        if (dto.getYesOrNo().equals(YesOrNoEnum.YES.getCode())) {
329
+            // 同意
330
+            casePaymentRecord.setPaymentStatus(1);
331
+            casePaymentRecord.setPaymentTime(new Date());
332
+            casePaymentRecord.setUpdateTime(new Date());
333
+        }else {
334
+            casePaymentRecord.setPaymentStatus(0);
335
+        }
319
         casePaymentRecord.setCaseId(application.getId());
336
         casePaymentRecord.setCaseId(application.getId());
320
-        casePaymentRecord.setPaymentTime(new Date());
321
-        casePaymentRecord.setUpdateTime(new Date());
322
         Example example = new Example(MsCasePaymentRecord.class);
337
         Example example = new Example(MsCasePaymentRecord.class);
323
         example.createCriteria().andEqualTo("caseId", casePaymentRecord.getCaseId());
338
         example.createCriteria().andEqualTo("caseId", casePaymentRecord.getCaseId());
324
-        casePaymentRecordMapper.updateByExampleSelective(casePaymentRecord,example);
339
+        casePaymentRecordMapper.updateByExampleSelective(casePaymentRecord, example);
325
         // 更改案件流程id和案件状态
340
         // 更改案件流程id和案件状态
326
-        application.setCaseFlowId(nextFlow.getId());
327
-        application.setCaseStatusName(nextFlow.getCaseStatusName());
341
+        application.setCaseFlowId(flow.getId());
342
+        application.setCaseStatusName(flow.getCaseStatusName());
328
         caseApplicationMapper.updateByPrimaryKeySelective(application);
343
         caseApplicationMapper.updateByPrimaryKeySelective(application);
329
-        // 将该案件存放到redis,5日之内如果案件状态还是待受理状态,则发送不受理通知书并自动结束
330
-        redisCache.setCacheObject(String.valueOf(application.getId()), application, Constants.CASE_ACCEPT_EXPIRATION, TimeUnit.DAYS);
331
-
344
+        if (dto.getApplicantConfirm() && dto.getYesOrNo().equals(YesOrNoEnum.YES.getCode())) {
345
+            // 申请人确认缴费后将该案件存放到redis,5日之内如果案件状态还是待受理状态,则发送不受理通知书并自动结束
346
+            redisCache.setCacheObject(String.valueOf(application.getId()), application, Constants.CASE_ACCEPT_EXPIRATION, TimeUnit.DAYS);
347
+        }
332
         // 新增日志
348
         // 新增日志
333
-        CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"确认已缴费");
334
-
349
+        if (dto.getYesOrNo().equals(YesOrNoEnum.YES.getCode())) {
350
+            CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(), "确认已缴费");
351
+        }else {
352
+            CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(), "拒绝确认缴费,拒绝原因为:"+dto.getReason());
353
+        }
354
+        if (dto.getYesOrNo().equals(YesOrNoEnum.NO.getCode())) {
355
+            // 拒绝,新增审核记录
356
+            MsCaseAudit audit = new MsCaseAudit();
357
+            audit.setCaseNode(flow.getNodeId());
358
+            audit.setCaseStatusName(flow.getCaseStatusName());
359
+            audit.setCaseAppliId(dto.getCaseId());
360
+            audit.setYesOrNo(dto.getYesOrNo());
361
+            audit.setReason(dto.getReason());
362
+            audit.setCreateTime(new Date());
363
+            if (SecurityUtils.getLoginUser().getUser() != null) {
364
+                audit.setCreateBy(SecurityUtils.getUsername());
365
+                audit.setCreateNickName(SecurityUtils.getLoginUser().getUser().getNickName());
366
+            }
367
+            auditMapper.insert(audit);
368
+        }
335
         // 查询申请人电话,如果是自然人,代理人不为空,则给代理人发短信,代理人为空,给申请人发短信
369
         // 查询申请人电话,如果是自然人,代理人不为空,则给代理人发短信,代理人为空,给申请人发短信
336
         MsCaseAffiliate affiliate = caseAffiliateMapper.selectByPrimaryKey(application.getId());
370
         MsCaseAffiliate affiliate = caseAffiliateMapper.selectByPrimaryKey(application.getId());
337
-        if(affiliate != null) {
338
-            String phone="";
339
-            String userName="";
340
-            if(affiliate.getOrganizeFlag().equals(0)){
371
+        // 发送缴费通知
372
+        sendPaymentSms(dto,caseAppllication, affiliate,flow);
373
+
374
+
375
+    }
376
+    /**
377
+     * 被申请人确认已缴费
378
+     * @param dto
379
+     * @return
380
+     */
381
+    @Transactional
382
+    @Override
383
+    public AjaxResult resConfirmPaid(CaseConfirmPayDTO dto) {
384
+        dto.setApplicantConfirm(false);
385
+        confirmPaid(dto);
386
+        return AjaxResult.success();
387
+
388
+    }
389
+
390
+    /**
391
+     * 发送缴费短信
392
+     * @param dto
393
+     * @param caseAppllication
394
+     * @param affiliate
395
+     */
396
+    private void sendPaymentSms(CaseConfirmPayDTO dto, MsCaseApplication caseAppllication, MsCaseAffiliate affiliate,MsCaseFlow flow) {
397
+        if (affiliate != null) {
398
+            // 受理通知
399
+            String phone = "";
400
+            String userName = "";
401
+            // 缴费通知
402
+            String payPhone = "";
403
+            String payUserName = "";
404
+            if (affiliate.getOrganizeFlag().equals(0)) {
341
                 // 自然人
405
                 // 自然人
342
-                if(StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())){
343
-                    phone=affiliate.getContactTelphoneAgent();
344
-                    userName=affiliate.getNameAgent();
345
-                }else {
346
-                    phone=affiliate.getApplicationPhone();
347
-                    userName=affiliate.getApplicationName();
406
+                if (StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())) {
407
+                    phone = affiliate.getContactTelphoneAgent();
408
+                    userName = affiliate.getNameAgent();
409
+                } else {
410
+                    phone = affiliate.getApplicationPhone();
411
+                    userName = affiliate.getApplicationName();
348
                 }
412
                 }
349
 
413
 
350
-            }else {
351
-                phone=affiliate.getContactTelphoneAgent();
352
-                userName=affiliate.getNameAgent();
414
+            } else {
415
+                phone = affiliate.getContactTelphoneAgent();
416
+                userName = affiliate.getNameAgent();
353
             }
417
             }
354
-            if(StrUtil.isNotEmpty(phone)) {
355
-                // 发送短信 2051914 调解缴费成功通知   尊敬的{1},您的调解申请费用已缴费成功。
356
-                Boolean smsFlag = SmsUtils.sendSms(affiliate.getCaseAppliId(), "2051914", phone, new String[]{userName});
357
-             //   CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(), "申请人调解缴费成功通知短信,尊敬的" + userName + ",您的调解申请费用已缴费成功。");
358
-
418
+            if (StrUtil.isNotEmpty(phone)) {
419
+                payPhone=phone;
420
+                payUserName=userName;
421
+                if(!dto.getApplicantConfirm()) {
422
+                    // 被申请人发送通知
423
+                    payPhone=affiliate.getRespondentPhone();
424
+                    payUserName=affiliate.getRespondentName();
425
+                }
426
+                Boolean smsFlag =true;
427
+                SmsSendRecord smsSendRecord=null;
428
+                // 申请人被申请人发送缴费成功短信 2051914 调解缴费成功通知   尊敬的{1},您的调解申请费用已缴费成功。
429
+                    if (dto.getYesOrNo().equals(YesOrNoEnum.YES.getCode())) {
430
+                        smsFlag = SmsUtils.sendSms(affiliate.getCaseAppliId(), "2051914", payPhone, new String[]{payUserName});
431
+                        smsSendRecord = new SmsSendRecord(caseAppllication.getId(), caseAppllication.getCaseNum(), payPhone, new Date(), "尊敬的" + payUserName + ",您的调解申请费用已缴费成功。");
432
+                    } else {
433
+                        smsFlag = SmsUtils.sendSms(affiliate.getCaseAppliId(), "2074402", payPhone, new String[]{payUserName, caseAppllication.getCaseNum(), dto.getReason()});
434
+                        // 2074402	调解系统确认缴费不通过通知   尊敬的{1}用户,您的{2}案件,确认缴费未通过,理由为{3},请知晓,如非本人操作,请忽略本短信
435
+                        smsSendRecord = new SmsSendRecord(caseAppllication.getId(), caseAppllication.getCaseNum(), payPhone, new Date(), "尊敬的" + payUserName + "用户,您的" + caseAppllication.getCaseNum() + "案件,确认缴费未通过,理由为" + dto.getReason() + ",请知晓,如非本人操作,请忽略本短信");
436
+                    }
359
                 // 新增短信记录
437
                 // 新增短信记录
360
-                SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), caseAppllication.getCaseNum(), phone, new Date(), "尊敬的" + userName + ",您的调解申请费用已缴费成功。");
361
-                if(smsFlag){
438
+                if (smsFlag) {
362
                     smsSendRecord.setSendStatus(YesOrNoEnum.YES.getCode());
439
                     smsSendRecord.setSendStatus(YesOrNoEnum.YES.getCode());
363
-                }else {
440
+                } else {
364
                     smsSendRecord.setSendStatus(YesOrNoEnum.NO.getCode());
441
                     smsSendRecord.setSendStatus(YesOrNoEnum.NO.getCode());
365
                 }
442
                 }
366
                 smsRecordMapper.saveSmsSendRecord(smsSendRecord);
443
                 smsRecordMapper.saveSmsSendRecord(smsSendRecord);
444
+                if(dto.getApplicantConfirm()&& dto.getYesOrNo().equals(YesOrNoEnum.YES.getCode())) {
445
+                    // 申请人发送受理短信
446
+                    sendAcceptSms(dto, caseAppllication, userName, phone);
447
+                    // 被申请人发送受理短信
448
+                    sendAcceptSms(dto, caseAppllication, affiliate.getRespondentName(), affiliate.getRespondentPhone());
449
+                }
367
             }
450
             }
368
         }
451
         }
369
     }
452
     }
370
 
453
 
454
+    /**
455
+     * 发送受理短信
456
+     * @param dto
457
+     * @param caseAppllication
458
+     */
459
+    private void sendAcceptSms(CaseConfirmPayDTO dto, MsCaseApplication caseAppllication,String userName,String phone ) {
460
+            // 申请人被申请人发送受理通知书 2073601    尊敬的{1}用户,您的{2}案件,已成功受理,请知晓,如非本人操作,请忽略本短信。
461
+            Boolean  smsFlag =  SmsUtils.sendSms(caseAppllication.getId(), "2073601", phone, new String[]{userName, caseAppllication.getCaseNum()});
462
+            SmsSendRecord smsSendRecord = new SmsSendRecord(caseAppllication.getId(), caseAppllication.getCaseNum(), phone, new Date(), "尊敬的" + userName + "用户,您的" + caseAppllication.getCaseNum() +  "案件,已成功受理,请知晓,如非本人操作,请忽略本短信。");
463
+            // 新增短信记录
464
+            if (smsFlag) {
465
+                smsSendRecord.setSendStatus(YesOrNoEnum.YES.getCode());
466
+            } else {
467
+                smsSendRecord.setSendStatus(YesOrNoEnum.NO.getCode());
468
+            }
469
+            smsRecordMapper.saveSmsSendRecord(smsSendRecord);
470
+
471
+    }
472
+
371
     /**
473
     /**
372
      * 确认缴费
474
      * 确认缴费
373
      *
475
      *
380
         application.setPayType(dto.getPayType());
482
         application.setPayType(dto.getPayType());
381
         // 修改缴费附件
483
         // 修改缴费附件
382
         if (CollectionUtil.isNotEmpty(dto.getPayOrderList())) {
484
         if (CollectionUtil.isNotEmpty(dto.getPayOrderList())) {
485
+
486
+
383
             for (MsCaseAttach caseAttach : dto.getPayOrderList()) {
487
             for (MsCaseAttach caseAttach : dto.getPayOrderList()) {
488
+                // 先删除之前的缴费
489
+                if(currentFlow.getButtonAuthFlag().equals("caseManagement:list:pay")){
490
+                    // 申请人附件
491
+                    caseAttachMapper.deleteCaseAttachByCasedIdAndType(application.getId(),AnnexTypeEnum.PAYMENT_RECEIPT.getCode());
492
+                }else {
493
+                    // 被申请人缴费附件
494
+                    caseAttachMapper.deleteCaseAttachByCasedIdAndType(application.getId(),AnnexTypeEnum.RES_PAYMENT_RECEIPT.getCode());
495
+                }
384
                 caseAttach.setCaseAppliId(application.getId());
496
                 caseAttach.setCaseAppliId(application.getId());
385
                 caseAttachMapper.updateCaseAttach(caseAttach);
497
                 caseAttachMapper.updateCaseAttach(caseAttach);
386
             }
498
             }

+ 18
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/mscase/MsCaseAuditMapper.xml 파일 보기

1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseAuditMapper">
4
+  <resultMap id="BaseResultMap" type="com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAudit">
5
+    <!--
6
+      WARNING - @mbg.generated
7
+    -->
8
+    <id column="id" jdbcType="BIGINT" property="id" />
9
+    <result column="case_appli_id" jdbcType="BIGINT" property="caseAppliId" />
10
+    <result column="case_node" jdbcType="INTEGER" property="caseNode" />
11
+    <result column="case_status_name" jdbcType="VARCHAR" property="caseStatusName" />
12
+    <result column="yes_or_no" jdbcType="INTEGER" property="yesOrNo" />
13
+    <result column="create_by" jdbcType="VARCHAR" property="createBy" />
14
+    <result column="create_nick_name" jdbcType="VARCHAR" property="createNickName" />
15
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
16
+    <result column="reason" jdbcType="LONGVARCHAR" property="reason" />
17
+  </resultMap>
18
+</mapper>

+ 2
- 2
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/sendrecord/SendMailRecordMapper.xml 파일 보기

19
     <select id="selectSendMailRecord" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord" resultMap="SendMailRecordResult">
19
     <select id="selectSendMailRecord" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord" resultMap="SendMailRecordResult">
20
         SELECT s.id ,s.mail_name ,s.mail_content ,s.mail_address ,s.send_time ,s.case_id ,s.create_time ,s.create_by ,
20
         SELECT s.id ,s.mail_name ,s.mail_content ,s.mail_address ,s.send_time ,s.case_id ,s.create_time ,s.create_by ,
21
         s.update_by ,s.update_time , s.send_status ,c.case_num
21
         s.update_by ,s.update_time , s.send_status ,c.case_num
22
-        from send_mail_record s left join ms_case_application c
22
+        from ms_send_mail_record s left join ms_case_application c
23
         on s.case_id  = c.id
23
         on s.case_id  = c.id
24
         <where>
24
         <where>
25
             <if test="caseNum != null and caseNum != ''">
25
             <if test="caseNum != null and caseNum != ''">
30
     </select>
30
     </select>
31
 
31
 
32
     <insert id="saveSendMailRecord">
32
     <insert id="saveSendMailRecord">
33
-        insert into send_mail_record(
33
+        insert into ms_send_mail_record(
34
         <if test="mailName != null and mailName != ''">mail_name,</if>
34
         <if test="mailName != null and mailName != ''">mail_name,</if>
35
         <if test="mailContent != null and mailContent != ''">mail_content,</if>
35
         <if test="mailContent != null and mailContent != ''">mail_content,</if>
36
         <if test="mailAddress != null and mailAddress != ''">mail_address,</if>
36
         <if test="mailAddress != null and mailAddress != ''">mail_address,</if>