Browse Source

案件列表修改,缴费确认

18792927508 2 years ago
parent
commit
2300df715c
22 changed files with 403 additions and 87 deletions
  1. 11
    0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CasePaymentController.java
  2. 14
    0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
  3. 2
    10
      ruoyi-common/src/main/java/com/ruoyi/common/utils/WxAppletNotifyUtils.java
  4. 2
    0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java
  5. 24
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAffiliate.java
  6. 69
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java
  7. 1
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAttach.java
  8. 4
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CasePaymentRecord.java
  9. 28
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CaseConfirmPayDTO.java
  10. 12
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CasePayDTO.java
  11. 14
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationMapper.java
  12. 3
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java
  13. 2
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CasePaymentRecordMapper.java
  14. 8
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICasePaymentService.java
  15. 67
    38
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
  16. 33
    7
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java
  17. 6
    2
      ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
  18. 11
    6
      ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
  19. 8
    4
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml
  20. 81
    18
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
  21. 1
    0
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml
  22. 2
    0
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CasePaymentRecordMapper.xml

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

@@ -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 View File

@@ -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())

+ 2
- 10
ruoyi-common/src/main/java/com/ruoyi/common/utils/WxAppletNotifyUtils.java View File

@@ -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 View File

@@ -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 View File

@@ -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 View File

@@ -114,9 +114,45 @@ public class CaseApplication  extends BaseEntity {
114 114
     private Integer paymentStatus;
115 115
     /** 支付状态描述 */
116 116
     private String paymentStatusName;
117
+    /**
118
+     * 支付方式code,0线上支付,1线下支付
119
+     */
120
+    private Integer payTypeCode;
121
+    /**
122
+     * 支付方式name,0线上支付,1线下支付
123
+     */
124
+    private String payTypeName;
125
+    /**
126
+     * 缴费凭证
127
+     */
128
+    private List<CaseAttach> payOrderList;
117 129
     // 导入校验失败信息
118 130
     private StringBuilder errorMsg;
119 131
 
132
+    public Integer getPayTypeCode() {
133
+        return payTypeCode;
134
+    }
135
+
136
+    public void setPayTypeCode(Integer payTypeCode) {
137
+        this.payTypeCode = payTypeCode;
138
+    }
139
+
140
+    public String getPayTypeName() {
141
+        return payTypeName;
142
+    }
143
+
144
+    public void setPayTypeName(String payTypeName) {
145
+        this.payTypeName = payTypeName;
146
+    }
147
+
148
+    public List<CaseAttach> getPayOrderList() {
149
+        return payOrderList;
150
+    }
151
+
152
+    public void setPayOrderList(List<CaseAttach> payOrderList) {
153
+        this.payOrderList = payOrderList;
154
+    }
155
+
120 156
     public StringBuilder getErrorMsg() {
121 157
         return errorMsg;
122 158
     }
@@ -190,6 +226,39 @@ public class CaseApplication  extends BaseEntity {
190 226
     private String applicantName;
191 227
     /** 被申请人名称 */
192 228
     private String respondentName;
229
+    /**
230
+     * 用户身份证号
231
+     */
232
+    private String idCard;
233
+    /**
234
+     * 用户id
235
+     */
236
+    private String userId;
237
+    private List<Long> deptIds;
238
+
239
+    public List<Long> getDeptIds() {
240
+        return deptIds;
241
+    }
242
+
243
+    public void setDeptIds(List<Long> deptIds) {
244
+        this.deptIds = deptIds;
245
+    }
246
+
247
+    public String getUserId() {
248
+        return userId;
249
+    }
250
+
251
+    public void setUserId(String userId) {
252
+        this.userId = userId;
253
+    }
254
+
255
+    public String getIdCard() {
256
+        return idCard;
257
+    }
258
+
259
+    public void setIdCard(String idCard) {
260
+        this.idCard = idCard;
261
+    }
193 262
 
194 263
     public String getApplicantName() {
195 264
         return applicantName;

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAttach.java View File

@@ -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 View File

@@ -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 View File

@@ -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 View File

@@ -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 View File

@@ -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
 }

+ 3
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java View File

@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
2 2
 
3 3
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
4 4
 import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
5
+import org.apache.ibatis.annotations.Param;
5 6
 
6 7
 import java.util.List;
7 8
 
@@ -14,4 +15,5 @@ public interface CaseAttachMapper {
14 15
 
15 16
 
16 17
     int updateCaseAttach(CaseAttach caseAttach);
17
-}
18
+
19
+  }

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CasePaymentRecordMapper.java View File

@@ -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 View File

@@ -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
 }

