From 7df9803cd672cce9c9c0d06d895911c8f6f87ced Mon Sep 17 00:00:00 2001 From: lijiarao Date: Thu, 1 Aug 2024 17:37:59 +0800 Subject: [PATCH 1/8] =?UTF-8?q?update=20=E6=96=87=E6=A1=A3=E6=8B=86?= =?UTF-8?q?=E5=88=86=E5=AF=BC=E5=87=BA=20=E5=9B=BE=E7=89=87=E8=AF=91?= =?UTF-8?q?=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/FileSplitItemsEOServiceImpl.java | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java index f3faddcb..c6ac96e0 100644 --- a/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java @@ -3960,18 +3960,34 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl allImgList, String fileNowPath) { for(FileSplitValImgExportDto imgExportDto : allImgList){ - String oldPath = uploadCospath + "/" + imgExportDto.getImgPath(); - String newPath = fileNowPath + File.separator + imgExportDto.getImgName(); - if (MinioUtil.doesObjectExist(oldPath)){ - try (InputStream in = MinioUtil.download(oldPath);) { - copyFile1(in, newPath); + String imgName = imgExportDto.getImgName(); + String fileName = imgExportDto.getImgPath(); + String oldPath = getPath(fileName); + String newPath = fileNowPath + File.separator + imgName; + try (InputStream in = ObsBootUtil.getOssFile(oldPath)) { + copyFile1(in, newPath); + } catch (IOException e) { + log.error(e.getMessage(), e); + } + String fileNameTranslation = imgExportDto.getImgPathTranslation(); + if (StringUtils.isNotBlank(fileNameTranslation)){ + String imgNameTranslation = imgName.substring(0,imgName.indexOf("."))+"translation.png"; + String oldPathTranslation = getPath(fileNameTranslation); + String newPathTranslation = fileNowPath + File.separator + imgNameTranslation; + try (InputStream in = ObsBootUtil.getOssFile(oldPathTranslation)) { + copyFile1(in, newPathTranslation); } catch (IOException e) { - e.printStackTrace(); log.error(e.getMessage(), e); } } } + } + private String getPath(String fileName){ + if (!fileName.contains("temp")){ + fileName = "temp\\" + fileName; + } + return fileName.replace("\\\\", "\\"); } @Override @@ -3979,13 +3995,10 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl startRow) { for(int cellNum = 0; cellNum < fieldList.size(); cellNum++) { - if (!"item_content".equals(fieldList.get(cellNum))) { + String s = fieldList.get(cellNum); + if (!"item_content".equals(s) && !"translation".equals(s)) { sheetItems.addMergedRegion(new CellRangeAddress(startRow, allRow, cellNum, cellNum)); } } From d9089644902a7f7aab72bb11e022de357284610a Mon Sep 17 00:00:00 2001 From: lijiarao Date: Thu, 1 Aug 2024 19:11:51 +0800 Subject: [PATCH 2/8] =?UTF-8?q?update=20=E6=96=87=E6=A1=A3=E6=8B=86?= =?UTF-8?q?=E5=88=86=20=E7=BC=96=E8=BE=91=E8=AF=91=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/xml/DocumentSplitMapper.xml | 3 +- .../impl/DocumentSplitServiceImpl.java | 40 +++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/laws-modules/src/main/java/com/jero/modules/laws/documenttool/mapper/xml/DocumentSplitMapper.xml b/laws-modules/src/main/java/com/jero/modules/laws/documenttool/mapper/xml/DocumentSplitMapper.xml index 41223719..85305e31 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/documenttool/mapper/xml/DocumentSplitMapper.xml +++ b/laws-modules/src/main/java/com/jero/modules/laws/documenttool/mapper/xml/DocumentSplitMapper.xml @@ -4,7 +4,7 @@ insert into SAR_FILE_SPLIT_ITEMS_VAL - (id, type, item_id, valid_flag, creation_user, creation_time, modify_time, modify_user, display_seq, img_name, item_content, index_item) + (id, type, item_id, valid_flag, creation_user, creation_time, modify_time, modify_user, display_seq, img_name, item_content, translation, index_item) values ( #{item.id, jdbcType=VARCHAR}, #{item.type, jdbcType=VARCHAR}, @@ -14,6 +14,7 @@ #{item.modifyUser, jdbcType=VARCHAR}, #{item.displaySeq, jdbcType=INTEGER}, #{item.imgName, jdbcType=INTEGER}, #{item.itemContent, jdbcType=CLOB}, + #{item.translation, jdbcType=CLOB}, #{item.indexItem, jdbcType=INTEGER}) diff --git a/laws-modules/src/main/java/com/jero/modules/laws/documenttool/service/impl/DocumentSplitServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/documenttool/service/impl/DocumentSplitServiceImpl.java index eef19607..8b7a581d 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/documenttool/service/impl/DocumentSplitServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/documenttool/service/impl/DocumentSplitServiceImpl.java @@ -465,6 +465,10 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService { if (ITEM_CONTENT.equals(k)){ v = itemContentJoin(valList, (String) parameter.get(ID)); } + // 条文内容拼接 + if (TRANSLATION.equals(k)){ + v = translationJoin(valList, (String) parameter.get(ID)); + } // 条文解读 if (INTERPRETATION_ARTICLES.equals(k)){ v = articlesJoin(articlesList, (String) parameter.get(ID)); @@ -532,6 +536,42 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService { return valContent.toString(); } + private String translationJoin(List valList, String itemId) { + StringBuilder valContent = new StringBuilder(); + if (!Objects.isNull(valList) && !valList.isEmpty()){ + int index = 0; + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + for (SarFileSplitItemsValEO sarFileSplitItemsValEO : valList) { + String translation = sarFileSplitItemsValEO.getTranslation(); + // 条文内容拼接 + if (DocumentSplitCommon.TEXT.equals(sarFileSplitItemsValEO.getType())) { + if (StringUtils.isNotBlank(translation)){ + sarFileSplitItemsValEO.setTranslation(translation + .replace("<", "<").replace(">", ">")); + } + valContent.append("

").append(translation).append("

"); + } else if (DocumentSplitCommon.IMG.equals(sarFileSplitItemsValEO.getType())) { + valContent.append(""); + } else if (DocumentSplitCommon.TABLE.equals(sarFileSplitItemsValEO.getType())) { + valContent.append(translation); + } + + // 条目信息 + index += 1; + sarFileSplitItemsValEO.setId(UUIDUtils.randomUUID20()); + sarFileSplitItemsValEO.setItemId(itemId); + sarFileSplitItemsValEO.setDisplaySeq(index); + sarFileSplitItemsValEO.setValidFlag(0); + sarFileSplitItemsValEO.setCreationTime(new Date()); + sarFileSplitItemsValEO.setModifyTime(new Date()); + sarFileSplitItemsValEO.setCreationUser(sysUser.getId()); + sarFileSplitItemsValEO.setModifyUser(sysUser.getId()); + } + } + return valContent.toString(); + } + private String itemContentJoin(List valList, String itemId) { StringBuilder valContent = new StringBuilder(); if (!Objects.isNull(valList) && !valList.isEmpty()){ From 429f75778a4fee6d4b76426378ca4498dffba520 Mon Sep 17 00:00:00 2001 From: yjz <3131811435@qq.com> Date: Fri, 2 Aug 2024 10:26:02 +0800 Subject: [PATCH 3/8] =?UTF-8?q?fix(=E6=A0=87=E5=87=86=E8=A7=A3=E8=AF=BB):?= =?UTF-8?q?=20=E8=AF=91=E6=96=87=E6=94=B9=E4=B8=BA=E6=A0=87=E5=87=86?= =?UTF-8?q?=E9=87=8C=E5=B8=A6=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xml/ProcessStandardInterpretClauseSublistMapper.xml | 3 ++- .../service/impl/StandardInterpretFlowServiceImpl.java | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/mapper/xml/ProcessStandardInterpretClauseSublistMapper.xml b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/mapper/xml/ProcessStandardInterpretClauseSublistMapper.xml index 9dbfa1d2..7d9f8fa9 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/mapper/xml/ProcessStandardInterpretClauseSublistMapper.xml +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/mapper/xml/ProcessStandardInterpretClauseSublistMapper.xml @@ -9,7 +9,7 @@ standard_interpret_clause_id, clause_id, interpret_person_id, - `translation`, + psic2.translation is_same_as_prev_version, change_description, regulatory_notes, @@ -50,6 +50,7 @@ IF(lds.id is not null, lds.standard_number, lds2.item_num) itemNum, IF(lds.id is not null, lds.standard_name, lds2.item_title) itemTitle, IF(lds.id is not null, null, lds2.item_content) itemContent, + lds2.translation, standard_interpret_id from process_standard_interpret_clause psic left join laws_domestic_standard lds on psic.clause_id = lds.id and lds.del_flag = 0 diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java index 9df0f702..5507ba59 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java @@ -256,6 +256,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe lawsDocumentSplit.setItemNum(null); lawsDocumentSplit.setItemTitle(null); lawsDocumentSplit.setItemContent(null); + lawsDocumentSplit.setTranslation(null); LawsDomesticStandard lawsDomesticStandard = lawsDomesticStandardService.getById(standardInterpretClauseSublist.getClauseId()); if (!Objects.isNull(lawsDomesticStandard)){ @@ -467,8 +468,8 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe // 合并 first.setInterpretPersonId(mergeString(first.getInterpretPersonId(), standardInterpretClauseSublist.getInterpretPersonId())); - first.setTranslation(mergeString(first.getTranslation(), - standardInterpretClauseSublist.getTranslation())); +// first.setTranslation(mergeString(first.getTranslation(), +// standardInterpretClauseSublist.getTranslation())); first.setIsSameAsPrevVersion(mergeString(first.getIsSameAsPrevVersion(), standardInterpretClauseSublist.getIsSameAsPrevVersion())); first.setChangeDescription(mergeString(first.getChangeDescription(), From 2fbfc3a68ce82ca2c9ce02dfb1cbc5f8a281c2a9 Mon Sep 17 00:00:00 2001 From: lijiarao Date: Fri, 9 Aug 2024 10:37:21 +0800 Subject: [PATCH 4/8] =?UTF-8?q?fix=20=E7=BC=96=E8=BE=91=E8=AF=91=E6=96=87?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=9B=9E=E6=98=BE=E5=88=B0?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../laws/documenttool/service/impl/DocumentSplitServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/laws-modules/src/main/java/com/jero/modules/laws/documenttool/service/impl/DocumentSplitServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/documenttool/service/impl/DocumentSplitServiceImpl.java index 8b7a581d..ae574096 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/documenttool/service/impl/DocumentSplitServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/documenttool/service/impl/DocumentSplitServiceImpl.java @@ -456,6 +456,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService { List valList = JSON.parseArray(JSON.toJSONString(parameter.get("itemValEOList")), SarFileSplitItemsValEO.class); parameter.remove("itemValEOList"); parameter.putIfAbsent(ITEM_CONTENT, ""); + parameter.putIfAbsent(TRANSLATION, ""); // 条文解读 List articlesList = JSON.parseArray(JSON.toJSONString(parameter.get(INTERPRETATION_ARTICLES_LIST)), SarFileSplitItemsValEO.class); parameter.remove(INTERPRETATION_ARTICLES_LIST); From 12ead6324e13ce9cf778207b4f55fa12d447d8e8 Mon Sep 17 00:00:00 2001 From: lijiarao Date: Tue, 13 Aug 2024 18:09:07 +0800 Subject: [PATCH 5/8] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E6=8B=86=E5=88=86=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../split/service/impl/FileSpiltService.java | 40 ++++++++++++++++--- .../jero/modules/split/util/AsposeUtil.java | 20 ++++++++-- 2 files changed, 50 insertions(+), 10 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSpiltService.java b/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSpiltService.java index a2838f68..e8b36c94 100644 --- a/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSpiltService.java +++ b/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSpiltService.java @@ -120,6 +120,9 @@ public class FileSpiltService { * @return */ public int fileCHN(SarFileSplitInfoEO sarFileSplitInfoEO, SplitFileTypeTypeEnum enumByValue) { + long time1=System.currentTimeMillis(); + long time2=System.currentTimeMillis(); + log.info("耗时:"+(time2-time1)+"ms"); if (sarFileSplitInfoEO.getStopNumber() <= 0) { sarFileSplitInfoEO.setStopNumber(200); } @@ -130,6 +133,8 @@ public class FileSpiltService { String partName = ""; LawsDomesticStandard lawsDomesticStandard = lawsDomesticStandardService.getById(sarFileSplitInfoEO.getStandardId()); LawsEnterpriseStandard lawsEnterpriseStandard = lawsEnterpriseStandardService.getById(sarFileSplitInfoEO.getStandardId()); + long time3=System.currentTimeMillis(); + log.info("耗时:"+(time3-time1)+"ms"); if (!Objects.isNull(lawsDomesticStandard)){ partName = lawsDomesticStandard.getPartName(); }else { @@ -145,7 +150,8 @@ public class FileSpiltService { // 拆分文件条款详情表中最终插入数据 List itemValList = new ArrayList<>(); Long treeListDisplay = 1L; - + long time4=System.currentTimeMillis(); + log.info("耗时:"+(time4-time1)+"ms"); String generalCatalogueId = UUIDUtils.randomUUID20(); SarFileSplitMenuEO documentTreeEO = new SarFileSplitMenuEO(); // SarFileSplitMenuEO documentTreeEO = new SarFileSplitMenuEO(generalCatalogueId,"总目录","",sarFileSplitInfoEO.getId(),treeListDisplay++,""); @@ -180,19 +186,37 @@ public class FileSpiltService { if (StringUtils.isEmpty(readFilePath)) { throw new JeroBootException("当前文件未找到,请重新选择!"); } + long time5=System.currentTimeMillis(); + log.info("耗时:"+(time5-time1)+"ms"); // try (InputStream is = MinioUtil.download(readFilePath);InputStream is1 = MinioUtil.download(readFilePath)) { try (InputStream is = ObsBootUtil.getOssFile(readFilePath);InputStream is1 = ObsBootUtil.getOssFile(readFilePath)) { + long time6=System.currentTimeMillis(); + log.info("耗时:"+(time6-time1)+"ms"); String fileName = readFilePath.substring((readFilePath.lastIndexOf("/") + 1)); - MultipartFile mFile = new MockMultipartFile(fileName, fileName, ContentType.APPLICATION_OCTET_STREAM.toString(), is); - MultipartFile mFile1 = new MockMultipartFile(fileName, fileName, ContentType.APPLICATION_OCTET_STREAM.toString(), is1); - InputStream inputStream = IntekeyUtils.getInputStreamByDecryptFile(mFile); - InputStream inputStream1 = IntekeyUtils.getInputStreamByDecryptFile(mFile1); + InputStream inputStream; + InputStream inputStream1; + if (IntekeyUtils.ENABLE) { + MultipartFile mFile = new MockMultipartFile(fileName, fileName, ContentType.APPLICATION_OCTET_STREAM.toString(), is); + MultipartFile mFile1 = new MockMultipartFile(fileName, fileName, ContentType.APPLICATION_OCTET_STREAM.toString(), is1); + inputStream = IntekeyUtils.getInputStreamByDecryptFile(mFile); + inputStream1 = IntekeyUtils.getInputStreamByDecryptFile(mFile1); + }else { + inputStream = is; + inputStream1 = is1; + } + ZipSecureFile.setMinInflateRatio(-1.0d); + long time7=System.currentTimeMillis(); + log.info("耗时:"+(time7-time1)+"ms"); XWPFDocument doc = new XWPFDocument(inputStream); + long time8=System.currentTimeMillis(); + log.info("耗时:"+(time8-time1)+"ms"); // 获取文档中的图片 - List allPictures = doc.getAllPictures(); + //List allPictures = doc.getAllPictures(); //获得序号标题和无标题序号 TitleNumberVO titleNumberVO = AsposeUtil.getNumber(inputStream1); + long time9=System.currentTimeMillis(); + log.info("耗时:"+(time9-time1)+"ms"); //TitleNumberVO titleNumberVO = new TitleNumberVO(); Map> titleNumberMap = titleNumberVO.getTitleNumberMap(); List emptyTitleList = titleNumberVO.getEmptyTitleList(); @@ -468,6 +492,8 @@ public class FileSpiltService { log.error(e.getMessage(),e); return -1; } + long time10=System.currentTimeMillis(); + log.info("耗时:"+(time10-time1)+"ms"); if (treeList.size() > 0 && messageList.size() > 0) { sarFileSplitMenuEOMapper.insertForeach(treeList); for (int i = 0; i < messageList.size(); i++) { @@ -477,6 +503,8 @@ public class FileSpiltService { iSarFileSplitItemsEOService.insertForeach(messageList); iSarFileSplitItemsValEOService.insertForeach(itemValList); + long time11=System.currentTimeMillis(); + log.info("耗时:"+(time11-time1)+"ms"); } else { return -1; } diff --git a/laws-modules/src/main/java/com/jero/modules/split/util/AsposeUtil.java b/laws-modules/src/main/java/com/jero/modules/split/util/AsposeUtil.java index 892c476b..9fc9e4be 100644 --- a/laws-modules/src/main/java/com/jero/modules/split/util/AsposeUtil.java +++ b/laws-modules/src/main/java/com/jero/modules/split/util/AsposeUtil.java @@ -23,18 +23,28 @@ public class AsposeUtil { * @return */ public static TitleNumberVO getNumber(InputStream is) { + long time1=System.currentTimeMillis(); + TitleNumberVO titleNumberVO = new TitleNumberVO(); Map> titleNumberMap = new HashMap<>(); List emptyTitleList = new ArrayList<>(); try { + long time9=System.currentTimeMillis(); + log.info("耗时:"+(time9-time1)+"ms"); Document doc = new Document(is); - + long time8=System.currentTimeMillis(); + log.info("耗时:"+(time8-time1)+"ms"); DocumentBuilder builder = new DocumentBuilder(doc); - - builder.insertField(FieldType.FIELD_NUM_PAGES, true); + long time7=System.currentTimeMillis(); + log.info("耗时:"+(time7-time1)+"ms"); + //builder.insertField(FieldType.FIELD_NUM_PAGES, true); + long time6=System.currentTimeMillis(); + log.info("耗时:"+(time6-time1)+"ms"); //获取段落 - NodeCollection childNodes = doc.getChildNodes(NodeType.ANY, true); + NodeCollection childNodes = doc.getChildNodes(NodeType.PARAGRAPH, true); + long time2=System.currentTimeMillis(); + log.info("耗时:"+(time2-time1)+"ms"); for (int i = 0; i < childNodes.getCount(); i++) { Node next = childNodes.get(i); @@ -79,6 +89,8 @@ public class AsposeUtil { } titleNumberVO.setTitleNumberMap(titleNumberMap); titleNumberVO.setEmptyTitleList(emptyTitleList); + long time9=System.currentTimeMillis(); + log.info("耗时:"+(time9-time1)+"ms"); return titleNumberVO; } From 962360971410542d5744e285c33bc8be06f7a138 Mon Sep 17 00:00:00 2001 From: yjz <3131811435@qq.com> Date: Wed, 14 Aug 2024 15:10:41 +0800 Subject: [PATCH 6/8] =?UTF-8?q?fix(=E8=A7=A3=E8=AF=BB=E6=B5=81=E7=A8=8B):?= =?UTF-8?q?=20=E8=AF=91=E6=96=87=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/ProcessStandardInterpretClause.java | 4 ++++ .../ProcessStandardInterpretClauseSublist.java | 1 + .../xml/ProcessStandardInterpretClauseMapper.xml | 1 + .../impl/StandardInterpretFlowServiceImpl.java | 14 ++++++++++++-- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/entity/ProcessStandardInterpretClause.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/entity/ProcessStandardInterpretClause.java index b48a6c88..38f14f31 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/entity/ProcessStandardInterpretClause.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/entity/ProcessStandardInterpretClause.java @@ -41,6 +41,10 @@ public class ProcessStandardInterpretClause extends BaseEntity { @TableField(exist = false) @Excel(name = "条款内容", width = 15) private String itemContent; + /**译文*/ + @ApiModelProperty(value = "译文") + @TableField(exist = false) + private String translation; /**各涉及部门解读人*/ @ApiModelProperty(value = "各涉及部门解读人") @Excel(name = "各涉及部门解读人", width = 18, dictTable = "sys_user", dicCode = "id", dicText = "CONCAT(realname, '(', username, ')')") diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/entity/ProcessStandardInterpretClauseSublist.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/entity/ProcessStandardInterpretClauseSublist.java index 362cae0c..9d2bdd8f 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/entity/ProcessStandardInterpretClauseSublist.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/entity/ProcessStandardInterpretClauseSublist.java @@ -51,6 +51,7 @@ public class ProcessStandardInterpretClauseSublist extends BaseEntity { /**译文*/ @ApiModelProperty(value = "译文") @Excel(name = "译文", width = 15) + @TableField(exist = false) private String translation; /**是否与上一版相同(字典:1:是,0:否)*/ @ApiModelProperty(value = "是否与上一版相同(字典:1:是,0:否)") diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/mapper/xml/ProcessStandardInterpretClauseMapper.xml b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/mapper/xml/ProcessStandardInterpretClauseMapper.xml index a448e753..208d3216 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/mapper/xml/ProcessStandardInterpretClauseMapper.xml +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/mapper/xml/ProcessStandardInterpretClauseMapper.xml @@ -8,6 +8,7 @@ IF(lds.id is not null, lds.standard_number, lds2.item_num) itemNum, IF(lds.id is not null, lds.standard_name, lds2.item_title) itemTitle, IF(lds.id is not null, null, lds2.item_content) itemContent, + lds2.translation, standard_interpret_id, psic.clause_id, interpret_person_ids, diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java index 5507ba59..698997a0 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java @@ -468,8 +468,6 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe // 合并 first.setInterpretPersonId(mergeString(first.getInterpretPersonId(), standardInterpretClauseSublist.getInterpretPersonId())); -// first.setTranslation(mergeString(first.getTranslation(), -// standardInterpretClauseSublist.getTranslation())); first.setIsSameAsPrevVersion(mergeString(first.getIsSameAsPrevVersion(), standardInterpretClauseSublist.getIsSameAsPrevVersion())); first.setChangeDescription(mergeString(first.getChangeDescription(), @@ -748,6 +746,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe .map(SarFileSplitItemsValEO::getItemContent) .collect(Collectors.joining("\n\r")); processStandardInterpretClause.setItemContent(itemContents); + String translation = sarFileSplitItemsValEOS.stream() + .map(SarFileSplitItemsValEO::getTranslation) + .collect(Collectors.joining("\n\r")); + processStandardInterpretClause.setTranslation(translation); } } @@ -862,6 +864,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe .map(SarFileSplitItemsValEO::getItemContent) .collect(Collectors.joining("\n\r")); processStandardInterpretClauseSublist.setItemContent(itemContents); + String translation = sarFileSplitItemsValEOS.stream() + .map(SarFileSplitItemsValEO::getTranslation) + .collect(Collectors.joining("\n\r")); + processStandardInterpretClauseSublist.setTranslation(translation); } } }else { @@ -890,6 +896,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe .map(SarFileSplitItemsValEO::getItemContent) .collect(Collectors.joining("\n\r")); processStandardInterpretClause.setItemContent(itemContents); + String translation = sarFileSplitItemsValEOS.stream() + .map(SarFileSplitItemsValEO::getTranslation) + .collect(Collectors.joining("\n\r")); + processStandardInterpretClause.setTranslation(translation); } } From c1a6fdd0be5ee264d00569583a2b5e616d947543 Mon Sep 17 00:00:00 2001 From: yjz <3131811435@qq.com> Date: Wed, 14 Aug 2024 15:33:35 +0800 Subject: [PATCH 7/8] =?UTF-8?q?fix(=E8=A7=A3=E8=AF=BB=E6=B5=81=E7=A8=8B):?= =?UTF-8?q?=20=E8=AF=91=E6=96=87=E5=AF=BC=E5=85=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ocessStandardInterpretClauseSublistMapper.xml | 2 +- .../impl/StandardInterpretFlowServiceImpl.java | 2 +- .../standardinterpret/vo/FlowImportExcel.java | 16 ++++++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/mapper/xml/ProcessStandardInterpretClauseSublistMapper.xml b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/mapper/xml/ProcessStandardInterpretClauseSublistMapper.xml index 7d9f8fa9..221c7e62 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/mapper/xml/ProcessStandardInterpretClauseSublistMapper.xml +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/mapper/xml/ProcessStandardInterpretClauseSublistMapper.xml @@ -9,7 +9,7 @@ standard_interpret_clause_id, clause_id, interpret_person_id, - psic2.translation + psic2.translation, is_same_as_prev_version, change_description, regulatory_notes, diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java index 698997a0..1d026a85 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java @@ -787,7 +787,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe excelHeadVerify(file, FlowImportExcel.class, 0, 0); List lists = ExcelImportUtil.importExcel(file.getInputStream(), FlowImportExcel.class, params); - if (CollectionUtils.isEmpty(lists) || lists.size() <= 2) { + if (CollectionUtils.isEmpty(lists)) { return Result.error(ResultCommon.IMPORT_DATA_CANNOT_BE_EMPTY); } List list = BeanCopyUtils.copyBeanList(lists, diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/vo/FlowImportExcel.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/vo/FlowImportExcel.java index b5dab8f5..b8760bfc 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/vo/FlowImportExcel.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/vo/FlowImportExcel.java @@ -49,7 +49,7 @@ public class FlowImportExcel { @ApiModelProperty(value = "涉及系统/部件)") @Excel(name = "涉及系统/部件", width = 15) private String partName; - /**涉及系统/部件)*/ + /**关键控制器*/ @ApiModelProperty(value = "关键控制器)") @Excel(name = "关键控制器", width = 15) private String keyController; @@ -57,10 +57,18 @@ public class FlowImportExcel { @ApiModelProperty(value = "责任部门") @Excel(name = "责任部门", width = 15) private String responsibleDepartment; + /**责任部门专业模块*/ + @ApiModelProperty(value = "责任部门专业模块") + @Excel(name = "责任部门专业模块", width = 18) + private String responsibleModule; /**关联部门*/ @ApiModelProperty(value = "关联部门") @Excel(name = "关联部门", width = 15) private String relatedDepartment; + /**关联部门专业模块*/ + @ApiModelProperty(value = "关联部门专业模块") + @Excel(name = "关联部门专业模块", width = 18) + private String relatedModule; /**适用车型*/ @ApiModelProperty(value = "适用车型") @Excel(name = "适用车型", width = 15) @@ -73,9 +81,13 @@ public class FlowImportExcel { @ApiModelProperty(value = "专业领域") @Excel(name = "专业领域", width = 15) private String domainArea; + /**配置需求*/ + @ApiModelProperty(value = "配置需求") + @Excel(name = "配置需求", width = 15) + private String configurationRequirements; /**新认证实施日期*/ @ApiModelProperty(value = "新认证实施日期") - @Excel(name = "新认证实施日期", width = 15) + @Excel(name = "新认证车实施日期", width = 15) private String newCerImplementDate; /**新生产车实施日期*/ @ApiModelProperty(value = "新生产车实施日期") From f5635b79bfe4a61f441361d0489e50d8ce20802d Mon Sep 17 00:00:00 2001 From: yjz <3131811435@qq.com> Date: Wed, 14 Aug 2024 15:42:32 +0800 Subject: [PATCH 8/8] =?UTF-8?q?fix(=E8=A7=A3=E8=AF=BB=E6=B5=81=E7=A8=8B):?= =?UTF-8?q?=20=E8=AF=91=E6=96=87=E5=AF=BC=E5=85=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/StandardInterpretFlowServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java index 1d026a85..db8c8ccd 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java @@ -1189,6 +1189,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe }else { data.setClauseId(lawsDocumentSplits.getId()); data.setItemContent(lawsDocumentSplits.getItemContent()); + data.setTranslation(lawsDocumentSplits.getTranslation()); } }