Преглед изворни кода

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

hejinbo пре 2 година
родитељ
комит
f7fcfb3193
27 измењених фајлова са 548 додато и 187 уклоњено
  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 Прегледај датотеку

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

+ 1
- 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/ArbitratorController.java Прегледај датотеку

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

+ 39
- 50
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Прегледај датотеку

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

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

+ 3
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java Прегледај датотеку

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

+ 1
- 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseLogRecordController.java Прегледај датотеку

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

+ 3
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CasePaymentController.java Прегледај датотеку

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

+ 14
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java Прегледај датотеку

332
      * 申请人主体信息
332
      * 申请人主体信息
333
      */
333
      */
334
     /** 姓名 */
334
     /** 姓名 */
335
-    @Excel(name = "申请人主体信息-申请人姓名",width = 26)
335
+    @Excel(name = "申请人主体信息-申请人(机构)",width = 26)
336
     private String name;
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
     private String identityNum;
343
     private String identityNum;
340
 
344
 
341
     /** 联系电话 */
345
     /** 联系电话 */
415
         this.name = name;
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
     public String getIdentityNum() {
430
     public String getIdentityNum() {
419
         return identityNum;
431
         return identityNum;
420
     }
432
     }

+ 30
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseLogRecord.java Прегледај датотеку

25
 
25
 
26
     /** 案件编号 */
26
     /** 案件编号 */
27
     private String caseNum;
27
     private String caseNum;
28
+    /**
29
+     * 展示的内容
30
+     */
31
+    private String content;
32
+    /**
33
+     * 用户昵称
34
+     */
35
+    private String createNickName;
36
+
28
 
37
 
29
     public String getCaseNum() {
38
     public String getCaseNum() {
30
         return caseNum;
39
         return caseNum;
50
         this.caseAppliId = caseAppliId;
59
         this.caseAppliId = caseAppliId;
51
     }
60
     }
52
 
61
 
53
-    public int getCaseNode() {
62
+    public Integer getCaseNode() {
54
         return caseNode;
63
         return caseNode;
55
     }
64
     }
56
 
65
 
73
     public void setNotes(String notes) {
82
     public void setNotes(String notes) {
74
         this.notes = notes;
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 Прегледај датотеку

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 Прегледај датотеку

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 Прегледај датотеку

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

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java Прегледај датотеку

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

+ 3
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java Прегледај датотеку

1
 package com.ruoyi.wisdomarbitrate.service;
1
 package com.ruoyi.wisdomarbitrate.service;
2
 
2
 
3
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
3
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
4
+import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
4
 
5
 
5
 import java.util.List;
6
 import java.util.List;
6
 
7
 
37
     int submitCaseApplicationCheck(CaseApplication caseApplication);
38
     int submitCaseApplicationCheck(CaseApplication caseApplication);
38
 
39
 
39
     CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
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 Прегледај датотеку

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

+ 199
- 10
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Прегледај датотеку

1
 package com.ruoyi.wisdomarbitrate.service.impl;
1
 package com.ruoyi.wisdomarbitrate.service.impl;
2
 
2
 
3
 
3
 
4
+import cn.hutool.core.collection.CollectionUtil;
5
+import cn.hutool.core.util.StrUtil;
6
+
7
+import com.ruoyi.common.annotation.DataScope;
4
 import com.ruoyi.common.constant.CaseApplicationConstants;
8
 import com.ruoyi.common.constant.CaseApplicationConstants;
9
+import com.ruoyi.common.core.domain.entity.SysDept;
5
 import com.ruoyi.common.exception.ServiceException;
10
 import com.ruoyi.common.exception.ServiceException;
11
+import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
6
 import com.ruoyi.common.utils.DateUtils;
12
 import com.ruoyi.common.utils.DateUtils;
7
 import com.ruoyi.common.utils.SmsUtils;
13
 import com.ruoyi.common.utils.SmsUtils;
8
 import com.ruoyi.common.utils.StringUtils;
14
 import com.ruoyi.common.utils.StringUtils;
9
 import com.ruoyi.common.utils.bean.BeanUtils;
15
 import com.ruoyi.common.utils.bean.BeanUtils;
16
+import com.ruoyi.system.mapper.SysDeptMapper;
10
 import com.ruoyi.wisdomarbitrate.domain.*;
17
 import com.ruoyi.wisdomarbitrate.domain.*;
18
+import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
11
 import com.ruoyi.wisdomarbitrate.mapper.*;
19
 import com.ruoyi.wisdomarbitrate.mapper.*;
12
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
20
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
13
 import org.springframework.beans.factory.annotation.Autowired;
21
 import org.springframework.beans.factory.annotation.Autowired;
18
 import java.util.*;
26
 import java.util.*;
19
 import java.util.stream.Collectors;
27
 import java.util.stream.Collectors;
20
 
28
 
29
+import static com.ruoyi.common.utils.SecurityUtils.getUsername;
30
+
21
 
31
 
22
 @Service
32
 @Service
23
 public class CaseApplicationServiceImpl implements ICaseApplicationService {
33
 public class CaseApplicationServiceImpl implements ICaseApplicationService {
34
 
44
 
35
     @Autowired
45
     @Autowired
36
     private CaseAttachMapper caseAttachMapper;
46
     private CaseAttachMapper caseAttachMapper;
47
+    @Autowired
48
+    private SysDeptMapper sysDeptMapper;
37
 
49
 
38
 
50
 
39
 
51
 
52
         //根据仲裁费用计费规则计算应缴费用
64
         //根据仲裁费用计费规则计算应缴费用
53
         //暂时设置计费比率为0.01
65
         //暂时设置计费比率为0.01
54
         BigDecimal feeRate = new BigDecimal(0.01);
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
         caseApplication.setFeePayable(feePayable);
68
         caseApplication.setFeePayable(feePayable);
57
         // 获取自动编码
69
         // 获取自动编码
58
         String caseNum = generateCaseNum();
70
         String caseNum = generateCaseNum();
60
 
72
 
61
         int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
73
         int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
62
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
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
                 caseAffiliate.setCaseAppliId(caseApplication.getId());
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
             caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
109
             caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
68
         }
110
         }
69
 
111
 
70
         List<CaseAttach> caseAttachList = caseApplication.getCaseAttachList();
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
                 caseAttach.setCaseAppliId(caseApplication.getId());
115
                 caseAttach.setCaseAppliId(caseApplication.getId());
74
                 caseAttachMapper.updateCaseAttach(caseAttach);
116
                 caseAttachMapper.updateCaseAttach(caseAttach);
75
             }
117
             }
