Pārlūkot izejas kodu

Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev

qtz 2 gadus atpakaļ
vecāks
revīzija
a12083d93c

+ 5
- 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Parādīt failu

@@ -28,10 +28,10 @@ import org.springframework.web.bind.annotation.*;
28 28
 import com.ruoyi.common.utils.poi.ExcelUtil;
29 29
 import org.springframework.web.multipart.MultipartFile;
30 30
 
31
+import javax.servlet.ServletException;
31 32
 import javax.servlet.http.HttpServletRequest;
32 33
 import javax.servlet.http.HttpServletResponse;
33
-import java.io.IOException;
34
-import java.io.InputStream;
34
+import java.io.*;
35 35
 import java.net.URL;
36 36
 import java.net.URLEncoder;
37 37
 import java.util.List;
@@ -353,6 +353,9 @@ public class CaseApplicationController extends BaseController {
353 353
     }
354 354
 
355 355
 
356
+
357
+    
358
+
356 359
     /**
357 360
      * 发送房间号短信
358 361
      */

+ 2
- 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseArbitrateController.java Parādīt failu

@@ -30,8 +30,8 @@ public class CaseArbitrateController extends BaseController {
30 30
     @PutMapping("/method")
31 31
 //    @PreAuthorize("@ss.hasPermi('caseManagement:list:checkarbitrationway')")
32 32
     public AjaxResult examineArbitrateMethod(@Validated @RequestBody CaseApplication caseApplication
33
-            , Integer opinion){
34
-        return caseArbitrateService.examineArbitrateMethod(caseApplication,opinion);
33
+            , Integer opinion, Integer arbitratMethod){
34
+        return caseArbitrateService.examineArbitrateMethod(caseApplication,opinion,arbitratMethod);
35 35
     }
36 36
 
37 37
     /**

+ 12
- 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java Parādīt failu

@@ -38,6 +38,18 @@ public class SysUser extends BaseEntity
38 38
     /** 用户昵称 */
39 39
     @Excel(name = "用户名称")
40 40
     private String nickName;
41
+
42
+    /** 用户昵称和待办数量 */
43
+    private String nickNameAndNum;
44
+
45
+    public String getNickNameAndNum() {
46
+        return nickNameAndNum;
47
+    }
48
+
49
+    public void setNickNameAndNum(String nickNameAndNum) {
50
+        this.nickNameAndNum = nickNameAndNum;
51
+    }
52
+
41 53
     /** 用户身份证号 */
42 54
     @Excel(name = "身份证号")
43 55
     private String idCard;

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java Parādīt failu

@@ -89,7 +89,7 @@ public class SysUserServiceImpl implements ISysUserService {
89 89
                 int casenum = caseApplicationMapper.selectCasenum(userId.toString());
90 90
                 String nickName = sysUser.getNickName();
91 91
                 String nickNamenew = nickName + "(待办案件数量" + casenum + "个)";
92
-                sysUser.setNickName(nickNamenew);
92
+                sysUser.setNickNameAndNum(nickNamenew);
93 93
             }
94 94
 
95 95
         }

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java Parādīt failu

