18792927508 2 yıl önce
ebeveyn
işleme
0b96d4351d
18 değiştirilmiş dosya ile 233 ekleme ve 111 silme
  1. 22
    0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/mscase/MsCaseApplicationController.java
  2. 4
    0
      ruoyi-admin/src/main/resources/application.yml
  3. 0
    58
      ruoyi-common/src/main/java/com/ruoyi/common/constant/CaseApplicationConstants.java
  4. 1
    1
      ruoyi-common/src/main/java/com/ruoyi/common/enums/AnnexTypeEnum.java
  5. 2
    5
      ruoyi-common/src/main/java/com/ruoyi/common/utils/EmailUtil.java
  6. 1
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/base/StringIdsReq.java
  7. 3
    4
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/CaseApplicationVO.java
  8. 2
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationReq.java
  9. 4
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationVO.java
  10. 26
    6
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseApplicationMapper.java
  11. 6
    2
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseAttachMapper.java
  12. 7
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/template/TemplateManageMapper.java
  13. 12
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/MsCaseApplicationService.java
  14. 126
    26
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java
  15. 1
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCasePaymentServiceImpl.java
  16. 3
    6
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/SignAward.java
  17. 9
    0
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/mscase/MsCaseAttachMapper.xml
  18. 4
    0
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/template/TemplateManageMapper.xml

+ 22
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/mscase/MsCaseApplicationController.java Dosyayı Görüntüle

51
         List<MsCaseApplicationVO> list = caseApplicationService.list(req);
51
         List<MsCaseApplicationVO> list = caseApplicationService.list(req);
52
         return getDataTable(list);
52
         return getDataTable(list);
53
     }
53
     }
54
+    /**
55
+     * 根据登录人返回用户信息
56
+     */
57
+    @GetMapping("/getUserInfo")
58
+    public AjaxResult getUserInfo()
59
+    {
60
+
61
+
62
+        return success(caseApplicationService.getUserInfo());
63
+    }
54
     /**
64
     /**
55
      * 新增案件
65
      * 新增案件
56
      */
66
      */
63
 
73
 
64
         return success(caseApplicationService.insert(caseApplication));
74
         return success(caseApplicationService.insert(caseApplication));
65
     }
75
     }
76
+
66
     /**
77
     /**
67
      * 根据身份证号获取性别和出生日期
78
      * 根据身份证号获取性别和出生日期
68
      */
79
      */
105
         }
116
         }
106
         return success(caseApplicationService.update(caseApplication));
117
         return success(caseApplicationService.update(caseApplication));
107
     }
118
     }
119
+    /**
120
+     * 删除案件
121
+     */
122
+    @PostMapping("/delete")
123
+    public AjaxResult delete(@RequestBody MsCaseApplication req ) {
124
+        if (req.getCaseFlowId() == null
125
+                || (req.getId() == null && StrUtil.isEmpty(req.getBatchNumber()))) {
126
+            return error("参数校验失败");
127
+        }
128
+        return caseApplicationService.delete(req);
129
+    }
108
     /**
130
     /**
109
      * 根据id查询案件
131
      * 根据id查询案件
110
      */
132
      */

+ 4
- 0
ruoyi-admin/src/main/resources/application.yml Dosyayı Görüntüle

184
   secretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
184
   secretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
185
   # 腾讯云密钥
185
   # 腾讯云密钥
186
   secretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
186
   secretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
187
+# 调解机构代码配置
188
+organizeConfig:
189
+  # creditCode
190
+  creditCode: 910000058386410047
187
 #jodconverter:
191
 #jodconverter:
188
 #  local:
192
 #  local:
189
 #    host: 121.40.189.20
193
 #    host: 121.40.189.20

+ 0
- 58
ruoyi-common/src/main/java/com/ruoyi/common/constant/CaseApplicationConstants.java Dosyayı Görüntüle

1
-package com.ruoyi.common.constant;
2
-/**
3
- * 立案申请案件状态
4
- *
5
- */
6
-public class CaseApplicationConstants {
7
-    /** 立案申请 */
8
-    public static final int CASE_APPLICATION = 0;
9
-    /** 待立案审查 */
10
-    public static final int CASE_CHECK = 1;
11
-    /** 待缴费 */
12
-    public static final int PENDING_PAYMENT = 2;
13
-    /** 待缴费确认  */
14
-    public static final int PENDING_PAYMENT_CONFIRM = 3;
15
-    /** 待案件质证 */
16
-    public static final int CASE_CROSSEXAMI = 4;
17
-
18
-    /** 待组庭  */
19
-    public static final int PENDING_TRIAL = 26;
20
-    /** 待组庭审核  */
21
-    public static final int CONFIRMDED_PENDING_TRIAL_SUBMMIT = 5;
22
-    /** 待组庭确定   */
23
-    public static final int CONFIRMDED_PENDING_TRIAL = 6;
24
-
25
-    /** 待审核仲裁方式 */
26
-    public static final int CHECK_ARBITRATION_METHOD = 7;
27
-    /** 待开庭审理 */
28
-    public static final int PENDING_OPENCOURT_HEAR = 8;
29
-    /** 待书面审理 */
30
-    public static final int PENDING_WRIITEN_HEAR = 9;
31
-    /** 待生成仲裁文书  */
32
-    public static final int GENERATED_ARBITRATION = 10;
33
-    /**待秘书核验仲裁文书*/
34
-    public static final int VERPRIF_ARBITRATION = 11;
35
-    /**待部门长审核仲裁文书*/
36
-    public static final int CHECK_ARBITRATION = 12;
37
-    /**待仲裁文书签名*/
38
-    public static final int SIGN_ARBITRATION = 13;
39
-    /** 待仲裁文书用印 */
40
-    public static final int     ARBITRATED_SEAL = 14;
41
-    /** 待仲裁文书送达 */
42
-    public static final int ARBITRATION_DELIVERY = 15;
43
-    /** 待案件归档*/
44
-    public static final int CASE_FILING = 16;
45
-    /** 已归档*/
46
-    public static final int CASE_ARCHIVED = 17;
47
-
48
-    /** 待修改开庭时间*/
49
-    public static final int MODIFY_HEARDATE = 31;
50
-    /**待仲裁员审核仲裁文书*/
51
-    public static final int HEAD_CHECK_ARBITRATION = 18;
52
-
53
-
54
-
55
-
56
-
57
-
58
-}

+ 1
- 1
ruoyi-common/src/main/java/com/ruoyi/common/enums/AnnexTypeEnum.java Dosyayı Görüntüle

16
     PAYMENT_RECEIPT(4, "申请人缴费单"),
16
     PAYMENT_RECEIPT(4, "申请人缴费单"),
17
     MEETING_VIDEO(5, "会议视频"),
17
     MEETING_VIDEO(5, "会议视频"),
18
     MEDIATE(6, "庭审笔录"),
18
     MEDIATE(6, "庭审笔录"),
19
-    MEDIATE_BOOK(7, "调解书"),
19
+    MEDIATE_BOOK(7, "调解书或和解协议"),
20
     MEDIATION_FILES(8, "调解资料"),
