Sfoglia il codice sorgente

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

hejinbo 2 anni fa
parent
commit
f7fcfb3193
27 ha cambiato i file con 548 aggiunte e 187 eliminazioni
  1. 7
    0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/AdjudicationController.java
  2. 1
    1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/ArbitratorController.java
  3. 39
    50
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java
  4. 3
    0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseArbitrateController.java
  5. 3
    0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java
  6. 1
    1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseLogRecordController.java
  7. 3
    0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CasePaymentController.java
  8. 14
    2
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java
  9. 30
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseLogRecord.java
  10. 0
    29
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/CaseLogVO.java
  11. 24
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/SendRoomNoMessageVO.java
  12. 1
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/ArbitratorMapper.java
  13. 2
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java
  14. 3
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java
  15. 13
    3
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java
  16. 199
    10
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
  17. 22
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java
  18. 7
    9
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java
  19. 80
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseLogRecordServiceImpl.java
  20. 4
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java
  21. 10
    30
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/IdentityAuthenticationServiceImpl.java
  22. 42
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/CaseLogUtils.java
  23. 2
    2
      ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
  24. 0
    17
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/ArbitratorMapper.xml
  25. 14
    0
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml
  26. 9
    2
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
  27. 15
    28
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseLogRecordMapper.xml

+ 7
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/AdjudicationController.java Vedi File

@@ -7,6 +7,7 @@ import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
7 7
 import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO;
8 8
 import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
9 9
 import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.security.access.prepost.PreAuthorize;
10 11
 import org.springframework.validation.annotation.Validated;
11 12
 import org.springframework.web.bind.annotation.*;
12 13
 