+ 67
- 38
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java View File

@@ -14,10 +14,9 @@ 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 22
 import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
@@ -50,6 +49,7 @@ import java.util.*;
50 49
 import java.util.regex.Pattern;
51 50
 import java.util.stream.Collectors;
52 51
 
52
+import static com.ruoyi.common.utils.SecurityUtils.getLoginUser;
53 53
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
54 54
 
55 55
 
@@ -62,7 +62,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
62 62
     private CaseAffiliateMapper caseAffiliateMapper;
63 63
 
64 64
     @Autowired
65
-    private ArbitratorMapper arbitratorMapper;
65
+    private CasePaymentRecordMapper casePaymentRecordMapper;
66 66
     @Autowired
67 67
     private ArbitrateRecordMapper arbitrateRecordMapper;
68 68
     @Autowired
@@ -79,9 +79,45 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
79 79
     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}$");
80 80
 
81 81
 
82
-
82
+    /**
83
+     * 数据权限:1.每个人不同的角色,而每个角色可以操作不同的案件状态
84
+     * 2.申请人:金融机构下,可以看到改机构的所有的案件
85
+     * 3.被申请人:可以看到自己相关的案件(案件有被申请人相关的信息)
86
+     * 4.仲裁员:案件选定了某个仲裁员后,该仲裁员就可以查看该案件
87
+     * 5.仲裁委(部门长):可以查看所有的案件
88
+     * 6.法律顾问秘书:可以属于多个机构,可以查看相关机构的所有案件
89
+     * 7.超级管理员:可以查看所有的信息和数据
90
+     * @param caseApplication
91
+     * @return
92
+     */
83 93
     @Override
84 94
     public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
95
+        // 获取登录用户
96
+        LoginUser loginUser = getLoginUser();
97
+        SysUser user = loginUser.getUser();
98
+        Long userId = user.getUserId();
99
+        Long deptId = user.getDeptId();
100
+        List<SysRole> roles = user.getRoles();
101
+        // 查询登录人身份证号
102
+        SysUser sysUser = sysUserMapper.selectUserById(userId);
103
+        caseApplication.setIdCard(sysUser.getIdCard());
104
+        caseApplication.setUserId(String.valueOf(userId));
105
+        for (SysRole role : roles) {
106
+            // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
107
+            if(role.getRoleName().equals("超级管理员")
108
+            ||role.getRoleName().equals("仲裁委")
109
+            ||role.getRoleName().equals("部门长")){
110
+                return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
111
+            }
112
+            if(role.getRoleName().equals("法律顾问")){
113
+                // 查询角色有关的用户部门
114
+                List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
115
+                caseApplication.setDeptIds(deptIds);
116
+            }
117
+        }
118
+
119
+
120
+        // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
85 121
         return caseApplicationMapper.selectCaseApplicationList(caseApplication);
86 122
 
87 123
     }
@@ -99,6 +135,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
99 135
         // 获取自动编码
100 136
         String caseNum = generateCaseNum();
101 137
         caseApplication.setCaseNum(caseNum);
138
+        caseApplication.setCreateBy(getUsername());
102 139
 
103 140
         int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
104 141
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
@@ -116,7 +153,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
116 153
                 if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
117 154
                     // 将组织机构id设为申请人名称