20
     MEDIATION_FILES(8, "调解资料"),
21
     RES_PAYMENT_RECEIPT(9, "被申请人缴费单"),
21
     RES_PAYMENT_RECEIPT(9, "被申请人缴费单"),
22
     SEAL_PICTURE(10, "印章图片"),
22
     SEAL_PICTURE(10, "印章图片"),

+ 2
- 5
ruoyi-common/src/main/java/com/ruoyi/common/utils/EmailUtil.java Dosyayı Görüntüle

4
 
4
 
5
 import javax.mail.*;
5
 import javax.mail.*;
6
 import javax.mail.internet.MimeMessage;
6
 import javax.mail.internet.MimeMessage;
7
-import java.io.BufferedReader;
8
 import java.io.IOException;
7
 import java.io.IOException;
9
-import java.io.InputStream;
10
-import java.io.InputStreamReader;
11
 
8
 
12
 @Slf4j
9
 @Slf4j
13
 public final class EmailUtil {
10
 public final class EmailUtil {
27
             BodyPart bodyPart = multipart.getBodyPart(i);
24
             BodyPart bodyPart = multipart.getBodyPart(i);
28
             if(bodyPart.getContentType().contains("Message/Rfc822")){
25
             if(bodyPart.getContentType().contains("Message/Rfc822")){
29
                 MimeMessage mimeMessage = new MimeMessage(session, bodyPart.getInputStream());
26
                 MimeMessage mimeMessage = new MimeMessage(session, bodyPart.getInputStream());
30
-               if(mimeMessage.getSubject()!=null&&mimeMessage.getSubject().contains("裁决书")){
31
-                   String[] split = mimeMessage.getSubject().split("裁决书");
27
+               if(mimeMessage.getSubject()!=null&&mimeMessage.getSubject().contains("调解书")){
28
+                   String[] split = mimeMessage.getSubject().split("调解书");
32
                    if(split.length>0){
29
                    if(split.length>0){
33
                        return split[0];
30
                        return split[0];
34
                    }
31
                    }

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/base/StringIdsReq.java Dosyayı Görüntüle

8
 public class StringIdsReq {
8
 public class StringIdsReq {
9
     private List<String> ids;
9
     private List<String> ids;
10
     /**
10
     /**
11
-     * 签署人账号(即仲裁员手机号)
11
+     * 签署人账号(即调解员手机号)
12
      */
12
      */
13
     private String psnAccount;
13
     private String psnAccount;
14
     /**
14
     /**

+ 3
- 4
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/CaseApplicationVO.java Dosyayı Görüntüle

2
 
2
 
3
 import com.fasterxml.jackson.annotation.JsonFormat;
3
 import com.fasterxml.jackson.annotation.JsonFormat;
4
 import com.ruoyi.common.annotation.Excel;
4
 import com.ruoyi.common.annotation.Excel;
5
-import com.ruoyi.common.core.domain.BaseEntity;
6
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
5
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
7
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
6
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
8
 import lombok.Data;
7
 import lombok.Data;
40
     /** 立案日期 */
39
     /** 立案日期 */
41
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
40
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
42
     private Date registerDate;
41
     private Date registerDate;
43
-    /** 仲裁方式 */
42
+    /** 调解方式 */
44
     private Integer arbitratMethod;
43
     private Integer arbitratMethod;
45
     /**
44
     /**
46
      * 是否导入,0手动录入,1导入,默认0
45
      * 是否导入,0手动录入,1导入,默认0
47
      */
46
      */
48
     private Integer importFlag;
47
     private Integer importFlag;
49
-    /** 仲裁方式名称 */
48
+    /** 调解方式名称 */
50
     private String arbitratMethodName;
49
     private String arbitratMethodName;
51
 
50
 
52
     /** 案件状态 */
51
     /** 案件状态 */
60
     private Integer respondentIsWrittenHear;
59
     private Integer respondentIsWrittenHear;
61
     /** 开庭方式是否一致 */
60
     /** 开庭方式是否一致 */
62
     private Integer arbitraMethodIssame;
61
     private Integer arbitraMethodIssame;
63
-    /** 仲裁方式说明 */
62
+    /** 调解方式说明 */
64
     private String arbitratMethodIllustrate;
63
     private String arbitratMethodIllustrate;
65
 
64
 
66
 
65
 

+ 2
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationReq.java Dosyayı Görüntüle

35
     /**
35
     /**
36
      * 申请机构
36
      * 申请机构
37
      */
37
      */
38
-    private String applicationOrganId;
38
+    private List<Long> applicationOrganIds;
39
     /**
39
     /**
40
      * 是否申请人,不为空则是申请人
40
      * 是否申请人,不为空则是申请人
41
      */
41
      */
100
      */
100
      */
101
     private List<MsCaseAttach> attachList;
101
     private List<MsCaseAttach> attachList;
102
 
102
 
103
+
103
 }
104
 }

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationVO.java Dosyayı Görüntüle

65
      * 拒绝原因
65
      * 拒绝原因
66
      */
66
      */
67
     private String rejectReason;
67
     private String rejectReason;
68
+    /**
69
+     * 调解方式名称,1-线上调解,2-线下调解
70
+     */
71
+    private String mediationMethodName;
68
 
72
 
69
 
73
 
70
 }
74
 }

+ 26
- 6
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseApplicationMapper.java Dosyayı Görüntüle

34
      * @param caseStatusNames
34
      * @param caseStatusNames
35
      * @return
35
      * @return
36
      */
36
      */
37
-    @Select("<script> select t.* from (select c.id,c.room_id roomId,c.mediation_method mediationMethod,0 AS pendingStatus,c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,c.case_subject_amount caseSubjectAmount," +
37
+    @Select("<script> select t.* from (select c.id,c.room_id roomId,c.mediation_method mediationMethod," +
38
+            "   CASE c.mediation_method when 1 then '线上调解' when 2 then '线下调解' ELSE '' END mediationMethodName,"
39
+            +
40
+            "0 AS pendingStatus,c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,c.case_subject_amount caseSubjectAmount," +
38
             "a.application_name applicationName,a.respondent_name respondentName,c.mediator_name mediatorName," +
41
             "a.application_name applicationName,a.respondent_name respondentName,c.mediator_name mediatorName," +
39
             "c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime from ms_case_application c " +
42
             "c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime from ms_case_application c " +
40
-            "join ms_case_affiliate a on c.id=a.case_appli_id <where> " +
43
+            "join ms_case_affiliate a on c.id=a.case_appli_id <where> "
44
+            +
45
+            "<if test='req.applicantFlag != null and req.applicationOrganIds != null and req.applicationOrganIds.size() > 0  '> and  a.application_id in" +
46
+            "<foreach item='organId' index='index' collection='req.applicationOrganIds' open='(' separator=',' close=')'>" +
47
+            "#{organId}" +
48
+            "</foreach>" +
49
+            "</if> "
50
+            +
41
             "<if test='caseStatusNames != null and caseStatusNames.size() > 0 '> and  c.case_status_name in" +
51
             "<if test='caseStatusNames != null and caseStatusNames.size() > 0 '> and  c.case_status_name in" +
42
             "<foreach item='caseStatus' index='index' collection='caseStatusNames' open='(' separator=',' close=')'>" +
52
             "<foreach item='caseStatus' index='index' collection='caseStatusNames' open='(' separator=',' close=')'>" +
43
             "#{caseStatus}" +
53
             "#{caseStatus}" +
50
             "    AND c.case_flow_id = #{req.caseFlowId} " +
60
             "    AND c.case_flow_id = #{req.caseFlowId} " +
51
             "</if> " +
61
             "</if> " +
52
             "<if test=\"req.caseNum != null and req.caseNum != ''\">" +
62
             "<if test=\"req.caseNum != null and req.caseNum != ''\">" +
53
-            "    AND c.case_num = #{req.caseNum} " +
63
+            "    AND c.case_num  like concat('%', #{req.caseNum}, '%') "+
54
             "</if> "
64
             "</if> "
55
             + "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
65
             + "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
56
             "    AND a.respondent_identity_num = #{req.respondentIdentityNum} " +
66
             "    AND a.respondent_identity_num = #{req.respondentIdentityNum} " +
61
             "<if test=\"req.endTime != null and req.endTime != ''\">" +
71
             "<if test=\"req.endTime != null and req.endTime != ''\">" +
62
             "and c.create_time &lt;= #{req.endTime}</if>" +
72
             "and c.create_time &lt;= #{req.endTime}</if>" +
63
             "        </where> " +
73
             "        </where> " +
64
-            "union  select c.id id,c.room_id roomId,c.mediation_method mediationMethod,1 AS pendingStatus,c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,c.case_subject_amount caseSubjectAmount," +
74
+            "union  select c.id id,c.room_id roomId,c.mediation_method mediationMethod,"
75
+            +
76
+            "   CASE c.mediation_method when 1 then '线上调解' when 2 then '线下调解' ELSE '' END mediationMethodName,"
77
+            +
78
+            "1 AS pendingStatus,c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,c.case_subject_amount caseSubjectAmount," +
65
             "a.application_name applicationName,a.respondent_name respondentName,c.mediator_name mediatorName," +
79
             "a.application_name applicationName,a.respondent_name respondentName,c.mediator_name mediatorName," +
66
             "c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime from ms_case_log_record r " +
80
             "c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime from ms_case_log_record r " +
67
             "join ms_case_application c on r.case_appli_id=c.id  " +
81
             "join ms_case_application c on r.case_appli_id=c.id  " +
68
             "join ms_case_affiliate a on c.id=a.case_appli_id  <where> r.create_by=#{req.userName}  and c.id not in (" +
82
             "join ms_case_affiliate a on c.id=a.case_appli_id  <where> r.create_by=#{req.userName}  and c.id not in (" +
69
             "select c1.id from  ms_case_application c1 JOIN ms_case_affiliate a1 ON a1.case_appli_id = c1.id"
83
             "select c1.id from  ms_case_application c1 JOIN ms_case_affiliate a1 ON a1.case_appli_id = c1.id"
70
             +
84
             +
85
+            "<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=')'>" +
87
+            "#{organId}" +
88
+            "</foreach>" +
89
+            "</if> "
90
+            +
71
             "<if test='caseStatusNames != null and caseStatusNames.size() > 0 '> and  c1.case_status_name in" +
91
             "<if test='caseStatusNames != null and caseStatusNames.size() > 0 '> and  c1.case_status_name in" +
72
             "<foreach item='caseStatus' index='index' collection='caseStatusNames' open='(' separator=',' close=')'>" +
92
             "<foreach item='caseStatus' index='index' collection='caseStatusNames' open='(' separator=',' close=')'>" +
73
             "#{caseStatus}" +
93
             "#{caseStatus}" +
78
             "    AND c1.case_flow_id = #{req.caseFlowId} " +
98
             "    AND c1.case_flow_id = #{req.caseFlowId} " +
79
             "</if> " +
99
             "</if> " +
80
             "<if test=\"req.caseNum != null and req.caseNum != ''\">" +
100
             "<if test=\"req.caseNum != null and req.caseNum != ''\">" +
81
-            "    AND c1.case_num = #{req.caseNum} " +
101
+            "     AND c1.case_num  like concat('%', #{req.caseNum}, '%') " +
82
             "</if> "
102
             "</if> "
83
             + "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
103
             + "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
84
             "    AND a1.respondent_identity_num = #{req.respondentIdentityNum} " +
104
             "    AND a1.respondent_identity_num = #{req.respondentIdentityNum} " +
95
             "    AND c.case_flow_id = #{req.caseFlowId} " +
115
             "    AND c.case_flow_id = #{req.caseFlowId} " +
96
             "</if> " +
116
             "</if> " +
97
             "<if test=\"req.caseNum != null and req.caseNum != ''\">" +
117
             "<if test=\"req.caseNum != null and req.caseNum != ''\">" +
98
-            "    AND c.case_num = #{req.caseNum} " +
118
+            "     AND c.case_num  like concat('%', #{req.caseNum}, '%')" +
99
             "</if> "
119
             "</if> "
100
             + "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
120
             + "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
101
             "    AND a.respondent_identity_num = #{req.respondentIdentityNum} " +
121
             "    AND a.respondent_identity_num = #{req.respondentIdentityNum} " +

+ 6
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseAttachMapper.java Dosyayı Görüntüle

35
      */
35
      */
36
     void deleteByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType,@Param("isBatchUpload") int isBatchUpload);
36
     void deleteByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType,@Param("isBatchUpload") int isBatchUpload);
37
 
37
 
38
-    void deleteCaseAttachByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType);
39
-
38
+    void deleteCaseAttachByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") Integer annexType);
40
 
39
 
40
+    /**
41
+     * 批量删除
42
+     * @param ids
43
+     */
44
+    void batchDelete(@Param("ids")List<Long> ids);
41
 }
45
 }

+ 7
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/template/TemplateManageMapper.java Dosyayı Görüntüle

78
      * @return
78
      * @return
79
      */
79
      */
80
     List<TemplateManage> selectTemplateListById(@Param("id")Long id);
80
     List<TemplateManage> selectTemplateListById(@Param("id")Long id);
81
+
82
+    /**
83
+     * 根据调解机构代码查询模板id
84
+     * @param creditCode
85
+     * @return
86
+     */
87
+    Long selectByCreditCode(@Param("creditCode")long creditCode);
81
 }
