ソースを参照

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

hejinbo 2 年 前
コミット
d52ecca5dc
共有20 個のファイルを変更した724 個の追加96 個の削除を含む
  1. 23
    0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/AdjudicationController.java
  2. 9
    11
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseArbitrateController.java
  3. 11
    0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java
  4. 2
    2
      ruoyi-admin/src/main/resources/application.yml
  5. 6
    0
      ruoyi-common/pom.xml
  6. 0
    8
      ruoyi-common/src/main/java/com/ruoyi/common/utils/SmsUtils.java
  7. 157
    0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/WordUtil.java
  8. 188
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/Adjudication.java
  9. 1
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/ArbitrateRecord.java
  10. 1
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAttach.java
  11. 37
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CaseEvidenceDTO.java
  12. 1
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CasePayDTO.java
  13. 8
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/IAdjudicationService.java
  14. 5
    2
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseArbitrateService.java
  15. 2
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseEvidenceService.java
  16. 150
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java
  17. 1
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CallBackHandleServiceImpl.java
  18. 58
    47
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java
  19. 63
    22
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java
  20. 1
    1
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml

+ 23
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/AdjudicationController.java ファイルの表示

@@ -0,0 +1,23 @@
1
+package com.ruoyi.web.controller.wisdomarbitrate;
2
+
3
+import com.ruoyi.common.core.controller.BaseController;
4
+import com.ruoyi.common.core.domain.AjaxResult;
5
+import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
6
+import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.validation.annotation.Validated;
9
+import org.springframework.web.bind.annotation.PostMapping;
10
+import org.springframework.web.bind.annotation.RequestBody;
11
+import org.springframework.web.bind.annotation.RequestMapping;
12
+import org.springframework.web.bind.annotation.RestController;
13
+
14
+@RestController
15
+@RequestMapping("/adjudication")
16
+public class AdjudicationController extends BaseController {
17
+    @Autowired
18
+    private IAdjudicationService adjudicationService;
19
+    @PostMapping("/document")
20
+    public AjaxResult createDocument(@Validated @RequestBody CaseApplication caseApplication){
21
+        return adjudicationService.createDocument(caseApplication);
22
+    }
23
+}

+ 9
- 11
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseArbitrateController.java ファイルの表示

@@ -2,6 +2,7 @@ package com.ruoyi.web.controller.wisdomarbitrate;
2 2
 
3 3
 import com.ruoyi.common.core.controller.BaseController;
4 4
 import com.ruoyi.common.core.domain.AjaxResult;
5
+import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
5 6
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
6 7
 import com.ruoyi.wisdomarbitrate.service.ICaseArbitrateService;
7 8
 import org.springframework.beans.factory.annotation.Autowired;