118 155
                     if (deptMap.containsKey(caseAffiliate.getName())) {
119
-                        caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
156
+                        caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseAffiliate.getName())));
157
+                        caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
120 158
                     } else {
121 159
                         // 如果不存在则新增
122 160
                         SysDept dept = new SysDept();
@@ -130,7 +168,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
130 168
                         dept.setUpdateBy(getUsername());
131 169
                         sysDeptMapper.insertDept(dept);
132 170
                         deptMap.put(dept.getDeptName(), dept.getDeptId());
133
-                        caseAffiliate.setName(String.valueOf(dept.getDeptId()));
171
+                        caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
172
+                        caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
134 173
 
135 174
                     }
136 175
                 }
@@ -184,6 +223,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
184 223
         BigDecimal feeRate = new BigDecimal(0.01);
185 224
         BigDecimal feePayable  = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2,BigDecimal.ROUND_HALF_UP);
186 225
         caseApplication.setFeePayable(feePayable);
226
+        caseApplication.setUpdateBy(getUsername());
187 227
 
188 228
         int rows = caseApplicationMapper.updataCaseApplication(caseApplication);
189 229
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
@@ -199,7 +239,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
199 239
                 if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
200 240
                     // 将组织机构id设为申请人名称
201 241
                     if (deptMap.containsKey(caseAffiliate.getName())) {
202
-                        caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
242
+                        caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
243
+                        caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseAffiliate.getName())));
203 244
                     } else {
204 245
                         // 如果不存在则新增
205 246
                         SysDept dept = new SysDept();
@@ -213,7 +254,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
213 254
                         dept.setUpdateBy(getUsername());
214 255
                         sysDeptMapper.insertDept(dept);
215 256
                         deptMap.put(dept.getDeptName(), dept.getDeptId());
216
-                        caseAffiliate.setName(String.valueOf(dept.getDeptId()));
257
+
258
+                        caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
259
+                        caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
217 260
 
218 261
                     }
219 262
                 }
@@ -400,7 +443,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
400 443
                             CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
401 444
                             // 新增立案信息
402 445
                             caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
403
-
446
+                            caseApplicationItera.setCreateBy(getUsername());
404 447
                             int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
405 448
                             List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
406 449
                             if(caseAffiliates!=null&&caseAffiliates.size()>0){
@@ -879,29 +922,22 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
879 922
         caseAffiliate.setCaseAppliId(caseApplication.getId());
880 923
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
881 924
         if(caseAffiliatListeselect!=null){
882
-            // 查询组织机构
883
-            List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
884
-            Map<String,String> deptMap=new HashMap<>();
885
-            if(CollectionUtil.isNotEmpty(sysDepts)){
886
-                for (SysDept sysDept : sysDepts) {
887
-                    deptMap.put(String.valueOf(sysDept.getDeptId()),sysDept.getDeptName());
888
-                }
889
-            }
890
-            StringBuffer applicantName = new StringBuffer();
925
+
891 926
             for (int i = 0; i < caseAffiliatListeselect.size(); i++){
892 927
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
893 928
                 int identityType = caseAffiliateselect.getIdentityType();
894 929
                 if(identityType==1){
895
-                    if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
896
-                        caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
897
-                    }
898
-                    applicantName.append(caseAffiliateselect.getName()).append(",");;
930
+
931
+                    caseApplicationselect.setApplicantName(caseAffiliateselect.getApplicationOrganName());
899 932
                 }
900 933
             }
901
-            caseApplicationselect.setApplicantName(applicantName.toString());
902
-
903 934
 
904 935
         }
936
+        caseApplication.setAnnexType(8);
937
+        // 查询缴费凭证
938
+        List<CaseAttach> payOrderList = caseAttachMapper.queryCaseAttachList(caseApplication);
939
+        caseApplicationselect.setPayOrderList(payOrderList);
940
+
905 941
         return caseApplicationselect;
906 942
     }
907 943
 
@@ -1012,21 +1048,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1012 1048
         caseAffiliate.setCaseAppliId(caseApplication.getId());