88
 }

+ 12
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/MsCaseApplicationService.java Dosyayı Görüntüle

2
 
2
 
3
 import com.ruoyi.common.core.domain.AjaxResult;
3
 import com.ruoyi.common.core.domain.AjaxResult;
4
 import com.ruoyi.common.core.domain.entity.SysDictData;
4
 import com.ruoyi.common.core.domain.entity.SysDictData;
5
+import com.ruoyi.common.core.domain.entity.SysUser;
5
 import com.ruoyi.common.exception.EsignDemoException;
6
 import com.ruoyi.common.exception.EsignDemoException;
6
 import com.ruoyi.system.domain.entity.flow.MsCaseFlow;
7
 import com.ruoyi.system.domain.entity.flow.MsCaseFlow;
7
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
8
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
125
      * @return
126
      * @return
126
      */
127
      */
127
     AjaxResult submit(MsCaseApplication req);
128
     AjaxResult submit(MsCaseApplication req);
129
+    /**
130
+     * 删除案件
131
+     * @param req
132
+     * @return
133
+     */
134
+    AjaxResult delete(MsCaseApplication req);
128
 
135
 
129
     /**
136
     /**
130
      * 查询调解员
137
      * 查询调解员
208
      * @param caseId
215
      * @param caseId
209
      */