@@ -24,6 +25,7 @@ public class AdjudicationController extends BaseController {
24 25
      * @return
25 26
      */
26 27
     @PostMapping("/document")
28
+    @PreAuthorize("@ss.hasPermi('caseManagement:list:createaward')")
27 29
     public AjaxResult createDocument(@Validated @RequestBody CaseApplication caseApplication){
28 30
         return adjudicationService.createDocument(caseApplication);
29 31
     }
@@ -44,6 +46,7 @@ public class AdjudicationController extends BaseController {
44 46
      * @return
45 47
      */
46 48
     @GetMapping("/logistics")
49
+    @PreAuthorize("@ss.hasPermi('delivery:detail')")
47 50
     public AjaxResult  getLogisticsInfo(CaseApplication caseApplication){
48 51
         List<LogisticsInfoVO> logisticsInfo = adjudicationService.getLogisticsInfo(caseApplication);
49 52
         return AjaxResult.success(logisticsInfo);
@@ -55,6 +58,7 @@ public class AdjudicationController extends BaseController {
55 58
      * @return
56 59
      */
57 60
     @PostMapping("/signature")
61
+    @PreAuthorize("@ss.hasPermi('awardManagement:list:sign')")
58 62
     public AjaxResult signature(@Validated @RequestBody CaseApplication caseApplication){
59 63
         return adjudicationService.signature(caseApplication);
60 64
     }
@@ -65,6 +69,7 @@ public class AdjudicationController extends BaseController {
65 69
      * @return
66 70
      */
67 71
     @PostMapping("/caseFile")
72
+    @PreAuthorize("@ss.hasPermi('awardManagement:list:file')")
68 73
     public AjaxResult caseFile(@Validated @RequestBody CaseApplication caseApplication){
69 74
         return adjudicationService.caseFile(caseApplication);
70 75
     }
@@ -75,6 +80,7 @@ public class AdjudicationController extends BaseController {
75 80
      * @return
76 81
      */
77 82
     @PostMapping("/service")
83
+    @PreAuthorize("@ss.hasPermi('awardManagement:list:sendaward')")
78 84
     public AjaxResult service(@RequestBody BookSendVO bookSendVO){
79 85
         return adjudicationService.service(bookSendVO.getId(),bookSendVO.getAppEmail(),bookSendVO.getResEmail(),bookSendVO.getApptrackingNum(),bookSendVO.getRestrackingNum());
80 86
     }
@@ -84,6 +90,7 @@ public class AdjudicationController extends BaseController {
84 90
      * @return
85 91
      */
86 92
     @PostMapping("/stamp")
93
+    @PreAuthorize("@ss.hasPermi('awardManagement:list:signprint')")
87 94
     public AjaxResult stamp(@Validated @RequestBody CaseApplication caseApplication){
88 95
         return adjudicationService.stamp(caseApplication);
89 96
     }

+ 1
- 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/ArbitratorController.java Vedi File

@@ -21,7 +21,7 @@ public class ArbitratorController   extends BaseController {
21 21
     /**
22 22
      * 查询仲裁员信息
23 23
      */
24
-    @PreAuthorize("@ss.hasPermi('arbitrator:list')")
24
+//    @PreAuthorize("@ss.hasPermi('arbitrator:list')")
25 25
     @GetMapping("/list")
26 26
     public TableDataInfo list(Arbitrator arbitrator)
27 27
     {

+ 39
- 50
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Vedi File

@@ -1,15 +1,14 @@
1 1
 package com.ruoyi.web.controller.wisdomarbitrate;
2 2
 
3
+import com.ruoyi.common.annotation.Anonymous;
3 4
 import com.ruoyi.common.annotation.Log;
4 5
 import com.ruoyi.common.core.controller.BaseController;
5 6
 import com.ruoyi.common.core.domain.AjaxResult;
6 7
 import com.ruoyi.common.core.page.TableDataInfo;
7 8
 import com.ruoyi.common.enums.BusinessType;
8
-import com.ruoyi.common.utils.SecurityUtils;
9
-import com.ruoyi.common.utils.StringUtils;
10 9
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
10
+import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
11 11
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
12
-import org.apache.commons.lang3.ArrayUtils;
13 12
 import org.springframework.beans.factory.annotation.Autowired;
14 13
 import org.springframework.security.access.prepost.PreAuthorize;
15 14
 import org.springframework.validation.annotation.Validated;
@@ -18,14 +17,12 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
18 17
 import org.springframework.web.multipart.MultipartFile;
19 18
 
20 19
 import javax.servlet.http.HttpServletResponse;
21
-import java.io.IOException;
22 20
 import java.util.List;
23 21
 
24 22
 
25
-
26 23
 @RestController
27 24
 @RequestMapping("/caseApplication")
28
-public class CaseApplicationController  extends BaseController {
25
+public class CaseApplicationController extends BaseController {
29 26
     @Autowired
30 27
     private ICaseApplicationService caseApplicationService;
31 28
 
@@ -33,10 +30,9 @@ public class CaseApplicationController  extends BaseController {
33 30
     /**
34 31
      * 查询立案数据
35 32
      */
36
-    @PreAuthorize("@ss.hasPermi('caseApplication:list')")
33
+    @PreAuthorize("@ss.hasPermi('caseManagement:list')")
37 34
     @GetMapping("/list")
38
-    public TableDataInfo list(CaseApplication caseApplication)
39
-    {
35
+    public TableDataInfo list(CaseApplication caseApplication) {
40 36
         startPage();
41 37
         List<CaseApplication> list = caseApplicationService.selectCaseApplicationList(caseApplication);
42 38
         return getDataTable(list);
@@ -45,15 +41,12 @@ public class CaseApplicationController  extends BaseController {
45 41
     /**
46 42
      * 新增立案数据
47 43
      */
48
-    @PreAuthorize("@ss.hasPermi('caseApplication:add')")
44
+    @PreAuthorize("@ss.hasPermi('caseManagement:list:add')")
49 45
     @Log(title = "新增立案数据", businessType = BusinessType.INSERT)
50 46
     @PostMapping("/addCaseApplication")
51 47
     public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
52 48
     {
53
-        int caseApplicationCount = caseApplicationService.selectCaseApplicationCount(caseApplication);
54
-        if(caseApplicationCount>0){
55
-            return error("新增立案申请'" + caseApplication.getCaseNum() + "'案件编号已存在");
56
-        }
49
+
57 50
         caseApplication.setCreateBy(getUsername());
58 51
         return toAjax(caseApplicationService.insertcaseApplication(caseApplication));
59 52
     }
@@ -61,11 +54,10 @@ public class CaseApplicationController  extends BaseController {
61 54
     /**
62 55
      * 修改立案数据
63 56
      */
64
-    @PreAuthorize("@ss.hasPermi('caseApplication:edit')")
57
+    @PreAuthorize("@ss.hasPermi('caseManagement:list:update')")
65 58
     @Log(title = "修改立案数据", businessType = BusinessType.UPDATE)
66 59
     @PostMapping("/editCaseApplication")
67
-    public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
68
-    {
60
+    public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
69 61
 
70 62
         caseApplication.setUpdateBy(getUsername());
71 63
         return toAjax(caseApplicationService.editCaseApplication(caseApplication));
@@ -74,11 +66,10 @@ public class CaseApplicationController  extends BaseController {
74 66
     /**
75 67
      * 提交立案申请
76 68
      */
77
-    @PreAuthorize("@ss.hasPermi('caseApplication:submit')")
69
+    @PreAuthorize("@ss.hasPermi('caseManagement:list:submit')")
78 70
     @Log(title = "提交立案申请", businessType = BusinessType.UPDATE)
79 71
     @PostMapping("/submitCaseApplication")
80
-    public AjaxResult submitCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
81
-    {
72
+    public AjaxResult submitCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
82 73
 
83 74
         return toAjax(caseApplicationService.submitCaseApplication(caseApplication));
84 75
     }
@@ -86,11 +77,10 @@ public class CaseApplicationController  extends BaseController {
86 77
     /**
87 78
      * 删除立案数据
88 79
      */
89
-    @PreAuthorize("@ss.hasPermi('caseApplication:remove')")
80
+    @PreAuthorize("@ss.hasPermi('caseManagement:list:delete')")
90 81
     @Log(title = "删除立案数据", businessType = BusinessType.DELETE)
91 82
     @PostMapping("/removeCaseApplication")
92
-    public AjaxResult removeCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
93
-    {
83
+    public AjaxResult removeCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
94 84
 
95 85
         return toAjax(caseApplicationService.deletecaseApplicationByIds(caseApplication));
96 86
     }
@@ -98,9 +88,9 @@ public class CaseApplicationController  extends BaseController {
98 88
     /**
99 89
      * 查询立案信息
100 90
      */
91
+     @PreAuthorize("@ss.hasPermi('caseManagement:list:detail')")
101 92
     @PostMapping("/selectCaseApplication")
102
-    public AjaxResult selectCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
103
-    {
93
+    public AjaxResult selectCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
104 94
         CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplication(caseApplication);
105 95
         return success(caseApplicationselect);
106 96
     }
@@ -109,20 +99,19 @@ public class CaseApplicationController  extends BaseController {
109 99
      * 立案申请导入模板下载
110 100
      */
111 101
     @PostMapping("/importTemplate")
112
-    public void importTemplate(HttpServletResponse response)
113
-    {
102
+    public void importTemplate(HttpServletResponse response) {
114 103
         ExcelUtil<CaseApplication> util = new ExcelUtil<CaseApplication>(CaseApplication.class);
115 104
         util.importTemplateExcel(response, "立案申请数据");
116 105
     }
117 106
 
118 107
     @Log(title = "立案信息导入", businessType = BusinessType.IMPORT)
119
-    @PreAuthorize("@ss.hasPermi('caseApplication:import')")
108
+    @PreAuthorize("@ss.hasPermi('caseManagement:list:import')")
120 109
     @PostMapping("/importData")
121 110
     public AjaxResult importData(MultipartFile file) throws Exception {
122 111
         ExcelUtil<CaseApplication> util = new ExcelUtil<CaseApplication>(CaseApplication.class);
123 112
         List<CaseApplication> caseApplicationList = util.importExcel(file.getInputStream());
124 113
         String operName = getUsername();
125
-        String message = caseApplicationService.importCaseApplication(caseApplicationList,operName);
114
+        String message = caseApplicationService.importCaseApplication(caseApplicationList, operName);
126 115
         return success(message);
127 116
     }
128 117
 
@@ -132,30 +121,27 @@ public class CaseApplicationController  extends BaseController {
132 121
     @PreAuthorize("@ss.hasPermi('caseApplication:pendTral')")
133 122
     @Log(title = "组庭", businessType = BusinessType.UPDATE)
134 123
     @PostMapping("/pendTral")
135
-    public AjaxResult pendTral(@Validated @RequestBody CaseApplication caseApplication)
136
-    {
124
+    public AjaxResult pendTral(@Validated @RequestBody CaseApplication caseApplication) {
137 125
         return toAjax(caseApplicationService.pendTral(caseApplication));
138 126
     }
139 127
 
140 128
     /**
141 129
      * 组庭审核
142 130
      */
143
-    @PreAuthorize("@ss.hasPermi('caseApplication:pendTralCheck')")
131
+    @PreAuthorize("@ss.hasPermi('caseManagement:list:checkgroup')")
144 132
     @Log(title = "组庭审核", businessType = BusinessType.UPDATE)
145 133
     @PostMapping("/pendTralCheck")
146
-    public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication)
147
-    {
134
+    public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication) {
148 135
         return toAjax(caseApplicationService.pendTralCheck(caseApplication));
149 136
     }
150 137
 
151 138
     /**
152 139
      * 组庭确认
153 140
      */
154
-    @PreAuthorize("@ss.hasPermi('caseApplication:pendTralSure')")
141
+    @PreAuthorize("@ss.hasPermi('caseManagement:list:confirmgroup')")
155 142
     @Log(title = "组庭确认", businessType = BusinessType.UPDATE)
156 143
     @PostMapping("/pendTralSure")
157
-    public AjaxResult pendTralSure(@Validated @RequestBody CaseApplication caseApplication)
158
-    {
144
+    public AjaxResult pendTralSure(@Validated @RequestBody CaseApplication caseApplication) {
159 145
         return toAjax(caseApplicationService.pendTralSure(caseApplication));
160 146
     }
161 147
 
@@ -165,8 +151,7 @@ public class CaseApplicationController  extends BaseController {
165 151
     @PreAuthorize("@ss.hasPermi('caseApplication:verificationArbitrateRecord')")
166 152
     @Log(title = "核验裁决书", businessType = BusinessType.UPDATE)
167 153
     @PostMapping("/verificationArbitrateRecord")
168
-    public AjaxResult verificationArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication)
169
-    {
154
+    public AjaxResult verificationArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
170 155
         return toAjax(caseApplicationService.verificationArbitrateRecord(caseApplication));
171 156
     }
172 157
 
@@ -176,32 +161,28 @@ public class CaseApplicationController  extends BaseController {
176 161
     @PreAuthorize("@ss.hasPermi('caseApplication:checkArbitrateRecord')")
177 162
     @Log(title = "审核裁决书", businessType = BusinessType.UPDATE)
178 163
     @PostMapping("/checkArbitrateRecord")
179
-    public AjaxResult checkArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication)
180
-    {
164
+    public AjaxResult checkArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
181 165
         return toAjax(caseApplicationService.checkArbitrateRecord(caseApplication));
182 166
     }
183 167
 
184 168
 
185
-
186 169
     /**
187 170
      * 是否指派仲裁员
188 171
      */
189 172
     @PreAuthorize("@ss.hasPermi('caseApplication:pendingAppointArbotrar')")
190 173
     @Log(title = "是否指派仲裁员", businessType = BusinessType.UPDATE)
191 174
     @PostMapping("/pendingAppointArbotrar")
192
-    public AjaxResult pendingAppointArbotrar(@Validated @RequestBody CaseApplication caseApplication)
193
-    {
175
+    public AjaxResult pendingAppointArbotrar(@Validated @RequestBody CaseApplication caseApplication) {
194 176
         return toAjax(caseApplicationService.pendingAppointArbotrar(caseApplication));
195 177
     }
196 178
 
197 179
     /**
198 180
      * 提交立案审查
199 181
      */
200
-    @PreAuthorize("@ss.hasPermi('caseApplication:submitCaseApplicationCheck')")
182
+    @PreAuthorize("@ss.hasPermi('caseManagement:list:check')")
201 183
     @Log(title = "提交立案审查", businessType = BusinessType.UPDATE)
202 184
     @PostMapping("/submitCaseApplicationCheck")
203
-    public AjaxResult submitCaseApplicationCheck(@Validated @RequestBody CaseApplication caseApplication)
204
-    {
185
+    public AjaxResult submitCaseApplicationCheck(@Validated @RequestBody CaseApplication caseApplication) {
205 186
 
206 187
         return toAjax(caseApplicationService.submitCaseApplicationCheck(caseApplication));
207 188
     }
@@ -209,14 +190,22 @@ public class CaseApplicationController  extends BaseController {
209 190
     /**
210 191
      * 确认缴费查询立案信息
211 192
      */
193
+    @PreAuthorize("@ss.hasPermi('paymentManagement:list:detail')")
212 194
     @PostMapping("/selectCaseApplicationConfirm")
213
-    public AjaxResult selectCaseApplicationConfirm(@Validated @RequestBody CaseApplication caseApplication)
214
-    {
195
+    public AjaxResult selectCaseApplicationConfirm(@Validated @RequestBody CaseApplication caseApplication) {
215 196
         CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplicationConfirm(caseApplication);
216 197
         return success(caseApplicationselect);
217 198
     }
218 199
 
219 200
 
220
-
201
+    /**
202
+     * 发送房间号短信
203
+     */
204
+    @Anonymous
205
+    @PostMapping("/sendRoomNoMessage")
206
+    public AjaxResult sendRoomNoMessage(@Validated @RequestBody SendRoomNoMessageVO messageVO) {
207
+        String result = caseApplicationService.sendRoomNoMessage(messageVO);
208
+        return success(result);
209
+    }
221 210
 
222 211
 }

+ 3
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseArbitrateController.java Vedi File

@@ -6,6 +6,7 @@ import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
6 6
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
7 7
 import com.ruoyi.wisdomarbitrate.service.ICaseArbitrateService;
8 8
 import org.springframework.beans.factory.annotation.Autowired;
9
+import org.springframework.security.access.prepost.PreAuthorize;
9 10
 import org.springframework.validation.annotation.Validated;
10 11
 import org.springframework.web.bind.annotation.*;
11 12
 
@@ -22,6 +23,7 @@ public class CaseArbitrateController extends BaseController {
22 23
      * @return
23 24
      */
24 25
     @PutMapping("/method")
26
+    @PreAuthorize("@ss.hasPermi('caseManagement:list:checkarbitrationway')")
25 27
     public AjaxResult examineArbitrateMethod(@Validated @RequestBody CaseApplication caseApplication
26 28
             ,Integer opinion){
27 29
         return caseArbitrateService.examineArbitrateMethod(caseApplication,opinion);
@@ -33,6 +35,7 @@ public class CaseArbitrateController extends BaseController {
33 35
      * @return
34 36
      */
35 37
     @PostMapping("/writtenHear")
38
+    @PreAuthorize("@ss.hasPermi('caseManagement:hear')")
36 39
     public AjaxResult writtenHear(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
37 40
         return caseArbitrateService.writtenHear(arbitrateRecord);
38 41
     }

+ 3
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java Vedi File

@@ -8,6 +8,7 @@ import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
8 8
 import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
9 9
 import com.ruoyi.wisdomarbitrate.service.ICaseEvidenceService;
10 10
 import org.springframework.beans.factory.annotation.Autowired;
11
+import org.springframework.security.access.prepost.PreAuthorize;
11 12
 import org.springframework.validation.annotation.Validated;
12 13
 import org.springframework.web.bind.annotation.*;
13 14
 import org.springframework.web.multipart.MultipartFile;
@@ -35,6 +36,7 @@ public class CaseEvidenceController extends BaseController {
35 36
      * @return
36 37
      */
37 38
     @GetMapping("/{id}")
39
+     @PreAuthorize("@ss.hasPermi('caseManagement:list:detail')")
38 40
     public AjaxResult getCaseDetailsById(@PathVariable Long id) {
39 41
         String username = this.getUsername();
40 42
         return caseEvidenceService.getCaseDetailsById(id,username);
@@ -61,6 +63,7 @@ public class CaseEvidenceController extends BaseController {
61 63
      * @return
62 64
      */
63 65
     @GetMapping("/all")
66
+    @PreAuthorize("@ss.hasPermi('caseManagement:list')")
64 67
     public TableDataInfo getCaseListAll(@RequestParam String identityNum) {
65 68
         startPage();
66 69
         List<CaseEvidenceVO> list = caseEvidenceService.getCaseListAll(identityNum);

+ 1
- 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseLogRecordController.java Vedi File

@@ -22,7 +22,7 @@ public class CaseLogRecordController   extends BaseController {
22 22
     /**
23 23
      * 查询案件日志列表
24 24
      */
25
-    @PreAuthorize("@ss.hasPermi('caseLogRecord:list')")
25
+    @PreAuthorize("@ss.hasPermi('caseLog:list')")
26 26
     @GetMapping("/list")
27 27
     public TableDataInfo list(CaseLogRecord caseLogRecord)
28 28
     {

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

@@ -5,6 +5,7 @@ import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5 5
 import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
6 6
 import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
7 7
 import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.security.access.prepost.PreAuthorize;
8 9
 import org.springframework.validation.annotation.Validated;
9 10
 import org.springframework.web.bind.annotation.*;
10 11
 
@@ -24,6 +25,7 @@ public class CasePaymentController {
24 25
      * @param casePayDTO 缴费传入参数
25 26
      * @return 统一响应结果
26 27
      */
28
+    @PreAuthorize("@ss.hasPermi('caseManagement:list:pay')")
27 29
     @PostMapping("/casePay")
28 30
     public AjaxResult casePay(@Validated @RequestBody CasePayDTO casePayDTO) {
29 31
         return paymentService.casePay(casePayDTO);
@@ -34,6 +36,7 @@ public class CasePaymentController {
34 36
      * @param caseApplication
35 37
      * @return
36 38
      */
39
+    @PreAuthorize("@ss.hasPermi('paymentManagement:list:payconfirm')")
37 40
     @PutMapping("/confirm")
38 41
     public AjaxResult confirmPayment(@Validated @RequestBody CaseApplication caseApplication) {
39 42
         return paymentService.confirmPayment(caseApplication);

+ 14
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java Vedi File

@@ -332,10 +332,14 @@ public class CaseApplication  extends BaseEntity {
332 332
      * 申请人主体信息
333 333
      */
334 334
     /** 姓名 */
335
-    @Excel(name = "申请人主体信息-申请人姓名",width = 26)
335
+    @Excel(name = "申请人主体信息-申请人(机构)",width = 26)
336 336
     private String name;
337
+    /**
338
+     * 申请人主体信息-申请人(机构)id
339
+     */
340
+    private String nameId;
337 341
     /** 身份证号 */
338
-    @Excel(name = "申请人主体信息-身份证号",width = 26)
342
+    @Excel(name = "申请人主体信息-代码",width = 26)
339 343
     private String identityNum;
340 344
 
341 345
     /** 联系电话 */
@@ -415,6 +419,14 @@ public class CaseApplication  extends BaseEntity {
415 419
         this.name = name;
416 420
     }
417 421
 
422
+    public String getNameId() {
423
+        return nameId;
424
+    }
425
+
426
+    public void setNameId(String nameId) {
427
+        this.nameId = nameId;
428
+    }
429
+
418 430
     public String getIdentityNum() {
419 431
         return identityNum;
420 432
     }

+ 30
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseLogRecord.java Vedi File

@@ -25,6 +25,15 @@ public class CaseLogRecord     extends BaseEntity {
25 25
 
26 26
     /** 案件编号 */
27 27
     private String caseNum;
28
+    /**
29
+     * 展示的内容
30
+     */
31
+    private String content;
32
+    /**
33
+     * 用户昵称
34
+     */
35
+    private String createNickName;
36
+
28 37
 
29 38
     public String getCaseNum() {
30 39
         return caseNum;
@@ -50,7 +59,7 @@ public class CaseLogRecord     extends BaseEntity {
50 59
         this.caseAppliId = caseAppliId;
51 60
     }
52 61
 
53
-    public int getCaseNode() {
62
+    public Integer getCaseNode() {
54 63
         return caseNode;
55 64
     }
56 65
 
@@ -73,4 +82,24 @@ public class CaseLogRecord     extends BaseEntity {
73 82
     public void setNotes(String notes) {
74 83
         this.notes = notes;
75 84
     }
85
+
86
+    public void setCaseNode(Integer caseNode) {
87
+        this.caseNode = caseNode;
88
+    }
89
+
90
+    public String getContent() {
91
+        return content;
92
+    }
93
+
94
+    public void setContent(String content) {
95
+        this.content = content;
96
+    }
97
+
98
+    public String getCreateNickName() {
99
+        return createNickName;
100
+    }
101
+
102
+    public void setCreateNickName(String nickName) {
103
+        this.createNickName = nickName;
104
+    }
76 105
 }

+ 0
- 29
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/CaseLogVO.java Vedi File

@@ -1,29 +0,0 @@
1
-package com.ruoyi.wisdomarbitrate.domain.vo;
2
-
3
-import lombok.Data;
4
-
5
-import java.util.Date;
6
-
7
-/**
8
- * @description 案件操作日志实体
9
- * @Author wangqiong
10
- * @Date 2023/10/09 15:18
11
- * @Version V1.0
12
- **/
13
-@Data
14
-public class CaseLogVO {
15
-    /**日志id*/
16
-    private String logId;
17
-    /**操作人id*/
18
-    private String operatorId;
19
-    /**操作人名称*/
20
-    private String operatorName;
21
-    /**操作人ip*/
22
-    private String ip;
23
-    /**操作时间*/
24
-    private Date operateTime;
25
-    /**操作明细*/
26
-    private String operateDetail;
27
-    /**操作类型*/
28
-    private String operateType;
29
-}

+ 24
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/SendRoomNoMessageVO.java Vedi File

@@ -0,0 +1,24 @@
1
+package com.ruoyi.wisdomarbitrate.domain.vo;
2
+
3
+import lombok.Data;
4
+
5
+import javax.validation.constraints.NotEmpty;
6
+import javax.validation.constraints.NotNull;
7
+import java.io.Serializable;
8
+
9
+/**
10
+ * @author wangqiong
11
+ * @description 发送房间号短信入参类
12
+ * @date 2023-10-10 15:20
13
+ */
14
+@Data
15
+public class SendRoomNoMessageVO implements Serializable {
16
+    private static final long serialVersionUID = 1L;
17
+    @NotNull(message = "案件id不能为空")
18
+    private Long id;
19
+    @NotEmpty(message = "房间号不能为空")
20
+    private String roomNo;
21
+
22
+
23
+
24
+}

+ 1
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/ArbitratorMapper.java Vedi File

@@ -1,6 +1,7 @@
1 1
 package com.ruoyi.wisdomarbitrate.mapper;
2 2
 
3 3
 import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
4
+import org.apache.ibatis.annotations.Param;
4 5
 
5 6
 import java.util.List;
6 7
 

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java Vedi File

@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
2 2
 
3 3
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
4 4
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5
+import org.apache.ibatis.annotations.Param;
5 6
 
6 7
 import java.util.List;
7 8
 
@@ -15,6 +16,7 @@ public interface CaseAffiliateMapper {
15 16
 
16 17
 
17 18
     List<CaseAffiliate>  selectCaseAffiliate(CaseAffiliate caseAffiliate);
19
+    CaseAffiliate  selectCaseAffiliateByIdentityType(@Param("caseAppliId") Long caseAppliId, @Param("identityType")int identityType);
18 20
 
19 21
     int updataCaseAffiliate(CaseAffiliate caseAffiliate);
20 22
 }

+ 3
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java Vedi File

@@ -1,6 +1,7 @@
1 1
 package com.ruoyi.wisdomarbitrate.service;
2 2
 
3 3
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
4
+import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
4 5
 
5 6
 import java.util.List;
6 7
 
@@ -37,4 +38,6 @@ public interface ICaseApplicationService {
37 38
     int submitCaseApplicationCheck(CaseApplication caseApplication);
38 39
 
39 40
     CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
41
+
42
+    String sendRoomNoMessage(SendRoomNoMessageVO messageVO);
40 43
 }

+ 13
- 3
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java Vedi File

@@ -2,9 +2,9 @@ package com.ruoyi.wisdomarbitrate.service.impl;
2 2
 
3 3
 import com.alibaba.fastjson.JSON;
4 4
 import com.alibaba.fastjson.JSONObject;
5
-import com.deepoove.poi.config.Configure;
6 5
 import com.ruoyi.common.constant.CaseApplicationConstants;
7 6
 import com.ruoyi.common.core.domain.AjaxResult;
7
+import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
8 8
 import com.ruoyi.common.utils.EmailOutUtil;
9 9
 import com.ruoyi.common.utils.WordUtil;
10 10
 import com.ruoyi.wisdomarbitrate.domain.*;
@@ -18,7 +18,6 @@ import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
18 18
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
19 19
 import com.ruoyi.wisdomarbitrate.service.ICaseLogRecordService;
20 20
 import lombok.extern.slf4j.Slf4j;
21
-import org.apache.poi.xwpf.usermodel.*;
22 21
 import org.springframework.beans.factory.annotation.Autowired;
23 22
 import org.springframework.mail.MailSendException;
24 23
 import org.springframework.mail.javamail.JavaMailSender;
@@ -34,7 +33,6 @@ import java.nio.file.Path;
34 33
 import java.nio.file.StandardCopyOption;
35 34
 import java.time.LocalDate;
36 35
 import java.time.ZoneId;
37
-import java.time.format.DateTimeFormatter;
38 36
 import java.util.*;
39 37
 
40 38
 @Service
@@ -314,6 +312,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
314 312
         //更改案件状态(暂时)
315 313
         caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
316 314
         caseApplicationMapper.submitCaseApplication(caseApplication);
315
+        // 新增日志
316
+        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.ARBITRATED_SEAL,"");
317
+
317 318
         return AjaxResult.success("签名成功,案件状态已改为待仲裁文书用印");
318 319
     }
319 320
 
@@ -322,6 +323,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
322 323
         //更改案件状态(暂时)
323 324
         caseApplication.setCaseStatus(CaseApplicationConstants.CASE_ARCHIVED);
324 325
         caseApplicationMapper.submitCaseApplication(caseApplication);
326
+        // 新增日志
327
+        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_ARCHIVED,"");
328
+
325 329
         return AjaxResult.success("归档成功,案件状态已改为已归档");
326 330
     }
327 331
 
@@ -353,6 +357,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
353 357
                 }
354 358
             }
355 359
         }
360
+        // 新增日志
361
+        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_FILING,"");
362
+
356 363
         return AjaxResult.success("仲裁文书送达成功");
357 364
     }
358 365
 
@@ -361,6 +368,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
361 368
         //更改案件状态(暂时)
362 369
         caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
363 370
         caseApplicationMapper.submitCaseApplication(caseApplication);
371
+        // 新增日志
372
+        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.ARBITRATION_DELIVERY,"");
373
+
364 374
         return AjaxResult.success("用印成功,案件状态已改为待仲裁文书送达");
365 375
     }
366 376
 

+ 199
- 10
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Vedi File

@@ -1,13 +1,21 @@
1 1
 package com.ruoyi.wisdomarbitrate.service.impl;
2 2
 
3 3
 
4
+import cn.hutool.core.collection.CollectionUtil;
5
+import cn.hutool.core.util.StrUtil;
6
+
7
+import com.ruoyi.common.annotation.DataScope;
4 8
 import com.ruoyi.common.constant.CaseApplicationConstants;
9
+import com.ruoyi.common.core.domain.entity.SysDept;
5 10
 import com.ruoyi.common.exception.ServiceException;
11
+import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
6 12
 import com.ruoyi.common.utils.DateUtils;
7 13
 import com.ruoyi.common.utils.SmsUtils;
8 14
 import com.ruoyi.common.utils.StringUtils;
9 15
 import com.ruoyi.common.utils.bean.BeanUtils;
16
+import com.ruoyi.system.mapper.SysDeptMapper;
10 17
 import com.ruoyi.wisdomarbitrate.domain.*;
18
+import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
11 19
 import com.ruoyi.wisdomarbitrate.mapper.*;
12 20
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
13 21
 import org.springframework.beans.factory.annotation.Autowired;
@@ -18,6 +26,8 @@ import java.text.SimpleDateFormat;
18 26
 import java.util.*;
19 27
 import java.util.stream.Collectors;
20 28
 
29
+import static com.ruoyi.common.utils.SecurityUtils.getUsername;
30
+
21 31
 
22 32
 @Service
23 33
 public class CaseApplicationServiceImpl implements ICaseApplicationService {
@@ -34,6 +44,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
34 44
 
35 45
     @Autowired
36 46
     private CaseAttachMapper caseAttachMapper;
47
+    @Autowired
48
+    private SysDeptMapper sysDeptMapper;
37 49
 
38 50
 
39 51
 
@@ -52,7 +64,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
52 64
         //根据仲裁费用计费规则计算应缴费用
53 65
         //暂时设置计费比率为0.01
54 66
         BigDecimal feeRate = new BigDecimal(0.01);
55
-        BigDecimal feePayable  = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2,BigDecimal.ROUND_HALF_UP);
67
+        BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, BigDecimal.ROUND_HALF_UP);
56 68
         caseApplication.setFeePayable(feePayable);
57 69
         // 获取自动编码
58 70
         String caseNum = generateCaseNum();
@@ -60,22 +72,52 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
60 72
 
61 73
         int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
62 74
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
63
-        if(caseAffiliates!=null&&caseAffiliates.size()>0){
64
-            for (CaseAffiliate caseAffiliate : caseAffiliates){
75
+        Map<String, Long> deptMap =new HashMap<>();
76
+        if (caseAffiliates != null && caseAffiliates.size() > 0) {
77
+                // 查询所有的组织机构,组装成map
78
+                List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
79
+                if (CollectionUtil.isEmpty(deptList)) {
80
+                    deptList = new ArrayList<>();
81
+                }
82
+                 deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
83
+
84
+            for (CaseAffiliate caseAffiliate : caseAffiliates) {
65 85
                 caseAffiliate.setCaseAppliId(caseApplication.getId());
86
+                if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
87
+                    // 将组织机构id设为申请人名称
88
+                    if (deptMap.containsKey(caseApplication.getName())) {
89
+                        caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
90
+                    } else {
91
+                        // 如果不存在则新增
92
+                        SysDept dept = new SysDept();
93
+                        dept.setParentId(0L);
94
+                        dept.setDeptName(caseAffiliate.getName());
95
+                        dept.setAncestors("0");
96
+                        dept.setOrderNum(1);
97
+                        dept.setStatus("0");
98
+                        dept.setDelFlag("0");
99
+                        dept.setCreateBy(getUsername());
100
+                        dept.setUpdateBy(getUsername());
101
+                        sysDeptMapper.insertDept(dept);
102
+                        deptMap.put(dept.getDeptName(), dept.getDeptId());
103
+                        caseAffiliate.setName(String.valueOf(dept.getDeptId()));
104
+
105
+                    }
106
+                }
66 107
             }
108
+
67 109
             caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
68 110
         }
69 111
 
70 112
         List<CaseAttach> caseAttachList = caseApplication.getCaseAttachList();
71
-        if(caseAttachList!=null&&caseAttachList.size()>0){
72
-            for (CaseAttach caseAttach : caseAttachList){
113
+        if (caseAttachList != null && caseAttachList.size() > 0) {
114
+            for (CaseAttach caseAttach : caseAttachList) {
73 115
                 caseAttach.setCaseAppliId(caseApplication.getId());
74 116
                 caseAttachMapper.updateCaseAttach(caseAttach);
75 117
             }
76
-
77 118
         }
78
-
119
+        // 新增日志
120
+        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_APPLICATION,"");
79 121
         return rows;
80 122
     }
81 123
 
@@ -116,10 +158,38 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
116 158
         int rows = caseApplicationMapper.updataCaseApplication(caseApplication);
117 159
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
118 160
         if(caseAffiliates!=null&&caseAffiliates.size()>0){
161
+            // 查询所有的组织机构,组装成map
162
+            List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
163
+            if (CollectionUtil.isEmpty(deptList)) {
164
+                deptList = new ArrayList<>();
165
+            }
166
+            Map<String, Long> deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
119 167
             for (CaseAffiliate caseAffiliate : caseAffiliates){
120 168
                 caseAffiliate.setCaseAppliId(caseApplication.getId());
169
+                if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
170
+                    // 将组织机构id设为申请人名称
171
+                    if (deptMap.containsKey(caseApplication.getName())) {
172
+                        caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
173
+                    } else {
174
+                        // 如果不存在则新增
175
+                        SysDept dept = new SysDept();
176
+                        dept.setParentId(0L);
177
+                        dept.setDeptName(caseAffiliate.getName());
178
+                        dept.setAncestors("0");
179
+                        dept.setOrderNum(1);
180
+                        dept.setStatus("0");
181
+                        dept.setDelFlag("0");
182
+                        dept.setCreateBy(getUsername());
183
+                        dept.setUpdateBy(getUsername());
184
+                        sysDeptMapper.insertDept(dept);
185
+                        deptMap.put(dept.getDeptName(), dept.getDeptId());
186
+                        caseAffiliate.setName(String.valueOf(dept.getDeptId()));
187
+
188
+                    }
189
+                }
121 190
                 caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
122 191
             }
192
+
123 193
         }
124 194
         List<CaseAttach> caseAttachList = caseApplication.getCaseAttachList();
125 195
         if(caseAttachList!=null&&caseAttachList.size()>0){
@@ -139,6 +209,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
139 209
         //提交立案申请
140 210
         caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CHECK);
141 211
         int rows = caseApplicationMapper.submitCaseApplication(caseApplication);
212
+        // 新增日志
213
+        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_CHECK,"");
142 214
         return rows;
143 215
     }
144 216
 
@@ -186,12 +258,23 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
186 258
 
187 259
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
188 260
         if(caseAffiliatListeselect!=null){
261
+            // 查询组织机构
262
+            List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
263
+            Map<String,String> deptMap=new HashMap<>();
264
+            if(CollectionUtil.isNotEmpty(sysDepts)){
265
+                for (SysDept sysDept : sysDepts) {
266
+                    deptMap.put(String.valueOf(sysDept.getDeptId()),sysDept.getDeptName());
267
+                }
268
+            }
189 269
             StringBuffer applicantName = new StringBuffer();
190 270
             StringBuffer respondentName = new StringBuffer();
191 271
             for (int i = 0; i < caseAffiliatListeselect.size(); i++){
192 272
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
193 273
                 int identityType = caseAffiliateselect.getIdentityType();
194 274
                 if(identityType==1){
275
+                    if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
276
+                        caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
277
+                    }
195 278
                     applicantName.append(caseAffiliateselect.getName()).append(",");;
196 279
                 }else if(identityType==2){
197 280
                     respondentName.append(caseAffiliateselect.getName()).append(",");;
@@ -213,6 +296,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
213 296
         int successNum = 0;
214 297
         int failureNum = 0;
215 298
         if(caseApplicationList!=null&&caseApplicationList.size()>0){
299
+            // 1,查询所有的组织机构,组装成map
300
+            List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
301
+            Map<String, Long> deptMap =new HashMap<>();
302
+            if(CollectionUtil.isNotEmpty(deptList)) {
303
+                deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
304
+            }
216 305
             List<CaseApplication> caseApplicationListinsert = new ArrayList<>();
217 306
             for (int i = 0; i < caseApplicationList.size(); i++){
218 307
                 CaseApplication caseApplication = caseApplicationList.get(i);
@@ -224,7 +313,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
224 313
 
225 314
                 //赋值CaseApplication的案件关联人信息
226 315
                 List<CaseAffiliate> caseAffiliatesnew  = new ArrayList<>();
227
-                assignmentCaseAffiliates(caseApplication,caseAffiliatesnew);
316
+                // 组装案件关联人信息
317
+                assignmentCaseAffiliates(caseApplication,caseAffiliatesnew,deptMap);
228 318
 
229 319
 //                int caseApplicationCount = selectCaseApplicationCount(caseApplication);
230 320
 //                if(caseApplicationCount>0){
@@ -344,7 +434,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
344 434
                 rows = caseApplicationMapper.submitCaseApplication(caseApplication);
345 435
             }
346 436
         }
347
-
437
+        // 新增日志
438
+        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL,"");
348 439
         return rows;
349 440
     }
350 441
 
@@ -355,6 +446,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
355 446
         int rows = caseApplicationMapper.submitCaseApplication(caseApplication);
356 447
         ArbitrateRecord arbitrateRecord = caseApplication.getArbitrateRecord();
357 448
         arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
449
+        // 新增日志
450
+        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CHECK_ARBITRATION,"");
358 451
         return rows;
359 452
 
360 453
     }
@@ -368,9 +461,15 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
368 461
         Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck();
369 462
         if(agreeOrNotCheck.intValue()==1){//同意审核
370 463
             caseApplication.setCaseStatus(CaseApplicationConstants.SIGN_ARBITRATION);
464
+            // 新增日志
465
+            CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.SIGN_ARBITRATION,"");
466
+
371 467
             rows = caseApplicationMapper.submitCaseApplication(caseApplication);
372 468
         }else if(agreeOrNotCheck.intValue()==2){//拒绝审核
373 469
             caseApplication.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
470
+            // 新增日志
471
+            CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.VERPRIF_ARBITRATION,"");
472
+
374 473
             rows = caseApplicationMapper.submitCaseApplication(caseApplication);
375 474
         }
376 475
 
@@ -400,11 +499,22 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
400 499
         caseAffiliate.setCaseAppliId(caseApplication.getId());
401 500
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
402 501
         if(caseAffiliatListeselect!=null){
502
+            // 查询组织机构
503
+            List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
504
+            Map<String,String> deptMap=new HashMap<>();
505
+            if(CollectionUtil.isNotEmpty(sysDepts)){
506
+                for (SysDept sysDept : sysDepts) {
507
+                    deptMap.put(String.valueOf(sysDept.getDeptId()),sysDept.getDeptName());
508
+                }
509
+            }
403 510
             StringBuffer applicantName = new StringBuffer();
404 511
             for (int i = 0; i < caseAffiliatListeselect.size(); i++){
405 512
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
406 513
                 int identityType = caseAffiliateselect.getIdentityType();
407 514
                 if(identityType==1){
515
+                    if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
516
+                        caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
517
+                    }
408 518
                     applicantName.append(caseAffiliateselect.getName()).append(",");;
409 519
                 }
410 520
             }
@@ -415,6 +525,32 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
415 525
         return caseApplicationselect;
416 526
     }
417 527
 
528
+    /**
529
+     * 给被申请人发送房间号短信
530
+     * @param messageVO
531
+     * @return
532
+     */
533
+    @Override
534
+    public String sendRoomNoMessage(SendRoomNoMessageVO messageVO) {
535
+        CaseAffiliate caseAffiliate = caseAffiliateMapper.selectCaseAffiliateByIdentityType(messageVO.getId(), 2);
536
+        if(null==caseAffiliate){
537
+            return "被申请人不存在";
538
+        }
539
+        CaseApplication caseApplication = new CaseApplication();
540
+        caseApplication.setId(messageVO.getId());
541
+        CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
542
+
543
+        //发送短信通知
544
+        SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
545
+        request.setTemplateId("1948332");
546
+        // 1948332 普通短信 开庭审理房间号通知 尊敬的{1}用户,您的{2}仲裁案件,开庭审理房间号为{3},请知晓,如非本人操作,请忽略本短信。
547
+        request.setPhone(caseAffiliate.getContactTelphone());
548
+        request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplicationselect.getCaseNum(), messageVO.getRoomNo()});
549
+        SmsUtils.sendSms(request);
550
+
551
+        return "短信发送成功";
552
+    }
553
+
418 554
     @Override
419 555
     @Transactional
420 556
     public int pendTralSure(CaseApplication caseApplication) {
@@ -459,9 +595,23 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
459 595
         caseAffiliate.setCaseAppliId(caseApplication.getId());
460 596
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
461 597
         if(caseAffiliatListeselect!=null) {
598
+            // 查询组织机构
599
+            List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
600
+            Map<String,String> deptMap=new HashMap<>();
601
+            if(CollectionUtil.isNotEmpty(sysDepts)){
602
+                for (SysDept sysDept : sysDepts) {
603
+                    deptMap.put(String.valueOf(sysDept.getDeptId()),sysDept.getDeptName());
604
+                }
605
+            }
462 606
             for (int j = 0; j < caseAffiliatListeselect.size(); j++) {
463 607
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
464 608
                 int identityType = caseAffiliateselect.getIdentityType();
609
+                if(identityType==1){
610
+                    if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
611
+                        caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
612
+                    }
613
+                    caseAffiliateselect.setName(caseAffiliateselect.getName());;
614
+                }
465 615
                 //给申请人、被申请人发送短信通知
466 616
                 request.setPhone(caseAffiliateselect.getContactTelphone());
467 617
                 // 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
@@ -470,6 +620,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
470 620
                 SmsUtils.sendSms(request);
471 621
             }
472 622
         }
623
+        // 新增日志
624
+        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CHECK_ARBITRATION_METHOD,"");
473 625
 
474 626
         return rows;
475 627
 
@@ -509,12 +661,17 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
509 661
 
510 662
 
511 663
 
512
-    private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew) {
664
+    private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew, Map<String, Long> deptMap) {
665
+       // 申请人信息
513 666
         CaseAffiliate caseAffiliate = new CaseAffiliate();
514 667
 
515 668
 //        BeanUtils.copyBeanProp(caseApplication,caseAffiliate);
516 669
         BeanUtils.copyBeanProp(caseAffiliate,caseApplication);
517 670
         caseAffiliate.setIdentityType(1);
671
+        // 申请人(机构),需要判断部门中是否存在,不存在则新增,当身份类型为1的时候,查询时需要根据名称查询组织机构
672
+        if(StrUtil.isNotEmpty(caseApplication.getName())){
673
+            setApplicantOrganization(caseAffiliate, caseApplication, deptMap);
674
+        }
518 675
         caseAffiliatesnew.add(caseAffiliate);
519 676
 
520 677
         // 组装被申请人信息
@@ -522,6 +679,38 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
522 679
         caseApplication.setCaseAffiliates(caseAffiliatesnew);
523 680
     }
524 681
 
682
+    /**
683
+     * 设置申请人的组织机构
684
+     * @param caseAffiliate
685
+     * @param caseApplication
686
+     */
687
+    @DataScope(deptAlias = "d")
688
+    private void   setApplicantOrganization(CaseAffiliate caseAffiliate, CaseApplication caseApplication,   Map<String, Long> deptMap ) {
689
+
690
+
691
+
692
+            // 将组织机构id设为申请人名称
693
+            if(deptMap.containsKey(caseApplication.getName())){
694
+                caseAffiliate.setName(String.valueOf(deptMap.get(caseApplication.getName())));
695
+            }else {
696
+               // 如果不存在则新增
697
+                SysDept dept = new SysDept();
698
+                dept.setParentId(0L);
699
+                dept.setDeptName(caseApplication.getName());
700
+                dept.setAncestors("0");
701
+                dept.setOrderNum(1);
702
+                dept.setStatus("0");
703
+                dept.setDelFlag("0");
704
+                dept.setCreateBy(getUsername());
705
+                dept.setUpdateBy(getUsername());
706
+                sysDeptMapper.insertDept(dept);
707
+                deptMap.put(dept.getDeptName(),dept.getDeptId());
708
+                caseAffiliate.setName(String.valueOf(dept.getDeptId()));
709
+
710
+            }
711
+
712
+    }
713
+
525 714
     /**
526 715
      * 组装被申请人信息
527 716
      * @param caseApplication

+ 22
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java Vedi File

@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
2 2
 
3 3
 import com.ruoyi.common.constant.CaseApplicationConstants;
4 4
 import com.ruoyi.common.core.domain.AjaxResult;
5
+import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
5 6
 import com.ruoyi.common.utils.SmsUtils;
6 7
 import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
7 8
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
@@ -44,18 +45,30 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
44 45
                 caseApplication1.setArbitratMethod(1);  // 更改仲裁方式
45 46
                 //修改案件状态为待开庭审理
46 47
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
48
+                // 新增日志
49
+                CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
50
+
47 51
             }else {
48 52
                 caseApplication1.setArbitratMethod(2);
49 53
                 //修改案件状态为待书面审理
50 54
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
55
+                // 新增日志
56
+                CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_WRIITEN_HEAR,"");
57
+
51 58
             }
52 59
         }else {
53 60
             if (arbitratMethod == 2){
54 61
                 //修改案件状态为待书面审理
55 62
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
63
+                // 新增日志
64
+                CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_WRIITEN_HEAR,"");
65
+
56 66
             }else {
57 67
                 //修改案件状态为待开庭审理
58 68
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
69
+                // 新增日志
70
+                CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
71
+
59 72
             }
60 73
         }
61 74
         int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
@@ -87,6 +100,9 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
87 100
                     }
88 101
                 }
89 102
             }
103
+            // 新增日志
104
+            CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
105
+
90 106
             return AjaxResult.success("审核成功");
91 107
         }
92 108
         return AjaxResult.error();
@@ -118,6 +134,9 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
118 134
                 //修改案件状态
119 135
                 caseApplication.setCaseStatus(CaseApplicationConstants.GENERATED_ARBITRATION);
120 136
                 caseApplicationMapper.submitCaseApplication(caseApplication);
137
+                // 新增日志
138
+                CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.GENERATED_ARBITRATION,"");
139
+
121 140
                 return AjaxResult.success("提交成功");
122 141
             }
123 142
         }else {
@@ -136,6 +155,9 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
136 155
                 //修改案件状态
137 156
                 caseApplication.setCaseStatus(CaseApplicationConstants.GENERATED_ARBITRATION);
138 157
                 caseApplicationMapper.submitCaseApplication(caseApplication);
158
+                // 新增日志
159
+                CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.GENERATED_ARBITRATION,"");
160
+
139 161
                 return AjaxResult.success("提交成功");
140 162
             }
141 163
         }

+ 7
- 9
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java Vedi File

@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
3 3
 import com.ruoyi.common.config.RuoYiConfig;
4 4
 import com.ruoyi.common.constant.CaseApplicationConstants;
5 5
 import com.ruoyi.common.core.domain.AjaxResult;
6
+import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
6 7
 import com.ruoyi.common.utils.file.FileUploadUtils;
7 8
 import com.ruoyi.wisdomarbitrate.domain.*;
8 9
 import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
@@ -130,6 +131,9 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
130 131
         caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_TRIAL);
131 132
         int i = caseApplicationMapper.submitCaseApplication(caseApplication);
132 133
         if (i > 0) {
134
+            // 新增日志
135
+            CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_TRIAL,"");
136
+
133 137
             return AjaxResult.success("证据确认成功");
134 138
         }
135 139
         return AjaxResult.error("暂无需要确认的证据");
@@ -165,15 +169,9 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
165 169
             }
166 170
             int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
167 171
             if (i > 0) {
168
-                //案件日志表里添加数据
169
-                CaseLogRecord caseLogRecord = new CaseLogRecord();
170
-                caseLogRecord.setCaseAppliId(caseApplication1.getId());
171
-                caseLogRecord.setCaseNode(caseStatus);
172
-                String createBy = caseApplication1.getCreateBy();
173
-                if (createBy != null) {
174
-                    caseLogRecord.setCreateBy(createBy);
175
-                }
176
-                caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
172
+                // 新增日志
173
+                CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT,"");
174
+
177 175
                 return AjaxResult.success("提交成功");
178 176
             }
179 177
         }

+ 80
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseLogRecordServiceImpl.java Vedi File

@@ -1,5 +1,9 @@
1 1
 package com.ruoyi.wisdomarbitrate.service.impl;
2 2
 
3
+import cn.hutool.core.collection.CollectionUtil;
4
+import cn.hutool.core.date.DatePattern;
5
+import cn.hutool.core.date.DateUtil;
6
+import cn.hutool.core.util.StrUtil;
3 7
 import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
4 8
 import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
5 9
 import com.ruoyi.wisdomarbitrate.service.ICaseLogRecordService;
@@ -16,7 +20,82 @@ public class CaseLogRecordServiceImpl  implements ICaseLogRecordService {
16 20
 
17 21
     @Override
18 22
     public List<CaseLogRecord> selectCaseLogRecordList(CaseLogRecord caseLogRecord) {
19
-        return caseLogRecordMapper.selectCaseLogRecordList(caseLogRecord);
23
+        List<CaseLogRecord> records = caseLogRecordMapper.selectCaseLogRecordList(caseLogRecord);
24
+        if(CollectionUtil.isNotEmpty(records)){
25
+            records.forEach(record->{
26
+                StringBuilder contentBuilder = new StringBuilder();
27
+                String caseNodeTime="";
28
+                if(record.getCaseNodeTime()!=null){
29
+                    caseNodeTime= DateUtil.format(record.getCaseNodeTime(), DatePattern.NORM_DATETIME_FORMATTER);
30
+                }
31
+
32
+                contentBuilder.append(record.getCreateNickName()).append("(").append(record.getCreateBy()).append(")").append("于").append(caseNodeTime);
33
+                switch(record.getCaseNode()){
34
+                  case  0:
35
+                      contentBuilder.append("创建立案申请");
36
+                      break;
37
+                    case  1:
38
+                        contentBuilder.append("提交立案申请");
39
+                        break;
40
+                    case  2:
41
+                        contentBuilder.append("提交立案审查");
42
+                        break;
43
+                    case  3:
44
+                        contentBuilder.append("支付成功");
45
+                        break;
46
+                    case  4:
47
+                        contentBuilder.append("缴费确认");
48
+                        break;
49
+                    case  5:
50
+                        contentBuilder.append("案件质证");
51
+                        break;
52
+                    case  6:
53
+                        contentBuilder.append("组庭审核");
54
+                        break;
55
+                    case  7:
56
+                        contentBuilder.append("组庭确认");
57
+                        break;
58
+                    case  8:
59
+                        contentBuilder.append("待开庭审理");
60
+                        break;
61
+                    case  9:
62
+                        contentBuilder.append("待书面审理");
63
+                        break;
64
+                    case  10:
65
+                        contentBuilder.append("书面审理");
66
+                        break;
67
+                    case  11:
68
+                        contentBuilder.append("审核裁决书,拒绝");
69
+                        break;
70
+                    case  12:
71
+                        contentBuilder.append("核验裁决书");
72
+                        break;
73
+                    case  13:
74
+                        contentBuilder.append("审核裁决书,同意");
75
+                        break;
76
+                    case  14:
77
+                        contentBuilder.append("签名成功");
78
+                        break;
79
+                    case  15:
80
+                        contentBuilder.append("用印成功");
81
+                        break;
82
+                    case  16:
83
+                        contentBuilder.append("送达仲裁文书");
84
+                        break;
85
+                    case  17:
86
+                        contentBuilder.append("案件归档");
87
+                        break;
88
+                    case  26:
89
+                        contentBuilder.append("证据确认成功");
90
+                        break;
91
+                    default:break;
92
+                }
93
+
94
+                record.setContent(contentBuilder.toString());
95
+
96
+            });
97
+        }
98
+        return records;
20 99
     }
21 100
 
22 101
 

+ 4
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java Vedi File

@@ -4,6 +4,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
4 4
 import com.ruoyi.ElegentPay;
5 5
 import com.ruoyi.common.constant.CaseApplicationConstants;
6 6
 import com.ruoyi.common.core.domain.AjaxResult;
7
+import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
7 8
 import com.ruoyi.common.utils.SmsUtils;
8 9
 import com.ruoyi.dto.PayRequest;
9 10
 import com.ruoyi.dto.PayResponse;
@@ -19,7 +20,6 @@ import org.springframework.beans.factory.annotation.Autowired;
19 20
 import org.springframework.stereotype.Service;
20 21
 import org.springframework.transaction.annotation.Transactional;
21 22
 
22
-import java.time.LocalDateTime;
23 23
 import java.util.Date;
24 24
 import java.util.List;
25 25
 
@@ -127,6 +127,9 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
127 127
                         SmsUtils.sendSms(request);
128 128
                     }
129 129
                 }
130
+                // 新增日志
131
+                CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_CROSSEXAMI,"");
132
+
130 133
                 return AjaxResult.success();
131 134
             }
132 135
         }

+ 10
- 30
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/IdentityAuthenticationServiceImpl.java Vedi File

@@ -14,15 +14,14 @@ import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
14 14
 import com.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper;
15 15
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
16 16
 import com.ruoyi.wisdomarbitrate.service.IdentityAuthenticationService;
17
+
17 18
 import com.tencentcloudapi.common.Credential;
18
-import com.tencentcloudapi.common.exception.TencentCloudSDKException;
19 19
 import com.tencentcloudapi.common.profile.ClientProfile;
20 20
 import com.tencentcloudapi.common.profile.HttpProfile;
21
+import com.tencentcloudapi.common.exception.TencentCloudSDKException;
21 22
 import com.tencentcloudapi.faceid.v20180301.FaceidClient;
22
-import com.tencentcloudapi.faceid.v20180301.models.GetEidResultRequest;
23
-import com.tencentcloudapi.faceid.v20180301.models.GetEidResultResponse;
24
-import com.tencentcloudapi.faceid.v20180301.models.GetEidTokenRequest;
25
-import com.tencentcloudapi.faceid.v20180301.models.GetEidTokenResponse;
23
+import com.tencentcloudapi.faceid.v20180301.models.*;
24
+
26 25
 import org.slf4j.Logger;
27 26
 import org.slf4j.LoggerFactory;
28 27
 import org.springframework.beans.factory.annotation.Autowired;
@@ -134,14 +133,7 @@ public class IdentityAuthenticationServiceImpl  implements IdentityAuthenticatio
134 133
                 IdentityAuthenticationRespon.setUserId(userId);
135 134
 
136 135
                 JSONObject objEidInfo = JSON.parseObject(objJSON.getString("EidInfo"));
137
-                String desKey = objEidInfo.getString("DesKey");
138
-                String uerInfo = objEidInfo.getString("UserInfo");
139
-                Map<String,String> mapEidInfo =  decodeEidInfo(desKey,uerInfo);
140
-                IdentityAuthenticationRespon.setName(mapEidInfo.get("name"));
141
-                IdentityAuthenticationRespon.setIdentityNo(mapEidInfo.get("identityNo"));
142
-                IdentityAuthenticationRespon.setCertificationStatus(1);
143
-
144
-                identityAuthenticationMapper.insertIdentityAuthentication(IdentityAuthenticationRespon);
136
+//                identityAuthenticationMapper.insertIdentityAuthentication(IdentityAuthenticationRespon);
145 137
                 IdentityAuthenticationResult.setCertificationStatus(1);
146 138
                 IdentityAuthenticationResult.setCertificationStatusName("认证成功");
147 139
             } catch (TencentCloudSDKException e) {
@@ -153,23 +145,11 @@ public class IdentityAuthenticationServiceImpl  implements IdentityAuthenticatio
153 145
         return IdentityAuthenticationResult;
154 146
     }
155 147
 
156
-    private Map<String, String> decodeEidInfo(String desKey, String uerInfo) {
157
-        Map<String, String> mapEidInfo = new HashMap<>();
158
-        byte[] deskeybyts = Base64.getDecoder().decode(desKey);
159
-        final SM2 sm2crypt = new SM2(privateKeyHexDecodeinfo, null, null);
160
-        sm2crypt.usePlainEncoding();
161
-        byte[] sm4keybys = sm2crypt.decrypt(deskeybyts);
162
-        SymmetricCrypto sm4dcrypt = SmUtil.sm4(sm4keybys);
163
-        byte[] uerInfobytes = sm4dcrypt.decrypt(Base64.getDecoder().decode(uerInfo));
164
-        JSONObject objuerInfo = JSON.parseObject(new String(uerInfobytes));
165
-        String name = objuerInfo.getString("name");
166
-        mapEidInfo.put("name",name);
167
-        String idtype = objuerInfo.getString("idtype");
168
-        mapEidInfo.put("identitytype",idtype);
169
-        String idnum = objuerInfo.getString("idnum");
170
-        mapEidInfo.put("identityNo",idnum);
171
-        return mapEidInfo;
172
-    }
148
+
149
+
150
+
151
+
152
+
173 153
 
174 154
 
175 155
 }

+ 42
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/CaseLogUtils.java Vedi File

@@ -0,0 +1,42 @@
1
+package com.ruoyi.wisdomarbitrate.utils;
2
+
3
+import cn.hutool.extra.spring.SpringUtil;
4
+import com.ruoyi.common.core.domain.model.LoginUser;
5
+import com.ruoyi.common.utils.SecurityUtils;
6
+import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
7
+import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
8
+
9
+import javax.validation.constraints.NotEmpty;
10
+import javax.validation.constraints.NotNull;
11
+
12
+/**
13
+ * 案件记录日志文件
14
+ * 
15
+ * @author wangqiong
16
+ */
17
+public class CaseLogUtils
18
+{
19
+    private static CaseLogRecordMapper caseLogRecordMapper= SpringUtil.getBean(CaseLogRecordMapper.class);
20
+
21
+    /**
22
+     * 新增案件日志
23
+     * @param caseAppliId 案件id,不能为空
24
+     * @param caseNode 案件节点,不能为空
25
+     * @param notes 备注
26
+     */
27
+    public static void insertCaseLog(@NotNull Long caseAppliId, @NotEmpty Integer caseNode, String notes  ){
28
+        // 获取当前的用户
29
+        LoginUser loginUser = SecurityUtils.getLoginUser();
30
+        String nickName = loginUser.getUser().getNickName();
31
+        CaseLogRecord operLog = new CaseLogRecord();
32
+        operLog.setCreateBy(loginUser.getUsername());
33
+        operLog.setCreateNickName(nickName);
34
+        operLog.setUpdateBy(loginUser.getUsername());
35
+        operLog.setCaseAppliId(caseAppliId);
36
+        operLog.setCaseNode(caseNode);
37
+        operLog.setNotes(notes);
38
+        caseLogRecordMapper.insertCaseLogRecord(operLog);
39
+    }
40
+
41
+
42
+}

+ 2
- 2
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml Vedi File

@@ -87,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
87 87
 		where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
88 88
 	</select>
89 89
     
90
-    <insert id="insertDept" parameterType="SysDept">
90
+    <insert id="insertDept" parameterType="SysDept" useGeneratedKeys="true" keyColumn="dept_id" keyProperty="deptId">
91 91
  		insert into sys_dept(
92 92
  			<if test="deptId != null and deptId != 0">dept_id,</if>
93 93
  			<if test="parentId != null and parentId != 0">parent_id,</if>
@@ -112,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
112 112
  			<if test="status != null">#{status},</if>
113 113
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
114 114
  			sysdate()
115
- 		)
115
+ 		);
116 116
 	</insert>
117 117
 	
118 118
 	<update id="updateDept" parameterType="SysDept">

+ 0
- 17
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/ArbitratorMapper.xml Vedi File

@@ -37,21 +37,4 @@
37 37
         </where>
38 38
     </select>
39 39
 
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57 40
 </mapper>

+ 14
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml Vedi File

@@ -33,6 +33,20 @@
33 33
             </if>
34 34
         </where>
35 35
     </select>
36
+    <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 ,
38
+        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
40
+        from case_affiliate c
41
+        <where>
42
+            <if test="caseAppliId != null ">
43
+                AND c.case_appli_id = #{caseAppliId}
44
+            </if>
45
+            <if test="caseAppliId != null ">
46
+                AND c.identity_type = #{identityType}
47
+            </if>
48
+        </where>
49
+    </select>
36 50
 
37 51
 
38 52
     <insert id="batchCaseAffiliate">

+ 9
- 2
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Vedi File

@@ -55,8 +55,10 @@
55 55
         c.hear_date ,c.arbitrat_claims ,
56 56
         c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
57 57
         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
58
+        c.update_by ,c.update_time , c.arbitrator_name,d.dept_name as applicantName
59 59
         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
60 62
         <where>
61 63
             <if test="caseStatus != null">
62 64
                 AND c.case_status = #{caseStatus}
@@ -64,6 +66,9 @@
64 66
             <if test="caseNum != null and caseNum != ''">
65 67
                 AND c.case_num = #{caseNum}
66 68
             </if>
69
+            <if test="name != null and name != ''">
70
+                AND ca.NAME=#{nameId}  AND ca.identity_type=1 and ca.name=d.dept_id
71
+            </if>
67 72
             <if test="caseStatusList != null and caseStatusList.size() > 0">
68 73
                 and c.case_status in
69 74
                 <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
@@ -201,8 +206,10 @@
201 206
         c.hear_date ,c.arbitrat_claims ,
202 207
         c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
203 208
         c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
204
-        c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name
209
+        c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,d.dept_name as applicantName
205 210
         from case_application c
211
+        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
206 213
         <where>
207 214
             <if test="id != null ">
208 215
                 AND c.id = #{id}

+ 15
- 28
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseLogRecordMapper.xml Vedi File

@@ -10,43 +10,30 @@
10 10
         <result property="caseNodeTime"     column="case_node_time"    />
11 11
         <result property="notes"        column="notes"        />
12 12
         <result property="caseNum"        column="case_num"        />
13
+        <result property="createBy"        column=" create_by"        />
14
+        <result property="createNickName"        column="create_nick_name"        />
13 15
 
14 16
     </resultMap>
15 17
 
16 18
     <insert id="insertCaseLogRecord">
17
-        insert into case_log_record(case_appli_id, case_node,case_node_time,notes,create_by,create_time ) values(
18
-            #{caseAppliId},#{caseNode},sysdate(),#{notes},#{createBy},sysdate()
19
+        insert into case_log_record(case_appli_id, case_node,case_node_time,notes,create_by,create_nick_name,create_time,update_by,update_time ) values(
20
+            #{caseAppliId},#{caseNode},sysdate(),#{notes},#{createBy},#{createNickName},sysdate(),#{updateBy},sysdate()
19 21
         )
20 22
     </insert>
23
+    <select id="selectCaseLogRecordList" resultType="com.ruoyi.wisdomarbitrate.domain.CaseLogRecord">
24
+            select cl.case_node caseNode ,cl.case_node_time caseNodeTime ,cl.notes  ,cl.id ,cl.case_appli_id caseAppliId,
25
+            cl.create_by createBy,cl.create_nick_name createNickName
26
+            from case_log_record cl
21 27
 
22
-    <select id="selectCaseLogRecordList" parameterType="CaseLogRecord" resultMap="CaseLogRecordResult">
23
-        select cl.case_node ,cl.case_node_time ,cl.notes ,c.case_num ,cl.id ,cl.case_appli_id
24
-        from case_log_record cl left join case_application c on cl.case_appli_id  = c.id
25
-        <where>
26
-            <if test="caseNum != null and caseNum != ''">
27
-                AND c.case_num = #{caseNum}
28
-            </if>
29
-        </where>
30
-    </select>
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
28
+            <where>
48 29
 
30
+                <if test="caseAppliId != null and caseAppliId != ''">
31
+                    AND cl.case_appli_id = #{caseAppliId}
32
+                </if>
33
+            </where>
34
+            order by create_time desc
49 35
 
36
+    </select>
50 37
 
51 38
 
52 39
 </mapper>