Просмотр исходного кода

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

qitz 2 лет назад
Родитель
Сommit
4ab85a5d23

+ 0
- 372
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/TestPOIController.java Просмотреть файл

@@ -1,372 +0,0 @@
1
-package com.ruoyi.web.controller.wisdomarbitrate;
2
-
3
-import cn.hutool.core.io.resource.ClassPathResource;
4
-import com.deepoove.poi.XWPFTemplate;
5
-import com.deepoove.poi.data.PictureRenderData;
6
-import com.ruoyi.common.constant.CaseApplicationConstants;
7
-import com.ruoyi.common.core.domain.AjaxResult;
8
-import com.ruoyi.common.core.redis.RedisCache;
9
-import com.ruoyi.common.utils.EmailOutUtil;
10
-import com.ruoyi.common.utils.WordUtil;
11
-import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
12
-import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
13
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
14
-import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
15
-import com.ruoyi.wisdomarbitrate.mapper.*;
16
-import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
17
-import com.ruoyi.wisdomarbitrate.service.ICaseLogRecordService;
18
-import org.apache.poi.util.Units;
19
-import org.apache.poi.xwpf.usermodel.Document;
20
-import org.apache.poi.xwpf.usermodel.XWPFDocument;
21
-import org.apache.poi.xwpf.usermodel.XWPFParagraph;
22
-import org.apache.poi.xwpf.usermodel.XWPFRun;
23
-import org.springframework.beans.factory.annotation.Autowired;
24
-import org.springframework.web.bind.annotation.GetMapping;
25
-import org.springframework.web.bind.annotation.RequestBody;
26
-import org.springframework.web.bind.annotation.RequestMapping;
27
-import org.springframework.web.bind.annotation.RestController;
28
-
29
-import javax.imageio.ImageIO;
30
-import java.awt.image.BufferedImage;
31
-import java.io.*;
32
-import java.nio.file.Files;
33
-import java.nio.file.Path;
34
-import java.nio.file.StandardCopyOption;
35
-import java.text.SimpleDateFormat;
36
-import java.time.LocalDate;
37
-import java.util.*;
38
-
39
-@RestController
40
-@RequestMapping
41
-public class TestPOIController {
42
-
43
-    @Autowired
44
-    private CaseApplicationMapper caseApplicationMapper;
45
-    @Autowired
46
-    private CaseAffiliateMapper caseAffiliateMapper;
47
-    @Autowired
48
-    private ArbitrateRecordMapper arbitrateRecordMapper;
49
-    @Autowired
50
-    private CaseAttachMapper caseAttachMapper;
51
-    @Autowired
52
-    private RedisCache redisCache;
53
-    @Autowired
54
-    private SendMailRecordMapper sendMailRecordMapper;
55
-
56
-    @GetMapping("/test")
57
-    public AjaxResult createDocument(@RequestBody CaseApplication caseApplication) {
58
-        try {
59
-            Map<String, Object> datas = new HashMap<>();
60
-            Long id = caseApplication.getId();
61
-            if (id == null) {
62
-                return null;
63
-            }
64
-            //获取案件详细信息
65
-            CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
66
-            //生成编码
67
-            String equipmentNo = getNewEquipmentNo();
68
-            datas.put("num", equipmentNo);
69
-            //获取仲裁记录表里的相关信息
70
-            ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
71
-            arbitrateRecord.setCaseAppliId(id);
72
-            ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
73
-            //获取案件关联人信息
74
-            CaseAffiliate caseAffiliate = new CaseAffiliate();
75
-            caseAffiliate.setCaseAppliId(id);
76
-            List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
77
-            List<String> nameAgentList = new ArrayList<>();
78
-            if (caseAffiliates != null && caseAffiliates.size() > 0) {
79
-                for (CaseAffiliate affiliate : caseAffiliates) {
80
-                    //获取身份类型
81
-                    int identityType = affiliate.getIdentityType();
82
-                    if (identityType == 1) {    //申请人
83
-                        datas.put("appName", affiliate.getName());
84
-                        datas.put("appAddress", affiliate.getResidenAffili());
85
-                        datas.put("appContactAddress", affiliate.getContactAddress());
86
-                        datas.put("appLegalPerson", affiliate.getCompLegalPerson());
87
-                        datas.put("appLegalPersonTitle", affiliate.getCompLegalperPost());
88
-                        datas.put("appAgentName", affiliate.getNameAgent());
89
-                        datas.put("appAgentTitle", affiliate.getAppliAgentTitle());
90
-                        nameAgentList.add(affiliate.getNameAgent());
91
-                    } else if (identityType == 2) {  //被申请人
92
-                        datas.put("resName", affiliate.getName());
93
-                        datas.put("resAddress", affiliate.getResidenAffili());
94
-                        String responSex = affiliate.getResponSex();
95
-                        if (responSex.equals("0")){
96
-                            datas.put("resSex","男");
97
-                        }else{
98
-                            datas.put("resSex","女");
99
-                        }
100
-                        Date responBirth = affiliate.getResponBirth();
101
-                        if (responBirth != null) {
102
-                            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
103
-                            String responBirthStr = sdf.format(responBirth);
104
-                            datas.put("resDateOfBirth", responBirthStr);
105
-
106
-                        }
107
-                        datas.put("resContactAddress", affiliate.getContactAddress());
108
-                        nameAgentList.add(affiliate.getNameAgent());
109
-                    }
110
-                }
111
-            }
112
-            Date createTime = caseApplication1.getCreateTime();
113
-            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
114
-            // 将日期格式化为字符串
115
-            String createTimeStr = sdf.format(createTime);
116
-            datas.put("submissionDate", createTimeStr);
117
-            Date registerDate = caseApplication1.getRegisterDate();
118
-            String registerDateStr = sdf.format(registerDate);
119
-            datas.put("acceptDate", registerDateStr);
120
-            //反请求
121
-            Integer adjudicaCounter = caseApplication1.getAdjudicaCounter();
122
-            String counterclaim = "在《2022年版仲裁规则》第十八条第(一)项规定的期限内,被申请人向秘书处提交了" +
123
-                    "《仲裁反请求申请书》及证据材料。仲裁委依据《2022年版仲裁规则》第十八条的规定受理了该仲裁反请求案申请。" +
124
-                    "仲裁反请求案件受理后,秘书处向被申请人发送了仲裁反请求通知书及附件,向申请人发送了仲裁反请求通知书及附件、仲裁反请求申请书及附件。";
125
-            if (adjudicaCounter == null) {
126
-                datas.put("counterclaim", null);
127
-            } else if (adjudicaCounter == 1) {
128
-                datas.put("counterclaim", counterclaim);
129
-            } else {
130
-                datas.put("counterclaim", null);
131
-            }
132
-            //财产保全
133
-            Integer properPreser = caseApplication1.getProperPreser();
134
-            String preservation = "本案受理后,申请人向仲裁委提交了财产保全申请,仲裁委根据《中华人民共和国仲裁法》" +
135
-                    "第二十八条之规定,将该申请提交至法院。";
136
-            if (properPreser == null) {
137
-                datas.put("preservation", null);
138
-            } else if (properPreser == 1) {
139
-                datas.put("preservation", preservation);
140
-            } else {
141
-                datas.put("preservation", null);
142
-            }
143
-            //管辖权异议
144
-            Integer objectiJuris = caseApplication1.getObjectiJuris();
145
-            String jurisdictionalObjection = "本案受理后,被申请人向仲裁委提交了《XX管辖异议申请书》,认为XXXXXX" +
146
-                    ",仲裁委经审理,当庭驳回了被申请人的管辖异议申请,并告知被申请人具体的事实和理由将在裁决书中一并列明。";
147
-            if (objectiJuris == null) {
148
-                datas.put("jurisdictionalObjection", null);
149
-            } else if (objectiJuris == 1) {
150
-                datas.put("jurisdictionalObjection", jurisdictionalObjection);
151
-            } else {
152
-                datas.put("jurisdictionalObjection", null);
153
-            }
154
-            String arbitratorName = caseApplication1.getArbitratorName();
155
-            datas.put("arbitratorName", arbitratorName);
156
-            Integer arbitratMethod = caseApplication1.getArbitratMethod();
157
-            Date hearDate = caseApplication1.getHearDate();
158
-            if (hearDate != null) {
159
-                String hearDateStr = sdf.format(hearDate);
160
-                //线上开庭时
161
-                if (arbitratMethod == 1) {
162
-                    String onLine1 = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于";
163
-                    String onLine2 = "通过仲裁委智慧仲裁平台开庭审理了本案。";
164
-                    datas.put("onLine1", onLine1);
165
-                    datas.put("hearDate", hearDateStr);
166
-                    datas.put("onLine2", onLine2);
167
-                } else {
168
-                    //书面仲裁时
169
-                    String written1 = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于";
170
-                    String written2 = "在仲裁委所在地开庭审理了本案。";
171
-                    datas.put("written1", written1);
172
-                    datas.put("hearDate1", hearDateStr);
173
-                    datas.put("written2", written2);
174
-                }
175
-            }
176
-            Integer isAbsence = caseApplication1.getIsAbsence();
177
-            if (isAbsence == null) {
178
-                datas.put("absent1", null);
179
-                datas.put("absent2", null);
180
-                datas.put("absent3", null);
181
-                datas.put("absent4", null);
182
-                datas.put("absent5", null);
183
-                datas.put("attend1", null);
184
-                datas.put("attend2", null);
185
-                datas.put("attend3", null);
186
-                datas.put("attend4", null);
187
-                datas.put("attend5", null);
188
-                datas.put("attend6", null);
189
-                datas.put("attend7", null);
190
-                datas.put("appAgentName1", null);
191
-                datas.put("appAgentName2", null);
192
-                datas.put("resAgentName", null);
193
-            } else if (isAbsence == 1) {
194
-                //缺席审理
195
-                String absent1 = "申请人的特别授权委托代理人";
196
-                String absent2 = "出席了庭审。被申请人经依法送达开庭通知,无正当理由未出席庭审,故仲裁庭依据" +
197
-                        "《2022年版仲裁规则》第四十条第(二)项的规定,对本案进行了缺席审理。";
198
-                String absent3 = "庭审中,申请人陈述了仲裁请求事项及事实与理由,出示了证据材料并进行了说明," +
199
-                        "发表了意见,回答了仲裁庭的提问,并作了最后陈述。因被申请人缺席庭审,故仲裁庭无法组织调解。";
200
-                String absent4 = "(二/三)当事人提供的证据材料\n" +
201
-                        "申请人为证明其主张的事实和理由,向仲裁庭提交了如下证据材料:";
202
-                String absent5 = "综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
203
-                        "第四十条第(二)项、第五十一条的规定,缺席裁决如下:";
204
-                datas.put("absent1", absent1);
205
-                datas.put("absent2", absent2);
206
-                datas.put("absent3", absent3);
207
-                datas.put("absent4", absent4);
208
-                datas.put("absent5", absent5);
209
-                datas.put("appAgentName1", nameAgentList.get(0));
210
-            } else {
211
-                //出席审理
212
-                String attend1 = "申请人的特别授权委托代理人";
213
-                String attend2 = "和被申请人本人/的特别授权委托代理人";
214
-                String attend3 = "出席了庭审。";
215
-                String attend4 = "庭审中,申请人陈述了仲裁请求事项及所依据的事实与理由,被申请人进行了答辩;" +
216
-                        "双方当事人均出示了证据材料并对对方的证据材料进行了质证;申请人出示了证据材料," +
217
-                        "被申请人对对方的证据材料进行了质证;双方当事人均回答了仲裁庭的提问,进行了辩论," +
218
-                        "并分别作了最后陈述。双方当事人在仲裁庭的主持下进行了调解,但未能达成调解协议。";
219
-                String attend5 = "(二)被申请人的答辩意见";
220
-                String attend6 = "(二/三)当事人提供的证据材料及对方的质证意见\n" +
221
-                        "申请人为证明其主张的事实和理由,向仲裁庭提交了如下证据材料:";
222
-                String attend7 = "被申请人对上述材料的质证意见为:";
223
-                datas.put("attend1", attend1);
224
-                datas.put("attend2", attend2);
225
-                datas.put("attend3", attend3);
226
-                datas.put("attend4", attend4);
227
-                datas.put("attend5", attend5);
228
-                datas.put("attend6", attend6);
229
-                datas.put("attend7", attend7);
230
-                datas.put("responCrossOpin", caseApplication1.getResponCrossOpin());
231
-                datas.put("appAgentName2", nameAgentList.get(0));
232
-                datas.put("resAgentName", nameAgentList.get(1));
233
-                if (arbitratMethod == 1) {
234
-                    //被申出席+开庭
235
-                    String attend8 = "综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
236
-                            "第五十一条的规定,裁决如下:";
237
-                    datas.put("attend8", attend8);
238
-                } else {
239
-                    //被申出席+书面
240
-                    String attend9 = "综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
241
-                            "第五十一条、第五十八条的规定,裁决如下:";
242
-                    datas.put("attend9", attend9);
243
-                }
244
-            }
245
-            datas.put("claims", caseApplication1.getArbitratClaims());
246
-            datas.put("request", caseApplication1.getRequestRule());
247
-            //申请人证据材料
248
-            datas.put("appEvidenceMaterial", null);
249
-            //被申请人证据材料
250
-
251
-            PictureRenderData pictureRenderData = WordUtil.rebuildImageContent(100, 100, null, "D:\\develop\\Snipaste_2023-10-27_09-59-23.jpg");
252
-            datas.put("resEvidenceMaterial", "证据详情可查询附件");
253
-            datas.put("applicaCrossOpin", caseApplication1.getApplicaCrossOpin());
254
-            if (arbitrateRecord1 != null) {
255
-                datas.put("factDetermi", arbitrateRecord1.getFactDetermi());
256
-                datas.put("arbitrateThink", arbitrateRecord1.getArbitrateThink());
257
-                datas.put("rulingFollows", arbitrateRecord1.getRulingFollows());
258
-            }
259
-            LocalDate now = LocalDate.now();
260
-            String year = Integer.toString(now.getYear());
261
-            datas.put("year", year);
262
-            String month = String.format("%02d", now.getMonthValue());
263
-            String day = String.format("%02d", now.getDayOfMonth());
264
-            //String modalFilePath = "/data/arbitrate-document/template/新裁决书模板.docx";
265
-            String modalFilePath = "D:/develop/新裁决书模板.docx";
266
-            //String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
267
-            String saveFolderPath = "D:/data/" + year + "/" + month + "/" + day;
268
-            String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
269
-            String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
270
-            String resultFilePath = saveFolderPath + "/" + fileName;
271
-            // 创建日期目录
272
-            File saveFolder = new File(saveFolderPath);
273
-            if (!saveFolder.exists()) {
274
-                saveFolder.mkdirs();
275
-            }
276
-            Path sourcePath = new File(modalFilePath).toPath();
277
-            Path destinationPath = new File(resultFilePath).toPath();
278
-            Files.copy(sourcePath, destinationPath, StandardCopyOption.REPLACE_EXISTING);
279
-            String docFilePath = WordUtil.getDocFilePath(datas, modalFilePath, resultFilePath);
280
-            File file = new File(docFilePath);
281
-            if (file.exists()) {
282
-                InputStream in = new FileInputStream(file);
283
-                XWPFDocument xwpfDocument = new XWPFDocument(in);
284
-                WordUtil.changeText(xwpfDocument);
285
-            }
286
-            String savePath = docFilePath.substring(0, docFilePath.indexOf("/upload/") + 8);
287
-            CaseAttach caseAttach = CaseAttach.builder()
288
-                    .caseAppliId(id)
289
-                    .annexName(saveName)
290
-                    .annexPath(savePath)
291
-                    .annexType(3)
292
-                    .build();
293
-            //保存到附件表里,先判断之前有没有,有的话更新,没有的话新增
294
-            List<CaseAttach> caseAttachList = caseAttachMapper.getCaseAttachByCaseIdAndType(caseAttach);
295
-            if (caseAttachList != null && caseAttachList.size() > 0) {
296
-                //之前已经生成过了,更新
297
-                int i = caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
298
-            } else {
299
-                //之前没生成过,新增
300
-                int i = caseAttachMapper.save(caseAttach);
301
-                if (i > 0) {
302
-                    if (arbitrateRecord1 != null) {
303
-                        Integer annexId = caseAttach.getAnnexId();
304
-                        //将附件id保存到仲裁记录表里面
305
-                        arbitrateRecord1.setAnnexId(annexId);
306
-                        arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord1);
307
-                    }
308
-                }
309
-            }
310
-            //修改案件状态
311
-            caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
312
-            caseApplicationMapper.submitCaseApplication(caseApplication1);
313
-            return AjaxResult.success("裁决书已生成");
314
-        } catch (IOException e) {
315
-            return AjaxResult.error(e + "请检查文件路径是否有误");
316
-        }
317
-    }
318
-
319
-    public String getNewEquipmentNo() {
320
-        Object awardNum = redisCache.getCacheObject("awardNum");
321
-        if (awardNum == null) {
322
-            redisCache.setCacheObject("awardNum", "00001");
323
-            String s = redisCache.getCacheObject("awardNum").toString();
324
-            // 字符串数字解析为整数
325
-            int no = Integer.parseInt(s);
326
-            // 最新设备编号自增1
327
-            int newEquipment = ++no;
328
-            // 将整数格式化为5位数字
329
-            s = String.format("%05d", newEquipment);
330
-            redisCache.setCacheObject("awardNum", s);
331
-            return s;
332
-        } else {
333
-            String s = awardNum.toString();
334
-            // 字符串数字解析为整数
335
-            int no = Integer.parseInt(s);
336
-            // 最新设备编号自增1
337
-            int newEquipment = ++no;
338
-            // 将整数格式化为5位数字
339
-            s = String.format("%05d", newEquipment);
340
-            redisCache.setCacheObject("awardNum", s);
341
-            return s;
342
-        }
343
-    }
344
-
345
-    public static void main(String[] args) throws Exception {
346
-        // 创建一个新的Word文档
347
-        XWPFDocument document = new XWPFDocument();
348
-
349
-        // 创建一个段落
350
-        XWPFParagraph paragraph = document.createParagraph();
351
-
352
-        // 创建一个文本区域
353
-        XWPFRun run = paragraph.createRun();
354
-
355
-        // 加载图片文件
356
-        File imageFile = new File("D:\\develop\\Snipaste_2023-10-27_09-59-23.jpg");
357
-        FileInputStream fis = new FileInputStream(imageFile);
358
-
359
-        // 将图片插入到文档中
360
-        run.addPicture(fis, Document.PICTURE_TYPE_JPEG, "image.jpg", Units.toEMU(100), Units.toEMU(100));
361
-
362
-        // 关闭输入流
363
-        fis.close();
364
-
365
-        // 保存文档
366
-        String filePath= "D:\\develop\\"+UUID.randomUUID()+"document.docx";
367
-        FileOutputStream fos = new FileOutputStream(filePath);
368
-        document.write(fos);
369
-        fos.close();
370
-    }
371
-
372
-    }