76
-
77
         }
118
         }
78
-
119
+        // 新增日志
120
+        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_APPLICATION,"");
79
         return rows;
121
         return rows;
80
     }
122
     }
81
 
123
 
116
         int rows = caseApplicationMapper.updataCaseApplication(caseApplication);
158
         int rows = caseApplicationMapper.updataCaseApplication(caseApplication);
117
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
159
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
118
         if(caseAffiliates!=null&&caseAffiliates.size()>0){
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
             for (CaseAffiliate caseAffiliate : caseAffiliates){
167
             for (CaseAffiliate caseAffiliate : caseAffiliates){
120
                 caseAffiliate.setCaseAppliId(caseApplication.getId());
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
                 caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
190
                 caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
122
             }
191
             }
192
+
123
         }
193
         }
124
         List<CaseAttach> caseAttachList = caseApplication.getCaseAttachList();
194
         List<CaseAttach> caseAttachList = caseApplication.getCaseAttachList();
125
         if(caseAttachList!=null&&caseAttachList.size()>0){
195
         if(caseAttachList!=null&&caseAttachList.size()>0){
139
         //提交立案申请
209
         //提交立案申请
140
         caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CHECK);
210
         caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CHECK);
141
         int rows = caseApplicationMapper.submitCaseApplication(caseApplication);
211
         int rows = caseApplicationMapper.submitCaseApplication(caseApplication);
212
+        // 新增日志
213
+        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_CHECK,"");
142
         return rows;
214
         return rows;
143
     }
215
     }
144
 
216
 
186
 
258
 