1013 1049
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
1014 1050
         if(caseAffiliatListeselect!=null) {
1015
-            // 查询组织机构
1016
-            List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
1017
-            Map<String,String> deptMap=new HashMap<>();
1018
-            if(CollectionUtil.isNotEmpty(sysDepts)){
1019
-                for (SysDept sysDept : sysDepts) {
1020
-                    deptMap.put(String.valueOf(sysDept.getDeptId()),sysDept.getDeptName());
1021
-                }
1022
-            }
1051
+
1023 1052
             for (int j = 0; j < caseAffiliatListeselect.size(); j++) {
1024 1053
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
1025 1054
                 int identityType = caseAffiliateselect.getIdentityType();
1026 1055
                 if(identityType==1){
1027
-                    if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
1028
-                        caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
1029
-                    }
1056
+                  caseAffiliateselect.setName(caseAffiliateselect.getApplicationOrganName());
1030 1057
 
1031 1058
                 }
1032 1059
                 //给申请人、被申请人发送短信通知
@@ -1108,7 +1135,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1108 1135
 
1109 1136
             // 将组织机构id设为申请人名称
1110 1137
             if(deptMap.containsKey(caseApplication.getName())){
1111
-                caseAffiliate.setName(String.valueOf(deptMap.get(caseApplication.getName())));
1138
+                caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseApplication.getName())));
1139
+                caseAffiliate.setApplicationOrganName(caseApplication.getName());
1112 1140
             }else {
1113 1141
                // 如果不存在则新增
1114 1142
                 SysDept dept = new SysDept();
@@ -1122,7 +1150,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1122 1150
                 dept.setUpdateBy(getUsername());
1123 1151
                 sysDeptMapper.insertDept(dept);
1124 1152
                 deptMap.put(dept.getDeptName(),dept.getDeptId());
1125
-                caseAffiliate.setName(String.valueOf(dept.getDeptId()));
1153
+                caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
1154
+                caseAffiliate.setApplicationOrganName(caseApplication.getName());
1126 1155
 
1127 1156
             }
1128 1157
 

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

@@ -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 View File

@@ -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 View File

@@ -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 View File

@@ -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},

+ 81
- 18
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml View File

@@ -34,31 +34,89 @@
34 34
         <result property="arbitratorName"   column="arbitrator_name"  />
35 35
         <result property="paymentStatus"   column="payment_status"  />
36 36
         <result property="paymentStatusName"   column="paymentStatusName"  />
37
+        <result property="payTypeCode"   column="pay_type"  />
37 38
     </resultMap>
38 39
 
39
-
40
-
41 40
     <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