+ 1
- 1
ruoyi-common/src/main/java/com/ruoyi/common/utils/WordUtil.java Просмотреть файл

@@ -146,7 +146,7 @@ public class WordUtil {
146 146
     public static PictureRenderData rebuildImageContent(Integer with, Integer height, String imageUrl, String relatedPath) {
147 147
         PictureRenderData pictureRenderData = null;
148 148
         if (!StringUtils.isBlank(imageUrl)) {
149
-            // pictureRenderData = Pictures.of(imageUrl).size(with, height).create();
149
+            //pictureRenderData = Pictures.of(imageUrl).size(with, height).create();
150 150
             //Pictures.PictureBuilder pictureBuilder = Pictures.of("https://res.wx.qq.com/a/wx_fed/weixin_portal/res/static/img/1EtCRvm.png");
151 151
         } else if (!StringUtils.isBlank(relatedPath)) {
152 152
             pictureRenderData = Pictures.ofLocal(relatedPath).size(with, height).create();

+ 4
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java Просмотреть файл

@@ -16,6 +16,9 @@ public class CaseApplication  extends BaseEntity {
16 16
 
17 17
     /** ID */
18 18
     private Long id;
19
+    /** 案件名称 */
20
+    @Excel(name = "案件名称")
21
+    private String caseName;
19 22
     /** 案件编号 */
20 23
 //    @Excel(name = "案件编号")
21 24
     private String caseNum;
@@ -127,8 +130,7 @@ public class CaseApplication  extends BaseEntity {
127 130
     /** 仲裁员名称 */
128 131
     private String arbitratorName;
129 132
 
130
-    /** 案件名称 */
131
-    private String caseName;
133
+
132 134
 
133 135
     /** 案件描述 */
134 136
     private String caseDescribe;

+ 5
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/SmsSendRecord.java Просмотреть файл

@@ -37,4 +37,9 @@ public class SmsSendRecord extends BaseEntity {
37 37
      * 发送内容
38 38
      */
39 39
     private String sendContent;
40
+
41
+    /**
42
+     * 发送状态
43
+     */
44
+    private Integer sendStatus;
40 45
 }

+ 58
- 8
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java Просмотреть файл

@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
2 2
 
3 3
 import com.alibaba.fastjson.JSON;
4 4
 import com.alibaba.fastjson.JSONObject;
5
+import com.deepoove.poi.data.PictureRenderData;
5 6
 import com.ruoyi.common.constant.CaseApplicationConstants;
6 7
 import com.ruoyi.common.core.domain.AjaxResult;
7 8
 import com.ruoyi.common.core.redis.RedisCache;
@@ -36,6 +37,7 @@ import java.nio.file.StandardCopyOption;
36 37
 import java.text.SimpleDateFormat;
37 38
 import java.time.LocalDate;
38 39
 import java.util.*;
40
+import java.util.regex.Pattern;
39 41
 
40 42
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
41 43
 
@@ -254,10 +256,34 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
254 256
             }
255 257
             datas.put("claims", caseApplication1.getArbitratClaims());
256 258
             datas.put("request", caseApplication1.getRequestRule());
257
-            //申请人证据材料
258
-            datas.put("appEvidenceMaterial", null);
259
-            //被申请人证据材料
260
-            datas.put("resEvidenceMaterial","(详见附件列表)");
259
+            CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
260
+            List<CaseAttach> caseAttachList1 = caseApplication2.getCaseAttachList();
261
+            if (caseAttachList1 != null && caseAttachList1.size() > 0) {
262
+                for (CaseAttach caseAttach : caseAttachList1) {
263
+                    if (caseAttach.getAnnexType() == 6) {   //被申请人证据材料
264
+                        String annexName = caseAttach.getAnnexName();
265
+                        boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
266
+                        if (isImageFile) {
267
+                            String annexPath = "/home/ruoyi"+caseAttach.getAnnexPath();
268
+                            System.out.println("路径是===========" + annexPath);
269
+                            PictureRenderData pictureRenderData = WordUtil
270
+                                    .rebuildImageContent(100, 100, null, annexPath);
271
+                            datas.put("resEvidenceMaterial", pictureRenderData);
272
+                        }
273
+                    } else if (caseAttach.getAnnexType() == 2) {   //申请人证据材料
274
+                        String annexName = caseAttach.getAnnexName();
275
+                        boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
276
+                        if (isImageFile) {
277
+                            String annexPath = "/home/ruoyi"+caseAttach.getAnnexPath();
278
+                            System.out.println("路径是===========" + annexPath);
279
+                            PictureRenderData pictureRenderData = WordUtil
280
+                                    .rebuildImageContent(100, 100, null, annexPath);
281
+                            //申请人证据材料
282
+                            datas.put("appEvidenceMaterial", pictureRenderData);
283
+                        }
284
+                    }
285
+                }
286
+            }
261 287
             datas.put("applicaCrossOpin", caseApplication1.getApplicaCrossOpin());
262 288
             if (arbitrateRecord1 != null) {
263 289
                 datas.put("factDetermi", arbitrateRecord1.getFactDetermi());
@@ -804,10 +830,34 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
804 830
             }
805 831
             datas.put("claims", caseApplication1.getArbitratClaims());
806 832
             datas.put("request", caseApplication1.getRequestRule());
807
-            //申请人证据材料
808
-            datas.put("appEvidenceMaterial", null);
809
-            //被申请人证据材料
810
-            datas.put("resEvidenceMaterial","(详见附件列表)");
833
+            CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
834
+            List<CaseAttach> caseAttachList1 = caseApplication2.getCaseAttachList();
835
+            if (caseAttachList1 != null && caseAttachList1.size() > 0) {
836
+                for (CaseAttach caseAttach : caseAttachList1) {
837
+                    if (caseAttach.getAnnexType() == 6) {   //被申请人证据材料
838
+                        String annexName = caseAttach.getAnnexName();
839
+                        boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
840
+                        if (isImageFile) {
841
+                            String annexPath = "/home/ruoyi"+caseAttach.getAnnexPath();
842
+                            System.out.println("路径是===========" + annexPath);
843
+                            PictureRenderData pictureRenderData = WordUtil
844
+                                    .rebuildImageContent(100, 100, null, annexPath);
845
+                            datas.put("resEvidenceMaterial", pictureRenderData);
846
+                        }
847
+                    } else if (caseAttach.getAnnexType() == 2) {   //申请人证据材料
848
+                        String annexName = caseAttach.getAnnexName();
849
+                        boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
850
+                        if (isImageFile) {
851
+                            String annexPath = "/home/ruoyi"+caseAttach.getAnnexPath();
852
+                            System.out.println("路径是===========" + annexPath);
853
+                            PictureRenderData pictureRenderData = WordUtil
854
+                                    .rebuildImageContent(100, 100, null, annexPath);
855
+                            //申请人证据材料
856
+                            datas.put("appEvidenceMaterial", pictureRenderData);
857
+                        }
858
+                    }
859
+                }
860
+            }
811 861
             datas.put("applicaCrossOpin", caseApplication1.getApplicaCrossOpin());
812 862
             if (arbitrateRecord1 != null) {
813 863
                 datas.put("factDetermi", arbitrateRecord1.getFactDetermi());

+ 10
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Просмотреть файл

@@ -1024,6 +1024,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1024 1024
                         String content="尊敬的"+agentUser.getNickName()+",您的代理的案件已接入仲裁系统,复制访问https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 进入小程序进行认证注册。如非本人操作,请忽略本短信";
1025 1025
                         smsSendRecord.setSendContent(content);
1026 1026
                         smsSendRecord.setCreateBy(getUsername());
1027
+                        smsSendRecord.setSendStatus(1);
1027 1028
                         smsRecordMapper.saveSmsSendRecord(smsSendRecord);
1028 1029
                     }
1029 1030
                 }
@@ -1472,6 +1473,11 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1472 1473
      * @param failureMsg
1473 1474
      */
1474 1475
     private void validBaseColumn(CaseApplication caseApplication, StringBuilder failureMsg) {
1476
+        if( StrUtil.isEmpty(caseApplication.getCaseName())){
1477
+            failureMsg.append("【案件名称】字段不能为空;");
1478
+        }else if(caseApplication.getCaseName().length()>50){
1479
+            failureMsg.append("【案件名称】字段超出指定长度,最大长度为50;");
1480
+        }
1475 1481
         BigDecimal caseSubjectAmount = caseApplication.getCaseSubjectAmount();
1476 1482
         if(null== caseSubjectAmount){
1477 1483
             failureMsg.append("【案件标的】字段不合法;");
@@ -1855,6 +1861,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1855 1861
                 smsSendRecord.setSendTime(new Date());
1856 1862
                 String content="尊敬的"+caseAffiliate.getName()+"用户,您的"+ caseApplicationselect.getCaseNum()+"仲裁案件,开庭审理房间号为"+ messageVO.getRoomNo()+",请在微信内打开https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 请知晓,如非本人操作,请忽略本短信。";
1857 1863
                 smsSendRecord.setSendContent(content);
1864
+                smsSendRecord.setSendStatus(1);
1858 1865
                 String userName;
1859 1866
                 try {
1860 1867
                     userName= getUsername();
@@ -2197,6 +2204,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2197 2204
                             content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,开庭日期已改为" + hearDatestr + ",请知晓,如非本人操作,请忽略本短信。";
2198 2205
                         }
2199 2206
                         smsSendRecord.setSendContent(content);
2207
+                        smsSendRecord.setSendStatus(1);
2200 2208
                         smsSendRecord.setCreateBy(getUsername());
2201 2209
                         smsRecordMapper.saveSmsSendRecord(smsSendRecord);
2202 2210
                     }
@@ -2233,6 +2241,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2233 2241
                     String content="尊敬的"+name+"用户,您的"+caseNum+"仲裁案件,开庭日期已确定为"+hearDatestr+",请知晓,如非本人操作,请忽略本短信。";
2234 2242
                     smsSendRecord.setSendContent(content);
2235 2243
                     smsSendRecord.setCreateBy(getUsername());
2244
+                    smsSendRecord.setSendStatus(1);
2236 2245
                     smsRecordMapper.saveSmsSendRecord(smsSendRecord);
2237 2246
                 }
2238 2247
             }
@@ -2391,6 +2400,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2391 2400
     private void copyCaseApplication(CaseApplication caseApplicationinsertDiffer, CaseApplication caseApplicationNew) {
2392 2401
         caseApplicationNew.setArbitratClaims(caseApplicationinsertDiffer.getArbitratClaims());
2393 2402
         caseApplicationNew.setCaseNum(caseApplicationinsertDiffer.getCaseNum());
2403
+        caseApplicationNew.setCaseName(caseApplicationinsertDiffer.getCaseName());
2394 2404
         caseApplicationNew.setCaseSubjectAmount(caseApplicationinsertDiffer.getCaseSubjectAmount());
2395 2405
         caseApplicationNew.setLoanStartDate(caseApplicationinsertDiffer.getLoanStartDate());
2396 2406
         caseApplicationNew.setLoanEndDate(caseApplicationinsertDiffer.getLoanEndDate());

+ 1
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java Просмотреть файл

@@ -126,6 +126,7 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
126 126
                         String content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,仲裁方式已确定为" + arbitratMethodStr + ",请知晓,如非本人操作,请忽略本短信。";
127 127
                         smsSendRecord.setSendContent(content);
128 128
                         smsSendRecord.setCreateBy(getUsername());
129
+                        smsSendRecord.setSendStatus(1);
129 130
                         smsRecordMapper.saveSmsSendRecord(smsSendRecord);
130 131
                     }
131 132
                 }

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java Просмотреть файл

@@ -119,12 +119,12 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
119 119
                     caseApplication.setCaseStatus(4);
120 120
                     caseApplicationMapper.submitCaseApplication(caseApplication);
121 121
                 }