@@ -15,27 +16,24 @@ public class CaseArbitrateController extends BaseController {
15 16
     private ICaseArbitrateService caseArbitrateService;
16 17
 
17 18
     /**
18
-     * 确定仲裁方式
19
+     * 审核仲裁方式
19 20
      * @param caseApplication
20
-     * @param arbitratMethod
21
+     * @param opinion   1同意,0拒绝
21 22
      * @return
22 23
      */
23 24
     @PutMapping("/method")
24
-    public AjaxResult chooseArbitrateMethod(@Validated @RequestBody CaseApplication caseApplication
25
-            ,Integer arbitratMethod){
26
-        return caseArbitrateService.chooseArbitrateMethod(caseApplication,arbitratMethod);
25
+    public AjaxResult examineArbitrateMethod(@Validated @RequestBody CaseApplication caseApplication
26
+            ,Integer opinion){
27
+        return caseArbitrateService.examineArbitrateMethod(caseApplication,opinion);
27 28
     }
28 29
 
29 30
     /**
30 31
      * 书面审理
31
-     * @param caseApplication
32
-     * @param accidentDescription
33
-     * @param arbitrationResult
32
+     * @param arbitrateRecord
34 33
      * @return
35 34
      */
36 35
     @PostMapping("/writtenHear")
37
-    public AjaxResult writtenHear(@Validated @RequestBody CaseApplication caseApplication
38
-            ,String accidentDescription , String arbitrationResult){
39
-        return caseArbitrateService.writtenHear(caseApplication,accidentDescription,arbitrationResult);
36
+    public AjaxResult writtenHear(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
37
+        return caseArbitrateService.writtenHear(arbitrateRecord);
40 38
     }
41 39
 }

+ 11
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java ファイルの表示

@@ -4,6 +4,7 @@ import com.ruoyi.common.core.controller.BaseController;
4 4
 import com.ruoyi.common.core.domain.AjaxResult;
5 5
 import com.ruoyi.common.core.page.TableDataInfo;
6 6
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
7
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
7 8
 import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
8 9
 import com.ruoyi.wisdomarbitrate.service.ICaseEvidenceService;
9 10
 import org.springframework.beans.factory.annotation.Autowired;
@@ -78,4 +79,14 @@ public class CaseEvidenceController extends BaseController {
78 79
     public AjaxResult evidenceConfirmation(@Validated @RequestBody CaseApplication caseApplication){
79 80
         return caseEvidenceService.evidenceConfirmation(caseApplication);
80 81
     }
82
+
83
+    /**
84
+     * 案件质证
85
+     * @param caseEvidenceDTO
86
+     * @return
87
+     */
88
+    @PostMapping("/crossexami")
89
+    public AjaxResult caseCrossexamination(@Validated @RequestBody CaseEvidenceDTO caseEvidenceDTO){
90
+        return caseEvidenceService.caseCrossexamination(caseEvidenceDTO);
91
+    }
81 92
 }

+ 2
- 2
ruoyi-admin/src/main/resources/application.yml ファイルの表示

@@ -143,8 +143,8 @@ elegent:
143 143
     alipay:
144 144
       appId: 2021003141676135
145 145
     callback:
146
-      domain: http://121.40.189.20:9000/
147
-      watch: false
146
+      domain: http://121.40.189.20:9001/
147
+      watch: true
148 148
       cycle: 10
149 149
 identityAuthentication:
150 150
   credentialSecretId: 123

+ 6
- 0
ruoyi-common/pom.xml ファイルの表示

@@ -145,6 +145,12 @@
145 145
             <version>3.1.701</version>
146 146
         </dependency>
147 147
 
148
+        <!-- poi-tl-->
149
+        <dependency>
150
+            <groupId>com.deepoove</groupId>
151
+            <artifactId>poi-tl</artifactId>
152
+            <version>1.9.1</version>
153
+        </dependency>
148 154
 
149 155
     </dependencies>
150 156
 

+ 0
- 8
ruoyi-common/src/main/java/com/ruoyi/common/utils/SmsUtils.java ファイルの表示

@@ -74,12 +74,4 @@ public class SmsUtils {
74 74
         private String[] templateParamSet;
75 75
 
76 76
     }
77
-
78
-    public static void main(String[] args) {
79
-        SendSmsRequest sendSmsRequest = new SendSmsRequest();
80
-        sendSmsRequest.setPhone("18792613219");
81
-        sendSmsRequest.setTemplateId("1928003");
82
-        sendSmsRequest.setTemplateParamSet(new String[]{"xxx","仲裁","编号"});
83
-        SmsUtils.sendSms(sendSmsRequest);
84
-    }
85 77
 }

+ 157
- 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/WordUtil.java ファイルの表示

@@ -0,0 +1,157 @@
1
+package com.ruoyi.common.utils;
2
+
3
+
4
+import com.deepoove.poi.XWPFTemplate;
5
+import com.deepoove.poi.config.Configure;
6
+import com.deepoove.poi.data.*;
7
+import com.deepoove.poi.data.style.ParagraphStyle;
8
+import com.deepoove.poi.data.style.Style;
9
+import com.deepoove.poi.util.PoitlIOUtils;
10
+import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
11
+
12
+import javax.servlet.http.HttpServletResponse;
13
+import java.io.BufferedOutputStream;
14
+import java.io.FileOutputStream;
15
+import java.io.IOException;
16
+import java.io.OutputStream;
17
+import java.util.ArrayList;
18
+import java.util.List;
19
+import java.util.Map;
20
+
21
+/**
22
+ * @Author: ymbgy
23
+ * @Date: 2022-09-21 13:26
24
+ */
25
+public class WordUtil {
26
+
27
+    private CellRenderData cell;
28
+
29
+    /**
30
+     * 查询生成的word文件流
31
+     *
32
+     * @param response
33
+     * @param datas
34
+     * @param modalFilePath
35
+     * @param resultFilePath
36
+     * @throws IOException
37
+     */
38
+    public static void getDocStreamFile(HttpServletResponse response, Map<String, Object> datas, String modalFilePath, String resultFilePath, String fileName) throws IOException {
39
+        //获取word模板和填充数据
40
+        XWPFTemplate template = XWPFTemplate.compile(modalFilePath).render(datas);
41
+        //设置返回类型及文件名
42
+        response.setContentType("application/octet-stream");
43
+        response.setHeader("Content-disposition", "attachment;filename=\"" + fileName + "\"");
44
+        //获取返回输出流
45
+        OutputStream out = response.getOutputStream();
46
+        BufferedOutputStream bos = new BufferedOutputStream(out);
47
+        template.write(bos);
48
+        bos.flush();
49
+        out.flush();
50
+        PoitlIOUtils.closeQuietlyMulti(template, bos, out);
51
+    }
52
+
53
+    /**
54
+     * 查询生成的word文件路径
55
+     *
56
+     * @param datas
57
+     * @param modalFilePath
58
+     * @param resultFilePath
59
+     * @return
60
+     * @throws IOException
61
+     */
62
+    public static String getDocFilePath(Map<String, Object> datas, String modalFilePath, String resultFilePath) throws IOException {
63
+        //获取word模板和填充数据
64
+        XWPFTemplate template = XWPFTemplate.compile(modalFilePath).render(datas);
65
+        template.writeAndClose(new FileOutputStream(resultFilePath));
66
+        return resultFilePath;
67
+    }
68
+
69
+    /**
70
+     * 构造绘制表格的方法
71
+     */
72
+    public static TableRenderData rebuildWordTableData(List<String> headerList, String headerBackgroundColor, String textColor, List<List<String>> tableContentList) {
73
+        RowRenderData header = rebuildWordTableHead(headerList, headerBackgroundColor, textColor);
74
+        List<RowRenderData> content = rebuildWordTableContent(tableContentList);
75
+        TableRenderData tableRenderData = Tables.create().addRow(header);
76
+        for (int i = 0; content != null && i < content.size(); i++) {
77
+            tableRenderData.addRow(content.get(i));
78
+        }
79
+        return tableRenderData;
80
+    }
81
+
82
+    /**
83
+     * 构造表格表头
84
+     *
85
+     * @return
86
+     */
87
+    public static RowRenderData rebuildWordTableHead(List<String> headerList, String headerBackgroundColor, String textColor) {
88
+        RowRenderData header = new RowRenderData();
89
+        for (int i = 0; headerList != null && i < headerList.size(); i++) {
90
+            CellRenderData cellRenderData = new CellRenderData();
91
+            ParagraphRenderData paragraphRenderData = new ParagraphRenderData();
92
+            Style style = new Style();
93
+            style.setColor(textColor);
94
+            style.setFontSize(12.0);
95
+            ParagraphStyle paragraphStyle = ParagraphStyle.builder()
96
+                    .withAlign(ParagraphAlignment.CENTER)
97
+                  //  .withBackgroundColor(headerBackgroundColor)
98
+                    .withDefaultTextStyle(style)
99
+                    .build();
100
+            paragraphRenderData.addText(headerList.get(i));
101
+            paragraphRenderData.setParagraphStyle(paragraphStyle);
102
+            cellRenderData.addParagraph(paragraphRenderData);
103
+            header.addCell(cellRenderData);
104
+        }
105
+        return header;
106
+    }
107
+
108
+    /**
109
+     * 构造表格内容
110
+     *
111
+     * @return
112
+     */
113
+    public static List<RowRenderData> rebuildWordTableContent(List<List<String>> tableContentList) {
114
+        List<RowRenderData> rowContentList = new ArrayList<>();
115
+        for (int i = 0; tableContentList != null && i < tableContentList.size(); i++) {
116
+            List<String> rowdataList = tableContentList.get(i);
117
+            RowRenderData rowcontent = new RowRenderData();
118
+            for (int j = 0; rowdataList != null && j < rowdataList.size(); j++) {
119
+                CellRenderData cellRenderData = new CellRenderData();
120
+                ParagraphRenderData paragraphRenderData = new ParagraphRenderData();
121
+                Style style = new Style();
122
+                style.setFontSize(12.0);
123
+                ParagraphStyle paragraphStyle = ParagraphStyle.builder()
124
+                        .withAlign(ParagraphAlignment.CENTER)
125
+                        .withDefaultTextStyle(style)
126
+                        .build();
127
+                paragraphRenderData.addText(rowdataList.get(j));
128
+                paragraphRenderData.setParagraphStyle(paragraphStyle);
129
+                cellRenderData.addParagraph(paragraphRenderData);
130
+                rowcontent.addCell(cellRenderData);
131
+            }
132
+            rowContentList.add(rowcontent);
133
+        }
134
+        return rowContentList;
135
+    }
136
+
137
+    /**
138
+     * 构建图片内容
139
+     */
140
+    public static PictureRenderData rebuildImageContent(Integer with, Integer height, String imageUrl, String relatedPath, Byte[] imageBytes) {
141
+        PictureRenderData pictureRenderData = null;
142
+        if (!StringUtils.isBlank(imageUrl)) {
143
+           // pictureRenderData = Pictures.of(imageUrl).size(with, height).create();
144
+            //Pictures.PictureBuilder pictureBuilder = Pictures.of("https://res.wx.qq.com/a/wx_fed/weixin_portal/res/static/img/1EtCRvm.png");
145
+        }else  if (!StringUtils.isBlank(relatedPath)) {
146
+            pictureRenderData = Pictures.ofLocal(relatedPath).size(with,height).create();
147
+//            Pictures.PictureBuilder pictureBuilder = Pictures.of("https://res.wx.qq.com/a/wx_fed/weixin_portal/res/static/img/1EtCRvm.png");
148
+        }
149
+        return pictureRenderData;
150
+    }
151
+    public static String getResultFilePath(Map<String, Object> datas, Configure config, String modalFilePath, String resultFilePath) throws IOException {
152
+        //获取word模板和填充数据
153
+        XWPFTemplate template = XWPFTemplate.compile(modalFilePath,config).render(datas);
154
+        template.writeAndClose(new FileOutputStream(resultFilePath));
155
+        return resultFilePath;
156
+    }
157
+}

+ 188
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/Adjudication.java ファイルの表示

@@ -0,0 +1,188 @@
1
+package com.ruoyi.wisdomarbitrate.domain;
2
+
3
+import lombok.Data;
4
+
5
+@Data
6
+public class Adjudication {
7
+    /**
8
+     * 申请人姓名
9
+     */
10
+    private String appName;
11
+    /**
12
+     * 申请人性别
13
+     */
14
+    private String appSex;
15
+    /**
16
+     * 申请人身份证号码
17
+     */
18
+    private String appIDNo;
19
+    /**
20
+     * 申请人住所
21
+     */
22
+    private String appAddress;
23
+
24
+    /**
25
+     * 申请人代理人姓名
26
+     */
27
+    private String appAgentName;
28
+    /**
29
+     * 申请人代理人身份证
30
+     */
31
+    private String appAgentIDNo;
32
+    /**
33
+     * 被申请人姓名
34
+     */
35
+    private String resName;
36
+    /**
37
+     * 被申请人性别
38
+     */
39
+    private String resSex;
40
+    /**
41
+     * 被申请人身份证号码
42
+     */
43
+    private String resIDNo;
44
+    /**
45
+     * 被申请人住所
46
+     */
47
+    private String resAddress;
48
+
49
+    /**
50
+     * 被申请人代理人姓名
51
+     */
52
+    private String resAgentName;
53
+    /**
54
+     * 被申请人代理人身份证
55
+     */
56
+    private String resAgentIDNo;
57
+
58
+    /**
59
+     * 案件名称
60
+     */
61
+    private String caseName;
62
+
63
+    /**
64
+     * 仲裁员名称
65
+     */
66
+    private String arbitratorName;
67
+    /**
68
+     * 开庭年
69
+     */
70
+    private String hearYear;
71
+    /**
72
+     * 开庭月
73
+     */
74
+    private String hearMonths;
75
+    /**
76
+     * 开庭日
77
+     */
78
+    private String hearDay;
79
+
80
+    /**
81
+     * 申请人具体仲裁请求
82
+     */
83
+    private String appArbitrationClaims;
84
+
85
+    /**
86
+     * 申请人证据名称
87
+     */
88
+    private String appEvidenceName;
89
+
90
+    /**
91
+     * 申请人拟证事实
92
+     */
93
+    private String appProveFacts;
94
+    /**
95
+     * 被申请人对申请人答辩内容
96
+     */
97
+    private String resDefenseContentToApp;
98
+
99
+    /**
100
+     * 被申请人具体仲裁请求
101
+     */
102
+    private String resArbitrationClaims;
103
+    /**
104
+     * 被申请人证据名称
105
+     */
106
+    private String resEvidenceName;
107
+    /**
108
+     * 被申请人拟证事实
109
+     */
110
+    private String resProveFacts;
111
+    /**
112
+     * 申请人对被申请人答辩内容
113
+     */
114
+    private String appDefenseContentToRes;
115
+    /**
116
+     * 第三人答辩内容
117
+     */
118
+    private String thirdDefenseContent;
119
+    /**
120
+     * 第三人证据名称
121
+     */
122
+    private String thirdEvidenceName;
123
+    /**
124
+     * 第三人拟证事实
125
+     */
126
+    private String thirdProveFacts;
127
+    /**
128
+     * 申请人对第三人答辩内容
129
+     */
130
+    private String appDefenseContentToThird;
131
+    /**
132
+     * 被申请人对第三人答辩内容
133
+     */
134
+    private String resDefenseContentToThird;
135
+    /**
136
+     * 证据认定
137
+     */
138
+    private String evidenDetermi;
139
+    /**
140
+     * 认定事实
141
+     */
142
+    private String factDetermi;
143
+    /**
144
+     * 综上所述
145
+     */
146
+    private String caseSketch;
147
+    /**
148
+     * 本庭认为
149
+     */
150
+    private String arbitrateThink;
151
+    /**
152
+     * 裁决如下
153
+     */
154
+    private String rulingFollows;
155
+    /**
156
+     * 法律条款
157
+     */
158
+    private String legalProvisions;
159
+    /**
160
+     * 首席仲裁
161
+     */
162
+    private String umpire;
163
+    /**
164
+     * 仲裁员1
165
+     */
166
+    private String arbitratorName1;
167
+    /**
168
+     * 仲裁员2
169
+     */
170
+    private String arbitratorName2;
171
+    /**
172
+     * 年
173
+     */
174
+    private String year;
175
+    /**
176
+     * 月
177
+     */
178
+    private String months;
179
+    /**
180
+     * 日
181
+     */
182
+    private String day;
183
+    /**
184
+     * 书记员
185
+     */
186
+    private String clerk;
187
+
188
+}

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/ArbitrateRecord.java ファイルの表示

@@ -26,7 +26,7 @@ public class ArbitrateRecord     extends BaseEntity {
26 26
     /** 审核裁决书意见 */
27 27
     private String checkOpinion;
28 28
     /** 裁决书附件id */
29
-    private Long annexId;
29
+    private Integer annexId;
30 30
 
31 31
 
32 32
 

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAttach.java ファイルの表示

@@ -9,7 +9,7 @@ import lombok.NoArgsConstructor;
9 9
 @Builder
10 10
 @AllArgsConstructor
11 11
 @NoArgsConstructor
12
-public class CaseAttach {
12
+public class  CaseAttach {
13 13
     /**
14 14
      *  附件id
15 15
      */

+ 37
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CaseEvidenceDTO.java ファイルの表示

@@ -0,0 +1,37 @@
1
+package com.ruoyi.wisdomarbitrate.domain.dto;
2
+
3
+import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
4
+import lombok.Data;
5
+
6
+import java.util.List;
7
+
8
+/**
9
+ * 案件质证传入对象
10
+ */
11
+@Data
12
+public class CaseEvidenceDTO {
13
+    /**
14
+     * 案件id
15
+     */
16
+    private Long caseId;
17
+
18
+    /**
19
+     * 是否有异议需要举证,1是,0否
20
+     */
21
+    private Integer objectionAddEviden;
22
+
23
+    /**
24
+     * 是否需要开庭审理,1是,0否
25
+     */
26
+    private Integer openCourtHear;
27
+
28
+    /**
29
+     * 是否指派仲裁员,1是,2否
30
+     */
31
+    private Integer pendingAppointArbotrar;
32
+
33
+    /**
34
+     * 案件仲裁员
35
+     */
36
+    private List<Arbitrator> arbitrators;
37
+}

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CasePayDTO.java ファイルの表示

@@ -2,7 +2,7 @@ package com.ruoyi.wisdomarbitrate.domain.dto;
2 2
 
3 3
 import lombok.Data;
4 4
 /**
5
- * 案件缴费传入参数
5
+ * 案件缴费传入对象
6 6
  */
7 7
 @Data
8 8
 public class CasePayDTO {

+ 8
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/IAdjudicationService.java ファイルの表示

@@ -0,0 +1,8 @@
1
+package com.ruoyi.wisdomarbitrate.service;
2
+
3
+import com.ruoyi.common.core.domain.AjaxResult;
4
+import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5
+
6
+public interface IAdjudicationService {
7
+    AjaxResult createDocument(CaseApplication caseApplication);
8
+}

+ 5
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseArbitrateService.java ファイルの表示

@@ -1,10 +1,13 @@
1 1
 package com.ruoyi.wisdomarbitrate.service;
2 2
 
3 3
 import com.ruoyi.common.core.domain.AjaxResult;
4
+import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
4 5
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5 6
 
6 7
 public interface ICaseArbitrateService {
7
-    AjaxResult chooseArbitrateMethod(CaseApplication caseApplication,Integer arbitratMethod);
8 8
 
9
-    AjaxResult writtenHear(CaseApplication caseApplication, String accidentDescription, String arbitrationResult);
9
+
10
+    AjaxResult writtenHear(ArbitrateRecord arbitrateRecord);
11
+
12
+    AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion);
10 13
 }

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseEvidenceService.java ファイルの表示

@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.service;
3 3
 
4 4
 import com.ruoyi.common.core.domain.AjaxResult;
5 5
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
6
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
6 7
 import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
7 8
 import org.springframework.web.multipart.MultipartFile;
8 9
 
@@ -18,4 +19,5 @@ public interface ICaseEvidenceService {
18 19
 
19 20
     AjaxResult evidenceConfirmation(CaseApplication caseApplication);
20 21
 
22
+    AjaxResult caseCrossexamination(CaseEvidenceDTO caseEvidenceDTO);
21 23
 }

+ 150
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java ファイルの表示

@@ -0,0 +1,150 @@
1
+package com.ruoyi.wisdomarbitrate.service.impl;
2
+
3
+import com.deepoove.poi.config.Configure;
4
+import com.ruoyi.common.core.domain.AjaxResult;
5
+import com.ruoyi.common.utils.WordUtil;
6
+import com.ruoyi.wisdomarbitrate.domain.*;
7
+import com.ruoyi.wisdomarbitrate.mapper.ArbitrateRecordMapper;
8
+import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
9
+import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
10
+import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
11
+import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
12
+import org.apache.poi.xwpf.usermodel.*;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.stereotype.Service;
15
+
16
+import java.io.*;
17
+import java.nio.file.Files;
18
+import java.nio.file.Path;
19
+import java.nio.file.StandardCopyOption;
20
+import java.time.LocalDate;
21
+import java.time.ZoneId;
22
+import java.time.format.DateTimeFormatter;
23
+import java.util.*;
24
+
25
+@Service
26
+public class AdjudicationServiceImpl implements IAdjudicationService {
27
+    @Autowired
28
+    private CaseApplicationMapper caseApplicationMapper;
29
+    @Autowired
30
+    private CaseAffiliateMapper caseAffiliateMapper;
31
+    @Autowired
32
+    private ArbitrateRecordMapper arbitrateRecordMapper;
33
+    @Autowired
34
+    private CaseAttachMapper caseAttachMapper;
35
+
36
+    @Override
37
+    public AjaxResult createDocument(CaseApplication caseApplication) {
38
+        try {
39
+            Map<String, Object> datas = new HashMap<>();
40
+            Adjudication adjudication = new Adjudication();
41
+            Long id = caseApplication.getId();
42
+            if (id == null){
43
+                return null;
44
+            }
45
+            //获取案件详细信息
46
+            CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
47
+            //获取仲裁记录表里的相关信息
48
+            ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
49
+            arbitrateRecord.setCaseAppliId(id);
50
+            ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
51
+
52
+            //获取案件关联人信息
53
+            CaseAffiliate caseAffiliate = new CaseAffiliate();
54
+            caseAffiliate.setCaseAppliId(id);
55
+            List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
56
+            if (caseAffiliates != null && caseAffiliates.size() > 0){
57
+                for (CaseAffiliate affiliate : caseAffiliates){
58
+                    //获取身份类型
59
+                    int identityType = affiliate.getIdentityType();
60
+                    if (identityType == 1) {    //申请人
61
+                        datas.put("appName", affiliate.getName());
62
+                        datas.put("appSex", null);
63
+                        datas.put("appIDNo", affiliate.getIdentityNum());
64
+                        datas.put("appAddress", affiliate.getContactAddress());
65
+                        datas.put("appAgentName", affiliate.getNameAgent());
66
+                        datas.put("appAgentIDNo",affiliate.getIdentityNumAgent());
67
+                    }else if (identityType == 2){  //被申请人
68
+                        datas.put("resName", affiliate.getName());
69
+                        datas.put("resSex", null);
70
+                        datas.put("resIDNo", affiliate.getIdentityNum());
71
+                        datas.put("resAddress", affiliate.getContactAddress());
72
+                        datas.put("resAgentName", affiliate.getNameAgent());
73
+                        datas.put("resAgentIDNo",affiliate.getIdentityNumAgent());
74
+                    }
75
+                }
76
+            }
77
+            String arbitratorName = caseApplication1.getArbitratorName();
78
+            datas.put("caseName",caseApplication1.getCaseName());
79
+            datas.put("arbitratorName",arbitratorName);
80
+            LocalDate localDate = caseApplication1.getHearDate()
81
+                    .toInstant()
82
+                    .atZone(ZoneId.systemDefault())
83
+                    .toLocalDate();
84
+            datas.put("hearYear",  localDate.getYear());
85
+            datas.put("hearMonths",  localDate.getMonthValue());
86
+            datas.put("hearDay",  localDate.getDayOfMonth());
87
+            datas.put("appArbitrationClaims", null);
88
+            datas.put("appEvidenceName", null);
89
+            datas.put("appProveFacts", null);
90
+            datas.put("resDefenseContentToApp", null);
91
+            datas.put("resArbitrationClaims", null);
92
+            datas.put("resEvidenceName", null);
93
+            datas.put("resProveFacts", null);
94
+            datas.put("appDefenseContentToRes", null);
95
+            datas.put("evidenDetermi", arbitrateRecord1.getEvidenDetermi());
96
+            datas.put("factDetermi", arbitrateRecord1.getFactDetermi());
97
+            datas.put("caseSketch", arbitrateRecord1.getCaseSketch());
98
+            datas.put("arbitrateThink", arbitrateRecord1.getArbitrateThink());
99
+            datas.put("legalProvisions", null);
100
+            datas.put("rulingFollows", arbitrateRecord1.getRulingFollows());
101
+            datas.put("umpire", null);
102
+            if (arbitratorName.contains(",")){
103
+                String[] nameArray = arbitratorName.split(",");
104
+                String firstName = nameArray[0];
105
+                String secondName = nameArray[1];
106
+                datas.put("arbitratorName1", firstName);
107
+                datas.put("arbitratorName2", secondName);
108
+            }else {
109
+                String secondName = "";
110
+                datas.put("arbitratorName1", arbitratorName);
111
+                datas.put("arbitratorName2", secondName);
112
+            }
113
+            LocalDate now = LocalDate.now();
114
+            datas.put("year", now.getYear());
115
+            datas.put("months", now.getMonthValue());
116
+            datas.put("day", now.getDayOfMonth());
117
+            datas.put("clerk", null);
118
+            String modalFilePath = "/data/arbitrate-document/template/仲裁裁决书模板.docx";
119
+
120
+            String currentDateStr = now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
121
+            String saveFolderPath = "/data/arbitrate-document/formal/" + currentDateStr;
122
+            // 创建日期目录
123
+            File saveFolder = new File(saveFolderPath);
124
+            if (!saveFolder.exists()) {
125
+                saveFolder.mkdirs();
126
+            }
127
+            String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
128
+            String resultFilePath = saveFolderPath+ fileName;
129
+            String docFilePath = WordUtil.getDocFilePath(datas, modalFilePath, resultFilePath);
130
+            //将裁决书保存到附件表里
131
+            CaseAttach caseAttach = CaseAttach.builder()
132
+                    .caseAppliId(id)
133
+                    .annexName(fileName)
134
+                    .annexPath(docFilePath)
135
+                    .annexType(3)
136
+                    .build();
137
+            int i = caseAttachMapper.save(caseAttach);
138
+            if (i>0){
139
+                Integer annexId = caseAttach.getAnnexId();
140
+                //将附件id保存到仲裁记录表里面
141
+                arbitrateRecord1.setAnnexId(annexId);
142
+                arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord1);
143
+            }
144
+            return AjaxResult.success("裁决书保存路径为" + docFilePath);
145
+        } catch (IOException e) {
146
+            e.printStackTrace();
147
+        }
148
+        return null;
149
+    }
150
+}

+ 1
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CallBackHandleServiceImpl.java ファイルの表示

@@ -13,6 +13,7 @@ import org.springframework.stereotype.Component;
13 13
 public class CallBackHandleServiceImpl implements CallBackService {
14 14
     @Autowired
15 15
     private CasePaymentServiceImpl casePaymentService;
16
+    
16 17
     @Override
17 18
     public void successPay(String orderSn) {
18 19
         casePaymentService.callback(orderSn);

+ 58
- 47
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java ファイルの表示

@@ -3,9 +3,11 @@ package com.ruoyi.wisdomarbitrate.service.impl;
3 3
 import com.ruoyi.common.constant.CaseApplicationConstants;
4 4
 import com.ruoyi.common.core.domain.AjaxResult;
5 5
 import com.ruoyi.common.utils.SmsUtils;
6
+import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
6 7
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
7 8
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
8 9
 import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
10
+import com.ruoyi.wisdomarbitrate.mapper.ArbitrateRecordMapper;
9 11
 import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
10 12
 import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
11 13
 import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
@@ -24,70 +26,79 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
24 26
     private CaseAffiliateMapper caseAffiliateMapper;
25 27
     @Autowired
26 28
     private CaseLogRecordMapper caseLogRecordMapper;
29
+    @Autowired
30
+    private ArbitrateRecordMapper arbitrateRecordMapper;
27 31
 
28 32
     @Override
29 33
     @Transactional
30
-    public AjaxResult chooseArbitrateMethod(CaseApplication caseApplication, Integer arbitratMethod) {
31
-        if (arbitratMethod != null) {
32
-            String arbitratMethodStr = arbitratMethod == 1 ? "开庭审理" : "书面审理";
33
-            //查询案件详细信息
34
-            CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
35
-            if (caseApplication1 == null) {
36
-                return AjaxResult.error();
34
+    public AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion) {
35
+        //查询案件详细信息
36
+        CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
37
+        if (caseApplication1 == null) {
38
+            return AjaxResult.error();
39
+        }
40
+        int arbitratMethod = caseApplication1.getArbitratMethod();
41
+        String caseNum = caseApplication1.getCaseNum();
42
+        if (opinion==0){   //拒绝
43
+            if (arbitratMethod == 2){
44
+                caseApplication1.setArbitratMethod(1);  // 更改仲裁方式
45
+            }else {
46
+                caseApplication1.setArbitratMethod(2);
37 47
             }
38
-            String caseNum = caseApplication1.getCaseNum();
39
-            //选择仲裁方式
40
-            caseApplication.setArbitratMethod(arbitratMethod);
41
-            //修改案件状态为待开庭
42
-            caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
43
-            int i = caseApplicationMapper.submitCaseApplication(caseApplication);
44
-            if (i > 0) {
45
-                //发送短信通知
46
-                SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
47
-                request.setTemplateId("1931000");
48
-                CaseAffiliate caseAffiliate = new CaseAffiliate();
49
-                caseAffiliate.setCaseAppliId(caseApplication1.getId());
50
-                List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);            //获取案件关联人信息
51
-                if (caseAffiliates != null && caseAffiliates.size() > 0) {
52
-                    for (CaseAffiliate affiliate : caseAffiliates) {
53
-                        //获取身份类型
54
-                        int identityType = affiliate.getIdentityType();
55
-                        if (identityType == 1) {    //申请人
56
-                            request.setPhone(affiliate.getContactTelphone());
57
-                            // 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
58
-                            // 1931000 普通短信 确定仲裁方式通知 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
59
-                            String name = affiliate.getName();
60
-                            request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
61
-                            SmsUtils.sendSms(request);
62
-                        } else {       //被申请人
63
-                            request.setPhone(affiliate.getContactTelphone());
64
-                            // 模板id1928006 普通短信 案件应诉通知 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击https://phmapp.xayunmei.com选择是否应诉。
65
-                            String name = affiliate.getName();
66
-                            request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
67
-                            SmsUtils.sendSms(request);
68
-                        }
48
+        }
49
+        //修改案件状态为待开庭
50
+        caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
51
+        int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
52
+        if (i > 0) {
53
+            String arbitratMethodStr = caseApplication1.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
54
+            //发送短信通知
55
+            SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
56
+            request.setTemplateId("1931000");
57
+            CaseAffiliate caseAffiliate = new CaseAffiliate();
58
+            caseAffiliate.setCaseAppliId(caseApplication1.getId());
59
+            List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);            //获取案件关联人信息
60
+            if (caseAffiliates != null && caseAffiliates.size() > 0) {
61
+                for (CaseAffiliate affiliate : caseAffiliates) {
62
+                    //获取身份类型
63
+                    int identityType = affiliate.getIdentityType();
64
+                    if (identityType == 1) {    //申请人
65
+                        request.setPhone(affiliate.getContactTelphone());
66
+                        // 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
67
+                        // 1931000 普通短信 确定仲裁方式通知 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
68
+                        String name = affiliate.getName();
69
+                        request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
70
+                        SmsUtils.sendSms(request);
71
+                    } else {       //被申请人
72
+                        request.setPhone(affiliate.getContactTelphone());
73
+                        // 模板id1928006 普通短信 案件应诉通知 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击https://phmapp.xayunmei.com选择是否应诉。
74
+                        String name = affiliate.getName();
75
+                        request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
76
+                        SmsUtils.sendSms(request);
69 77
                     }
70 78
                 }
71
-                return AjaxResult.success("选择成功");
72 79
             }
73
-
80
+            return AjaxResult.success("审核成功");
74 81
         }
75
-        return AjaxResult.error("请选择开庭方式");
82
+        return AjaxResult.error();
76 83
     }
77 84
 
78 85
     @Override
79
-    public AjaxResult writtenHear(CaseApplication caseApplication, String accidentDescription, String arbitrationResult) {
80
-        //提交仲裁结果
86
+    public AjaxResult writtenHear(ArbitrateRecord arbitrateRecord) {
87
+        //查询案件详情
88
+        CaseApplication caseApplication = new CaseApplication();
89
+        caseApplication.setId(arbitrateRecord.getCaseAppliId());
81 90
         CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
82
-        caseApplication1.setCaseDescribe(accidentDescription); //案情描述
83
-        caseApplication1.setCaseResult(arbitrationResult);  //仲裁结果
84
-        int i = caseApplicationMapper.updataCaseApplication(caseApplication1);
91
+        String createBy = caseApplication1.getCreateBy();
92
+        if (createBy!=null){
93
+            arbitrateRecord.setCreateBy(createBy);
94
+        }
95
+        //提交仲裁结果
96
+        int i =  arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecord);
85 97
         if (i>0){
86 98
             //案件日志表里添加数据
87 99
             CaseLogRecord caseLogRecord = new CaseLogRecord();
88 100
             caseLogRecord.setCaseAppliId(caseApplication1.getId());
89 101
             caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
90
-            String createBy = caseApplication1.getCreateBy();
91 102
             if (createBy!=null){
92 103
                 caseLogRecord.setCreateBy(createBy);
93 104
             }

+ 63
- 22
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java ファイルの表示

@@ -4,15 +4,11 @@ import com.ruoyi.common.config.RuoYiConfig;
4 4
 import com.ruoyi.common.constant.CaseApplicationConstants;
5 5
 import com.ruoyi.common.core.domain.AjaxResult;
6 6
 import com.ruoyi.common.utils.file.FileUploadUtils;
7
-import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
8
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
9
-import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
7
+import com.ruoyi.wisdomarbitrate.domain.*;
8
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
10 9
 import com.ruoyi.wisdomarbitrate.domain.vo.CaseDetailVO;
11 10
 import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
12
-import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
13
-import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
14
-import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
15
-import com.ruoyi.wisdomarbitrate.mapper.CaseEvidenceMapper;
11
+import com.ruoyi.wisdomarbitrate.mapper.*;
16 12
 import com.ruoyi.wisdomarbitrate.service.ICaseEvidenceService;
17 13
 import org.springframework.beans.BeanUtils;
18 14
 import org.springframework.beans.factory.annotation.Autowired;
@@ -21,12 +17,9 @@ import org.springframework.transaction.annotation.Transactional;
21 17
 import org.springframework.web.multipart.MultipartFile;
22 18
 
23 19
 import java.io.IOException;
24
-import java.time.LocalDate;
25
-import java.time.LocalDateTime;
26
-import java.time.format.DateTimeFormatter;
27
-import java.util.ArrayList;
28 20
 import java.util.Arrays;
29 21
 import java.util.List;
22
+import java.util.stream.Collectors;
30 23
 
31 24
 @Service
32 25
 public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
@@ -38,10 +31,12 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
38 31
     private CaseApplicationMapper caseApplicationMapper;
39 32
     @Autowired
40 33
     private CaseAttachMapper caseAttachMapper;
34
+    @Autowired
35
+    private CaseLogRecordMapper caseLogRecordMapper;
41 36
 
42 37
     @Override
43 38
     @Transactional
44
-    public AjaxResult getCaseDetailsById(Long id,String userName) {
39
+    public AjaxResult getCaseDetailsById(Long id, String userName) {
45 40
         CaseApplication caseApplication = new CaseApplication();
46 41
         caseApplication.setId(id);
47 42
         CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
@@ -52,10 +47,12 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
52 47
             caseAffiliate.setCaseAppliId(id);
53 48
             List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
54 49
             for (CaseAffiliate affiliate : caseAffiliates) {
55
-                String name = affiliate.getName();
56
-                //判断当前登录人和案件关联人姓名是否一致
57
-                if (name.equals(userName)) {  //一致,将案件关联人的身份类型赋给当前登录人
58
-                    caseDetailVO.setIdentityType(affiliate.getIdentityType());
50
+                if (affiliate.getName() != null) {
51
+                    String name = affiliate.getName();
52
+                    //判断当前登录人和案件关联人姓名是否一致
53
+                    if (name.equals(userName)) {  //一致,将案件关联人的身份类型赋给当前登录人
54
+                        caseDetailVO.setIdentityType(affiliate.getIdentityType());
55
+                    }
59 56
                 }
60 57
                 if (affiliate.getIdentityType() == 1) {  //申请人
61 58
                     caseDetailVO.setApplicantName(affiliate.getName());
@@ -64,13 +61,13 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
64 61
                 }
65 62
                 //根据案件id查询案件证据材料
66 63
                 List<CaseAttach> evidenceMaterialList = caseAttachMapper.queryAnnexPathByCaseId(id);
67
-                if (evidenceMaterialList!=null&&evidenceMaterialList.size()>0){
64
+                if (evidenceMaterialList != null && evidenceMaterialList.size() > 0) {
68 65
                     for (CaseAttach caseAttach : evidenceMaterialList) {
69
-                        String path =caseAttach.getAnnexName();
66
+                        String path = caseAttach.getAnnexName();
70 67
                         String prefix = "/profile";
71 68
                         int startIndex = path.indexOf(prefix);
72 69
                         startIndex += prefix.length();
73
-                        String extractedPath = "/uploadPath"+path.substring(startIndex);
70
+                        String extractedPath = "/uploadPath" + path.substring(startIndex);
74 71
                         caseAttach.setAnnexPath(extractedPath);
75 72
                     }
76 73
                 }
@@ -116,10 +113,9 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
116 113
     }
117 114
 
118 115
 
119
-
120 116
     @Override
121 117
     public List<CaseEvidenceVO> getCaseListAll(String identityNum) {
122
-        List<Integer> caseStatusList = Arrays.asList(3, 4, 5, 9);
118
+        List<Integer> caseStatusList = Arrays.asList(CaseApplicationConstants.CASE_CROSSEXAMI);
123 119
         return getCaseEvidenceVOList(identityNum, caseStatusList, null);
124 120
     }
125 121
 
@@ -127,12 +123,57 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
127 123
     public AjaxResult evidenceConfirmation(CaseApplication caseApplication) {
128 124
         caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_TRIAL);
129 125
         int i = caseApplicationMapper.submitCaseApplication(caseApplication);
130
-        if (i>0){
126
+        if (i > 0) {
131 127
             return AjaxResult.success("证据确认成功");
132 128
         }
133 129
         return AjaxResult.error("暂无需要确认的证据");
134 130
     }
135 131
 
132
+    @Override
133
+    public AjaxResult caseCrossexamination(CaseEvidenceDTO caseEvidenceDTO) {
134
+        //查询案件详细信息
135
+        CaseApplication caseApplication = new CaseApplication();
136
+        caseApplication.setId(caseEvidenceDTO.getCaseId());
137
+        CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
138
+        if (caseApplication1 != null) {
139
+            int caseStatus = caseApplication1.getCaseStatus();
140
+            caseApplication1.setObjectionAddEviden(caseEvidenceDTO.getObjectionAddEviden());
141
+            caseApplication1.setOpenCourtHear(caseEvidenceDTO.getOpenCourtHear());
142
+            caseApplication1.setPendingAppointArbotrar(caseEvidenceDTO.getPendingAppointArbotrar());
143
+            List<Arbitrator> arbitrators = caseEvidenceDTO.getArbitrators();
144
+            if (arbitrators != null && arbitrators.size() > 0) {
145
+                List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
146
+                List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
147
+                String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
148
+                String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
149
+                caseApplication1.setArbitratorId(idstr);
150
+                caseApplication1.setArbitratorName(arbitratorNamestr);
151
+            }
152
+            //修改案件状态
153
+            caseApplication1.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT);
154
+            //选择仲裁方式
155
+            if (caseEvidenceDTO.getOpenCourtHear()==1){   //开庭审理
156
+                caseApplication1.setArbitratMethod(1);
157
+            }else {
158
+                caseApplication1.setArbitratMethod(2);  //书面审理
159
+            }
160
+            int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
161
+            if (i > 0) {
162
+                //案件日志表里添加数据
163
+                CaseLogRecord caseLogRecord = new CaseLogRecord();
164
+                caseLogRecord.setCaseAppliId(caseApplication1.getId());
165
+                caseLogRecord.setCaseNode(caseStatus);
166
+                String createBy = caseApplication1.getCreateBy();
167
+                if (createBy != null) {
168
+                    caseLogRecord.setCreateBy(createBy);
169
+                }
170
+                caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
171
+                return AjaxResult.success("提交成功");
172
+            }
173
+        }
174
+        return null;
175
+    }
176
+
136 177
     private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
137 178
         List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType);
138 179
         if (caseListByRespondent != null && caseListByRespondent.size() > 0) {

+ 1
- 1
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml ファイルの表示

@@ -13,7 +13,7 @@
13 13
         <result property="userId"     column="use_id"    />
14 14
         <result property="userName"     column="use_account"    />
15 15
     </resultMap>
16
-    <insert id="save">
16
+    <insert id="save" useGeneratedKeys="true" keyProperty="annexId">
17 17
         INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account)
18 18
         VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName})
19 19
     </insert>