From 078c21420214ab6d217013337fba4657e1524bfd Mon Sep 17 00:00:00 2001 From: 18792927508 <1322446236@qq.com> Date: Fri, 8 Dec 2023 13:50:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=88=90=E8=A3=81=E5=86=B3=E4=B9=A6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/AdjudicationServiceImpl.java | 37 ++++++++++++++++--- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java index 407db1a..035456f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java @@ -176,7 +176,6 @@ public class AdjudicationServiceImpl implements IAdjudicationService { Map columnValueMap = columnValueList.stream().collect(Collectors.toMap(ColumnValue::getColumn, ColumnValue::getValue)); agentName=columnValueMap.get("agentName"); resName=columnValueMap.get("respondentName"); - resName=columnValueMap.get("respondentName"); // 懒得if,暂时这样 // for (String bookmark : bookmarkList) { @@ -188,7 +187,28 @@ public class AdjudicationServiceImpl implements IAdjudicationService { } else { datas.put(bookmark, "女"); } - }else { + }else if(bookmark.equals("arbitratClaims")){ + // 请求仲裁庭裁决 + String arbitratClaims = columnValueMap.get(bookmark); + if(StrUtil.isNotEmpty(arbitratClaims)){ + String replace = arbitratClaims.replace("甲方", "被申请人").replace("乙方", "申请人"); + datas.put("arbitratClaims", replace); + + }else { + datas.put("arbitratClaims", ""); + } + }else if(bookmark.equals("mediationAgreement")){ + // 查询本案事实如下 + String mediationAgreement = columnValueMap.get(bookmark); + if(StrUtil.isNotEmpty(mediationAgreement)){ + String replace = mediationAgreement.replace("甲方", "被申请人").replace("乙方", "申请人"); + datas.put("mediationAgreement", replace); + + }else { + datas.put("mediationAgreement", ""); + } + } + else { datas.put(bookmark, columnValueMap.get(bookmark)); } } @@ -196,6 +216,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService { }else { } + // 裁决书生成时间 LocalDate now = LocalDate.now(); String year = Integer.toString(now.getYear()); @@ -204,6 +225,8 @@ public class AdjudicationServiceImpl implements IAdjudicationService { String equipmentNo = getNewEquipmentNo(); // 裁决书编号 datas.put("num", equipmentNo); + // 仲裁费 + datas.put("arbitrationFee", caseApplicationById.getFeePayable().toString()); // 案件创建时间 Date createTime = caseApplicationById.getCreateTime(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日"); @@ -243,8 +266,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService { attendName += "被申请人" + resName; } if(attendName.endsWith("、")){ - agentName=attendName.replace("、",""); + attendName=attendName.replace("、",""); } + datas.put("attendName", attendName); } // 仲裁员名称 @@ -297,7 +321,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService { } else { // 出席 String attendReplace = attend.replace("{{agentName}}", Optional.ofNullable(agentName).orElse("")); - datas.put("attend",attend); + datas.put("attend",attendReplace); // 被申请人证据 if(caseAttachMap!=null && CollectionUtil.isNotEmpty(caseAttachMap.get(6))){ // 开庭+出席+被申提供证据 @@ -310,7 +334,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService { for (CaseAttach caseAttach : caseAttaches) { stringBuilder.append(caseAttach.getAnnexName()).append("\n"); } - resFileRplace = resFile.replace("{{resFile}}", stringBuilder.toString()).replace("{{applicantOpinion}}", Optional.ofNullable(arbitrateRecordSelect.getApplicantOpinion()).orElse("")); + resFileRplace = resFile.replace("{{resFile}}", stringBuilder.toString()).replace("{{applicantOpinion}}", (arbitrateRecordSelect==null||arbitrateRecordSelect.getApplicantOpinion()==null?"":arbitrateRecordSelect.getApplicantOpinion())); } datas.put("resFile",resFileRplace); }else { @@ -325,7 +349,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService { for (CaseAttach caseAttach : caseAttaches) { stringBuilder.append(caseAttach.getAnnexName()).append("\n"); } - resAttendOpinionReplace = resAttendOpinion.replace("{{applicantFile}}", stringBuilder.toString()).replace("{{respondentOpinion}}", arbitrateRecordSelect.getRespondentOpinion()==null?"":arbitrateRecordSelect.getRespondentOpinion()); + resAttendOpinionReplace = resAttendOpinion.replace("{{applicantFile}}", stringBuilder.toString()).replace("{{respondentOpinion}}", (arbitrateRecordSelect==null||arbitrateRecordSelect.getRespondentOpinion()==null)?"":arbitrateRecordSelect.getRespondentOpinion()); } datas.put("resAttendOpinion",resAttendOpinionReplace); @@ -333,6 +357,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService { } + String month = String.format("%02d", now.getMonthValue()); String day = String.format("%02d", now.getDayOfMonth()); // todo