From b2c3e6433352c6d9006602b57134c0cc216fc3ee Mon Sep 17 00:00:00 2001 From: 18792927508 <1322446236@qq.com> Date: Fri, 3 Nov 2023 10:50:51 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=97=B6=E5=8A=A0?= =?UTF-8?q?=E6=A1=88=E4=BB=B6=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/wisdomarbitrate/domain/CaseApplication.java | 6 ++++-- .../service/impl/CaseApplicationServiceImpl.java | 6 ++++++ .../mapper/wisdomarbitrate/CaseApplicationMapper.xml | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java index 355ee58..134caf8 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java @@ -16,6 +16,9 @@ public class CaseApplication extends BaseEntity { /** ID */ private Long id; + /** 案件名称 */ + @Excel(name = "案件名称") + private String caseName; /** 案件编号 */ // @Excel(name = "案件编号") private String caseNum; @@ -127,8 +130,7 @@ public class CaseApplication extends BaseEntity { /** 仲裁员名称 */ private String arbitratorName; - /** 案件名称 */ - private String caseName; + /** 案件描述 */ private String caseDescribe; diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java index cad7a7e..b70f2ad 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java @@ -1472,6 +1472,11 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService { * @param failureMsg */ private void validBaseColumn(CaseApplication caseApplication, StringBuilder failureMsg) { + if( StrUtil.isEmpty(caseApplication.getCaseName())){ + failureMsg.append("【案件名称】字段不能为空;"); + }else if(caseApplication.getCaseName().length()>50){ + failureMsg.append("【案件名称】字段超出指定长度,最大长度为50;"); + } BigDecimal caseSubjectAmount = caseApplication.getCaseSubjectAmount(); if(null== caseSubjectAmount){ failureMsg.append("【案件标的】字段不合法;"); @@ -2391,6 +2396,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService { private void copyCaseApplication(CaseApplication caseApplicationinsertDiffer, CaseApplication caseApplicationNew) { caseApplicationNew.setArbitratClaims(caseApplicationinsertDiffer.getArbitratClaims()); caseApplicationNew.setCaseNum(caseApplicationinsertDiffer.getCaseNum()); + caseApplicationNew.setCaseName(caseApplicationinsertDiffer.getCaseName()); caseApplicationNew.setCaseSubjectAmount(caseApplicationinsertDiffer.getCaseSubjectAmount()); caseApplicationNew.setLoanStartDate(caseApplicationinsertDiffer.getLoanStartDate()); caseApplicationNew.setLoanEndDate(caseApplicationinsertDiffer.getLoanEndDate()); diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml index 7bd95db..de4523e 100644 --- a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml @@ -372,7 +372,7 @@ insert into case_application( - + case_name , case_num, case_subject_amount, register_date, @@ -400,6 +400,7 @@ import_flag, create_time )values( + #{caseName}, #{caseNum}, #{caseSubjectAmount}, sysdate(), From 9c8bb4b00d089cc54c9da51b5afff2d1d9dd9b5f Mon Sep 17 00:00:00 2001 From: 18792927508 <1322446236@qq.com> Date: Fri, 3 Nov 2023 10:57:03 +0800 Subject: [PATCH 2/6] =?UTF-8?q?Revert=20"=E5=AF=BC=E5=85=A5=E6=97=B6?= =?UTF-8?q?=E5=8A=A0=E6=A1=88=E4=BB=B6=E5=90=8D=E7=A7=B0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit b2c3e6433352c6d9006602b57134c0cc216fc3ee. --- .../com/ruoyi/wisdomarbitrate/domain/CaseApplication.java | 6 ++---- .../service/impl/CaseApplicationServiceImpl.java | 6 ------ .../mapper/wisdomarbitrate/CaseApplicationMapper.xml | 3 +-- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java index 134caf8..355ee58 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java @@ -16,9 +16,6 @@ public class CaseApplication extends BaseEntity { /** ID */ private Long id; - /** 案件名称 */ - @Excel(name = "案件名称") - private String caseName; /** 案件编号 */ // @Excel(name = "案件编号") private String caseNum; @@ -130,7 +127,8 @@ public class CaseApplication extends BaseEntity { /** 仲裁员名称 */ private String arbitratorName; - + /** 案件名称 */ + private String caseName; /** 案件描述 */ private String caseDescribe; diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java index b70f2ad..cad7a7e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java @@ -1472,11 +1472,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService { * @param failureMsg */ private void validBaseColumn(CaseApplication caseApplication, StringBuilder failureMsg) { - if( StrUtil.isEmpty(caseApplication.getCaseName())){ - failureMsg.append("【案件名称】字段不能为空;"); - }else if(caseApplication.getCaseName().length()>50){ - failureMsg.append("【案件名称】字段超出指定长度,最大长度为50;"); - } BigDecimal caseSubjectAmount = caseApplication.getCaseSubjectAmount(); if(null== caseSubjectAmount){ failureMsg.append("【案件标的】字段不合法;"); @@ -2396,7 +2391,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService { private void copyCaseApplication(CaseApplication caseApplicationinsertDiffer, CaseApplication caseApplicationNew) { caseApplicationNew.setArbitratClaims(caseApplicationinsertDiffer.getArbitratClaims()); caseApplicationNew.setCaseNum(caseApplicationinsertDiffer.getCaseNum()); - caseApplicationNew.setCaseName(caseApplicationinsertDiffer.getCaseName()); caseApplicationNew.setCaseSubjectAmount(caseApplicationinsertDiffer.getCaseSubjectAmount()); caseApplicationNew.setLoanStartDate(caseApplicationinsertDiffer.getLoanStartDate()); caseApplicationNew.setLoanEndDate(caseApplicationinsertDiffer.getLoanEndDate()); diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml index de4523e..7bd95db 100644 --- a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml @@ -372,7 +372,7 @@ insert into case_application( - case_name , + case_num, case_subject_amount, register_date, @@ -400,7 +400,6 @@ import_flag, create_time )values( - #{caseName}, #{caseNum}, #{caseSubjectAmount}, sysdate(), From 07a3dea9ccc71e7fa8174e07ff84ec4c91e0de55 Mon Sep 17 00:00:00 2001 From: 18792927508 <1322446236@qq.com> Date: Fri, 3 Nov 2023 10:57:15 +0800 Subject: [PATCH 3/6] =?UTF-8?q?Revert=20"Revert=20"=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E6=97=B6=E5=8A=A0=E6=A1=88=E4=BB=B6=E5=90=8D=E7=A7=B0""?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 9c8bb4b00d089cc54c9da51b5afff2d1d9dd9b5f. --- .../com/ruoyi/wisdomarbitrate/domain/CaseApplication.java | 6 ++++-- .../service/impl/CaseApplicationServiceImpl.java | 6 ++++++ .../mapper/wisdomarbitrate/CaseApplicationMapper.xml | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java index 355ee58..134caf8 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java @@ -16,6 +16,9 @@ public class CaseApplication extends BaseEntity { /** ID */ private Long id; + /** 案件名称 */ + @Excel(name = "案件名称") + private String caseName; /** 案件编号 */ // @Excel(name = "案件编号") private String caseNum; @@ -127,8 +130,7 @@ public class CaseApplication extends BaseEntity { /** 仲裁员名称 */ private String arbitratorName; - /** 案件名称 */ - private String caseName; + /** 案件描述 */ private String caseDescribe; diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java index cad7a7e..b70f2ad 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java @@ -1472,6 +1472,11 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService { * @param failureMsg */ private void validBaseColumn(CaseApplication caseApplication, StringBuilder failureMsg) { + if( StrUtil.isEmpty(caseApplication.getCaseName())){ + failureMsg.append("【案件名称】字段不能为空;"); + }else if(caseApplication.getCaseName().length()>50){ + failureMsg.append("【案件名称】字段超出指定长度,最大长度为50;"); + } BigDecimal caseSubjectAmount = caseApplication.getCaseSubjectAmount(); if(null== caseSubjectAmount){ failureMsg.append("【案件标的】字段不合法;"); @@ -2391,6 +2396,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService { private void copyCaseApplication(CaseApplication caseApplicationinsertDiffer, CaseApplication caseApplicationNew) { caseApplicationNew.setArbitratClaims(caseApplicationinsertDiffer.getArbitratClaims()); caseApplicationNew.setCaseNum(caseApplicationinsertDiffer.getCaseNum()); + caseApplicationNew.setCaseName(caseApplicationinsertDiffer.getCaseName()); caseApplicationNew.setCaseSubjectAmount(caseApplicationinsertDiffer.getCaseSubjectAmount()); caseApplicationNew.setLoanStartDate(caseApplicationinsertDiffer.getLoanStartDate()); caseApplicationNew.setLoanEndDate(caseApplicationinsertDiffer.getLoanEndDate()); diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml index 7bd95db..de4523e 100644 --- a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml @@ -372,7 +372,7 @@ insert into case_application( - + case_name , case_num, case_subject_amount, register_date, @@ -400,6 +400,7 @@ import_flag, create_time )values( + #{caseName}, #{caseNum}, #{caseSubjectAmount}, sysdate(), From 876d0807c7f97c312c80892109028632e27285e3 Mon Sep 17 00:00:00 2001 From: hejinbo Date: Fri, 3 Nov 2023 11:47:39 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E8=A3=81=E5=86=B3=E4=B9=A6=E6=8F=92?= =?UTF-8?q?=E5=85=A5=E8=AF=81=E6=8D=AE=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wisdomarbitrate/TestPOIController.java | 104 +++++++++++------- .../java/com/ruoyi/common/utils/WordUtil.java | 2 +- .../service/impl/AdjudicationServiceImpl.java | 66 +++++++++-- 3 files changed, 122 insertions(+), 50 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/TestPOIController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/TestPOIController.java index 369d6ce..be87b38 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/TestPOIController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/TestPOIController.java @@ -35,6 +35,7 @@ import java.nio.file.StandardCopyOption; import java.text.SimpleDateFormat; import java.time.LocalDate; import java.util.*; +import java.util.regex.Pattern; @RestController @RequestMapping @@ -52,6 +53,8 @@ public class TestPOIController { private RedisCache redisCache; @Autowired private SendMailRecordMapper sendMailRecordMapper; + @Autowired + private ICaseApplicationService caseApplicationService; @GetMapping("/test") public AjaxResult createDocument(@RequestBody CaseApplication caseApplication) { @@ -92,10 +95,10 @@ public class TestPOIController { datas.put("resName", affiliate.getName()); datas.put("resAddress", affiliate.getResidenAffili()); String responSex = affiliate.getResponSex(); - if (responSex.equals("0")){ - datas.put("resSex","男"); - }else{ - datas.put("resSex","女"); + if (responSex.equals("0")) { + datas.put("resSex", "男"); + } else { + datas.put("resSex", "女"); } Date responBirth = affiliate.getResponBirth(); if (responBirth != null) { @@ -244,12 +247,37 @@ public class TestPOIController { } datas.put("claims", caseApplication1.getArbitratClaims()); datas.put("request", caseApplication1.getRequestRule()); - //申请人证据材料 - datas.put("appEvidenceMaterial", null); - //被申请人证据材料 - - PictureRenderData pictureRenderData = WordUtil.rebuildImageContent(100, 100, null, "D:\\develop\\Snipaste_2023-10-27_09-59-23.jpg"); - datas.put("resEvidenceMaterial", "证据详情可查询附件"); + CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication); + List caseAttachList1 = caseApplication2.getCaseAttachList(); + if (caseAttachList1 != null && caseAttachList1.size() > 0) { + for (CaseAttach caseAttach : caseAttachList1) { + if (caseAttach.getAnnexType() == 6) { //被申请人证据材料 + String annexName = caseAttach.getAnnexName(); + boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName); + if (isImageFile) { + String prefix = "/profile"; + int startIndex = annexName.indexOf(prefix); + startIndex += prefix.length(); + String annexPath = "/uploadPath" + annexName.substring(startIndex); + System.out.println("路径是===========" + annexPath); + PictureRenderData pictureRenderData = WordUtil + .rebuildImageContent(100, 100, null, annexPath); + datas.put("resEvidenceMaterial", pictureRenderData); + } + } else if (caseAttach.getAnnexType() == 2) { //申请人证据材料 + String annexName = caseAttach.getAnnexName(); + boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName); + if (isImageFile) { + String annexPath = "/home/ruoyi"+caseAttach.getAnnexPath(); + System.out.println("路径是===========" + annexPath); + PictureRenderData pictureRenderData = WordUtil + .rebuildImageContent(100, 100, null, annexPath); + //申请人证据材料 + datas.put("appEvidenceMaterial", pictureRenderData); + } + } + } + } datas.put("applicaCrossOpin", caseApplication1.getApplicaCrossOpin()); if (arbitrateRecord1 != null) { datas.put("factDetermi", arbitrateRecord1.getFactDetermi()); @@ -261,10 +289,10 @@ public class TestPOIController { datas.put("year", year); String month = String.format("%02d", now.getMonthValue()); String day = String.format("%02d", now.getDayOfMonth()); - //String modalFilePath = "/data/arbitrate-document/template/新裁决书模板.docx"; - String modalFilePath = "D:/develop/新裁决书模板.docx"; - //String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day; - String saveFolderPath = "D:/data/" + year + "/" + month + "/" + day; + String modalFilePath = "/data/arbitrate-document/template/新裁决书模板.docx"; + // String modalFilePath = "D:/develop/新裁决书模板.docx"; + String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day; + // String saveFolderPath = "D:/data/" + year + "/" + month + "/" + day; String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx"; String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName; String resultFilePath = saveFolderPath + "/" + fileName; @@ -311,11 +339,13 @@ public class TestPOIController { caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION); caseApplicationMapper.submitCaseApplication(caseApplication1); return AjaxResult.success("裁决书已生成"); - } catch (IOException e) { - return AjaxResult.error(e + "请检查文件路径是否有误"); - } + } catch(IOException e) + { + return AjaxResult.error(e + "请检查文件路径是否有误"); } +} + public String getNewEquipmentNo() { Object awardNum = redisCache.getCacheObject("awardNum"); if (awardNum == null) { @@ -343,30 +373,22 @@ public class TestPOIController { } public static void main(String[] args) throws Exception { - // 创建一个新的Word文档 - XWPFDocument document = new XWPFDocument(); + Map datas = new HashMap() { + { + //本地图片 + put("resEvidenceMaterial", new PictureRenderData(100, 120, "D:\\develop\\Snipaste_2023-10-27_09-59-23.jpg")); + //网路图片 + // put("urlPicture", new PictureRenderData(100, 100, ".png", BytePictureUtils.getUrlByteArray("https://avatars3.githubusercontent.com/u/1394854?v=3&s=40"))); + } + }; - // 创建一个段落 - XWPFParagraph paragraph = document.createParagraph(); - - // 创建一个文本区域 - XWPFRun run = paragraph.createRun(); - - // 加载图片文件 - File imageFile = new File("D:\\develop\\Snipaste_2023-10-27_09-59-23.jpg"); - FileInputStream fis = new FileInputStream(imageFile); - - // 将图片插入到文档中 - run.addPicture(fis, Document.PICTURE_TYPE_JPEG, "image.jpg", Units.toEMU(100), Units.toEMU(100)); - - // 关闭输入流 - fis.close(); - - // 保存文档 - String filePath= "D:\\develop\\"+UUID.randomUUID()+"document.docx"; - FileOutputStream fos = new FileOutputStream(filePath); - document.write(fos); - fos.close(); - } + XWPFTemplate template = XWPFTemplate.compile("D:\\develop\\新裁决书模板.docx") + .render(datas); + FileOutputStream out = new FileOutputStream("D:\\develop\\out_picture.docx"); + template.write(out); + out.flush(); + out.close(); + template.close(); } +} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/WordUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/WordUtil.java index 5cddab0..236fee7 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/WordUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/WordUtil.java @@ -146,7 +146,7 @@ public class WordUtil { public static PictureRenderData rebuildImageContent(Integer with, Integer height, String imageUrl, String relatedPath) { PictureRenderData pictureRenderData = null; if (!StringUtils.isBlank(imageUrl)) { - // pictureRenderData = Pictures.of(imageUrl).size(with, height).create(); + //pictureRenderData = Pictures.of(imageUrl).size(with, height).create(); //Pictures.PictureBuilder pictureBuilder = Pictures.of("https://res.wx.qq.com/a/wx_fed/weixin_portal/res/static/img/1EtCRvm.png"); } else if (!StringUtils.isBlank(relatedPath)) { pictureRenderData = Pictures.ofLocal(relatedPath).size(with, height).create(); 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 3ac266d..3e371b6 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 @@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.service.impl; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.deepoove.poi.data.PictureRenderData; import com.ruoyi.common.constant.CaseApplicationConstants; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.redis.RedisCache; @@ -36,6 +37,7 @@ import java.nio.file.StandardCopyOption; import java.text.SimpleDateFormat; import java.time.LocalDate; import java.util.*; +import java.util.regex.Pattern; import static com.ruoyi.common.utils.SecurityUtils.getUsername; @@ -254,10 +256,34 @@ public class AdjudicationServiceImpl implements IAdjudicationService { } datas.put("claims", caseApplication1.getArbitratClaims()); datas.put("request", caseApplication1.getRequestRule()); - //申请人证据材料 - datas.put("appEvidenceMaterial", null); - //被申请人证据材料 - datas.put("resEvidenceMaterial","(详见附件列表)"); + CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication); + List caseAttachList1 = caseApplication2.getCaseAttachList(); + if (caseAttachList1 != null && caseAttachList1.size() > 0) { + for (CaseAttach caseAttach : caseAttachList1) { + if (caseAttach.getAnnexType() == 6) { //被申请人证据材料 + String annexName = caseAttach.getAnnexName(); + boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName); + if (isImageFile) { + String annexPath = "/home/ruoyi"+caseAttach.getAnnexPath(); + System.out.println("路径是===========" + annexPath); + PictureRenderData pictureRenderData = WordUtil + .rebuildImageContent(100, 100, null, annexPath); + datas.put("resEvidenceMaterial", pictureRenderData); + } + } else if (caseAttach.getAnnexType() == 2) { //申请人证据材料 + String annexName = caseAttach.getAnnexName(); + boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName); + if (isImageFile) { + String annexPath = "/home/ruoyi"+caseAttach.getAnnexPath(); + System.out.println("路径是===========" + annexPath); + PictureRenderData pictureRenderData = WordUtil + .rebuildImageContent(100, 100, null, annexPath); + //申请人证据材料 + datas.put("appEvidenceMaterial", pictureRenderData); + } + } + } + } datas.put("applicaCrossOpin", caseApplication1.getApplicaCrossOpin()); if (arbitrateRecord1 != null) { datas.put("factDetermi", arbitrateRecord1.getFactDetermi()); @@ -804,10 +830,34 @@ public class AdjudicationServiceImpl implements IAdjudicationService { } datas.put("claims", caseApplication1.getArbitratClaims()); datas.put("request", caseApplication1.getRequestRule()); - //申请人证据材料 - datas.put("appEvidenceMaterial", null); - //被申请人证据材料 - datas.put("resEvidenceMaterial","(详见附件列表)"); + CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication); + List caseAttachList1 = caseApplication2.getCaseAttachList(); + if (caseAttachList1 != null && caseAttachList1.size() > 0) { + for (CaseAttach caseAttach : caseAttachList1) { + if (caseAttach.getAnnexType() == 6) { //被申请人证据材料 + String annexName = caseAttach.getAnnexName(); + boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName); + if (isImageFile) { + String annexPath = "/home/ruoyi"+caseAttach.getAnnexPath(); + System.out.println("路径是===========" + annexPath); + PictureRenderData pictureRenderData = WordUtil + .rebuildImageContent(100, 100, null, annexPath); + datas.put("resEvidenceMaterial", pictureRenderData); + } + } else if (caseAttach.getAnnexType() == 2) { //申请人证据材料 + String annexName = caseAttach.getAnnexName(); + boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName); + if (isImageFile) { + String annexPath = "/home/ruoyi"+caseAttach.getAnnexPath(); + System.out.println("路径是===========" + annexPath); + PictureRenderData pictureRenderData = WordUtil + .rebuildImageContent(100, 100, null, annexPath); + //申请人证据材料 + datas.put("appEvidenceMaterial", pictureRenderData); + } + } + } + } datas.put("applicaCrossOpin", caseApplication1.getApplicaCrossOpin()); if (arbitrateRecord1 != null) { datas.put("factDetermi", arbitrateRecord1.getFactDetermi()); From 533ce8d465b6cefb542a3ccb27b04f4e11b7611f Mon Sep 17 00:00:00 2001 From: 18792927508 <1322446236@qq.com> Date: Fri, 3 Nov 2023 16:03:08 +0800 Subject: [PATCH 5/6] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CaseEvidenceServiceImpl.java | 2 +- .../service/impl/CasePaymentServiceImpl.java | 17 +++++++++++++---- .../wisdomarbitrate/CaseApplicationMapper.xml | 4 +++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java index aa87e90..2c73aab 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java @@ -119,12 +119,12 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService { caseApplication.setCaseStatus(4); caseApplicationMapper.submitCaseApplication(caseApplication); } + } CaseAttach caseAttachselect = new CaseAttach(); caseAttachselect.setAnnexId(caseAttach.getAnnexId()); caseAttachselect.setAnnexName(caseAttach.getAnnexName()); caseAttachselect.setAnnexType(caseAttach.getAnnexType()); return AjaxResult.success("上传成功", caseAttachselect); - } } catch (IOException e) { e.printStackTrace(); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java index 9bb6198..e95d423 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java @@ -185,11 +185,20 @@ public class CasePaymentServiceImpl implements ICasePaymentService { CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication); caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM); //修改案件状态 - caseApplicationMapper.submitCaseApplication(caseApplication1); - // 新增日志 - CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_PAYMENT_CONFIRM,""); + int i = caseApplicationMapper.submitCaseApplication(caseApplication1); + if(i>0) { + // 修改支付状态 + CasePaymentRecord paymentRecord = new CasePaymentRecord(); + paymentRecord.setPayType(payDTO.getPayType()); + paymentRecord.setCaseId(payDTO.getCaseId()); + paymentRecord.setPaymentStatus(1); + casePaymentRecordMapper.saveRecord(paymentRecord); + // 新增日志 + CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, ""); - return AjaxResult.success("确认缴费成功"); + return AjaxResult.success("确认缴费成功"); + } + return AjaxResult.success("确认缴费失败"); } diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml index de4523e..d7ef77d 100644 --- a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml @@ -7,6 +7,7 @@ + @@ -516,6 +517,7 @@ CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理' ELSE '无审理方式' END arbitratMethodName, + c.case_name, c.case_status , CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费' when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核' @@ -596,7 +598,7 @@ order by c.create_time desc limit 1 CASE c.pay_type when 0 then '线上支付' when 0 then '线下支付' else '' end payTypeName from case_application c left join case_payment_record p on c.id = p.case_id where c.case_status = 3 - AND c.id = #{id} and p.payment_status=1 + AND c.id = #{id} and p.payment_status=1 limit 1 - select id ,case_appli_id ,case_num ,phone ,send_time ,send_content + select id ,case_appli_id ,case_num ,phone ,send_time ,send_content,send_status from sms_send_record