41
+        select t.* from(
42
+        <!--         查询法律顾问案件-->
42 43
         select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
43 44
         CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
44
-            ELSE '无审理方式'
45
-            END arbitratMethodName,
45
+        ELSE '无审理方式'
46
+        END arbitratMethodName,
46 47
         c.case_status ,
47 48
         CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
48
-                            when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
49
-                            when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
50
-                            when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
51
-                            when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
52
-                            when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
53
-                            ELSE '无案件状态'
54
-                            END caseStatusName,
49
+        when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
50
+        when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
51
+        when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
52
+        when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
53
+        when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
54
+        ELSE '无案件状态'
55
+        END caseStatusName,
55 56
         c.hear_date ,c.arbitrat_claims ,
56 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 58
         c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
58
-        c.update_by ,c.update_time , c.arbitrator_name,d.dept_name as applicantName,c.register_date
59
+        c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.arbitrator_id,ca.identity_num , ca.identity_type
59 60
         from case_application c
60
-        LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
61
-        LEFT JOIN sys_dept d ON ca.NAME = d.dept_id and ca.name=d.dept_id
61
+        LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id
62
+        <where>
63
+            <if test="caseStatus != null">
64
+                AND c.case_status = #{caseStatus}
65
+            </if>
66
+            <if test="caseNum != null and caseNum != ''">
67
+                AND c.case_num = #{caseNum}
68
+            </if>
69
+            <if test="caseStatusList != null and caseStatusList.size() > 0">
70
+                and c.case_status in
71
+                <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
72
+                    #{caseStatus}
73
+                </foreach>
74
+            </if>
75
+        </where>
76
+        ) t <where>
77
+        <!--申请人-->
78
+        <if test="nameId != null and nameId != ''">
79
+            or ( t.application_organ_id = #{nameId}  AND t.identity_type=1 )
80
+        </if>
81
+        <!--被申请人-->
82
+        <if test="idCard != null and idCard != ''">
83
+            or (t.identity_num=#{idCard}  AND t.identity_type=2)
84
+        </if>
85
+                   <!--仲裁员-->
86
+        <if test="userId != null and userId != ''">
87
+            or instr  (t.arbitrator_id,#{userId})>0
88
+        </if>
89
+        <!--法律顾问-->
90
+        <if test="deptIds != null and deptIds.size() > 0">
91
+            or t.name
92
+            in
93
+            <foreach item="item" collection="deptIds" open="(" separator="," close=")">
94
+                #{item}
95
+            </foreach>
96
+        </if>
97
+    </where>
98
+        order by t.create_time desc,t.case_num desc
99
+    </select>
100
+    <select id="selectAdminCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
101
+        select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
102
+        CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
103
+        ELSE '无审理方式'
104
+        END arbitratMethodName,
105
+        c.case_status ,
106
+        CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
107
+        when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
108
+        when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
109
+        when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
110
+        when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
111
+        when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
112
+        ELSE '无案件状态'
113
+        END caseStatusName,
114
+        c.hear_date ,c.arbitrat_claims ,
115
+        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
116
+        c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
117
+        c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName
118
+        from case_application c
119
+        LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id
62 120
         <where>
63 121
             <if test="caseStatus != null">
64 122
                 AND c.case_status = #{caseStatus}
@@ -67,7 +125,7 @@
67 125
                 AND c.case_num = #{caseNum}
68 126
             </if>
69 127
             <if test="nameId != null and nameId != ''">
70
-                AND ca.NAME=#{nameId}  AND ca.identity_type=1 and ca.name=d.dept_id
128
+                AND ca.application_organ_id=#{nameId}  AND ca.identity_type=1
71 129
             </if>
72 130
             <if test="caseStatusList != null and caseStatusList.size() > 0">
73 131
                 and c.case_status in
@@ -79,6 +137,7 @@
79 137
         order by c.create_time desc,c.case_num desc
80 138
     </select>
81 139
 
140
+
82 141
     <select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
83 142
         select count(1) from  case_application c
84 143
         <where>
@@ -184,6 +243,9 @@
184 243
         </set>
185 244
         where id = #{id}
186 245
     </update>
246
+    <update id="updatePayType">
247
+        update case_application set pay_type=#{payType} where id = #{caseId}
248
+    </update>
187 249
 
188 250
     <delete id="deletecaseApplication" parameterType="CaseApplication">
189 251
         delete from case_application where id = #{id}
@@ -206,10 +268,10 @@
206 268
         c.hear_date ,c.arbitrat_claims ,
207 269
         c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
208 270
         c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
209
-        c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,d.dept_name as applicantName
271
+        c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName
210 272
         from case_application c
211 273
         LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
212
-        LEFT JOIN sys_dept d ON ca.NAME = d.dept_id and ca.name=d.dept_id
274
+
213 275
         <where>
214 276
             <if test="id != null ">
215 277
                 AND c.id = #{id}
@@ -238,7 +300,8 @@
238 300
         p.payment_status ,
239 301
         CASE p.payment_status when 1 then '已支付' when 0 then '未支付'
240 302
         ELSE '无支付状态'
241
-        END paymentStatusName
303
+        END paymentStatusName,c.pay_type,
304
+        CASE c.pay_type when 0 then '线上支付' when 0 then '线下支付' else '' end payTypeName
242 305
         from case_application c left join case_payment_record p on c.id  = p.case_id
243 306
         where c.case_status  = 3 and p.payment_status  = 1
244 307
             AND c.id = #{id}

+ 1
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml View File

@@ -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 View File

@@ -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>