216
      */
210
      void notAccept(String caseId,String reason);
217
      void notAccept(String caseId,String reason);
218
+
219
+    /**
220
+     * 根据登录人返回用户信息
221
+     */
222
+    SysUser getUserInfo();
211
 }
223
 }

+ 126
- 26
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java Dosyayı Görüntüle

35
 import com.ruoyi.wisdomarbitrate.domain.dto.template.FatchRule;
35
 import com.ruoyi.wisdomarbitrate.domain.dto.template.FatchRule;
36
 import com.ruoyi.wisdomarbitrate.domain.dto.template.TemplateManage;
36
 import com.ruoyi.wisdomarbitrate.domain.dto.template.TemplateManage;
37
 import com.ruoyi.wisdomarbitrate.domain.entity.dept.MsSealSignRecord;
37
 import com.ruoyi.wisdomarbitrate.domain.entity.dept.MsSealSignRecord;
38
-import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
39
-import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
40
-import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
41
-import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseMediator;
38
+import com.ruoyi.wisdomarbitrate.domain.entity.mscase.*;
42
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.*;
39
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.*;
43
 import com.ruoyi.wisdomarbitrate.mapper.dept.DeptIdentifyMapper;
40
 import com.ruoyi.wisdomarbitrate.mapper.dept.DeptIdentifyMapper;
44
 import com.ruoyi.wisdomarbitrate.mapper.dept.MsSealSignRecordMapper;
41
 import com.ruoyi.wisdomarbitrate.mapper.dept.MsSealSignRecordMapper;
54
 import org.apache.poi.xwpf.usermodel.XWPFDocument;
51
 import org.apache.poi.xwpf.usermodel.XWPFDocument;
55
 import org.springframework.beans.BeanUtils;
52
 import org.springframework.beans.BeanUtils;
56
 import org.springframework.beans.factory.annotation.Autowired;
53
 import org.springframework.beans.factory.annotation.Autowired;
54
+import org.springframework.beans.factory.annotation.Value;
57
 import org.springframework.stereotype.Service;
55
 import org.springframework.stereotype.Service;
58
 import org.springframework.transaction.annotation.Transactional;
56
 import org.springframework.transaction.annotation.Transactional;
59
 import org.springframework.web.multipart.MultipartFile;
57
 import org.springframework.web.multipart.MultipartFile;
85
  */
83
  */
86
 @Service
84
 @Service
87
 public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
85
 public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
86
+    /**
87
+     * 调解机构代码
88
+     */
89
+    @Value("${organizeConfig.creditCode}")
90
+    private long creditCode;
88
     @Autowired
91
     @Autowired
89
     MsCaseApplicationService caseApplicationService;
92
     MsCaseApplicationService caseApplicationService;
90
     @Autowired
93
     @Autowired
177
         if (CollectionUtil.isEmpty(caseFlows)) {
180
         if (CollectionUtil.isEmpty(caseFlows)) {
178
             throw new ServiceException("该角色为绑定案件流程");
181
             throw new ServiceException("该角色为绑定案件流程");
179
         }
182
         }
180
-        Map<String, MsCaseFlow> flowMap = caseFlows.stream().collect(Collectors.toMap(MsCaseFlow::getButtonAuthFlag, Function.identity()));
183
+    //    Map<String, MsCaseFlow> flowMap = caseFlows.stream().collect(Collectors.toMap(MsCaseFlow::getButtonAuthFlag, Function.identity()));
181
         List<String> caseStatusNames = caseFlows.stream().map(MsCaseFlow::getCaseStatusName).collect(Collectors.toList());
184
         List<String> caseStatusNames = caseFlows.stream().map(MsCaseFlow::getCaseStatusName).collect(Collectors.toList());