187
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
259
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
188
         if(caseAffiliatListeselect!=null){
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
             StringBuffer applicantName = new StringBuffer();
269
             StringBuffer applicantName = new StringBuffer();
190
             StringBuffer respondentName = new StringBuffer();
270
             StringBuffer respondentName = new StringBuffer();
191
             for (int i = 0; i < caseAffiliatListeselect.size(); i++){
271
             for (int i = 0; i < caseAffiliatListeselect.size(); i++){
192
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
272
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
193
                 int identityType = caseAffiliateselect.getIdentityType();
273
                 int identityType = caseAffiliateselect.getIdentityType();
194
                 if(identityType==1){
274
                 if(identityType==1){
275
+                    if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
276
+                        caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
277
+                    }
195
                     applicantName.append(caseAffiliateselect.getName()).append(",");;
278
                     applicantName.append(caseAffiliateselect.getName()).append(",");;
196
                 }else if(identityType==2){
279
                 }else if(identityType==2){
197
                     respondentName.append(caseAffiliateselect.getName()).append(",");;
280
                     respondentName.append(caseAffiliateselect.getName()).append(",");;
213
         int successNum = 0;
296
         int successNum = 0;
214
         int failureNum = 0;
297
         int failureNum = 0;
215
         if(caseApplicationList!=null&&caseApplicationList.size()>0){
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
             List<CaseApplication> caseApplicationListinsert = new ArrayList<>();
305
             List<CaseApplication> caseApplicationListinsert = new ArrayList<>();
217
             for (int i = 0; i < caseApplicationList.size(); i++){
306
             for (int i = 0; i < caseApplicationList.size(); i++){
218
                 CaseApplication caseApplication = caseApplicationList.get(i);
307
                 CaseApplication caseApplication = caseApplicationList.get(i);
224
 
313
 
225
                 //赋值CaseApplication的案件关联人信息
314
                 //赋值CaseApplication的案件关联人信息
226
                 List<CaseAffiliate> caseAffiliatesnew  = new ArrayList<>();
315
                 List<CaseAffiliate> caseAffiliatesnew  = new ArrayList<>();
227
-                assignmentCaseAffiliates(caseApplication,caseAffiliatesnew);
316
+                // 组装案件关联人信息
317
+                assignmentCaseAffiliates(caseApplication,caseAffiliatesnew,deptMap);
228
 
318
 
229
 //                int caseApplicationCount = selectCaseApplicationCount(caseApplication);
319
 //                int caseApplicationCount = selectCaseApplicationCount(caseApplication);
230
 //                if(caseApplicationCount>0){
320
 //                if(caseApplicationCount>0){
344
                 rows = caseApplicationMapper.submitCaseApplication(caseApplication);
434
                 rows = caseApplicationMapper.submitCaseApplication(caseApplication);
345
             }
435
             }
346
         }
436
         }
347
-
437
+        // 新增日志
438
+        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL,"");
348
         return rows;
439
         return rows;
349
     }
440
     }
350
 
441
 
355
         int rows = caseApplicationMapper.submitCaseApplication(caseApplication);
446
         int rows = caseApplicationMapper.submitCaseApplication(caseApplication);
356
         ArbitrateRecord arbitrateRecord = caseApplication.getArbitrateRecord();
447
         ArbitrateRecord arbitrateRecord = caseApplication.getArbitrateRecord();
357
         arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
448
         arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
449
+        // 新增日志
450
+        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CHECK_ARBITRATION,"");
358
         return rows;
451
         return rows;
359
 
452
 
360
     }
453
     }
368
         Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck();
461
         Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck();
369
         if(agreeOrNotCheck.intValue()==1){//同意审核
462
         if(agreeOrNotCheck.intValue()==1){//同意审核
370
             caseApplication.setCaseStatus(CaseApplicationConstants.SIGN_ARBITRATION);
463
             caseApplication.setCaseStatus(CaseApplicationConstants.SIGN_ARBITRATION);
464
+            // 新增日志
465
+            CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.SIGN_ARBITRATION,"");
466
+
371
             rows = caseApplicationMapper.submitCaseApplication(caseApplication);
467
             rows = caseApplicationMapper.submitCaseApplication(caseApplication);
372
         }else if(agreeOrNotCheck.intValue()==2){//拒绝审核
468
         }else if(agreeOrNotCheck.intValue()==2){//拒绝审核
373
             caseApplication.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
469
             caseApplication.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
470
+            // 新增日志
471
+            CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.VERPRIF_ARBITRATION,"");
472
+
374
             rows = caseApplicationMapper.submitCaseApplication(caseApplication);
473
             rows = caseApplicationMapper.submitCaseApplication(caseApplication);
375
         }
474
         }
376
 
475
 
400
         caseAffiliate.setCaseAppliId(caseApplication.getId());
499
         caseAffiliate.setCaseAppliId(caseApplication.getId());
401
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
500
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
402
         if(caseAffiliatListeselect!=null){
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
             StringBuffer applicantName = new StringBuffer();
510
             StringBuffer applicantName = new StringBuffer();
404
             for (int i = 0; i < caseAffiliatListeselect.size(); i++){
511
             for (int i = 0; i < caseAffiliatListeselect.size(); i++){
405
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
512
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
406
                 int identityType = caseAffiliateselect.getIdentityType();
513
                 int identityType = caseAffiliateselect.getIdentityType();
407
                 if(identityType==1){
514
                 if(identityType==1){
515
+                    if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
516
+                        caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
517
+                    }
408
                     applicantName.append(caseAffiliateselect.getName()).append(",");;
518
                     applicantName.append(caseAffiliateselect.getName()).append(",");;
409
                 }
519
                 }
410
             }
520
             }
