Explorar el Código

Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz3

qitz hace 2 años
padre
commit
0b280496b5
Se han modificado 25 ficheros con 508 adiciones y 103 borrados
  1. 1
    1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java
  2. 11
    0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CasePaymentController.java
  3. 14
    0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
  4. 93
    13
      ruoyi-common/src/main/java/com/ruoyi/common/utils/EmailOutUtil.java
  5. 2
    10
      ruoyi-common/src/main/java/com/ruoyi/common/utils/WxAppletNotifyUtils.java
  6. 2
    0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java
  7. 24
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAffiliate.java
  8. 69
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java
  9. 1
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAttach.java
  10. 4
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CasePaymentRecord.java
  11. 28
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CaseConfirmPayDTO.java
  12. 12
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CasePayDTO.java
  13. 14
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationMapper.java
  14. 2
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CasePaymentRecordMapper.java
  15. 8
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICasePaymentService.java
  16. 3
    6
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java
  17. 80
    44
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
  18. 3
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java
  19. 33
    7
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java
  20. 6
    2
      ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
  21. 11
    6
      ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
  22. 8
    4
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml
  23. 76
    8
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
  24. 1
    0
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml
  25. 2
    0
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CasePaymentRecordMapper.xml

+ 1
- 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Ver fichero

@@ -259,7 +259,7 @@ public class CaseApplicationController extends BaseController {
259 259
      * @return
260 260
      */
261 261
     @PostMapping("/creatTrialRecord")
262
-    @PreAuthorize("@ss.hasPermi('caseManagement:list:creatTrialRecord')")
262
+//    @PreAuthorize("@ss.hasPermi('caseManagement:list:creatTrialRecord')")
263 263
     public AjaxResult creatTrialRecord(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
264 264
         return caseApplicationService.creatTrialRecord(arbitrateRecord);
265 265
     }

+ 11
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CasePaymentController.java Ver fichero

@@ -2,6 +2,7 @@ package com.ruoyi.web.controller.wisdomarbitrate;
2 2
 
3 3
 import com.ruoyi.common.core.domain.AjaxResult;
4 4
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
5 6
 import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
6 7
 import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
7 8
 import org.springframework.beans.factory.annotation.Autowired;
@@ -30,6 +31,16 @@ public class CasePaymentController {
30 31
     public AjaxResult casePay(@Validated @RequestBody CasePayDTO casePayDTO) {
31 32
         return paymentService.casePay(casePayDTO);
32 33
     }
34
+    /**
35
+     * 确认缴费
36
+     * @param payDTO 缴费传入参数
37
+     * @return 统一响应结果
38
+     */
39
+//    @PreAuthorize("@ss.hasPermi('caseManagement:list:pay')")
40
+    @PostMapping("/confirmPay")
41
+    public AjaxResult confirmPay(@Validated @RequestBody CaseConfirmPayDTO payDTO) {
42
+        return paymentService.confirmPay(payDTO);
43
+    }
33 44
 
34 45
     /**
35 46
      * 缴费确认

+ 14
- 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java Ver fichero

@@ -33,9 +33,14 @@ public class SysUser extends BaseEntity
33 33
     @Excel(name = "登录名称")
34 34
     private String userName;
35 35
 
36
+
37
+
36 38
     /** 用户昵称 */
37 39
     @Excel(name = "用户名称")
38 40
     private String nickName;
41
+    /** 用户身份证号 */
42
+    @Excel(name = "身份证号")
43
+    private String idCard;
39 44
 
40 45
     /** 用户邮箱 */
41 46
     @Excel(name = "用户邮箱")
@@ -297,12 +302,21 @@ public class SysUser extends BaseEntity
297 302
         this.roleId = roleId;
298 303
     }
299 304
 
305
+    public String getIdCard() {
306
+        return idCard;
307
+    }
308
+
309
+    public void setIdCard(String idCard) {
310
+        this.idCard = idCard;
311
+    }
312
+
300 313
     @Override
301 314
     public String toString() {
302 315
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
303 316
             .append("userId", getUserId())
304 317
             .append("deptId", getDeptId())
305 318
             .append("userName", getUserName())
319
+            .append("idCard", getIdCard())
306 320
             .append("nickName", getNickName())
307 321
             .append("email", getEmail())
308 322
             .append("phonenumber", getPhonenumber())

+ 93
- 13
ruoyi-common/src/main/java/com/ruoyi/common/utils/EmailOutUtil.java Ver fichero

@@ -11,12 +11,19 @@ import org.springframework.mail.javamail.JavaMailSenderImpl;
11 11
 import org.springframework.mail.javamail.MimeMessageHelper;
12 12
 import org.springframework.stereotype.Component;
13 13
 
14
-import javax.mail.MessagingException;
15
-import javax.mail.internet.MimeMessage;
14
+import javax.activation.DataHandler;
15
+import javax.mail.*;
16
+import javax.mail.internet.*;
17
+import javax.mail.util.ByteArrayDataSource;
16 18
 import javax.validation.constraints.NotNull;
17 19
 import java.io.File;
18 20
 import java.io.IOException;
21
+import java.nio.file.Files;
22
+import java.nio.file.Paths;
23
+import java.security.Security;
24
+import java.util.Date;
19 25
 import java.util.List;
26
+import java.util.Properties;
20 27
 import java.util.regex.Matcher;
21 28
 import java.util.regex.Pattern;
22 29
 
@@ -40,15 +47,15 @@ public class EmailOutUtil {
40 47
 //    @Value("${spring.mail-out-network.from}")
41 48
 //    private static String fromOut;
42 49
     @Value("${spring.mail.host}")
43
-    private  String hostOut;
50
+    private String hostOut;
44 51
     @Value("${spring.mail.username}")
45
-    private  String usernameOut;
52
+    private String usernameOut;
46 53
     @Value("${spring.mail.password}")
47
-    private   String passwordOut;
54
+    private String passwordOut;
48 55
     @Value("${spring.mail.port}")
49
-    private  Integer portOut;
56
+    private Integer portOut;
50 57
 
51
-    public  JavaMailSender rebuildMailSender() {
58
+    public JavaMailSender rebuildMailSender() {
52 59
         JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
53 60
         mailSender.setHost(hostOut);
54 61
         mailSender.setUsername(usernameOut);
@@ -66,7 +73,7 @@ public class EmailOutUtil {
66 73
      * @param subject 邮件主题
67 74
      * @param content 邮件内容(发送内容)
68 75
      */
69
-    public  void sendMessage(String to, String subject, String content, String from, JavaMailSender mailSender) {
76
+    public void sendMessage(String to, String subject, String content, String from, JavaMailSender mailSender) {
70 77
         // 创建一个邮件对象
71 78
         SimpleMailMessage msg = new SimpleMailMessage();
72 79
         msg.setFrom(from);
@@ -80,15 +87,88 @@ public class EmailOutUtil {
80 87
         ////System.out.println("发送成功:" + from + ":to:" + to);
81 88
     }
82 89
 
90
+    /**
91
+     * @param to       收件人
92
+     * @param message  邮件内容
93
+     * @param subject  邮件主题
94
+     * @param fileList 邮件附件
95
+     */
96
+    public  void sendEmil(String to, String message, String subject, List<File> fileList, File file) {
97
+        try {
98
+            Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
99
+            final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
100
+            //设置邮件会话参数
101
+            Properties props = new Properties();
102
+            //邮箱的发送服务器地址
103
+            props.setProperty("mail.smtp.host", "smtp.163.com");
104
+            props.setProperty("mail.smtp.socketFactory.class", SSL_FACTORY);
105
+            props.setProperty("mail.smtp.socketFactory.fallback", "false");
106
+            //邮箱发送服务器端口,这里设置为465端口
107
+            props.setProperty("mail.smtp.port", "465");
108
+            props.setProperty("mail.smtp.socketFactory.port", "465");
109
+            props.put("mail.smtp.auth", "true");
110
+            //获取到邮箱会话,利用匿名内部类的方式,将发送者邮箱用户名和密码授权给jvm
111
+            Session session = Session.getDefaultInstance(props, new Authenticator() {
112
+                @Override
113
+                protected PasswordAuthentication getPasswordAuthentication() {
114
+                    return new PasswordAuthentication(usernameOut, passwordOut);
115
+                }
116
+            });
117
+            //通过会话,得到一个邮件,用于发送
118
+            Message msg = new MimeMessage(session);
119
+            //设置发件人
120
+            msg.setFrom(new InternetAddress(usernameOut));
121
+            //设置收件人,to为收件人,cc为抄送,bcc为密送
122
+            msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to, false));
123
+            msg.setRecipients(Message.RecipientType.CC, InternetAddress.parse(to, false));
124
+            msg.setRecipients(Message.RecipientType.BCC, InternetAddress.parse(to, false));
125
+            //设置邮件消息
126
+            msg.setSubject(subject);
127
+            msg.setText(message);
128
+            //设置发送的日期
129
+            msg.setSentDate(new Date());
130
+            // 创建邮件正文
131
+            MimeMultipart multipart = new MimeMultipart();
132
+//            MimeBodyPart bodyPart = new MimeBodyPart();
133
+//            bodyPart.setContent("This is the body of the email", "text/html");
134
+//            multipart.addBodyPart(bodyPart);
135
+            // 添加附件
136
+            if (file != null) {
137
+                MimeBodyPart attachmentPart = new MimeBodyPart();
138
+                attachmentPart.attachFile(file);
139
+                attachmentPart.setFileName(MimeUtility.encodeText(file.getName()));
140
+                multipart.addBodyPart(attachmentPart);
141
+                //将multipart对象放入邮件
142
+                msg.setContent(multipart);
143
+            } else if (fileList != null && fileList.size() > 0) {
144
+                // 添加附件(多个)
145
+                if (fileList != null && fileList.size() > 0) {
146
+                    for (File tempfile : fileList) {
147
+                        MimeBodyPart attachmentPart = new MimeBodyPart();
148
+                        attachmentPart.attachFile(tempfile);
149
+                        attachmentPart.setFileName(MimeUtility.encodeText(tempfile.getName()));
150
+                        multipart.addBodyPart(attachmentPart);
151
+                    }
152
+                    msg.setContent(multipart);
153
+                }
154
+            }
155
+            //调用Transport的send方法去发送邮件
156
+            Transport.send(msg);
157
+        } catch (Exception e) {
158
+            e.printStackTrace();
159
+        }
160
+
161
+    }
162
+
83 163
     /**
84 164
      * 发送带附件的邮件信息
85 165
      *
86
-     * @param to      接收方
87
-     * @param subject 邮件主题
88
-     * @param content 邮件内容(发送内容)
89
-     * @param fileList   文件集合 // 可发送多个附件
166
+     * @param to       接收方
167
+     * @param subject  邮件主题
168
+     * @param content  邮件内容(发送内容)
169
+     * @param fileList 文件集合 // 可发送多个附件
90 170
      */
91
-    public  void sendMessageCarryFiles(String to, String subject, String content, List<File> fileList, String from, @NotNull JavaMailSender mailSender) {
171
+    public void sendMessageCarryFiles(String to, String subject, String content, List<File> fileList, String from, @NotNull JavaMailSender mailSender) {
92 172
         MimeMessage mimeMessage = mailSender.createMimeMessage();
93 173
         try {
94 174
             MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, true);

+ 2
- 10
ruoyi-common/src/main/java/com/ruoyi/common/utils/WxAppletNotifyUtils.java Ver fichero

@@ -2,22 +2,14 @@ package com.ruoyi.common.utils;
2 2
 
3 3
 /**
4 4
  * @author wangqiong
5
- * @description
5
+ * @description 获取微信小程序url scheme
6 6
  * @date 2023-10-13 10:16
7 7
  */
8
-import cn.hutool.core.util.StrUtil;
8
+
9 9
 import cn.hutool.http.HttpUtil;
10 10
 import cn.hutool.json.JSONObject;
11 11
 import cn.hutool.json.JSONUtil;
12
-import lombok.RequiredArgsConstructor;
13
-import org.springframework.stereotype.Component;
14
-
15 12
 
16
-/**
17
- * @Author: Tenk
18
- */
19
-@RequiredArgsConstructor
20
-@Component
21 13
 public class WxAppletNotifyUtils {
22 14
 
23 15
     /**

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java Ver fichero

@@ -115,4 +115,6 @@ public interface SysDeptMapper
115 115
      * @return 结果
116 116
      */
117 117
     public int deleteDeptById(Long deptId);
118
+
119
+    List<Long> selectUserDeptListByRoleId(@Param("roleId")Long roleId);
118 120
 }

+ 24
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAffiliate.java Ver fichero

@@ -15,6 +15,14 @@ public class CaseAffiliate   extends BaseEntity {
15 15
     /** 姓名 */
16 16
     @Excel(name = "姓名")
17 17
     private String name;
18
+    /**
19
+     * 申请机构id
20
+     */
21
+    private String applicationOrganId;
22
+    /**
23
+     * 申请机构名称
24
+     */
25
+    private String applicationOrganName;
18 26
     /** 身份证号 */
19 27
     @Excel(name = "身份证号")
20 28
     private String identityNum;
@@ -49,6 +57,22 @@ public class CaseAffiliate   extends BaseEntity {
49 57
     /** 快递单号 */
50 58
     private String trackNum;
51 59
 
60
+    public String getApplicationOrganId() {
61
+        return applicationOrganId;
62
+    }
63
+
64
+    public void setApplicationOrganId(String applicationOrganId) {
65
+        this.applicationOrganId = applicationOrganId;
66
+    }
67
+
68
+    public String getApplicationOrganName() {
69
+        return applicationOrganName;
70
+    }
71
+
72
+    public void setApplicationOrganName(String applicationOrganName) {
73
+        this.applicationOrganName = applicationOrganName;
74
+    }
75
+
52 76
     public String getSendEmail() {
53 77
         return sendEmail;
54 78
     }

+ 69
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java Ver fichero

@@ -198,9 +198,45 @@ public class CaseApplication  extends BaseEntity {
198 198
 
199 199
     /** 支付状态描述 */
200 200
     private String paymentStatusName;
201
+    /**
202
+     * 支付方式code,0线上支付,1线下支付
203
+     */
204
+    private Integer payTypeCode;
205
+    /**
206
+     * 支付方式name,0线上支付,1线下支付
207
+     */
208
+    private String payTypeName;
209
+    /**
210
+     * 缴费凭证
211
+     */
212
+    private List<CaseAttach> payOrderList;
201 213
     // 导入校验失败信息
202 214
     private StringBuilder errorMsg;
203 215
 
216
+    public Integer getPayTypeCode() {
217
+        return payTypeCode;
218
+    }
219
+
220
+    public void setPayTypeCode(Integer payTypeCode) {
221
+        this.payTypeCode = payTypeCode;
222
+    }
223
+
224
+    public String getPayTypeName() {
225
+        return payTypeName;
226
+    }
227
+
228
+    public void setPayTypeName(String payTypeName) {
229
+        this.payTypeName = payTypeName;
230
+    }
231
+
232
+    public List<CaseAttach> getPayOrderList() {
233
+        return payOrderList;
234
+    }
235
+
236
+    public void setPayOrderList(List<CaseAttach> payOrderList) {
237
+        this.payOrderList = payOrderList;
238
+    }
239
+
204 240
     public StringBuilder getErrorMsg() {
205 241
         return errorMsg;
206 242
     }
@@ -274,6 +310,39 @@ public class CaseApplication  extends BaseEntity {
274 310
     private String applicantName;
275 311
     /** 被申请人名称 */
276 312
     private String respondentName;
313
+    /**
314
+     * 用户身份证号
315
+     */
316
+    private String idCard;
317
+    /**
318
+     * 用户id
319
+     */
320
+    private String userId;
321
+    private List<Long> deptIds;
322
+
323
+    public List<Long> getDeptIds() {
324
+        return deptIds;
325
+    }
326
+
327
+    public void setDeptIds(List<Long> deptIds) {
328
+        this.deptIds = deptIds;
329
+    }
330
+
331
+    public String getUserId() {
332
+        return userId;
333
+    }
334
+
335
+    public void setUserId(String userId) {
336
+        this.userId = userId;
337
+    }
338
+
339
+    public String getIdCard() {
340
+        return idCard;
341
+    }
342
+
343
+    public void setIdCard(String idCard) {
344
+        this.idCard = idCard;
345
+    }
277 346
 
278 347
     public String getApplicantName() {
279 348
         return applicantName;

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAttach.java Ver fichero

@@ -27,7 +27,7 @@ public class  CaseAttach {
27 27
      */
28 28
     private String annexPath;
29 29
     /**
30
-     * 附件类型,立案申请书(1)、证据材料(2)、仲裁文书(3)、案件视频(4)、身份证件(5)
30
+     * 附件类型,立案申请书(1)、申请人证据材料(2)、仲裁文书(3)、案件视频(4)、身份证件(5)、被申请人证据材料 (6)、庭审笔录(7)、缴费凭证(8)'
31 31
      */
32 32
     private Integer annexType;
33 33
     /**

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CasePaymentRecord.java Ver fichero

@@ -38,4 +38,8 @@ public class CasePaymentRecord {
38 38
     /** 更新时间 */
39 39
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
40 40
     private Date updateTime;
41
+    /**
42
+     * 支付方式 0线上支付,1线下支付
43
+     */
44
+    private Integer payType;
41 45
 }

+ 28
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CaseConfirmPayDTO.java Ver fichero

@@ -0,0 +1,28 @@
1
+package com.ruoyi.wisdomarbitrate.domain.dto;
2
+
3
+import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
4
+import lombok.Data;
5
+
6
+import javax.validation.constraints.NotNull;
7
+import java.util.List;
8
+
9
+/**
10
+ * 案件确认缴费传入对象
11
+ */
12
+@Data
13
+public class CaseConfirmPayDTO {
14
+    /**
15
+     * 案件id
16
+     */
17
+    @NotNull(message = "案件id不能为空")
18
+    private Long caseId;
19
+
20
+    /**
21
+     * 支付方式 0线上支付,1线下支付
22
+     */
23
+    private Integer payType;
24
+    /**
25
+     * 缴费凭证
26
+     */
27
+    private List<CaseAttach> payOrderList;
28
+}

+ 12
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CasePayDTO.java Ver fichero

@@ -1,6 +1,10 @@
1 1
 package com.ruoyi.wisdomarbitrate.domain.dto;
2 2
 
3
+import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
3 4
 import lombok.Data;
5
+
6
+import java.util.List;
7
+
4 8
 /**
5 9
  * 案件缴费传入对象
6 10
  */
@@ -23,4 +27,12 @@ public class CasePayDTO {
23 27
      * 支付方式 wxpay(微信)  alipay(支付宝)
24 28
      */
25 29
     private String platform;
30
+    /**
31
+     * 支付方式 0线上支付,1线下支付
32
+     */
33
+    private Integer payType;
34
+    /**
35
+     * 缴费凭证
36
+     */
37
+    private List<CaseAttach> payOrderList;
26 38
 }

+ 14
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationMapper.java Ver fichero

@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
3 3
 import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
4 4
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
5 5
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
6
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
6 7
 import org.apache.ibatis.annotations.Param;
7 8
 
8 9
 import java.util.List;
@@ -12,6 +13,13 @@ public interface CaseApplicationMapper {
12 13
 
13 14
     int selectCaseApplicationCount(CaseApplication caseApplication);
14 15
 
16
+    /**
17
+     * 查询超级管理员案件
18
+     * @param caseApplication
19
+     * @return
20
+     */
21
+    List<CaseApplication> selectAdminCaseApplicationList(CaseApplication caseApplication);
22
+
15 23
     int insertCaseApplication(CaseApplication caseApplication);
16 24
 
17 25
 
@@ -39,4 +47,10 @@ public interface CaseApplicationMapper {
39 47
      * @return
40 48
      */
41 49
     String selectArbitratorList(@Param("id") String id);
50
+
51
+    /**
52
+     * 修改支付方式
53
+     * @param payDTO
54
+     */
55
+    void updatePayType(CaseConfirmPayDTO payDTO);
42 56
 }

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CasePaymentRecordMapper.java Ver fichero

@@ -8,4 +8,6 @@ public interface CasePaymentRecordMapper {
8 8
     CasePaymentRecord queryRecord(String orderNumber);
9 9
 
10 10
     void update(CasePaymentRecord casePaymentRecord);
11
+
12
+    CasePaymentRecord selectRecordByCaseId(Long id);
11 13
 }

+ 8
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICasePaymentService.java Ver fichero

@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.service;
3 3
 import com.ruoyi.common.core.domain.AjaxResult;
4 4
 import com.ruoyi.dto.PayRequest;
5 5
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
6
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
6 7
 import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
7 8
 
8 9
 public interface ICasePaymentService {
@@ -12,4 +13,11 @@ public interface ICasePaymentService {
12 13
     AjaxResult casePay(CasePayDTO casePayDTO);
13 14
 
14 15
     AjaxResult confirmPayment(CaseApplication caseApplication);
16
+
17
+    /**
18
+     * 确认缴费
19
+     * @param payDTO
20
+     * @return
21
+     */
22
+    AjaxResult confirmPay(CaseConfirmPayDTO payDTO);
15 23
 }

+ 3
- 6
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java Ver fichero

@@ -371,19 +371,16 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
371 371
                 if (caseAttach.getAnnexType() == 3) {
372 372
                     String annexPath = caseAttach.getAnnexPath();
373 373
                     String path = "/home/ruoyi/" + annexPath;
374
-//        String path = "/home/ruoyi/uploadPath/upload/2023/10/12/裁决书测试20231012test.docx";
375
-//        String path = "E:/WorkDoc/SH/裁决书测试20231012test.docx";
376 374
                     file = new File(path);
377 375
                     fileList.add(file);
378
-                    System.out.println("文件长度:" + file.length());
376
+                    System.out.println("文件长度==================:" + file.length());
379 377
                 }
380 378
             }
381 379
         }
382 380
         if (file != null) {
383
-            JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();
384 381
             try {
385
-//                emailOutUtil.sendMessageCarryFile(appEmail, "裁决书", "您好,审核后的裁决书在附件中请查阅", file, "hjbjava@163.com", javaMailSender);
386
-                emailOutUtil.sendMessageCarryFiles(appEmail, "裁决书", "您好,审核后的裁决书在附件中请查阅", fileList, "lmj1549843951@163.com", javaMailSender);
382
+                emailOutUtil.sendEmil(appEmail, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
383
+                emailOutUtil.sendEmil(resEmail, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
387 384
             } catch (Exception e) {
388 385
                 System.out.println("邮件发送失败++++++++++++++++++++++++++++++++");
389 386
                 System.out.println(e.toString());

+ 80
- 44
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Ver fichero

@@ -14,13 +14,12 @@ import com.google.gson.JsonObject;
14 14
 import com.ruoyi.common.annotation.DataScope;
15 15
 import com.ruoyi.common.constant.CaseApplicationConstants;
16 16
 import com.ruoyi.common.core.domain.AjaxResult;
17
-import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
18
-import com.ruoyi.common.core.domain.entity.SysDept;
17
+import com.ruoyi.common.core.domain.entity.*;
19 18
 
20
-import com.ruoyi.common.core.domain.entity.SysUser;
19
+import com.ruoyi.common.core.domain.model.LoginUser;
21 20
 import com.ruoyi.common.exception.EsignDemoException;
22 21
 import com.ruoyi.common.exception.ServiceException;
23
-import com.ruoyi.common.utils.WordUtil;
22
+import com.ruoyi.common.utils.*;
24 23
 import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
25 24
 
26 25
 
@@ -30,9 +29,6 @@ import com.ruoyi.common.exception.EsignDemoException;
30 29
 import com.ruoyi.common.exception.ServiceException;
31 30
 import com.ruoyi.system.mapper.SysUserMapper;
32 31
 import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
33
-import com.ruoyi.common.utils.DateUtils;
34
-import com.ruoyi.common.utils.SmsUtils;
35
-import com.ruoyi.common.utils.StringUtils;
36 32
 import com.ruoyi.common.utils.bean.BeanUtils;
37 33
 import com.ruoyi.system.mapper.SysDeptMapper;
38 34
 import com.ruoyi.wisdomarbitrate.domain.*;
@@ -57,6 +53,8 @@ import java.util.*;
57 53
 import java.util.regex.Pattern;
58 54
 import java.util.stream.Collectors;
59 55
 
56
+import static com.ruoyi.common.utils.PageUtils.startPage;
57
+import static com.ruoyi.common.utils.SecurityUtils.getLoginUser;
60 58
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
61 59
 
62 60
 
@@ -69,7 +67,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
69 67
     private CaseAffiliateMapper caseAffiliateMapper;
70 68
 
71 69
     @Autowired
72
-    private ArbitratorMapper arbitratorMapper;
70
+    private CasePaymentRecordMapper casePaymentRecordMapper;
73 71
     @Autowired
74 72
     private ArbitrateRecordMapper arbitrateRecordMapper;
75 73
     @Autowired
@@ -88,13 +86,58 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
88 86
     private static final Pattern TELEPHONE_REGX =  Pattern.compile("^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$");
89 87
 
90 88
 
91
-
89
+    /**
90
+     * 数据权限:1.每个人不同的角色,而每个角色可以操作不同的案件状态
91
+     * 2.申请人:金融机构下,可以看到改机构的所有的案件
92
+     * 3.被申请人:可以看到自己相关的案件(案件有被申请人相关的信息)
93
+     * 4.仲裁员:案件选定了某个仲裁员后,该仲裁员就可以查看该案件
94
+     * 5.仲裁委(部门长):可以查看所有的案件
95
+     * 6.法律顾问秘书:可以属于多个机构,可以查看相关机构的所有案件
96
+     * 7.超级管理员:可以查看所有的信息和数据
97
+     * @param caseApplication
98
+     * @return
99
+     */
100
+//    @Override
101
+//    public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
102
+//        // 获取登录用户
103
+//        LoginUser loginUser = getLoginUser();
104
+//        SysUser user = loginUser.getUser();
105
+//        Long userId = user.getUserId();
106
+//        Long deptId = user.getDeptId();
107
+//        List<SysRole> roles = user.getRoles();
108
+//        // 查询登录人身份证号
109
+//        SysUser sysUser = sysUserMapper.selectUserById(userId);
110
+//        caseApplication.setIdCard(sysUser.getIdCard());
111
+//        caseApplication.setUserId(String.valueOf(userId));
112
+//        startPage();
113
+//        for (SysRole role : roles) {
114
+//            // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
115
+//            if(role.getRoleName().equals("超级管理员")
116
+//            ||role.getRoleName().equals("仲裁委")
117
+//            ||role.getRoleName().equals("部门长")){
118
+//                return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
119
+//            }
120
+//            if(role.getRoleName().equals("法律顾问")){
121
+//                // 查询角色有关的用户部门
122
+//                List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
123
+//                caseApplication.setDeptIds(deptIds);
124
+//            }
125
+//            if(StrUtil.isEmpty(caseApplication.getNameId())&&role.getRoleName().equals("申请人")){
126
+//                // 查询角色有关的用户部门
127
+//                caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
128
+//            }
129
+//        }
130
+//
131
+//
132
+//        // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
133
+//        return caseApplicationMapper.selectCaseApplicationList(caseApplication);
134
+//
135
+//    }
92 136
     @Override
93 137
     public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
94
-        return caseApplicationMapper.selectCaseApplicationList(caseApplication);
138
+        return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
95 139
 
96 140
     }
97
-
98 141
     @Override
99 142
     @Transactional
100 143
     public int insertcaseApplication(CaseApplication caseApplication) {
@@ -108,6 +151,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
108 151
         // 获取自动编码
109 152
         String caseNum = generateCaseNum();
110 153
         caseApplication.setCaseNum(caseNum);
154
+        caseApplication.setCreateBy(getUsername());
111 155
 
112 156
         int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
113 157
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
@@ -125,7 +169,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
125 169
                 if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
126 170
                     // 将组织机构id设为申请人名称
127 171
                     if (deptMap.containsKey(caseAffiliate.getName())) {
128
-                        caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
172
+                        caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseAffiliate.getName())));
173
+                        caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
129 174
                     } else {
130 175
                         // 如果不存在则新增
131 176
                         SysDept dept = new SysDept();
@@ -139,7 +184,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
139 184
                         dept.setUpdateBy(getUsername());
140 185
                         sysDeptMapper.insertDept(dept);
141 186
                         deptMap.put(dept.getDeptName(), dept.getDeptId());
142
-                        caseAffiliate.setName(String.valueOf(dept.getDeptId()));
187
+                        caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
188
+                        caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
143 189
 
144 190
                     }
145 191
                 }
@@ -193,6 +239,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
193 239
         BigDecimal feeRate = new BigDecimal(0.01);
194 240
         BigDecimal feePayable  = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2,BigDecimal.ROUND_HALF_UP);
195 241
         caseApplication.setFeePayable(feePayable);
242
+        caseApplication.setUpdateBy(getUsername());
196 243
 
197 244
         int rows = caseApplicationMapper.updataCaseApplication(caseApplication);
198 245
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
@@ -208,7 +255,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
208 255
                 if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
209 256
                     // 将组织机构id设为申请人名称
210 257
                     if (deptMap.containsKey(caseAffiliate.getName())) {
211
-                        caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
258
+                        caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
259
+                        caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseAffiliate.getName())));
212 260
                     } else {
213 261
                         // 如果不存在则新增
214 262
                         SysDept dept = new SysDept();
@@ -222,7 +270,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
222 270
                         dept.setUpdateBy(getUsername());
223 271
                         sysDeptMapper.insertDept(dept);
224 272
                         deptMap.put(dept.getDeptName(), dept.getDeptId());
225
-                        caseAffiliate.setName(String.valueOf(dept.getDeptId()));
273
+
274
+                        caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
275
+                        caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
226 276
 
227 277
                     }
228 278
                 }
@@ -409,7 +459,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
409 459
                             CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
410 460
                             // 新增立案信息
411 461
                             caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
412
-
462
+                            caseApplicationItera.setCreateBy(getUsername());
413 463
                             int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
414 464
                             List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
415 465
                             if(caseAffiliates!=null&&caseAffiliates.size()>0){
@@ -888,29 +938,22 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
888 938
         caseAffiliate.setCaseAppliId(caseApplication.getId());
889 939
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
890 940
         if(caseAffiliatListeselect!=null){
891
-            // 查询组织机构
892
-            List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
893
-            Map<String,String> deptMap=new HashMap<>();
894
-            if(CollectionUtil.isNotEmpty(sysDepts)){
895
-                for (SysDept sysDept : sysDepts) {
896
-                    deptMap.put(String.valueOf(sysDept.getDeptId()),sysDept.getDeptName());
897
-                }
898
-            }
899
-            StringBuffer applicantName = new StringBuffer();
941
+
900 942
             for (int i = 0; i < caseAffiliatListeselect.size(); i++){
901 943
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
902 944
                 int identityType = caseAffiliateselect.getIdentityType();
903 945
                 if(identityType==1){
904
-                    if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
905
-                        caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
906
-                    }
907
-                    applicantName.append(caseAffiliateselect.getName()).append(",");;
946
+
947
+                    caseApplicationselect.setApplicantName(caseAffiliateselect.getApplicationOrganName());
908 948
                 }
909 949
             }
910
-            caseApplicationselect.setApplicantName(applicantName.toString());
911
-
912 950
 
913 951
         }
952
+        caseApplication.setAnnexType(8);
953
+        // 查询缴费凭证
954
+        List<CaseAttach> payOrderList = caseAttachMapper.queryCaseAttachList(caseApplication);
955
+        caseApplicationselect.setPayOrderList(payOrderList);
956
+
914 957
         return caseApplicationselect;
915 958
     }
916 959
 
@@ -1216,21 +1259,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1216 1259
         caseAffiliate.setCaseAppliId(caseApplication.getId());
1217 1260
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
1218 1261
         if(caseAffiliatListeselect!=null) {
1219
-            // 查询组织机构
1220
-            List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
1221
-            Map<String,String> deptMap=new HashMap<>();
1222
-            if(CollectionUtil.isNotEmpty(sysDepts)){
1223
-                for (SysDept sysDept : sysDepts) {
1224
-                    deptMap.put(String.valueOf(sysDept.getDeptId()),sysDept.getDeptName());
1225
-                }
1226
-            }
1262
+
1227 1263
             for (int j = 0; j < caseAffiliatListeselect.size(); j++) {
1228 1264
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
1229 1265
                 int identityType = caseAffiliateselect.getIdentityType();
1230 1266
                 if(identityType==1){
1231
-                    if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
1232
-                        caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
1233
-                    }
1267
+                  caseAffiliateselect.setName(caseAffiliateselect.getApplicationOrganName());
1234 1268
 
1235 1269
                 }
1236 1270
                 //给申请人、被申请人发送短信通知
@@ -1312,7 +1346,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1312 1346
 
1313 1347
             // 将组织机构id设为申请人名称
1314 1348
             if(deptMap.containsKey(caseApplication.getName())){
1315
-                caseAffiliate.setName(String.valueOf(deptMap.get(caseApplication.getName())));
1349
+                caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseApplication.getName())));
1350
+                caseAffiliate.setApplicationOrganName(caseApplication.getName());
1316 1351
             }else {
1317 1352
                // 如果不存在则新增
1318 1353
                 SysDept dept = new SysDept();
@@ -1326,7 +1361,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1326 1361
                 dept.setUpdateBy(getUsername());
1327 1362
                 sysDeptMapper.insertDept(dept);
1328 1363
                 deptMap.put(dept.getDeptName(),dept.getDeptId());
1329
-                caseAffiliate.setName(String.valueOf(dept.getDeptId()));
1364
+                caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
1365
+                caseAffiliate.setApplicationOrganName(caseApplication.getName());
1330 1366
 
1331 1367
             }
1332 1368
 

+ 3
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java Ver fichero

@@ -101,7 +101,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
101 101
                     .userName(userName)
102 102
                     .build();
103 103
             int count = caseAttachMapper.save(caseAttach);
104
-            if (count > 0) {
104
+            if (count > 0 && annexType!=null && annexType!=8) {
105 105
                 if(id!=null){
106 106
                     //修改案件状态
107 107
                     CaseApplication caseApplication = new CaseApplication();
@@ -121,6 +121,8 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
121 121
 
122 122
         return AjaxResult.error("上传失败");
123 123
     }
124
+
125
+
124 126
 @Autowired
125 127
 IdentityAuthenticationMapper identityAuthenticationMapper;
126 128
 

+ 33
- 7
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java Ver fichero

@@ -1,9 +1,15 @@
1 1
 package com.ruoyi.wisdomarbitrate.service.impl;
2 2
 
3 3
 
4
+import cn.hutool.core.collection.CollectionUtil;
4 5
 import com.ruoyi.ElegentPay;
5 6
 import com.ruoyi.common.constant.CaseApplicationConstants;
6 7
 import com.ruoyi.common.core.domain.AjaxResult;
8
+import com.ruoyi.common.core.domain.model.LoginUser;
9
+import com.ruoyi.common.utils.SecurityUtils;
10
+import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
11
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
12
+import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
7 13
 import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
8 14
 import com.ruoyi.common.utils.SmsUtils;
9 15
 import com.ruoyi.dto.PayRequest;
@@ -29,6 +35,8 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
29 35
     private final CaseApplicationMapper caseApplicationMapper;
30 36
     private final CasePaymentRecordMapper casePaymentRecordMapper;
31 37
     private final CaseAffiliateMapper caseAffiliateMapper;
38
+    @Autowired
39
+    private  CaseAttachMapper caseAttachMapper;
32 40
 
33 41
     @Autowired
34 42
     public CasePaymentServiceImpl(ElegentPay elegentPay
@@ -78,13 +86,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
78 86
         casePaymentRecord.setPaymentTime(new Date());
79 87
         casePaymentRecord.setUpdateTime(new Date());
80 88
         casePaymentRecordMapper.update(casePaymentRecord);
81
-        //根据案件id查询案件信息
82
-        CaseApplication caseApplication = new CaseApplication();
83
-        caseApplication.setId(caseId);
84
-        CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
85
-        caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
86
-        //修改案件状态
87
-        caseApplicationMapper.submitCaseApplication(caseApplication1);
89
+
88 90
         return AjaxResult.success("支付成功");
89 91
     }
90 92
 
@@ -135,4 +137,28 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
135 137
         }
136 138
         return AjaxResult.error("暂无需要确认的缴费清单");
137 139
     }
140
+    @Transactional
141
+    @Override
142
+    public AjaxResult confirmPay(CaseConfirmPayDTO payDTO) {
143
+        if(payDTO.getCaseId()!=null&&payDTO.getPayType()!=null){
144
+            // 修改支付方式
145
+
146
+            caseApplicationMapper.updatePayType(payDTO);
147
+        }
148
+        if(CollectionUtil.isNotEmpty(payDTO.getPayOrderList())){
149
+            for (CaseAttach caseAttach : payDTO.getPayOrderList()) {
150
+                caseAttach.setCaseAppliId(payDTO.getCaseId());
151
+                caseAttachMapper.updateCaseAttach(caseAttach);
152
+            }
153
+        }
154
+        // 修改节点状态
155
+        //根据案件id查询案件信息
156
+        CaseApplication caseApplication = new CaseApplication();
157
+        caseApplication.setId(payDTO.getCaseId());
158
+        CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
159
+        caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
160
+        //修改案件状态
161
+        caseApplicationMapper.submitCaseApplication(caseApplication1);
162
+        return AjaxResult.success("确认缴费成功");
163
+    }
138 164
 }

+ 6
- 2
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml Ver fichero

@@ -86,8 +86,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
86 86
 	    <include refid="selectDeptVo"/>
87 87
 		where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
88 88
 	</select>
89
-    
90
-    <insert id="insertDept" parameterType="SysDept" useGeneratedKeys="true" keyColumn="dept_id" keyProperty="deptId">
89
+	<select id="selectUserDeptListByRoleId" resultType="java.lang.Long">
90
+		select u.dept_id from sys_user_role r
91
+		join sys_user u on r.role_id=#{roleId} and r.user_id=u.user_id
92
+	</select>
93
+
94
+	<insert id="insertDept" parameterType="SysDept" useGeneratedKeys="true" keyColumn="dept_id" keyProperty="deptId">
91 95
  		insert into sys_dept(
92 96
  			<if test="deptId != null and deptId != 0">dept_id,</if>
93 97
  			<if test="parentId != null and parentId != 0">parent_id,</if>

+ 11
- 6
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml Ver fichero

@@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
9 9
         <result property="deptId"       column="dept_id"      />
10 10
         <result property="userName"     column="user_name"    />
11 11
         <result property="nickName"     column="nick_name"    />
12
+		<result property="idCard"    column="id_card" />
12 13
         <result property="email"        column="email"        />
13 14
         <result property="phonenumber"  column="phonenumber"  />
14 15
         <result property="sex"          column="sex"          />
@@ -35,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
35 36
         <result property="orderNum"  column="order_num"   />
36 37
         <result property="leader"    column="leader"      />
37 38
         <result property="status"    column="dept_status" />
39
+
38 40
     </resultMap>
39 41
 	
40 42
     <resultMap id="RoleResult" type="SysRole">
@@ -49,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
49 51
 	<sql id="selectUserVo">
50 52
         select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, 
51 53
         d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
52
-        r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
54
+        r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.id_card
53 55
         from sys_user u
54 56
 		    left join sys_dept d on u.dept_id = d.dept_id
55 57
 		    left join sys_user_role ur on u.user_id = ur.user_id
@@ -57,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
57 59
     </sql>
58 60
     
59 61
     <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
60
-		select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
62
+		select u.user_id, u.dept_id, u.nick_name, u.user_name,u.id_card, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
61 63
 		left join sys_dept d on u.dept_id = d.dept_id
62 64
 		where u.del_flag = '0'
63 65
 		<if test="userId != null and userId != 0">
@@ -86,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
86 88
 	</select>
87 89
 	
88 90
 	<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
89
-	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
91
+	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name,u.id_card, u.email, u.phonenumber, u.status, u.create_time
90 92
 	    from sys_user u
91 93
 			 left join sys_dept d on u.dept_id = d.dept_id
92 94
 			 left join sys_user_role ur on u.user_id = ur.user_id
@@ -103,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
103 105
 	</select>
104 106
 	
105 107
 	<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
106
-	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
108
+	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name,u.id_card, u.email, u.phonenumber, u.status, u.create_time
107 109
 	    from sys_user u
108 110
 			 left join sys_dept d on u.dept_id = d.dept_id
109 111
 			 left join sys_user_role ur on u.user_id = ur.user_id
@@ -142,7 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
142 144
 		select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
143 145
 	</select>
144 146
 	<select id="selectUserListByAdRole" resultMap="SysUserResult">
145
-		select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark from sys_user u
147
+		select u.user_id, u.dept_id, u.nick_name, u.user_name,u.id_card, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark from sys_user u
146 148
 		 join sys_user_role ur on ur.user_id =u.user_id
147 149
 		    join sys_role r on ur.role_id = r.role_id and r.role_name='仲裁员'
148 150
 		where r.del_flag = '0' and r.status='0'
@@ -161,7 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
161 163
 
162 164
 	</select>
163 165
 	<select id="selectUserListByIds" resultMap="SysUserResult">
164
-		select u.user_id,  u.nick_name, u.user_name, u.phonenumber, u.remark from sys_user u
166
+		select u.user_id,  u.nick_name, u.user_name,u.id_card, u.phonenumber, u.remark from sys_user u
165 167
 
166 168
 			<where>
167 169
 		<if test="idList != null and idList.size() > 0">
@@ -181,6 +183,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
181 183
  			<if test="deptId != null and deptId != 0">dept_id,</if>
182 184
  			<if test="userName != null and userName != ''">user_name,</if>
183 185
  			<if test="nickName != null and nickName != ''">nick_name,</if>
186
+ 			<if test="idCard != null and idCard != ''">id_card,</if>
184 187
  			<if test="email != null and email != ''">email,</if>
185 188
  			<if test="avatar != null and avatar != ''">avatar,</if>
186 189
  			<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
@@ -195,6 +198,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
195 198
  			<if test="deptId != null and deptId != ''">#{deptId},</if>
196 199
  			<if test="userName != null and userName != ''">#{userName},</if>
197 200
  			<if test="nickName != null and nickName != ''">#{nickName},</if>
201
+ 			<if test="idCard != null and idCard != ''">#{idCard},</if>
198 202
  			<if test="email != null and email != ''">#{email},</if>
199 203
  			<if test="avatar != null and avatar != ''">#{avatar},</if>
200 204
  			<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
@@ -213,6 +217,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
213 217
  			<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
214 218
  			<if test="userName != null and userName != ''">user_name = #{userName},</if>
215 219
  			<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
220
+ 			<if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
216 221
  			<if test="email != null ">email = #{email},</if>
217 222
  			<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
218 223
  			<if test="sex != null and sex != ''">sex = #{sex},</if>

+ 8
- 4
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml Ver fichero

@@ -19,13 +19,15 @@
19 19
         <result property="contactTelphoneAgent"      column="contact_telphone_agent"     />
20 20
         <result property="contactAddressAgent"    column="contact_address_agent"   />
21 21
         <result property="trackNum"    column="track_num"   />
22
+        <result property="applicationOrganId"    column="application_organ_id"   />
23
+        <result property="applicationOrganName"    column="application_organ_name"   />
22 24
 
23 25
     </resultMap>
24 26
 
25 27
     <select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
26 28
         select c.id ,c.case_appli_id ,c.identity_type ,c.name ,c.identity_num ,c.contact_telphone ,c.contact_address ,
27 29
         c.work_address ,c.work_telphone ,c.name_agent, c.identity_num_agent ,c.contact_telphone_agent ,c.contact_address_agent,
28
-        c.track_num
30
+        c.track_num,c.application_organ_id,c.application_organ_name
29 31
         from case_affiliate c
30 32
         <where>
31 33
             <if test="caseAppliId != null ">
@@ -36,7 +38,7 @@
36 38
     <select id="selectCaseAffiliateByIdentityType"  resultMap="CaseAffiliateResult">
37 39
         select c.id ,c.case_appli_id ,c.identity_type ,c.name ,c.identity_num ,c.contact_telphone ,c.contact_address ,
38 40
         c.work_address ,c.work_telphone ,c.name_agent, c.identity_num_agent ,c.contact_telphone_agent ,c.contact_address_agent,
39
-        c.track_num
41
+        c.track_num,c.application_organ_id,c.application_organ_name
40 42
         from case_affiliate c
41 43
         <where>
42 44
             <if test="caseAppliId != null ">
@@ -50,11 +52,11 @@
50 52
 
51 53
 
52 54
     <insert id="batchCaseAffiliate">
53
-        insert into case_affiliate(case_appli_id, identity_type,name,identity_num,contact_telphone,
55
+        insert into case_affiliate(case_appli_id, identity_type,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
54 56
         contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
55 57
         contact_address_agent ) values
56 58
         <foreach item="item" index="index" collection="list" separator=",">
57
-            (#{item.caseAppliId},#{item.identityType},#{item.name},#{item.identityNum},#{item.contactTelphone},
59
+            (#{item.caseAppliId},#{item.identityType},#{item.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
58 60
             #{item.contactAddress},#{item.workAddress},#{item.workTelphone},  #{item.nameAgent},#{item.identityNumAgent},
59 61
             #{item.contactTelphoneAgent},#{item.contactAddressAgent})
60 62
         </foreach>
@@ -67,6 +69,8 @@
67 69
         set
68 70
         case_appli_id=#{caseAppliId},
69 71
         identity_type= #{identityType},
72
+        application_organ_id= #{applicationOrganId},
73
+        application_organ_name= #{applicationOrganName},
70 74
         name = #{name},
71 75
         identity_num = #{identityNum},
72 76
         contact_telphone = #{contactTelphone},

+ 76
- 8
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Ver fichero

@@ -37,9 +37,9 @@
37 37
         <result property="filearbitraUrl"   column="filearbitra_url"  />
38 38
     </resultMap>
39 39
 
40
-
41
-
42 40
     <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
41
+select t1.* from(
42
+        select t.* from(
43 43
         select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
44 44
         CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
45 45
             ELSE '无审理方式'
@@ -56,10 +56,74 @@
56 56
         c.hear_date ,c.arbitrat_claims ,
57 57
         c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
58 58
         c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
59
-        c.update_by ,c.update_time , c.arbitrator_name,d.dept_name as applicantName,c.register_date,c.filearbitra_url
59
+        c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name as applicantName,
60
+        c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url
60 61
         from case_application c
61 62
         LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
62
-        LEFT JOIN sys_dept d ON ca.NAME = d.dept_id and ca.name=d.dept_id
63
+        <where>
64
+            <if test="caseStatus != null">
65
+                AND c.case_status = #{caseStatus}
66
+            </if>
67
+            <if test="caseNum != null and caseNum != ''">
68
+                AND c.case_num = #{caseNum}
69
+            </if>
70
+            <if test="caseStatusList != null and caseStatusList.size() > 0">
71
+                and c.case_status in
72
+                <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
73
+                    #{caseStatus}
74
+                </foreach>
75
+            </if>
76
+        </where>
77
+        ) t
78
+        <where>
79
+
80
+        <!--被申请人-->
81
+        <if test="idCard != null and idCard != ''">
82
+            or (t.identity_num=#{idCard}  AND t.identity_type=2)
83
+        </if>
84
+        <!--仲裁员-->
85
+        <if test="userId != null and userId != ''">
86
+            or instr  (t.arbitrator_id,#{userId})>0
87
+        </if>
88
+        <!--法律顾问-->
89
+        <if test="deptIds != null and deptIds.size() > 0">
90
+            or t.name
91
+            in
92
+            <foreach item="item" collection="deptIds" open="(" separator="," close=")">
93
+                #{item}
94
+            </foreach>
95
+        </if>
96
+
97
+    </where>
98
+        ) t1
99
+        <where>
100
+            <!--申请人-->
101
+            <if test="nameId != null and nameId != ''">
102
+                and ( t1.application_organ_id = #{nameId}  AND t1.identity_type=1 )
103
+            </if>
104
+        </where>
105
+        order by t1.create_time desc,t1.case_num desc
106
+    </select>
107
+    <select id="selectAdminCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
108
+        select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
109
+        CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
110
+        ELSE '无审理方式'
111
+        END arbitratMethodName,
112
+        c.case_status ,
113
+        CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
114
+        when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
115
+        when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
116
+        when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
117
+        when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
118
+        when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
119
+        ELSE '无案件状态'
120
+        END caseStatusName,
121
+        c.hear_date ,c.arbitrat_claims ,
122
+        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
123
+        c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
124
+        c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.filearbitra_url
125
+        from case_application c
126
+        LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
63 127
         <where>
64 128
             <if test="caseStatus != null">
65 129
                 AND c.case_status = #{caseStatus}
@@ -68,7 +132,7 @@
68 132
                 AND c.case_num = #{caseNum}
69 133
             </if>
70 134
             <if test="nameId != null and nameId != ''">
71
-                AND ca.NAME=#{nameId}  AND ca.identity_type=1 and ca.name=d.dept_id
135
+                AND ca.application_organ_id=#{nameId}  AND ca.identity_type=1
72 136
             </if>
73 137
             <if test="caseStatusList != null and caseStatusList.size() > 0">
74 138
                 and c.case_status in
@@ -186,6 +250,9 @@
186 250
         </set>
187 251
         where id = #{id}
188 252
     </update>
253
+    <update id="updatePayType">
254
+        update case_application set pay_type=#{payType} where id = #{caseId}
255
+    </update>
189 256
 
190 257
     <delete id="deletecaseApplication" parameterType="CaseApplication">
191 258
         delete from case_application where id = #{id}
@@ -208,10 +275,10 @@
208 275
         c.hear_date ,c.arbitrat_claims ,
209 276
         c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
210 277
         c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
211
-        c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,d.dept_name as applicantName
278
+        c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName
212 279
         from case_application c
213 280
         LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
214
-        LEFT JOIN sys_dept d ON ca.NAME = d.dept_id and ca.name=d.dept_id
281
+
215 282
         <where>
216 283
             <if test="id != null ">
217 284
                 AND c.id = #{id}
@@ -240,7 +307,8 @@
240 307
         p.payment_status ,
241 308
         CASE p.payment_status when 1 then '已支付' when 0 then '未支付'
242 309
         ELSE '无支付状态'
243
-        END paymentStatusName
310
+        END paymentStatusName,c.pay_type,
311
+        CASE c.pay_type when 0 then '线上支付' when 0 then '线下支付' else '' end payTypeName
244 312
         from case_application c left join case_payment_record p on c.id  = p.case_id
245 313
         where c.case_status  = 3 and p.payment_status  = 1
246 314
             AND c.id = #{id}

+ 1
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml Ver fichero

@@ -17,6 +17,7 @@
17 17
         INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account)
18 18
         VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName})
19 19
     </insert>
20
+
20 21
     <select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
21 22
         select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
22 23
         from case_attach

+ 2
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CasePaymentRecordMapper.xml Ver fichero

@@ -11,6 +11,7 @@
11 11
         <result property="paymentTime"        column="payment_time"        />
12 12
         <result property="createTime"   column="create_time"  />
13 13
         <result property="updateTime"   column="update_time"  />
14
+        <result property="payType"   column="pay_type"  />
14 15
     </resultMap>
15 16
     <insert id="saveRecord">
16 17
         INSERT INTO case_payment_record (case_id, order_number, payment_status , create_time)
@@ -24,6 +25,7 @@
24 25
             <if test="paymentTime != null ">payment_time = #{paymentTime},</if>
25 26
             <if test="paymentStatus != null ">payment_status = #{paymentStatus},</if>
26 27
             <if test="updateTime != null ">update_time = #{updateTime},</if>
28
+            <if test="payType != null ">pay_type = #{payType},</if>
27 29
         </set>
28 30
         where id = #{id}
29 31
     </update>