185
+        // 如果是申请人,可以看见申请人为自己(即自然人)或者委托代理人为自己的案件(即机构)
182
         for (SysRole role : roles) {
186
         for (SysRole role : roles) {
183
             if(StrUtil.isNotEmpty(role.getRoleName())){
187
             if(StrUtil.isNotEmpty(role.getRoleName())){
184
                 if(StrUtil.equals(role.getRoleName(),"申请人")) {
188
                 if(StrUtil.equals(role.getRoleName(),"申请人")) {
189
+                    List<Long> applicationOrganIds=new ArrayList<>();
190
+                    applicationOrganIds.add(sysUser.getUserId());
185
                     caseStatusNames.add("待调解");
191
                     caseStatusNames.add("待调解");
192
+                    req.setApplicantFlag(1);
193
+                    // 根据用户查询部门ids
194
+                    List<SysDept> deptList = sysDeptMapper.selectDeptByUserId(loginUser.getUserId());
195
+                    if(CollectionUtil.isNotEmpty(deptList)) {
196
+                        List<Long> deptIds = deptList.stream().map(SysDept::getDeptId).collect(Collectors.toList());
197
+                        applicationOrganIds.addAll(deptIds);
198
+
199
+                    }
200
+                    req.setApplicationOrganIds(applicationOrganIds);
186
                     break;
201
                     break;
187
                 }
202
                 }
188
                 if(StrUtil.equals(role.getRoleName(),"被申请人")){
203
                 if(StrUtil.equals(role.getRoleName(),"被申请人")){
232
         if (CollectionUtil.isEmpty(caseFlows)) {
247
         if (CollectionUtil.isEmpty(caseFlows)) {
233
             throw new ServiceException("该角色为绑定案件流程");
248
             throw new ServiceException("该角色为绑定案件流程");
234
         }
249
         }
250
+        // 设置模板id,根据机构代码查询模板
251
+        Long templateId =  templateManageMapper.selectByCreditCode(creditCode);
252
+        caseApplication.setTemplateId(templateId);
253
+
235
         MsCaseFlow caseFlow = caseFlows.get(0);
254
         MsCaseFlow caseFlow = caseFlows.get(0);
236
         caseApplication.setCaseStatusName(caseFlow.getCaseStatusName());
255
         caseApplication.setCaseStatusName(caseFlow.getCaseStatusName());
237
         caseApplication.setCaseFlowId(caseFlow.getId());
256
         caseApplication.setCaseFlowId(caseFlow.getId());
238
         caseApplication.setCreateTime(new Date());
257
         caseApplication.setCreateTime(new Date());
239
-        // 计算仲裁费用
258
+        // todo 暂时写死,费用300元
259
+        caseApplication.setCaseSubjectAmount(new BigDecimal("30000"));
240
         setFeePayableMethod(caseApplication);
260
         setFeePayableMethod(caseApplication);
241
         // 设置批号
261
         // 设置批号
242
         if (StrUtil.isEmpty(caseApplication.getBatchNumber())) {
262
         if (StrUtil.isEmpty(caseApplication.getBatchNumber())) {
260
                     // 新增申请机构和代理人
280
                     // 新增申请机构和代理人
261
                     caseApplicationService.insertAgentUser(affiliate);
281
                     caseApplicationService.insertAgentUser(affiliate);
262
                 }else if(StrUtil.isNotEmpty(affiliate.getApplicationName())&&affiliate.getOrganizeFlag()==0){
282
                 }else if(StrUtil.isNotEmpty(affiliate.getApplicationName())&&affiliate.getOrganizeFlag()==0){
263
-                    // todo 申请人为自然人,如果系统不存在申请人和代理人用户,分别新增用户,新增完用户需要发送短信
264
                     // 查询申请人角色id
283
                     // 查询申请人角色id
265
                     Long roleId = roleMapper.selectRoleIdByName("申请人");
284
                     Long roleId = roleMapper.selectRoleIdByName("申请人");
266
                     caseApplicationService.insertApplicantUser(affiliate,false,roleId);
285
                     caseApplicationService.insertApplicantUser(affiliate,false,roleId);
306
                         req.setBatchNumber(caseApplication.getBatchNumber());
325
                         req.setBatchNumber(caseApplication.getBatchNumber());
307
                     }
326
                     }
308
                     // 生成调解申请书
327
                     // 生成调解申请书
309
-                       req.setTemplateType(TemplateTypeEnum.MEDIATION_APPLICATION.getCode());
310
-                    // todo 部署放开
328
+                    req.setTemplateType(TemplateTypeEnum.MEDIATION_APPLICATION.getCode());
329
+
311
                     caseApplicationService.generateApplication(req);
330
                     caseApplicationService.generateApplication(req);
312
             // 保存案件附件
331
             // 保存案件附件
313
             if (CollectionUtil.isNotEmpty(caseAttachList)) {
332
             if (CollectionUtil.isNotEmpty(caseAttachList)) {
329
                 }
348
                 }
330
                 columnValueMapper.batchSave(columnValueList);
349
                 columnValueMapper.batchSave(columnValueList);
331
             }
350
             }
332
-            // todo 发送短信
333
             CaseLogUtils.insertCaseLog(caseApplication.getId(), 0, "新增案件", "");
351
             CaseLogUtils.insertCaseLog(caseApplication.getId(), 0, "新增案件", "");
334
             return 1;
352
             return 1;
335
         }
353
         }
359
         }
377
         }
360
         if(StrUtil.isNotEmpty(phone) && StrUtil.isNotEmpty(name)){
378
         if(StrUtil.isNotEmpty(phone) && StrUtil.isNotEmpty(name)){
361
             // 查询用户是否存在
379
             // 查询用户是否存在
362
-            SysUser   sysUser = sysUserMapper.selectUserByUserName(name);
380
+            SysUser   sysUser = sysUserMapper.selectUserByPhone(phone);
363
             if(sysUser==null){
381
             if(sysUser==null){
364
                 // 新增用户
382
                 // 新增用户
365
                 sysUser = new SysUser();
383
                 sysUser = new SysUser();
446
     @Override
464
     @Override
447
     public AjaxResult update(MsCaseApplicationVO caseApplication) {
465
     public AjaxResult update(MsCaseApplicationVO caseApplication) {
448
         // 计算仲裁费用
466
         // 计算仲裁费用
467
+        caseApplication.setCaseSubjectAmount(new BigDecimal("30000"));
449
         setFeePayableMethod(caseApplication);
468
         setFeePayableMethod(caseApplication);
450
         caseApplication.setUpdateBy(SecurityUtils.getUsername());
469
         caseApplication.setUpdateBy(SecurityUtils.getUsername());
451
         caseApplication.setUpdateTime(new Date());
470
         caseApplication.setUpdateTime(new Date());
461
                 // 新增申请机构代理人
480
                 // 新增申请机构代理人
462
                 caseApplicationService.insertAgentUser(affiliate);
481
                 caseApplicationService.insertAgentUser(affiliate);
463
             }else if(StrUtil.isNotEmpty(affiliate.getApplicationName())&&affiliate.getOrganizeFlag()==0){
482
             }else if(StrUtil.isNotEmpty(affiliate.getApplicationName())&&affiliate.getOrganizeFlag()==0){
464
-                // todo 申请人为自然人,如果系统不存在申请人和代理人用户,分别新增用户,新增完用户需要发送短信
465
                 // 查询申请人角色id
483
                 // 查询申请人角色id
466
                 Long roleId = roleMapper.selectRoleIdByName("申请人");
484
                 Long roleId = roleMapper.selectRoleIdByName("申请人");
467
                 caseApplicationService.insertApplicantUser(affiliate,false,roleId);
485
                 caseApplicationService.insertApplicantUser(affiliate,false,roleId);
873
             MsCaseAffiliate affiliate = affiliateMap.get(application.getId());
891
             MsCaseAffiliate affiliate = affiliateMap.get(application.getId());
874
 
892
 
875
             if (StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())) {
893
             if (StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())) {
876
-                String sendContent = "尊敬的" + affiliate.getNameAgent() + "用户,您的" + application.getCaseNum() + "仲裁案件,已成功受理,请知晓,如非本人操作,请忽略本短信";
894
+                String sendContent = "尊敬的" + affiliate.getNameAgent() + "用户,您的" + application.getCaseNum() + "案件,已成功受理,请知晓,如非本人操作,请忽略本短信";
877
                 // 给申请人发送案件受理短信 尊敬的{1}用户,您的{2}仲裁案件,已成功受理,请知晓,如非本人操作,请忽略本短信
895
                 // 给申请人发送案件受理短信 尊敬的{1}用户,您的{2}仲裁案件,已成功受理,请知晓,如非本人操作,请忽略本短信
878
-                Boolean smsFlag = SmsUtils.sendSms(application.getId(), "2049503", affiliate.getContactTelphoneAgent(), new String[]{affiliate.getNameAgent(), application.getCaseNum()});
879
-                CaseLogUtils.insertCaseLog(application.getId(), caseFlow.getNodeId(), caseFlow.getNodeName(), "向申请人发送短信," + sendContent);
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);
880
                 SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), application.getCaseNum(), affiliate.getContactTelphoneAgent(), new Date(), sendContent);
898
                 SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), application.getCaseNum(), affiliate.getContactTelphoneAgent(), new Date(), sendContent);
881
                 if (smsFlag) {
899
                 if (smsFlag) {
882
                     // 发送成功
900
                     // 发送成功
891
                 String sendContent = "尊敬的用户,您的" + application.getCaseNum() + "的案件已经受理,请登录调解系统进行缴费处理。请知晓,如非本人操作,请忽略本短信";
909
                 String sendContent = "尊敬的用户,您的" + application.getCaseNum() + "的案件已经受理,请登录调解系统进行缴费处理。请知晓,如非本人操作,请忽略本短信";
892
                 // 给被申请人发送案件受理短信 2068468 待缴费通知      尊敬的用户,您编号为{1}的案件已经受理,请登录调解系统进行缴费处理。请知晓,如非本人操作,请忽略本短信
910
                 // 给被申请人发送案件受理短信 2068468 待缴费通知      尊敬的用户,您编号为{1}的案件已经受理,请登录调解系统进行缴费处理。请知晓,如非本人操作,请忽略本短信
893
                 Boolean smsFlag = SmsUtils.sendSms(application.getId(), "2068468", affiliate.getRespondentPhone(), new String[]{ application.getCaseNum()});
911
                 Boolean smsFlag = SmsUtils.sendSms(application.getId(), "2068468", affiliate.getRespondentPhone(), new String[]{ application.getCaseNum()});
894
-                CaseLogUtils.insertCaseLog(application.getId(), caseFlow.getNodeId(), caseFlow.getNodeName(), "向被申请人发送短信," + sendContent);
912
+              //  CaseLogUtils.insertCaseLog(application.getId(), caseFlow.getNodeId(), caseFlow.getNodeName(), "向被申请人发送短信," + sendContent);
895
                 SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), application.getCaseNum(), affiliate.getRespondentPhone(), new Date(), sendContent);
913
                 SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), application.getCaseNum(), affiliate.getRespondentPhone(), new Date(), sendContent);