122
+            }
122 123
                 CaseAttach caseAttachselect = new CaseAttach();
123 124
                 caseAttachselect.setAnnexId(caseAttach.getAnnexId());
124 125
                 caseAttachselect.setAnnexName(caseAttach.getAnnexName());
125 126
                 caseAttachselect.setAnnexType(caseAttach.getAnnexType());
126 127
                 return AjaxResult.success("上传成功", caseAttachselect);
127
-            }
128 128
         } catch (IOException e) {
129 129
             e.printStackTrace();
130 130
         }

+ 15
- 4
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java Просмотреть файл

@@ -128,6 +128,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
128 128
                             String content="尊敬的"+name+"用户,您的"+caseName+"案件"+caseNum+"已成功受理。";
129 129
                             smsSendRecord.setSendContent(content);
130 130
                             smsSendRecord.setCreateBy(getUsername());
131
+                            smsSendRecord.setSendStatus(1);
131 132
                             smsRecordMapper.saveSmsSendRecord(smsSendRecord);
132 133
                         }
133 134
                     } else {       //被申请人
@@ -146,6 +147,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
146 147
                             String content="尊敬的"+name+"用户,您的"+caseName+"案件"+caseNum+"已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信";
147 148
                             smsSendRecord.setSendContent(content);
148 149
                             smsSendRecord.setCreateBy(getUsername());
150
+                            smsSendRecord.setSendStatus(1);
149 151
                             smsRecordMapper.saveSmsSendRecord(smsSendRecord);
150 152
                         }