@@ -56,6 +56,10 @@ public class CaseApplication  extends BaseEntity {
56 56
 
57 57
     /** 被申请人是否书面审理 */
58 58
     private Integer respondentIsWrittenHear;
59
+    /** 开庭方式是否一致 */
60
+    private Integer arbitraMethodIssame;
61
+    /** 仲裁方式说明 */
62
+    private String arbitratMethodIllustrate;
59 63
 
60 64
 
61 65
     /** 案件申请表ID */

+ 3
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/CasePayListVO.java Parādīt failu

@@ -4,14 +4,15 @@ import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
4 4
 import com.ruoyi.wisdomarbitrate.domain.CaseApplicationPay;
5 5
 import lombok.Data;
6 6
 
7
+import java.math.BigDecimal;
7 8
 import java.util.List;
8 9
 
9 10
 @Data
10 11
 public class CasePayListVO {
11 12
     /**
12
-     * 订单总金额 单位:分
13
+     * 订单总金额
13 14
      */
14
-    private int totalFee;
15
+    private BigDecimal totalFee;
15 16
 
16 17
     /**
17 18
      * 案件总条数

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseArbitrateService.java Parādīt failu

@@ -13,5 +13,5 @@ public interface ICaseArbitrateService {
13 13
 
14 14
     AjaxResult  writtenHear(CaseIds caseIds);
15 15
 
16
-    AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion);
16
+    AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion, Integer arbitratMethod);
17 17
 }

+ 78
- 11
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Parādīt failu

@@ -174,7 +174,45 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
174 174
                 // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
175 175
                 if ("超级管理员".equals(role.getRoleName())
176 176
                 ) {
177
-                    return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
177
+                    List<CaseApplication> caseApplicationlist = caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
178
+                    if(caseApplicationlist!=null&&caseApplicationlist.size()>0){
179
+                        for(CaseApplication caseApplicationsel : caseApplicationlist){
180
+                            Integer caseStatus = caseApplicationsel.getCaseStatus();
181
+                            if(caseStatus.intValue() == CaseApplicationConstants.CHECK_ARBITRATION_METHOD){
182
+                                Integer applicantIsWrittenHear = caseApplicationsel.getApplicantIsWrittenHear();
183
+                                Integer respondentIsWrittenHear = caseApplicationsel.getRespondentIsWrittenHear();
184
+                                if(applicantIsWrittenHear!=null&&respondentIsWrittenHear!=null){
185
+                                    if(applicantIsWrittenHear.intValue()==respondentIsWrittenHear.intValue()){
186
+                                        caseApplicationsel.setArbitraMethodIssame(1);
187
+                                        if(applicantIsWrittenHear.intValue()==1&&respondentIsWrittenHear.intValue()==1){
188
+                                            caseApplicationsel.setArbitratMethod(2);
189
+                                        }else {
190
+                                            caseApplicationsel.setArbitratMethod(1);
191
+                                        }
192
+                                    }else {
193
+                                        caseApplicationsel.setArbitraMethodIssame(2);
194
+                                        String applicantarbitratMethod = "";
195
+                                        String respondentbitratMethod = "";
196
+                                        if(applicantIsWrittenHear.intValue()==1){
197
+                                            applicantarbitratMethod = "书面审理";
198
+                                        }else {
199
+                                            applicantarbitratMethod = "开庭审理";
200
+                                        }
201
+                                        if(respondentIsWrittenHear.intValue()==1){
202
+                                            respondentbitratMethod = "书面审理";
203
+                                        }else {
204
+                                            respondentbitratMethod = "开庭审理";
205
+                                        }
206
+                                        String arbitratMethodIllustrate = "当前案件开庭方式:申请人选择开庭方式为"+applicantarbitratMethod+
207
+                                                "被申请人选择开庭方式为"+respondentbitratMethod+",请确定开庭方式。";
208
+                                        caseApplicationsel.setArbitratMethodIllustrate(arbitratMethodIllustrate);
209
+                                    }
210
+                                }
211
+
212
+                            }
213
+                        }
214
+                    }
215
+                    return caseApplicationlist;
178 216
                 }
179 217
                 if ("仲裁委".equals(role.getRoleName())
180 218
                         || "部门长".equals(role.getRoleName())) {
@@ -223,7 +261,45 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
223 261
 
224 262
             // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
225 263
 //            return caseApplicationMapper.selectCaseApplicationList(caseApplication);
226
-            return caseApplicationMapper.selectCaseApplicationList1(caseApplication);
264
+            List<CaseApplication> caseApplications = caseApplicationMapper.selectCaseApplicationList1(caseApplication);
265
+            if(caseApplications!=null&&caseApplications.size()>0){
266
+                for(CaseApplication caseApplicationsel : caseApplications){
267
+                    Integer caseStatus = caseApplicationsel.getCaseStatus();
268
+                    if(caseStatus.intValue() == CaseApplicationConstants.CHECK_ARBITRATION_METHOD){
269
+                        Integer applicantIsWrittenHear = caseApplicationsel.getApplicantIsWrittenHear();
270
+                        Integer respondentIsWrittenHear = caseApplicationsel.getRespondentIsWrittenHear();
271
+                        if(applicantIsWrittenHear!=null&&respondentIsWrittenHear!=null){
272
+                            if(applicantIsWrittenHear.intValue()==respondentIsWrittenHear.intValue()){
273
+                                caseApplicationsel.setArbitraMethodIssame(1);
274
+                                if(applicantIsWrittenHear.intValue()==1&&respondentIsWrittenHear.intValue()==1){
275
+                                    caseApplicationsel.setArbitratMethod(2);
276
+                                }else {
277
+                                    caseApplicationsel.setArbitratMethod(1);
278
+                                }
279
+                            }else {
280
+                                caseApplicationsel.setArbitraMethodIssame(2);
281
+                                String applicantarbitratMethod = "";
282
+                                String respondentbitratMethod = "";
283
+                                if(applicantIsWrittenHear.intValue()==1){
284
+                                    applicantarbitratMethod = "书面审理";
285
+                                }else {
286
+                                    applicantarbitratMethod = "开庭审理";
287
+                                }
288
+                                if(respondentIsWrittenHear.intValue()==1){
289
+                                    respondentbitratMethod = "书面审理";
290
+                                }else {
291
+                                    respondentbitratMethod = "开庭审理";
292
+                                }
293
+                                String arbitratMethodIllustrate = "当前案件开庭方式:申请人选择开庭方式为"+applicantarbitratMethod+
294
+                                        "被申请人选择开庭方式为"+respondentbitratMethod+",请确定开庭方式。";
295
+                                caseApplicationsel.setArbitratMethodIllustrate(arbitratMethodIllustrate);
296
+                            }
297
+                        }
298
+
299
+                    }
300
+                }
301
+            }
302
+            return caseApplications;
227 303
 
228 304
     }
229 305
 
@@ -1077,15 +1153,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1077 1153
         BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, RoundingMode.HALF_UP);
1078 1154
         caseApplication.setFeePayable(feePayable);
1079 1155
         caseApplication.setUpdateBy(getUsername());
1080
-        Integer applicantIsWrittenHear = caseApplication.getApplicantIsWrittenHear();
1081
-        if(applicantIsWrittenHear!=null&&applicantIsWrittenHear.intValue()==1){
1082
-            //书面审理
1083
-            caseApplication.setArbitratMethod(2);
1084
-        }else {
1085
-            //开庭审理
1086
-            caseApplication.setArbitratMethod(1);
1087
-        }
1088
-
1089 1156
         // 立案申请状态直接修改主表信息
1090 1157
         if (caseApplication.getCaseStatus() != null && caseApplication.getCaseStatus().equals(CaseApplicationConstants.CASE_APPLICATION)) {
1091 1158
             // 修改内置字段

+ 26
- 8
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java Parādīt failu

@@ -58,19 +58,17 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
58 58
 
59 59
     @Override
60 60
     @Transactional
61
-    public AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion) {
61
+    public AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion, Integer arbitratMethodNow) {
62 62
         //查询案件详细信息
63 63
         CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
64 64
         if (caseApplication1 == null) {
65 65
             return AjaxResult.success();
66 66
         }
67
-        Integer arbitratMethod = caseApplication1.getArbitratMethod();
68
-        if (arbitratMethod == null) {
69
-            return AjaxResult.error("请先指定仲裁方式");
70
-        }
67
+        Integer arbitratMethodOriral = caseApplication.getArbitratMethod();
68
+
71 69
         String caseNum = caseApplication1.getCaseNum();
72 70
         if (opinion == 0) {   //拒绝
73
-            if (arbitratMethod == 2) {
71
+            if (arbitratMethodOriral == 2) {
74 72
                 caseApplication1.setArbitratMethod(1);  // 更改仲裁方式
75 73
                 //修改案件状态修改开庭时间
76 74
                 caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
@@ -87,15 +85,35 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
87 85
                 CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
88 86
 
89 87
             }
90
-        } else {
91
-            if (arbitratMethod == 2) {
88
+        } else if (opinion == 1 ) {
89
+            if (arbitratMethodOriral == 2) {
92 90
                 //修改案件状态为待书面审理
91
+                caseApplication1.setArbitratMethod(2);
92
+                caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
93
+                // 新增日志
94
+                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
95
+
96
+            } else {
97
+                //修改案件状态为待修改开庭时间
98
+                caseApplication1.setArbitratMethod(1);
99
+                caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
100
+                //修改案件状态为待修改开庭时间
101
+//                caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
102
+                // 新增日志
103
+                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
104
+
105
+            }
106
+        }else if (opinion == 2) {
107
+            if (arbitratMethodNow == 2) {
108
+                //修改案件状态为待书面审理
109
+                caseApplication1.setArbitratMethod(2);
93 110
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
94 111
                 // 新增日志
95 112
                 CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
96 113
 
97 114
             } else {
98 115
                 //修改案件状态为待修改开庭时间
116
+                caseApplication1.setArbitratMethod(1);
99 117
                 caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
100 118
                 //修改案件状态为待修改开庭时间
101 119
 //                caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);

+ 1
- 8
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java Parādīt failu

@@ -247,14 +247,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
247 247
             //修改案件状态
248 248
             caseApplication1.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT);
249 249
 
250
-            Integer respondentIsWrittenHear = caseEvidenceDTO.getRespondentIsWrittenHear();
251
-            if(respondentIsWrittenHear.intValue()==1){
252
-                //书面审理
253
-                caseApplication1.setArbitratMethod(2);
254
-            }else {
255
-                //开庭审理
256
-                caseApplication1.setArbitratMethod(1);
257
-            }
250
+
258 251
             int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
259 252
             if (i > 0) {
260 253
                 // 新增日志

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java Parādīt failu

@@ -252,7 +252,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
252 252
             CaseApplication caseApplication1 = caseApplicationService.selectCaseApplication(caseApplication);
253 253
             BigDecimal feePayable = caseApplication1.getFeePayable();
254 254
             sum = sum.add(feePayable);
255
-            listVO.setTotalFee(sum.intValue());
255
+            listVO.setTotalFee(sum);
256 256
             caseApplicationPay.setCaseAppName(caseApplication1.getApplicantName());
257 257
             caseApplicationPay.setCaseResName(caseApplication1.getRespondentName());
258 258
             caseApplicationPay.setCaseNum(caseApplication1.getCaseNum());

+ 7
- 7
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Parādīt failu

@@ -60,7 +60,7 @@
60 60
         select DISTINCT(t1.id),t1.caseLogId,t1.case_num,t1.case_subject_amount,t1.register_date,t1.arbitrat_method,
61 61
         t1.arbitratMethodName,t1.case_status,t1.caseStatusName,t1.hear_date,t1.arbitrat_claims,
62 62
         t1.loan_start_date,t1.loan_end_date,t1.claim_princi_owed,t1.claim_interest_owed,t1.claim_liquid_damag,t1.fee_payable,
63
-        t1.begin_video_date,t1.online_video_person,t1.contract_number,t1.create_by,t1.create_time,t1.update_by,t1.update_time,
63
+        t1.begin_video_date,t1.online_video_person,t1.contract_number,t1.create_by,t1.create_time,t1.appli_iswrit_hear,t1.respon_isWrit_hear,t1.update_by,t1.update_time,
64 64
         t1.arbitrator_name,t1.name,t1.application_organ_id,t1.applicantName,t1.arbitrator_id,t1.identity_num,t1.identity_type,
65 65
         t1.filearbitra_url,t1.lock_status,t1.version,t1.updateSubmitStatus,t1.batch_number,t1.pendingStatus
66 66
         from(
@@ -85,7 +85,7 @@
85 85
                 c.hear_date ,c.arbitrat_claims ,
86 86
                 c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag
87 87
                 ,c.fee_payable ,c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by
88
-                ,c.create_time,
88
+                ,c.create_time,c.appli_iswrit_hear,c.respon_isWrit_hear,
89 89
                 c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name
90 90
                 as applicantName,
91 91
                 c.arbitrator_id,ca.identity_num ,ca.identity_type,c.filearbitra_url,c.lock_status,c.version,null as
@@ -153,7 +153,7 @@
153 153
                 c.hear_date ,c.arbitrat_claims ,
154 154
                 c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag
155 155
                 ,c.fee_payable ,
156
-                c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
156
+                c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,c.appli_iswrit_hear,c.respon_isWrit_hear,
157 157
                 c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name
158 158
                 as
159 159
                 applicantName,
@@ -216,7 +216,7 @@
216 216
                 c.online_video_person,
217 217
                 c.contract_number,
218 218
                 c.create_by,
219
-                c.create_time,
219
+                c.create_time,c.appli_iswrit_hear,c.respon_isWrit_hear,
220 220
                 c.update_by,
221 221
                 c.update_time,
222 222
                 c.arbitrator_name,
@@ -283,7 +283,7 @@
283 283
                 c.online_video_person,
284 284
                 c.contract_number,
285 285
                 c.create_by,
286
-                c.create_time,
286
+                c.create_time,c.appli_iswrit_hear,c.respon_isWrit_hear,
287 287
                 c.update_by,
288 288
                 c.update_time,
289 289
                 c.arbitrator_name,
@@ -351,7 +351,7 @@
351 351
             c.online_video_person,
352 352
             c.contract_number,
353 353
             c.create_by,
354
-            c.create_time,
354
+            c.create_time,c.appli_iswrit_hear,c.respon_isWrit_hear,
355 355
             c.update_by,
356 356
             c.update_time,
357 357
             c.arbitrator_name,
@@ -819,7 +819,7 @@
819 819
         c.hear_date ,c.arbitrat_claims ,
820 820
         c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag
821 821
         ,c.fee_payable ,
822
-        c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,c.lock_status,
822
+        c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,c.appli_iswrit_hear,c.respon_isWrit_hear,c.lock_status,
823 823
         c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId
824 824
         ,ca.application_organ_name as applicantName,c.filearbitra_url,(select version from
825 825
         case_application_log where case_appli_id=c.id order by version desc limit 1) as version,(select

+ 1
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseNumRuleMapper.xml Parādīt failu

@@ -63,6 +63,7 @@
63 63
                 AND dept_name_firchar = #{deptNameFirchar}
64 64
             </if>
65 65
         </where>
66
+        order by create_time desc
66 67
     </select>
67 68
 
68 69
 

+ 1
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/TemplateManageMapper.xml Parādīt failu

@@ -79,6 +79,7 @@
79 79
             </if>
80 80
             AND  del_flag =0
81 81
         </where>
82
+        ORDER BY create_time DESC
82 83
     </select>
83 84
 
84 85
 </mapper>