896
                 if (smsFlag) {
914
                 if (smsFlag) {
897
                     // 发送成功
915
                     // 发送成功
918
             }
936
             }
919
             for (MsCaseApplication application : list) {
937
             for (MsCaseApplication application : list) {
920
                 MsCaseFlow caseFlow = caseApplicationService.nextFlow(application.getId(), req.getCaseFlowId(), YesOrNoEnum.NO.getCode());
938
                 MsCaseFlow caseFlow = caseApplicationService.nextFlow(application.getId(), req.getCaseFlowId(), YesOrNoEnum.NO.getCode());
921
-                // todo 发送短信
922
-//                CaseLogUtils.insertCaseLog(application.getId(), caseFlow.getNodeId(), caseFlow.getCaseStatusName(), "提交成功");
939
+
940
+                CaseLogUtils.insertCaseLog(application.getId(), caseFlow.getNodeId(), caseFlow.getCaseStatusName(), "提交成功");
923
             }
941
             }
924
         }else {
942
         }else {
925
             MsCaseFlow caseFlow = caseApplicationService.nextFlow(req.getId(), req.getCaseFlowId(), YesOrNoEnum.NO.getCode());
943
             MsCaseFlow caseFlow = caseApplicationService.nextFlow(req.getId(), req.getCaseFlowId(), YesOrNoEnum.NO.getCode());
926
-            // todo 发送短信
927
-//            CaseLogUtils.insertCaseLog(req.getId(), caseFlow.getNodeId(), caseFlow.getCaseStatusName(), "提交成功");
944
+
945
+            CaseLogUtils.insertCaseLog(req.getId(), caseFlow.getNodeId(), caseFlow.getCaseStatusName(), "提交成功");
928
 
946
 
929
         }
947
         }
930
         return AjaxResult.success("提交成功");
948
         return AjaxResult.success("提交成功");
931
     }
949
     }
950
+    @Transactional
951
+    @Override
952
+    public AjaxResult delete(MsCaseApplication req) {
953
+        if(req.getCaseFlowId()>1){
954
+            return AjaxResult.error("已提交的案件无法删除!");
955
+        }
956
+
957
+        if(StrUtil.isNotEmpty(req.getBatchNumber())){
958
+            // 批量删除
959
+            List<MsCaseApplication> list = listByBatchNumber(req.getBatchNumber(), req.getCaseFlowId());
960
+            if(CollectionUtil.isEmpty(list)){
961
+                return AjaxResult.error("该批次号下未找到案件");
962
+            }
963
+            List<Long> ids = list.stream().map(MsCaseApplication::getId).collect(Collectors.toList());
964
+            // 删除主表
965
+            Example caseExample = new Example(MsCaseApplication.class);
966
+            Example.Criteria caseCriteria = caseExample.createCriteria();
967
+            caseCriteria.andIn("id", ids);
968
+            msCaseApplicationMapper.deleteByExample(caseExample);
969
+            // 删除相关人员表
970
+            Example affiliateExample = new Example(MsCaseAffiliate.class);
971
+            Example.Criteria affiliateCriteria = affiliateExample.createCriteria();
972
+            affiliateCriteria.andIn("caseAppliId", ids);
973
+            msCaseAffiliateMapper.deleteByExample(affiliateExample);
974
+            // 删除附件表
975
+            msCaseAttachMapper.batchDelete(ids);
976
+            // 删除预约调解员表
977
+            Example reservationExample = new Example(MsCaseMediator.class);
978
+            Example.Criteria reservationCriteria = reservationExample.createCriteria();
979
+            reservationCriteria.andIn("caseAppliId", ids);
980
+            msCaseMediatorMapper.deleteByExample(reservationExample);
981
+            // 删除日志表
982
+            Example caseLogExample = new Example(MsCaseLogRecord.class);
983
+            Example.Criteria caseLogCriteria = caseLogExample.createCriteria();
984
+            caseLogCriteria.andIn("caseAppliId", ids);
985
+            caseLogRecordMapper.deleteByExample(reservationExample);
986
+        }else {
987
+            // 删除主表
988
+            msCaseApplicationMapper.deleteByPrimaryKey(req.getId());
989
+            // 删除相关人员表
990
+            msCaseAffiliateMapper.deleteByPrimaryKey(req.getId());
991
+            // 删除附件表
992
+            msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(req.getId(),null);
993
+            // 删除预约调解员表
994
+            Example reservationExample = new Example(MsCaseMediator.class);
995
+            Example.Criteria reservationCriteria = reservationExample.createCriteria();
996
+            reservationCriteria.andEqualTo("caseAppliId", req.getId());
997
+            msCaseMediatorMapper.deleteByExample(reservationExample);
998
+            // 删除日志表
999
+            Example caseLogExample = new Example(MsCaseLogRecord.class);
1000
+            Example.Criteria caseLogCriteria = caseLogExample.createCriteria();
1001
+            caseLogCriteria.andEqualTo("caseAppliId", req.getId());
1002
+            caseLogRecordMapper.deleteByExample(reservationExample);
1003
+
1004
+        }
1005
+        return AjaxResult.success("删除成功");
1006
+    }
932
 
1007
 