151 153
                     }
@@ -185,11 +187,20 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
185 187
         CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
186 188
         caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
187 189
         //修改案件状态
188
-        caseApplicationMapper.submitCaseApplication(caseApplication1);
189
-        // 新增日志
190
-        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_PAYMENT_CONFIRM,"");
190
+        int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
191
+        if(i>0) {
192
+            // 修改支付状态
193
+            CasePaymentRecord paymentRecord = new CasePaymentRecord();
194
+            paymentRecord.setPayType(payDTO.getPayType());
195
+            paymentRecord.setCaseId(payDTO.getCaseId());
196
+            paymentRecord.setPaymentStatus(1);
197
+            casePaymentRecordMapper.saveRecord(paymentRecord);
198
+            // 新增日志
199
+            CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, "");
191 200
 
192
-        return AjaxResult.success("确认缴费成功");
201
+            return AjaxResult.success("确认缴费成功");
202
+        }
203
+        return AjaxResult.success("确认缴费失败");
193 204
     }
194 205
 
195 206
 

+ 5
- 2
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Просмотреть файл

@@ -7,6 +7,7 @@
7 7
     <resultMap type="CaseApplication" id="CaseApplicationResult">
8 8
         <id     property="id"       column="id"      />
9 9
         <result property="caseNum"       column="case_num"      />
