瀏覽代碼

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

qitz 2 年之前
父節點
當前提交
0b280496b5
共有 25 個文件被更改,包括 508 次插入103 次删除
  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 查看文件

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

+ 11
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CasePaymentController.java 查看文件

2
 
2
 
3
 import com.ruoyi.common.core.domain.AjaxResult;
3
 import com.ruoyi.common.core.domain.AjaxResult;
4
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
4
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
5
 import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
6
 import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
6
 import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
7
 import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
7
 import org.springframework.beans.factory.annotation.Autowired;
8
 import org.springframework.beans.factory.annotation.Autowired;
30
     public AjaxResult casePay(@Validated @RequestBody CasePayDTO casePayDTO) {
31
     public AjaxResult casePay(@Validated @RequestBody CasePayDTO casePayDTO) {
31
         return paymentService.casePay(casePayDTO);
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 查看文件

33
     @Excel(name = "登录名称")
33
     @Excel(name = "登录名称")
34
     private String userName;
34
     private String userName;
35
 
35
 
36
+
37
+
36
     /** 用户昵称 */
38
     /** 用户昵称 */
37
     @Excel(name = "用户名称")
39
     @Excel(name = "用户名称")
38
     private String nickName;
40
     private String nickName;
41
+    /** 用户身份证号 */
42
+    @Excel(name = "身份证号")
43
+    private String idCard;
39
 
44
 
40
     /** 用户邮箱 */
45
     /** 用户邮箱 */
41
     @Excel(name = "用户邮箱")
46
     @Excel(name = "用户邮箱")
297
         this.roleId = roleId;
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
     @Override
313
     @Override
301
     public String toString() {
314
     public String toString() {
302
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
315
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
303
             .append("userId", getUserId())
316
             .append("userId", getUserId())
304
             .append("deptId", getDeptId())
317
             .append("deptId", getDeptId())
305
             .append("userName", getUserName())
318
             .append("userName", getUserName())
319
+            .append("idCard", getIdCard())
306
             .append("nickName", getNickName())
320
             .append("nickName", getNickName())
307
             .append("email", getEmail())
321
             .append("email", getEmail())
308
             .append("phonenumber", getPhonenumber())
322
             .append("phonenumber", getPhonenumber())

+ 93
- 13
ruoyi-common/src/main/java/com/ruoyi/common/utils/EmailOutUtil.java 查看文件

11
 import org.springframework.mail.javamail.MimeMessageHelper;
11
 import org.springframework.mail.javamail.MimeMessageHelper;
12
 import org.springframework.stereotype.Component;
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
 import javax.validation.constraints.NotNull;
18
 import javax.validation.constraints.NotNull;
17
 import java.io.File;
19
 import java.io.File;
18
 import java.io.IOException;
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
 import java.util.List;
25
 import java.util.List;
26
+import java.util.Properties;
20
 import java.util.regex.Matcher;
27
 import java.util.regex.Matcher;
21
 import java.util.regex.Pattern;
28
 import java.util.regex.Pattern;
22
 
29
 
40
 //    @Value("${spring.mail-out-network.from}")
47
 //    @Value("${spring.mail-out-network.from}")
41
 //    private static String fromOut;
48
 //    private static String fromOut;
42
     @Value("${spring.mail.host}")
49
     @Value("${spring.mail.host}")
43
-    private  String hostOut;
50
+    private String hostOut;
44
     @Value("${spring.mail.username}")
51
     @Value("${spring.mail.username}")
45
-    private  String usernameOut;
52
+    private String usernameOut;
46
     @Value("${spring.mail.password}")
53
     @Value("${spring.mail.password}")
47
-    private   String passwordOut;
54
+    private String passwordOut;
48
     @Value("${spring.mail.port}")
55
     @Value("${spring.mail.port}")
49
-    private  Integer portOut;
56
+    private Integer portOut;
50
 
57
 
51
-    public  JavaMailSender rebuildMailSender() {
58
+    public JavaMailSender rebuildMailSender() {
52
         JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
59
         JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
53
         mailSender.setHost(hostOut);
60
         mailSender.setHost(hostOut);
54
         mailSender.setUsername(usernameOut);
61
         mailSender.setUsername(usernameOut);
66
      * @param subject 邮件主题
73
      * @param subject 邮件主题
67
      * @param content 邮件内容(发送内容)
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
         SimpleMailMessage msg = new SimpleMailMessage();
78
         SimpleMailMessage msg = new SimpleMailMessage();
72
         msg.setFrom(from);
79
         msg.setFrom(from);
80
         ////System.out.println("发送成功:" + from + ":to:" + to);
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
         MimeMessage mimeMessage = mailSender.createMimeMessage();
172
         MimeMessage mimeMessage = mailSender.createMimeMessage();
93
         try {
173
         try {
94
             MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, true);
174
             MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, true);

+ 2
- 10
ruoyi-common/src/main/java/com/ruoyi/common/utils/WxAppletNotifyUtils.java 查看文件

2
 
2
 
3
 /**
3
 /**
4
  * @author wangqiong
4
  * @author wangqiong
5
- * @description
5
+ * @description 获取微信小程序url scheme
6
  * @date 2023-10-13 10:16
6
  * @date 2023-10-13 10:16
7
  */
7
  */
8
-import cn.hutool.core.util.StrUtil;
8
+
9
 import cn.hutool.http.HttpUtil;
9
 import cn.hutool.http.HttpUtil;
10
 import cn.hutool.json.JSONObject;
10
 import cn.hutool.json.JSONObject;
11
 import cn.hutool.json.JSONUtil;
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
 public class WxAppletNotifyUtils {
13
 public class WxAppletNotifyUtils {
22
 
14
 
23
     /**
15
     /**

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java 查看文件

115
      * @return 结果
115
      * @return 结果
116
      */
116
      */
117
     public int deleteDeptById(Long deptId);
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 查看文件

15
     /** 姓名 */
15
     /** 姓名 */
16
     @Excel(name = "姓名")
16
     @Excel(name = "姓名")
17
     private String name;
17
     private String name;
18
+    /**
19
+     * 申请机构id
20
+     */
21
+    private String applicationOrganId;
22
+    /**
23
+     * 申请机构名称
24
+     */
25
+    private String applicationOrganName;
18
     /** 身份证号 */
26
     /** 身份证号 */
19
     @Excel(name = "身份证号")
27
     @Excel(name = "身份证号")
20
     private String identityNum;
28
     private String identityNum;
49
     /** 快递单号 */
57
     /** 快递单号 */
50
     private String trackNum;
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
     public String getSendEmail() {
76
     public String getSendEmail() {
53
         return sendEmail;
77
         return sendEmail;
54
     }
78
     }

+ 69
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java 查看文件

198
 
198
 
199
     /** 支付状态描述 */
199
     /** 支付状态描述 */
200
     private String paymentStatusName;
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
     private StringBuilder errorMsg;
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
     public StringBuilder getErrorMsg() {
240
     public StringBuilder getErrorMsg() {
205
         return errorMsg;
241
         return errorMsg;
206
     }
242
     }
274
     private String applicantName;
310
     private String applicantName;
275
     /** 被申请人名称 */
311
     /** 被申请人名称 */
276
     private String respondentName;
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
     public String getApplicantName() {
347
     public String getApplicantName() {
279
         return applicantName;
348
         return applicantName;

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAttach.java 查看文件

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

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CasePaymentRecord.java 查看文件

38
     /** 更新时间 */
38
     /** 更新时间 */
39
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
39
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
40
     private Date updateTime;
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 查看文件

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 查看文件

1
 package com.ruoyi.wisdomarbitrate.domain.dto;
1
 package com.ruoyi.wisdomarbitrate.domain.dto;
2
 
2
 
3
+import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
3
 import lombok.Data;
4
 import lombok.Data;
5
+
6
+import java.util.List;
7
+
4
 /**
8
 /**
5
  * 案件缴费传入对象
9
  * 案件缴费传入对象
6
  */
10
  */
23
      * 支付方式 wxpay(微信)  alipay(支付宝)
27
      * 支付方式 wxpay(微信)  alipay(支付宝)
24
      */
28
      */
25
     private String platform;
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 查看文件

3
 import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
3
 import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
4
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
4
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
5
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
6
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
6
 import org.apache.ibatis.annotations.Param;
7
 import org.apache.ibatis.annotations.Param;
7
 
8
 
8
 import java.util.List;
9
 import java.util.List;
12
 
13
 
13
     int selectCaseApplicationCount(CaseApplication caseApplication);
14
     int selectCaseApplicationCount(CaseApplication caseApplication);
14
 
15
 
16
+    /**
17
+     * 查询超级管理员案件
18
+     * @param caseApplication
19
+     * @return
20
+     */
21
+    List<CaseApplication> selectAdminCaseApplicationList(CaseApplication caseApplication);
22
+
15
     int insertCaseApplication(CaseApplication caseApplication);
23
     int insertCaseApplication(CaseApplication caseApplication);
16
 
24
 
17
 
25
 
39
      * @return
47
      * @return
40
      */
48
      */
41
     String selectArbitratorList(@Param("id") String id);
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 查看文件

8
     CasePaymentRecord queryRecord(String orderNumber);
8
     CasePaymentRecord queryRecord(String orderNumber);
9
 
9
 
10
     void update(CasePaymentRecord casePaymentRecord);
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 查看文件

3
 import com.ruoyi.common.core.domain.AjaxResult;
3
 import com.ruoyi.common.core.domain.AjaxResult;
4
 import com.ruoyi.dto.PayRequest;
4
 import com.ruoyi.dto.PayRequest;
5
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
6
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
6
 import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
7
 import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
7
 
8
 
8
 public interface ICasePaymentService {
9
 public interface ICasePaymentService {
12
     AjaxResult casePay(CasePayDTO casePayDTO);
13
     AjaxResult casePay(CasePayDTO casePayDTO);
13
 
14
 
14
     AjaxResult confirmPayment(CaseApplication caseApplication);
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 查看文件

371
                 if (caseAttach.getAnnexType() == 3) {
371
                 if (caseAttach.getAnnexType() == 3) {
372
                     String annexPath = caseAttach.getAnnexPath();
372
                     String annexPath = caseAttach.getAnnexPath();
373
                     String path = "/home/ruoyi/" + annexPath;
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
                     file = new File(path);
374
                     file = new File(path);
377
                     fileList.add(file);
375
                     fileList.add(file);
378
-                    System.out.println("文件长度:" + file.length());
376
+                    System.out.println("文件长度==================:" + file.length());
379
                 }
377
                 }
380
             }
378
             }
381
         }
379
         }
382
         if (file != null) {
380
         if (file != null) {
383
-            JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();
384
             try {
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
             } catch (Exception e) {
384
             } catch (Exception e) {
388
                 System.out.println("邮件发送失败++++++++++++++++++++++++++++++++");
385
                 System.out.println("邮件发送失败++++++++++++++++++++++++++++++++");
389
                 System.out.println(e.toString());
386
                 System.out.println(e.toString());

+ 80
- 44
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java 查看文件

14
 import com.ruoyi.common.annotation.DataScope;
14
 import com.ruoyi.common.annotation.DataScope;
15
 import com.ruoyi.common.constant.CaseApplicationConstants;
15
 import com.ruoyi.common.constant.CaseApplicationConstants;
16
 import com.ruoyi.common.core.domain.AjaxResult;
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
 import com.ruoyi.common.exception.EsignDemoException;
20
 import com.ruoyi.common.exception.EsignDemoException;
22
 import com.ruoyi.common.exception.ServiceException;
21
 import com.ruoyi.common.exception.ServiceException;
23
-import com.ruoyi.common.utils.WordUtil;
22
+import com.ruoyi.common.utils.*;
24
 import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
23
 import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
25
 
24
 
26
 
25
 
30
 import com.ruoyi.common.exception.ServiceException;
29
 import com.ruoyi.common.exception.ServiceException;
31
 import com.ruoyi.system.mapper.SysUserMapper;
30
 import com.ruoyi.system.mapper.SysUserMapper;
32
 import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
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
 import com.ruoyi.common.utils.bean.BeanUtils;
32
 import com.ruoyi.common.utils.bean.BeanUtils;
37
 import com.ruoyi.system.mapper.SysDeptMapper;
33
 import com.ruoyi.system.mapper.SysDeptMapper;
38
 import com.ruoyi.wisdomarbitrate.domain.*;
34
 import com.ruoyi.wisdomarbitrate.domain.*;
57
 import java.util.regex.Pattern;
53
 import java.util.regex.Pattern;
58
 import java.util.stream.Collectors;
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
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
58
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
61
 
59
 
62
 
60
 
69
     private CaseAffiliateMapper caseAffiliateMapper;
67
     private CaseAffiliateMapper caseAffiliateMapper;
70
 
68
 
71
     @Autowired
69
     @Autowired
72
-    private ArbitratorMapper arbitratorMapper;
70
+    private CasePaymentRecordMapper casePaymentRecordMapper;
73
     @Autowired
71
     @Autowired
74
     private ArbitrateRecordMapper arbitrateRecordMapper;
72
     private ArbitrateRecordMapper arbitrateRecordMapper;
75
     @Autowired
73
     @Autowired
88
     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}$");
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
     @Override
136
     @Override
93
     public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
137
     public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
94
-        return caseApplicationMapper.selectCaseApplicationList(caseApplication);
138
+        return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
95
 
139
 
96
     }
140
     }
97
-
98
     @Override
141
     @Override
99
     @Transactional
142
     @Transactional
100
     public int insertcaseApplication(CaseApplication caseApplication) {
143
     public int insertcaseApplication(CaseApplication caseApplication) {
108
         // 获取自动编码
151
         // 获取自动编码
109
         String caseNum = generateCaseNum();
152
         String caseNum = generateCaseNum();
110
         caseApplication.setCaseNum(caseNum);
153
         caseApplication.setCaseNum(caseNum);
154
+        caseApplication.setCreateBy(getUsername());
111
 
155
 
112
         int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
156
         int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
113
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
157
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
125
                 if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
169
                 if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
126
                     // 将组织机构id设为申请人名称
170
                     // 将组织机构id设为申请人名称
127
                     if (deptMap.containsKey(caseAffiliate.getName())) {
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
                     } else {
174
                     } else {
130
                         // 如果不存在则新增
175
                         // 如果不存在则新增
131
                         SysDept dept = new SysDept();
176
                         SysDept dept = new SysDept();
139
                         dept.setUpdateBy(getUsername());
184
                         dept.setUpdateBy(getUsername());
140
                         sysDeptMapper.insertDept(dept);
185
                         sysDeptMapper.insertDept(dept);
141
                         deptMap.put(dept.getDeptName(), dept.getDeptId());
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
         BigDecimal feeRate = new BigDecimal(0.01);
239
         BigDecimal feeRate = new BigDecimal(0.01);
194
         BigDecimal feePayable  = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2,BigDecimal.ROUND_HALF_UP);
240
         BigDecimal feePayable  = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2,BigDecimal.ROUND_HALF_UP);
195
         caseApplication.setFeePayable(feePayable);
241
         caseApplication.setFeePayable(feePayable);
242
+        caseApplication.setUpdateBy(getUsername());
196
 
243
 
197
         int rows = caseApplicationMapper.updataCaseApplication(caseApplication);
244
         int rows = caseApplicationMapper.updataCaseApplication(caseApplication);
198
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
245
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
208
                 if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
255
                 if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
209
                     // 将组织机构id设为申请人名称
256
                     // 将组织机构id设为申请人名称
210
                     if (deptMap.containsKey(caseAffiliate.getName())) {
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
                     } else {
260
                     } else {
213
                         // 如果不存在则新增
261
                         // 如果不存在则新增
214
                         SysDept dept = new SysDept();
262
                         SysDept dept = new SysDept();
222
                         dept.setUpdateBy(getUsername());
270
                         dept.setUpdateBy(getUsername());
223
                         sysDeptMapper.insertDept(dept);
271
                         sysDeptMapper.insertDept(dept);
224
                         deptMap.put(dept.getDeptName(), dept.getDeptId());
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
                             CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
459
                             CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
410
                             // 新增立案信息
460
                             // 新增立案信息
411
                             caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
461
                             caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
412
-
462
+                            caseApplicationItera.setCreateBy(getUsername());
413
                             int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
463
                             int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
414
                             List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
464
                             List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
415
                             if(caseAffiliates!=null&&caseAffiliates.size()>0){
465
                             if(caseAffiliates!=null&&caseAffiliates.size()>0){
888
         caseAffiliate.setCaseAppliId(caseApplication.getId());
938
         caseAffiliate.setCaseAppliId(caseApplication.getId());
889
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
939
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
890
         if(caseAffiliatListeselect!=null){
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
             for (int i = 0; i < caseAffiliatListeselect.size(); i++){
942
             for (int i = 0; i < caseAffiliatListeselect.size(); i++){
901
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
943
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
902
                 int identityType = caseAffiliateselect.getIdentityType();
944
                 int identityType = caseAffiliateselect.getIdentityType();
903
                 if(identityType==1){
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
         return caseApplicationselect;
957
         return caseApplicationselect;
915
     }
958
     }
916
 
959
 
1216
         caseAffiliate.setCaseAppliId(caseApplication.getId());
1259
         caseAffiliate.setCaseAppliId(caseApplication.getId());
1217
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
1260
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
1218
         if(caseAffiliatListeselect!=null) {
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
             for (int j = 0; j < caseAffiliatListeselect.size(); j++) {
1263
             for (int j = 0; j < caseAffiliatListeselect.size(); j++) {
1228
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
1264
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
1229
                 int identityType = caseAffiliateselect.getIdentityType();
1265
                 int identityType = caseAffiliateselect.getIdentityType();
1230
                 if(identityType==1){
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
 
1346
 
1313
             // 将组织机构id设为申请人名称
1347
             // 将组织机构id设为申请人名称
1314
             if(deptMap.containsKey(caseApplication.getName())){
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
             }else {
1351
             }else {
1317
                // 如果不存在则新增
1352
                // 如果不存在则新增
1318
                 SysDept dept = new SysDept();
1353
                 SysDept dept = new SysDept();
1326
                 dept.setUpdateBy(getUsername());
1361
                 dept.setUpdateBy(getUsername());
1327
                 sysDeptMapper.insertDept(dept);
1362
                 sysDeptMapper.insertDept(dept);
1328
                 deptMap.put(dept.getDeptName(),dept.getDeptId());
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 查看文件

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

+ 33
- 7
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java 查看文件

1
 package com.ruoyi.wisdomarbitrate.service.impl;
1
 package com.ruoyi.wisdomarbitrate.service.impl;
2
 
2
 
3
 
3
 
4
+import cn.hutool.core.collection.CollectionUtil;
4
 import com.ruoyi.ElegentPay;
5
 import com.ruoyi.ElegentPay;
5
 import com.ruoyi.common.constant.CaseApplicationConstants;
6
 import com.ruoyi.common.constant.CaseApplicationConstants;
6
 import com.ruoyi.common.core.domain.AjaxResult;
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
 import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
13
 import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
8
 import com.ruoyi.common.utils.SmsUtils;
14
 import com.ruoyi.common.utils.SmsUtils;
9
 import com.ruoyi.dto.PayRequest;
15
 import com.ruoyi.dto.PayRequest;
29
     private final CaseApplicationMapper caseApplicationMapper;
35
     private final CaseApplicationMapper caseApplicationMapper;
30
     private final CasePaymentRecordMapper casePaymentRecordMapper;
36
     private final CasePaymentRecordMapper casePaymentRecordMapper;
31
     private final CaseAffiliateMapper caseAffiliateMapper;
37
     private final CaseAffiliateMapper caseAffiliateMapper;
38
+    @Autowired
39
+    private  CaseAttachMapper caseAttachMapper;
32
 
40
 
33
     @Autowired
41
     @Autowired
34
     public CasePaymentServiceImpl(ElegentPay elegentPay
42
     public CasePaymentServiceImpl(ElegentPay elegentPay
78
         casePaymentRecord.setPaymentTime(new Date());
86
         casePaymentRecord.setPaymentTime(new Date());
79
         casePaymentRecord.setUpdateTime(new Date());
87
         casePaymentRecord.setUpdateTime(new Date());
80
         casePaymentRecordMapper.update(casePaymentRecord);
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
         return AjaxResult.success("支付成功");
90
         return AjaxResult.success("支付成功");
89
     }
91
     }
90
 
92
 
135
         }
137
         }
136
         return AjaxResult.error("暂无需要确认的缴费清单");
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 查看文件

86
 	    <include refid="selectDeptVo"/>
86
 	    <include refid="selectDeptVo"/>
87
 		where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
87
 		where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
88
 	</select>
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
  		insert into sys_dept(
95
  		insert into sys_dept(
92
  			<if test="deptId != null and deptId != 0">dept_id,</if>
96
  			<if test="deptId != null and deptId != 0">dept_id,</if>
93
  			<if test="parentId != null and parentId != 0">parent_id,</if>
97
  			<if test="parentId != null and parentId != 0">parent_id,</if>

+ 11
- 6
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml 查看文件

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

+ 8
- 4
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml 查看文件

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

+ 76
- 8
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml 查看文件

37
         <result property="filearbitraUrl"   column="filearbitra_url"  />
37
         <result property="filearbitraUrl"   column="filearbitra_url"  />
38
     </resultMap>
38
     </resultMap>
39
 
39
 
40
-
41
-
42
     <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
40
     <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
41
+select t1.* from(
42
+        select t.* from(
43
         select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
43
         select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
44
         CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
44
         CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
45
             ELSE '无审理方式'
45
             ELSE '无审理方式'
56
         c.hear_date ,c.arbitrat_claims ,
56
         c.hear_date ,c.arbitrat_claims ,
57
         c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
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
         c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
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
         from case_application c
61
         from case_application c
61
         LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
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
         <where>
127
         <where>
64
             <if test="caseStatus != null">
128
             <if test="caseStatus != null">
65
                 AND c.case_status = #{caseStatus}
129
                 AND c.case_status = #{caseStatus}
68
                 AND c.case_num = #{caseNum}
132
                 AND c.case_num = #{caseNum}
69
             </if>
133
             </if>
70
             <if test="nameId != null and nameId != ''">
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
             </if>
136
             </if>
73
             <if test="caseStatusList != null and caseStatusList.size() > 0">
137
             <if test="caseStatusList != null and caseStatusList.size() > 0">
74
                 and c.case_status in
138
                 and c.case_status in
186
         </set>
250
         </set>
187
         where id = #{id}
251
         where id = #{id}
188
     </update>
252
     </update>
253
+    <update id="updatePayType">
254
+        update case_application set pay_type=#{payType} where id = #{caseId}
255
+    </update>
189
 
256
 
190
     <delete id="deletecaseApplication" parameterType="CaseApplication">
257
     <delete id="deletecaseApplication" parameterType="CaseApplication">
191
         delete from case_application where id = #{id}
258
         delete from case_application where id = #{id}
208
         c.hear_date ,c.arbitrat_claims ,
275
         c.hear_date ,c.arbitrat_claims ,
209
         c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
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
         c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
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
         from case_application c
279
         from case_application c
213
         LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
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
         <where>
282
         <where>
216
             <if test="id != null ">
283
             <if test="id != null ">
217
                 AND c.id = #{id}
284
                 AND c.id = #{id}
240
         p.payment_status ,
307
         p.payment_status ,
241
         CASE p.payment_status when 1 then '已支付' when 0 then '未支付'
308
         CASE p.payment_status when 1 then '已支付' when 0 then '未支付'
242
         ELSE '无支付状态'
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
         from case_application c left join case_payment_record p on c.id  = p.case_id
312
         from case_application c left join case_payment_record p on c.id  = p.case_id
245
         where c.case_status  = 3 and p.payment_status  = 1
313
         where c.case_status  = 3 and p.payment_status  = 1
246
             AND c.id = #{id}
314
             AND c.id = #{id}

+ 1
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml 查看文件

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

+ 2
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CasePaymentRecordMapper.xml 查看文件

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