933
     /**
1008
     /**
934
      * 查询调解员
1009
      * 查询调解员
1024
             // 被申请人预约
1099
             // 被申请人预约
1025
             // 新增日志
1100
             // 新增日志
1026
             CaseLogUtils.insertCaseLog(vo.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(), "被申请人选择调解员");
1101
             CaseLogUtils.insertCaseLog(vo.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(), "被申请人选择调解员");
1027
-            if (StrUtil.isEmpty(msCaseAffiliate.getContactTelphoneAgent())|| StrUtil.isEmpty(msCaseAffiliate.getApplicationPhone())) {
1028
-                return AjaxResult.error("申请代理人手机号为空");
1029
-            }
1102
+//            if (StrUtil.isEmpty(msCaseAffiliate.getContactTelphoneAgent())|| StrUtil.isEmpty(msCaseAffiliate.getApplicationPhone())) {
1103
+//                return AjaxResult.error("申请代理人手机号为空");
1104
+//            }
1030
             // 判断申请人是否预约
1105
             // 判断申请人是否预约
1031
             caseApplicationService. isReservation( vo,userIds);
1106
             caseApplicationService. isReservation( vo,userIds);
1032
 
1107
 
1115
                 CaseLogUtils.insertCaseLog(vo.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(), "被申请人选择调解员");
1190
                 CaseLogUtils.insertCaseLog(vo.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(), "被申请人选择调解员");
1116
 
1191
 
1117
             }
1192
             }
1118
-            // todo 发送短信
1193
+
1119
         }
1194
         }
1120
     }
1195
     }
1121
 
1196
 
1207
                     // 发送短信 2065809 案件不予受理通知    尊敬的用户,您编号为{1}的案件由于{2}所以不予受理,请知晓,如非本人操作,请忽略本短信。
1282
                     // 发送短信 2065809 案件不予受理通知    尊敬的用户,您编号为{1}的案件由于{2}所以不予受理,请知晓,如非本人操作,请忽略本短信。
1208
                     Boolean smsFlag = SmsUtils.sendSms(id, "2065809", phone, new String[]{application.getCaseNum(),reason});
1283
                     Boolean smsFlag = SmsUtils.sendSms(id, "2065809", phone, new String[]{application.getCaseNum(),reason});
1209
                     String sendContent = "尊敬的用户,您编号为" + application.getCaseNum() + "的案件由于"+reason+"所以不予受理,请知晓,如非本人操作,请忽略本短信。";
1284
                     String sendContent = "尊敬的用户,您编号为" + application.getCaseNum() + "的案件由于"+reason+"所以不予受理,请知晓,如非本人操作,请忽略本短信。";
1210
-                    CaseLogUtils.insertCaseLog(application.getId(), application.getCaseFlowId(), application.getCaseStatusName(), sendContent);
1285
+                  //  CaseLogUtils.insertCaseLog(application.getId(), application.getCaseFlowId(), application.getCaseStatusName(), sendContent);
1211
 
1286
 
1212
                     // 新增短信记录
1287
                     // 新增短信记录
1213
                     SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), application.getCaseNum(), phone, new Date(), sendContent);
1288
                     SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), application.getCaseNum(), phone, new Date(), sendContent);
1229
         }
1304
         }
1230
     }
1305
     }
1231
 
1306
 
1307
+    @Override
1308
+    public SysUser getUserInfo() {
1309
+        SysUser sysUser =new SysUser();
1310
+
1311
+        if(StrUtil.isNotEmpty(SecurityUtils.getUsername())){
1312
+             sysUser = sysUserMapper.selectUserByUserName(getUsername());
1313
+
1314
+        }
1315
+        return sysUser;
1316
+    }
1317
+
1232
     /**
1318
     /**
1233
      * 查询预约信息
1319
      * 查询预约信息
1234
      * @param id
1320
      * @param id
1252
             return AjaxResult.success(result);
1338
             return AjaxResult.success(result);
1253
         }
1339
         }
1254
         Map<Integer, List<MsCaseMediator>> mediatorMap = msCaseMediators.stream().collect(Collectors.groupingBy(MsCaseMediator::getType));
1340
         Map<Integer, List<MsCaseMediator>> mediatorMap = msCaseMediators.stream().collect(Collectors.groupingBy(MsCaseMediator::getType));
1255
-        // todo 申请人
1256
         result.setMediatorList(mediatorMap.get(MediatorTypeEnum.PC.getCode()));
1341
         result.setMediatorList(mediatorMap.get(MediatorTypeEnum.PC.getCode()));
1257
         result.setResMediatorList(mediatorMap.get(MediatorTypeEnum.MI_NI_PROGRESS.getCode()));
1342
         result.setResMediatorList(mediatorMap.get(MediatorTypeEnum.MI_NI_PROGRESS.getCode()));
1258
         return AjaxResult.success(result);
1343
         return AjaxResult.success(result);
1274
         if (StrUtil.isEmpty(application.getMediationMethod())) {
1359
         if (StrUtil.isEmpty(application.getMediationMethod())) {
1275
             return AjaxResult.error("未选择调解方式");
1360
             return AjaxResult.error("未选择调解方式");
1276
         }
1361
         }
1362
+        // 查询当前流程节点
1363
+        MsCaseFlow currentFlow = caseFlowMapper.selectByPrimaryKey(req.getCaseFlowId());
1364
+        if (currentFlow == null) {
1365
+            throw new ServiceException("未找到当前流程节点");
1366
+        }
1277
         MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(req.getId());
1367
         MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(req.getId());
1278
         if (application.getMediationMethod().equals("1")) {
1368
         if (application.getMediationMethod().equals("1")) {
1279
             // 线上调解
1369
             // 线上调解
1559
                                                 if(caseFlow != null){
1649
                                                 if(caseFlow != null){
1560
                                                     application.setCaseFlowId(caseFlow.getId());
1650
                                                     application.setCaseFlowId(caseFlow.getId());
1561
                                                     application.setCaseStatusName(caseFlow.getCaseStatusName());
1651
                                                     application.setCaseStatusName(caseFlow.getCaseStatusName());
1652
+                                                    msCaseApplicationMapper.updateByPrimaryKey(application);
1653
+                                                    // 新增日志
1654
+                                                    CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"");
1562
                                                 }
1655
                                                 }
1563
 
1656
 
1564
                                                 application.setMediaResult(mediaResult);
1657
                                                 application.setMediaResult(mediaResult);
1597
                     flowExample.createCriteria().andEqualTo("caseStatusName", "结束");
1690
                     flowExample.createCriteria().andEqualTo("caseStatusName", "结束");
1598
                     MsCaseFlow caseFlow = caseFlowMapper.selectOneByExample(flowExample);
1691
                     MsCaseFlow caseFlow = caseFlowMapper.selectOneByExample(flowExample);
1599
                     if(caseFlow != null){
1692
                     if(caseFlow != null){
1693
+                        // 新增日志
1694
+                        CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"");
1600
                         application.setCaseFlowId(caseFlow.getId());
1695
                         application.setCaseFlowId(caseFlow.getId());
1601
                         application.setCaseStatusName(caseFlow.getCaseStatusName());
1696
                         application.setCaseStatusName(caseFlow.getCaseStatusName());
1602
                         msCaseApplicationMapper.updateByPrimaryKey(application);
1697
                         msCaseApplicationMapper.updateByPrimaryKey(application);
1615
                         application.setCaseFlowId(caseFlow.getId());
1710
                         application.setCaseFlowId(caseFlow.getId());
1616
                         application.setCaseStatusName(caseFlow.getCaseStatusName());
1711
                         application.setCaseStatusName(caseFlow.getCaseStatusName());
1617
                         msCaseApplicationMapper.updateByPrimaryKey(application);
1712
                         msCaseApplicationMapper.updateByPrimaryKey(application);
1713
+                        // 新增日志
1714
+                        CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"");
1715
+
1618
                     }
1716
                     }
1619
 
1717
 
1620
                     application.setMediaResult(mediaResult);
1718
                     application.setMediaResult(mediaResult);
1886
                 application.setCaseFlowId(caseFlow.getId());
1984
                 application.setCaseFlowId(caseFlow.getId());
1887
                 application.setCaseStatusName(caseFlow.getCaseStatusName());
1985
                 application.setCaseStatusName(caseFlow.getCaseStatusName());
1888
                 msCaseApplicationMapper.updateByPrimaryKey(application);
1986
                 msCaseApplicationMapper.updateByPrimaryKey(application);
1987
+                // 新增日志
1988
+                CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"");
1889
             }
1989
             }
1890
             return AjaxResult.success();
1990
             return AjaxResult.success();
1891
         }
1991
         }

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCasePaymentServiceImpl.java Dosyayı Görüntüle

354
             if(StrUtil.isNotEmpty(phone)) {
354
             if(StrUtil.isNotEmpty(phone)) {
355
                 // 发送短信 2051914 调解缴费成功通知   尊敬的{1},您的调解申请费用已缴费成功。
355
                 // 发送短信 2051914 调解缴费成功通知   尊敬的{1},您的调解申请费用已缴费成功。
356
                 Boolean smsFlag = SmsUtils.sendSms(affiliate.getCaseAppliId(), "2051914", phone, new String[]{userName});
356
                 Boolean smsFlag = SmsUtils.sendSms(affiliate.getCaseAppliId(), "2051914", phone, new String[]{userName});
357
-                CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(), "申请人调解缴费成功通知短信,尊敬的" + userName + ",您的调解申请费用已缴费成功。");
357
+             //   CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(), "申请人调解缴费成功通知短信,尊敬的" + userName + ",您的调解申请费用已缴费成功。");
358
 
358
 
359
                 // 新增短信记录
359
                 // 新增短信记录
360
                 SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), caseAppllication.getCaseNum(), phone, new Date(), "尊敬的" + userName + ",您的调解申请费用已缴费成功。");
360
                 SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), caseAppllication.getCaseNum(), phone, new Date(), "尊敬的" + userName + ",您的调解申请费用已缴费成功。");

+ 3
- 6
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/SignAward.java Dosyayı Görüntüle

3
 import com.alibaba.fastjson.JSON;
3
 import com.alibaba.fastjson.JSON;
4
 import com.alibaba.fastjson.JSONObject;
4
 import com.alibaba.fastjson.JSONObject;
5
 import com.google.gson.Gson;
5
 import com.google.gson.Gson;
6
-import com.google.gson.JsonArray;
7
-import com.google.gson.JsonObject;
8
 import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
6
 import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
9
 import com.ruoyi.common.enums.EsignRequestType;
7
 import com.ruoyi.common.enums.EsignRequestType;
10
 import com.ruoyi.common.exception.EsignDemoException;
8
 import com.ruoyi.common.exception.EsignDemoException;
11
 import com.ruoyi.common.utils.EsignApplicaConfig;
9
 import com.ruoyi.common.utils.EsignApplicaConfig;
12
 import com.ruoyi.common.utils.EsignHttpHelper;
10
 import com.ruoyi.common.utils.EsignHttpHelper;
13
 import com.ruoyi.common.utils.SealUtil;
11
 import com.ruoyi.common.utils.SealUtil;
14
-import com.ruoyi.wisdomarbitrate.domain.vo.base.StringIdsReq;
15
 import com.ruoyi.wisdomarbitrate.domain.dto.dept.DeptIdentify;
12
 import com.ruoyi.wisdomarbitrate.domain.dto.dept.DeptIdentify;
16
 import com.ruoyi.wisdomarbitrate.domain.dto.mscase.SealSignRecord;
13
 import com.ruoyi.wisdomarbitrate.domain.dto.mscase.SealSignRecord;
14
+import com.ruoyi.wisdomarbitrate.domain.vo.base.StringIdsReq;
17
 
15
 
18
-import java.util.ArrayList;
19
 import java.util.List;
16
 import java.util.List;
20
 import java.util.Map;
17
 import java.util.Map;
21
 
18
 
826
         String apiaddr = "/v3/files/" + fileId + "/keyword-positions";
823
         String apiaddr = "/v3/files/" + fileId + "/keyword-positions";
827
         String jsonParm = "{\n" +
824
         String jsonParm = "{\n" +
828
                 "    \"keywords\": [\n" +
825
                 "    \"keywords\": [\n" +
829
-                "        \"仲裁员:\",\n" +
830
-                "        \"(仲裁委员会盖章)\"\n" +
826
+                "        \"调解员:\",\n" +
827
+                "        \"(调解委员会盖章)\"\n" +
831
                 "    ]\n" +
828
                 "    ]\n" +
832
                 "}";
829
                 "}";
833
         //请求方法
830
         //请求方法

+ 9
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/mscase/MsCaseAttachMapper.xml Dosyayı Görüntüle

65
     <delete id="deleteCaseAttachByCasedIdAndType">
65
     <delete id="deleteCaseAttachByCasedIdAndType">
66
         delete from ms_case_attach
66
         delete from ms_case_attach
67
         where case_appli_id = #{caseAppliId}
67
         where case_appli_id = #{caseAppliId}
68
+        <if test="annexType != null ">
68
         and annex_type = #{annexType}
69
         and annex_type = #{annexType}
70
+        </if>
71
+    </delete>
72
+    <delete id="batchDelete">
73
+        delete from ms_case_attach
74
+        where case_appli_id in
75
+        <foreach collection="ids" item="id" open="(" separator="," close=")">
76
+            #{id}
77
+        </foreach>
69
     </delete>
78
     </delete>
70
 
79
 
71
     <select id="queryCaseAttachList" resultMap="CaseAttachResult">
80
     <select id="queryCaseAttachList" resultMap="CaseAttachResult">

+ 4
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/template/TemplateManageMapper.xml Dosyayı Görüntüle

150
         select m.* ,f.* from ms_template_manage m join ms_template_manage_file f on m.id=f.template_manage_id
150
         select m.* ,f.* from ms_template_manage m join ms_template_manage_file f on m.id=f.template_manage_id
151
         where m.id=#{id}
151
         where m.id=#{id}
152
     </select>
152
     </select>
153
+    <select id="selectByCreditCode" resultType="java.lang.Long">
154
+        select m.id from ms_dept_identify i join ms_template_manage m on m.identify_id=i.id
155
+        where i.credit_code=#{creditCode} and i.del_flag=0 and i.identify_status=1 limit 1
156
+    </select>
153
 </mapper>
157
 </mapper>