10
+        <result property="caseName"       column="case_name"      />
10 11
         <result property="caseSubjectAmount"     column="case_subject_amount"    />
11 12
         <result property="registerDate"     column="register_date"    />
12 13
         <result property="arbitratMethod"        column="arbitrat_method"        />
@@ -372,7 +373,7 @@
372 373
 
373 374
     <insert id="insertCaseApplication" parameterType="CaseApplication" useGeneratedKeys="true" keyProperty="id">
374 375
         insert into case_application(
375
-
376
+        <if test="caseName != null  and caseName != ''">case_name ,</if>
376 377
         <if test="caseNum != null and caseNum != ''">case_num,</if>
377 378
         <if test="caseSubjectAmount != null">case_subject_amount,</if>
378 379
         register_date,
@@ -400,6 +401,7 @@
400 401
         <if test="importFlag != null ">import_flag,</if>
401 402
         create_time
402 403
         )values(
404
+        <if test="caseName != null and caseName != ''">#{caseName},</if>
403 405
         <if test="caseNum != null and caseNum != ''">#{caseNum},</if>
404 406
         <if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
405 407
         sysdate(),
@@ -515,6 +517,7 @@
515 517
         CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
516 518
         ELSE '无审理方式'
517 519
         END arbitratMethodName,
520
+         c.case_name,
518 521
         c.case_status ,
519 522
         CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
520 523
         when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
@@ -595,7 +598,7 @@ order by c.create_time desc limit 1
595 598
                CASE c.pay_type when 0 then '线上支付' when 0 then '线下支付' else '' end payTypeName
596 599
         from case_application c left join case_payment_record p on c.id  = p.case_id
597 600
         where c.case_status  = 3
598
-          AND c.id = #{id} and p.payment_status=1
601
+          AND c.id = #{id} and p.payment_status=1 limit 1
599 602
 
600 603
     </select>
601 604
     <select id="selectCaseNumLike" resultType="java.lang.Integer">

+ 4
- 1
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/SmsRecordMapper.xml Просмотреть файл

@@ -15,6 +15,7 @@
15 15
         <result property="updateTime"   column="update_time"  />
16 16
         <result property="createBy"   column="create_by"  />
17 17
         <result property="updateBy"   column="update_by"  />
18
+        <result property="sendStatus"   column="send_status"  />
18 19
     </resultMap>
19 20
     <insert id="saveSmsSendRecord" parameterType="SmsSendRecord" useGeneratedKeys="true" keyProperty="id">
20 21
 
@@ -25,6 +26,7 @@
25 26
         <if test="sendTime != null ">send_time,</if>
26 27
         <if test="sendContent != null ">send_content,</if>
27 28
         <if test="createBy != null and createBy != ''">create_by,</if>
29
+        <if test="sendStatus != null ">send_status,</if>
28 30
         create_time
29 31
         )values(
30 32
         <if test="caseId != null ">#{caseId},</if>
@@ -33,13 +35,14 @@
33 35
         <if test="sendTime != null ">#{sendTime},</if>
34 36
         <if test="sendContent != null ">#{sendContent},</if>
35 37
         <if test="createBy != null  and createBy != ''">#{createBy},</if>
38
+        <if test="sendStatus != null ">#{sendStatus},</if>
36 39
         sysdate()
37 40
         )
38 41
     </insert>
39 42
 
40 43
     <select id="getSmsSendRecord" parameterType="SmsSendRecord" resultMap="SmsSendRecordResult">
41 44
 
42
-        select id ,case_appli_id ,case_num ,phone ,send_time ,send_content
45
+        select id ,case_appli_id ,case_num ,phone ,send_time ,send_content,send_status
43 46
         from sms_send_record
44 47
         <where>
45 48
             <if test="caseNum != null and caseNum != ''">