415
         return caseApplicationselect;
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
     @Override
554
     @Override
419
     @Transactional
555
     @Transactional
420
     public int pendTralSure(CaseApplication caseApplication) {
556
     public int pendTralSure(CaseApplication caseApplication) {
459
         caseAffiliate.setCaseAppliId(caseApplication.getId());
595
         caseAffiliate.setCaseAppliId(caseApplication.getId());
460
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
596
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
461
         if(caseAffiliatListeselect!=null) {
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
             for (int j = 0; j < caseAffiliatListeselect.size(); j++) {
606
             for (int j = 0; j < caseAffiliatListeselect.size(); j++) {
463
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
607
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
464
                 int identityType = caseAffiliateselect.getIdentityType();
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
                 request.setPhone(caseAffiliateselect.getContactTelphone());
616
                 request.setPhone(caseAffiliateselect.getContactTelphone());
467
                 // 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
617
                 // 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
470
                 SmsUtils.sendSms(request);
620
                 SmsUtils.sendSms(request);
471
             }
621
             }
472
         }
622
         }
623
+        // 新增日志
624
+        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CHECK_ARBITRATION_METHOD,"");
473
 
625
 
474
         return rows;
626
         return rows;
475
 
627
 
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
         CaseAffiliate caseAffiliate = new CaseAffiliate();
666
         CaseAffiliate caseAffiliate = new CaseAffiliate();
514
 
667
 
515
 //        BeanUtils.copyBeanProp(caseApplication,caseAffiliate);
668
 //        BeanUtils.copyBeanProp(caseApplication,caseAffiliate);
516
         BeanUtils.copyBeanProp(caseAffiliate,caseApplication);
669
         BeanUtils.copyBeanProp(caseAffiliate,caseApplication);
517
         caseAffiliate.setIdentityType(1);
670
         caseAffiliate.setIdentityType(1);
671
+        // 申请人(机构),需要判断部门中是否存在,不存在则新增,当身份类型为1的时候,查询时需要根据名称查询组织机构
672
+        if(StrUtil.isNotEmpty(caseApplication.getName())){
673
+            setApplicantOrganization(caseAffiliate, caseApplication, deptMap);
674
+        }
518
         caseAffiliatesnew.add(caseAffiliate);
675
         caseAffiliatesnew.add(caseAffiliate);
519
 
676
 
520
         // 组装被申请人信息
677
         // 组装被申请人信息
522
         caseApplication.setCaseAffiliates(caseAffiliatesnew);
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
      * @param caseApplication
716
      * @param caseApplication

+ 22
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java Прегледај датотеку

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

+ 7
- 9
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java Прегледај датотеку

3
 import com.ruoyi.common.config.RuoYiConfig;
3
 import com.ruoyi.common.config.RuoYiConfig;
4
 import com.ruoyi.common.constant.CaseApplicationConstants;
4
 import com.ruoyi.common.constant.CaseApplicationConstants;
5
 import com.ruoyi.common.core.domain.AjaxResult;
5
 import com.ruoyi.common.core.domain.AjaxResult;
6
+import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
6
 import com.ruoyi.common.utils.file.FileUploadUtils;
7
 import com.ruoyi.common.utils.file.FileUploadUtils;
7
 import com.ruoyi.wisdomarbitrate.domain.*;
8
 import com.ruoyi.wisdomarbitrate.domain.*;
8
 import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
9
 import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
130
         caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_TRIAL);
131
         caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_TRIAL);
131
         int i = caseApplicationMapper.submitCaseApplication(caseApplication);
132
         int i = caseApplicationMapper.submitCaseApplication(caseApplication);
132
         if (i > 0) {
133
         if (i > 0) {
134
+            // 新增日志
135
+            CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_TRIAL,"");
136
+
133
             return AjaxResult.success("证据确认成功");
137
             return AjaxResult.success("证据确认成功");
134
         }
138
         }
135
         return AjaxResult.error("暂无需要确认的证据");
139
         return AjaxResult.error("暂无需要确认的证据");
165
             }
169
             }
166
             int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
170
             int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
167
             if (i > 0) {
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
                 return AjaxResult.success("提交成功");
175
                 return AjaxResult.success("提交成功");
178
             }
176
             }
179
         }
177
         }

+ 80
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseLogRecordServiceImpl.java Прегледај датотеку

1
 package com.ruoyi.wisdomarbitrate.service.impl;
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
 import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
7
 import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
4
 import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
8
 import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
