|
|
@@ -180,7 +180,16 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
180
|
180
|
//
|
|
181
|
181
|
for (String bookmark : bookmarkList) {
|
|
182
|
182
|
if(columnValueMap.containsKey(bookmark)){
|
|
183
|
|
- datas.put(bookmark,columnValueMap.get(bookmark));
|
|
|
183
|
+ if(bookmark.equals("resSex")){
|
|
|
184
|
+ String responSex = columnValueMap.get(bookmark);
|
|
|
185
|
+ if (responSex.equals("0")) {
|
|
|
186
|
+ datas.put(bookmark, "男");
|
|
|
187
|
+ } else {
|
|
|
188
|
+ datas.put(bookmark, "女");
|
|
|
189
|
+ }
|
|
|
190
|
+ }else {
|
|
|
191
|
+ datas.put(bookmark, columnValueMap.get(bookmark));
|
|
|
192
|
+ }
|
|
184
|
193
|
}
|
|
185
|
194
|
}
|
|
186
|
195
|
}else {
|
|
|
@@ -231,11 +240,11 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
231
|
240
|
// todo 线上仲裁/线下仲裁方式未选择
|
|
232
|
241
|
//线上开庭时
|
|
233
|
242
|
if (arbitratMethod == 1) {
|
|
234
|
|
- String replace = onLine.replace(onLineDate, hearDateStr);
|
|
|
243
|
+ String replace = onLine.replace(onLineDate, Optional.ofNullable(hearDateStr).orElse(""));
|
|
235
|
244
|
datas.put("onLine", replace);
|
|
236
|
245
|
} else {
|
|
237
|
246
|
//书面仲裁时
|
|
238
|
|
- String replace = written.replace(writtenDate, hearDateStr);
|
|
|
247
|
+ String replace = written.replace(writtenDate, Optional.ofNullable(hearDateStr).orElse(""));
|
|
239
|
248
|
datas.put("written", replace);
|
|
240
|
249
|
|
|
241
|
250
|
}
|
|
|
@@ -252,7 +261,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
252
|
261
|
if (arbitratMethod == 1) {
|
|
253
|
262
|
if (isAbsence != null && isAbsence == 1) {
|
|
254
|
263
|
// 被申请人缺席
|
|
255
|
|
- String absentReplace = absent.replace("{{agentName}}", agentName);
|
|
|
264
|
+ String absentReplace = absent.replace("{{agentName}}", Optional.ofNullable(agentName).orElse(""));
|
|
256
|
265
|
datas.put("absent",absentReplace);
|
|
257
|
266
|
// 被申请人缺席
|
|
258
|
267
|
String resAbsentReplace=resAbsent;
|
|
|
@@ -267,7 +276,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
267
|
276
|
datas.put("resAbsent",resAbsentReplace);
|
|
268
|
277
|
} else {
|
|
269
|
278
|
// 出席
|
|
270
|
|
- String attendReplace = attend.replace("{{agentName}}", agentName);
|
|
|
279
|
+ String attendReplace = attend.replace("{{agentName}}", Optional.ofNullable(agentName).orElse(""));
|
|
271
|
280
|
datas.put("attend",attend);
|
|
272
|
281
|
// 被申请人证据
|
|
273
|
282
|
if(caseAttachMap!=null && CollectionUtil.isNotEmpty(caseAttachMap.get(6))){
|
|
|
@@ -281,7 +290,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
281
|
290
|
for (CaseAttach caseAttach : caseAttaches) {
|
|
282
|
291
|
stringBuilder.append(caseAttach.getAnnexName()).append("\n");
|
|
283
|
292
|
}
|
|
284
|
|
- resFileRplace = resFile.replace("{{resFile}}", stringBuilder.toString()).replace("{{applicantOpinion}}", arbitrateRecordSelect.getApplicantOpinion());
|
|
|
293
|
+ resFileRplace = resFile.replace("{{resFile}}", stringBuilder.toString()).replace("{{applicantOpinion}}", Optional.ofNullable(arbitrateRecordSelect.getApplicantOpinion()).orElse(""));
|
|
285
|
294
|
}
|
|
286
|
295
|
datas.put("resFile",resFileRplace);
|
|
287
|
296
|
}else {
|
|
|
@@ -296,7 +305,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
296
|
305
|
for (CaseAttach caseAttach : caseAttaches) {
|
|
297
|
306
|
stringBuilder.append(caseAttach.getAnnexName()).append("\n");
|
|
298
|
307
|
}
|
|
299
|
|
- resAttendOpinionReplace = resAttendOpinion.replace("{{applicantFile}}", stringBuilder.toString()).replace("{{respondentOpinion}}", arbitrateRecordSelect.getRespondentOpinion());
|
|
|
308
|
+ resAttendOpinionReplace = resAttendOpinion.replace("{{applicantFile}}", stringBuilder.toString()).replace("{{respondentOpinion}}", arbitrateRecordSelect.getRespondentOpinion()==null?"":arbitrateRecordSelect.getRespondentOpinion());
|
|
300
|
309
|
}
|
|
301
|
310
|
|
|
302
|
311
|
datas.put("resAttendOpinion",resAttendOpinionReplace);
|
|
|
@@ -306,13 +315,16 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
306
|
315
|
|
|
307
|
316
|
String month = String.format("%02d", now.getMonthValue());
|
|
308
|
317
|
String day = String.format("%02d", now.getDayOfMonth());
|
|
309
|
|
- String modalFilePath = "/data/arbitrate-document/template/新裁决书模板.docx";
|
|
310
|
|
-// String modalFilePath = "D:/新裁决书模板.docx";
|
|
311
|
|
- // todo 服务器路径
|
|
312
|
|
- String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
|
313
|
|
-// String saveFolderPath = "D:/";
|
|
|
318
|
+ // todo
|
|
|
319
|
+// String modalFilePath = "/data/arbitrate-document/template/新裁决书模板.docx";
|
|
|
320
|
+ String modalFilePath = templatePath;
|
|
|
321
|
+ // todo
|
|
|
322
|
+// String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
|
|
323
|
+ String saveFolderPath = "D:/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
|
314
|
324
|
String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
|
|
315
|
|
- String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
|
|
325
|
+ // todo
|
|
|
326
|
+// String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
|
|
327
|
+ String saveName = "D:/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
|
316
|
328
|
String resultFilePath = saveFolderPath + "/" + fileName;
|
|
317
|
329
|
// 创建日期目录
|
|
318
|
330
|
File saveFolder = new File(saveFolderPath);
|