From 76847fafb10d65dd4615d6a94f760ea61d4c4a3f Mon Sep 17 00:00:00 2001 From: hejinbo Date: Fri, 22 Sep 2023 14:43:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E6=97=B6=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 4 +- .../wisdomarbitrate/domain/Adjudication.java | 209 ++++++++++-------- .../service/impl/AdjudicationServiceImpl.java | 97 +++++++- .../impl/CallBackHandleServiceImpl.java | 1 + 4 files changed, 208 insertions(+), 103 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index e11b3d0..06fa6f1 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -143,8 +143,8 @@ elegent: alipay: appId: 2021003141676135 callback: - domain: http://121.40.189.20:9000/ - watch: false + domain: http://121.40.189.20:9001/ + watch: true cycle: 10 identityAuthentication: credentialSecretId: 123 diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/Adjudication.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/Adjudication.java index 0041958..75eb96e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/Adjudication.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/Adjudication.java @@ -7,47 +7,28 @@ public class Adjudication { /** * 申请人姓名 */ - private String applicantName; + private String appName; /** * 申请人性别 */ - private String applicantSex; + private String appSex; /** * 申请人身份证号码 */ - private String applicantIDNo; + private String appIDNo; /** * 申请人住所 */ private String appAddress; - /** - * 申请人邮编 - */ - private String appZipCode; - /** - * 申请人组织名称 - */ - private String appOrgName; - /** - * 申请人组织地址 - */ - private String appOrgAddress; - /** - * 申请人法人姓名 - */ - private String appLegalPerName; - /** - * 申请人法人职务 - */ - private String appLegalPerJob; + /** * 申请人代理人姓名 */ private String appAgentName; /** - * 申请人代理人性别 + * 申请人代理人身份证 */ - private String appAgentSex; + private String appAgentIDNo; /** * 被申请人姓名 */ @@ -64,83 +45,20 @@ public class Adjudication { * 被申请人住所 */ private String resAddress; - /** - * 被申请人邮编 - */ - private String resZipCode; - /** - * 被申请人组织名称 - */ - private String resOrgName; - /** - * 被申请人组织地址 - */ - private String resOrgAddress; - /** - * 被申请人法人姓名 - */ - private String resLegalPerName; - /** - * 被申请人法人职务 - */ - private String resLegalPerJob; + /** * 被申请人代理人姓名 */ private String resAgentName; /** - * 被申请人代理人性别 + * 被申请人代理人身份证 */ - private String resAgentSex; - /** - * 第三人姓名 - */ - private String thirdName; - /** - * 第三人性别 - */ - private String thirdSex; + private String resAgentIDNo; /** - * 第三人身份证 + * 案件名称 */ - private String thirdDNo; - /** - * 第三人住所 - */ - private String thirdAddress; - /** - * 第三人邮编 - */ - private String thirdZipCode; - /** - * 第三人组织名称 - */ - private String thirdOrgName; - /** - * 第三人组织地址 - */ - private String thirdOrgAddress; - /** - * 第三人法人姓名 - */ - private String thirdLegalPerName; - /** - * 第三人法人职务 - */ - private String thirdLegalPerJob; - /** - * 第三人代理人姓名 - */ - private String thirdAgentName; - /** - * 第三人代理人性别 - */ - private String thirdAgentSex; - /** - * 案件描述 - */ - private String caseDescribe; + private String caseName; /** * 仲裁员名称 @@ -159,7 +77,112 @@ public class Adjudication { */ private String hearDay; + /** + * 申请人具体仲裁请求 + */ + private String appArbitrationClaims; + /** + * 申请人证据名称 + */ + private String appEvidenceName; + /** + * 申请人拟证事实 + */ + private String appProveFacts; + /** + * 被申请人对申请人答辩内容 + */ + private String resDefenseContentToApp; + + /** + * 被申请人具体仲裁请求 + */ + private String resArbitrationClaims; + /** + * 被申请人证据名称 + */ + private String resEvidenceName; + /** + * 被申请人拟证事实 + */ + private String resProveFacts; + /** + * 申请人对被申请人答辩内容 + */ + private String appDefenseContentToRes; + /** + * 第三人答辩内容 + */ + private String thirdDefenseContent; + /** + * 第三人证据名称 + */ + private String thirdEvidenceName; + /** + * 第三人拟证事实 + */ + private String thirdProveFacts; + /** + * 申请人对第三人答辩内容 + */ + private String appDefenseContentToThird; + /** + * 被申请人对第三人答辩内容 + */ + private String resDefenseContentToThird; + /** + * 证据认定 + */ + private String evidenDetermi; + /** + * 认定事实 + */ + private String factDetermi; + /** + * 综上所述 + */ + private String caseSketch; + /** + * 本庭认为 + */ + private String arbitrateThink; + /** + * 裁决如下 + */ + private String rulingFollows; + /** + * 法律条款 + */ + private String legalProvisions; + /** + * 首席仲裁 + */ + private String umpire; + /** + * 仲裁员1 + */ + private String arbitratorName1; + /** + * 仲裁员2 + */ + private String arbitratorName2; + /** + * 年 + */ + private String year; + /** + * 月 + */ + private String months; + /** + * 日 + */ + private String day; + /** + * 书记员 + */ + private String clerk; } 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 1ad7347..a49ddad 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 @@ -3,8 +3,11 @@ package com.ruoyi.wisdomarbitrate.service.impl; import com.deepoove.poi.config.Configure; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.utils.WordUtil; +import com.ruoyi.wisdomarbitrate.domain.Adjudication; +import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord; import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate; import com.ruoyi.wisdomarbitrate.domain.CaseApplication; +import com.ruoyi.wisdomarbitrate.mapper.ArbitrateRecordMapper; import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper; import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper; import com.ruoyi.wisdomarbitrate.service.IAdjudicationService; @@ -16,9 +19,9 @@ import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; +import java.time.LocalDate; +import java.time.ZoneId; +import java.util.*; @Service public class AdjudicationServiceImpl implements IAdjudicationService { @@ -26,18 +29,96 @@ public class AdjudicationServiceImpl implements IAdjudicationService { private CaseApplicationMapper caseApplicationMapper; @Autowired private CaseAffiliateMapper caseAffiliateMapper; + @Autowired + private ArbitrateRecordMapper arbitrateRecordMapper; + @Override public AjaxResult createDocument(CaseApplication caseApplication) { - CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication); - try { Map datas = new HashMap<>(); - datas.put("1", "张三"); - String modalFilePath = "D:/develop/ceshi.docx"; + Adjudication adjudication = new Adjudication(); + Long id = caseApplication.getId(); + if (id == null){ + return null; + } + //获取案件详细信息 + CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication); + //获取仲裁记录表里的相关信息 + ArbitrateRecord arbitrateRecord = new ArbitrateRecord(); + arbitrateRecord.setCaseAppliId(id); + ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord); + + //获取案件关联人信息 + CaseAffiliate caseAffiliate = new CaseAffiliate(); + caseAffiliate.setCaseAppliId(id); + List caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); + if (caseAffiliates != null && caseAffiliates.size() > 0){ + for (CaseAffiliate affiliate : caseAffiliates){ + //获取身份类型 + int identityType = affiliate.getIdentityType(); + if (identityType == 1) { //申请人 + datas.put(adjudication.getAppName(), affiliate.getName()); + datas.put(adjudication.getAppSex(), null); + datas.put(adjudication.getAppIDNo(), affiliate.getIdentityNum()); + datas.put(adjudication.getAppAddress(), affiliate.getContactAddress()); + datas.put(adjudication.getAppAgentName(), affiliate.getNameAgent()); + datas.put(adjudication.getAppAgentIDNo(),affiliate.getIdentityNumAgent()); + }else if (identityType == 2){ //被申请人 + datas.put(adjudication.getResName(), affiliate.getName()); + datas.put(adjudication.getResSex(), null); + datas.put(adjudication.getResIDNo(), affiliate.getIdentityNum()); + datas.put(adjudication.getResAddress(), affiliate.getContactAddress()); + datas.put(adjudication.getResAgentName(), affiliate.getNameAgent()); + datas.put(adjudication.getResAgentName(),affiliate.getIdentityNumAgent()); + } + } + } + String arbitratorName = caseApplication1.getArbitratorName(); + datas.put(adjudication.getCaseName(),caseApplication1.getCaseName()); + datas.put(adjudication.getArbitratorName(),arbitratorName); + LocalDate localDate = caseApplication1.getHearDate() + .toInstant() + .atZone(ZoneId.systemDefault()) + .toLocalDate(); + datas.put(adjudication.getHearYear(), localDate.getYear()); + datas.put(adjudication.getHearMonths(), localDate.getMonthValue()); + datas.put(adjudication.getHearDay(), localDate.getDayOfMonth()); + datas.put(adjudication.getAppArbitrationClaims(), null); + datas.put(adjudication.getAppEvidenceName(), null); + datas.put(adjudication.getAppProveFacts(), null); + datas.put(adjudication.getResDefenseContentToApp(), null); + datas.put(adjudication.getResArbitrationClaims(), null); + datas.put(adjudication.getResEvidenceName(), null); + datas.put(adjudication.getResProveFacts(), null); + datas.put(adjudication.getAppDefenseContentToRes(), null); + datas.put(adjudication.getEvidenDetermi(), arbitrateRecord1.getEvidenDetermi()); + datas.put(adjudication.getFactDetermi(), arbitrateRecord1.getFactDetermi()); + datas.put(adjudication.getCaseSketch(), arbitrateRecord1.getCaseSketch()); + datas.put(adjudication.getArbitrateThink(), arbitrateRecord1.getArbitrateThink()); + datas.put(adjudication.getLegalProvisions(), null); + datas.put(adjudication.getRulingFollows(), arbitrateRecord1.getRulingFollows()); + datas.put(adjudication.getUmpire(), null); + if (arbitratorName.contains(",")){ + String[] nameArray = arbitratorName.split(","); + String firstName = nameArray[0]; + String secondName = nameArray[1]; + datas.put(adjudication.getArbitratorName1(), firstName); + datas.put(adjudication.getArbitratorName2(), secondName); + }else { + String secondName = ""; + datas.put(adjudication.getArbitratorName1(), arbitratorName); + datas.put(adjudication.getArbitratorName2(), secondName); + } + LocalDate now = LocalDate.now(); + datas.put(adjudication.getYear(), now.getYear()); + datas.put(adjudication.getMonths(), now.getMonthValue()); + datas.put(adjudication.getDay(), now.getDayOfMonth()); + datas.put(adjudication.getClerk(), null); + String modalFilePath = "D:/develop/仲裁裁决书模板 (2).docx"; String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx"; String resultFilePath = "D:/data/" + fileName; String docFilePath = WordUtil.getDocFilePath(datas, modalFilePath, resultFilePath); - return AjaxResult.success("裁决书保存路径为"+docFilePath); + return AjaxResult.success("裁决书保存路径为" + docFilePath); } catch (IOException e) { e.printStackTrace(); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CallBackHandleServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CallBackHandleServiceImpl.java index 4812468..dfa8aca 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CallBackHandleServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CallBackHandleServiceImpl.java @@ -13,6 +13,7 @@ import org.springframework.stereotype.Component; public class CallBackHandleServiceImpl implements CallBackService { @Autowired private CasePaymentServiceImpl casePaymentService; + @Override public void successPay(String orderSn) { casePaymentService.callback(orderSn);