5
 import com.ruoyi.wisdomarbitrate.service.ICaseLogRecordService;
9
 import com.ruoyi.wisdomarbitrate.service.ICaseLogRecordService;
16
 
20
 
17
     @Override
21
     @Override
18
     public List<CaseLogRecord> selectCaseLogRecordList(CaseLogRecord caseLogRecord) {
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 Прегледај датотеку

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

+ 10
- 30
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/IdentityAuthenticationServiceImpl.java Прегледај датотеку

14
 import com.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper;
14
 import com.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper;
15
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
15
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
16
 import com.ruoyi.wisdomarbitrate.service.IdentityAuthenticationService;
16
 import com.ruoyi.wisdomarbitrate.service.IdentityAuthenticationService;
17
+
17
 import com.tencentcloudapi.common.Credential;
18
 import com.tencentcloudapi.common.Credential;
18
-import com.tencentcloudapi.common.exception.TencentCloudSDKException;
19
 import com.tencentcloudapi.common.profile.ClientProfile;
19
 import com.tencentcloudapi.common.profile.ClientProfile;
20
 import com.tencentcloudapi.common.profile.HttpProfile;
20
 import com.tencentcloudapi.common.profile.HttpProfile;
21
+import com.tencentcloudapi.common.exception.TencentCloudSDKException;
21
 import com.tencentcloudapi.faceid.v20180301.FaceidClient;
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
 import org.slf4j.Logger;
25
 import org.slf4j.Logger;
27
 import org.slf4j.LoggerFactory;
26
 import org.slf4j.LoggerFactory;
28
 import org.springframework.beans.factory.annotation.Autowired;
27
 import org.springframework.beans.factory.annotation.Autowired;
134
                 IdentityAuthenticationRespon.setUserId(userId);
133
                 IdentityAuthenticationRespon.setUserId(userId);
135
 
134
 
136
                 JSONObject objEidInfo = JSON.parseObject(objJSON.getString("EidInfo"));
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
                 IdentityAuthenticationResult.setCertificationStatus(1);
137
                 IdentityAuthenticationResult.setCertificationStatus(1);
146
                 IdentityAuthenticationResult.setCertificationStatusName("认证成功");
138
                 IdentityAuthenticationResult.setCertificationStatusName("认证成功");
147
             } catch (TencentCloudSDKException e) {
139
             } catch (TencentCloudSDKException e) {
153
         return IdentityAuthenticationResult;
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 Прегледај датотеку

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 Прегледај датотеку

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

+ 0
- 17
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/ArbitratorMapper.xml Прегледај датотеку

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

+ 14
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml Прегледај датотеку

33
             </if>
33
             </if>
34
         </where>
34
         </where>
35
     </select>
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
     <insert id="batchCaseAffiliate">
52
     <insert id="batchCaseAffiliate">

+ 9
- 2
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Прегледај датотеку

55
         c.hear_date ,c.arbitrat_claims ,
55
         c.hear_date ,c.arbitrat_claims ,
56
         c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
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
         c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
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
         from case_application c
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
         <where>
62
         <where>
61
             <if test="caseStatus != null">
63
             <if test="caseStatus != null">
62
                 AND c.case_status = #{caseStatus}
64
                 AND c.case_status = #{caseStatus}
64
             <if test="caseNum != null and caseNum != ''">
66
             <if test="caseNum != null and caseNum != ''">
65
                 AND c.case_num = #{caseNum}
67
                 AND c.case_num = #{caseNum}
66
             </if>
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
             <if test="caseStatusList != null and caseStatusList.size() > 0">
72
             <if test="caseStatusList != null and caseStatusList.size() > 0">
68
                 and c.case_status in
73
                 and c.case_status in
69
                 <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
74
                 <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
201
         c.hear_date ,c.arbitrat_claims ,
206
         c.hear_date ,c.arbitrat_claims ,
202
         c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
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
         c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
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
         from case_application c
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
         <where>
213
         <where>
207
             <if test="id != null ">
214
             <if test="id != null ">
208
                 AND c.id = #{id}
215
                 AND c.id = #{id}

+ 15
- 28
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseLogRecordMapper.xml Прегледај датотеку

10
         <result property="caseNodeTime"     column="case_node_time"    />
10
         <result property="caseNodeTime"     column="case_node_time"    />
11
         <result property="notes"        column="notes"        />
11
         <result property="notes"        column="notes"        />
12
         <result property="caseNum"        column="case_num"        />
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
     </resultMap>
16
     </resultMap>
15
 
17
 
16
     <insert id="insertCaseLogRecord">
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
     </insert>
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
 </mapper>
39
 </mapper>