From 5e4736dcd00ab54b89c2b97316fb3a62677ae35a Mon Sep 17 00:00:00 2001 From: yjz <3131811435@qq.com> Date: Thu, 22 Aug 2024 11:43:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9D=A1=E6=AC=BE=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E6=A0=87=E5=87=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProcessStandardInterpretClause.java | 5 ++++ .../StandardInterpretFlowServiceImpl.java | 25 ++++++++++++------- .../mapper/xml/DocumentSplitMapper.xml | 8 +++--- .../impl/DocumentSplitServiceImpl.java | 3 +++ .../impl/FileSplitItemsEOServiceImpl.java | 18 ++++++++++++- 5 files changed, 46 insertions(+), 13 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 38f14f31..d59a947a 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 @@ -60,5 +60,10 @@ public class ProcessStandardInterpretClause extends BaseEntity { /**是否分发(1:是 0:否)*/ @ApiModelProperty(value = "是否分发(1:是 0:否)") private String isDistribute; + + // 标准id + @ApiModelProperty("标准id") + @TableField(exist = false) + private String standardId; } 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 94df25c4..1253322f 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 @@ -303,10 +303,12 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe lawsDocumentSplit.setStandardId(lawsDomesticStandard.getId()); lawsDocumentSplit.setFileType( standardInterpretDTO.getProcessStandardInterpret().getDecompositionSource()); + lawsDocumentSplit.setInfoId(processStandardInterpret.getSplitInfoId()); HashMap parameter = new HashMap<>(); parameter.put("standard_id", lawsDomesticStandard.getId()); - parameter.put("file_type", - standardInterpretDTO.getProcessStandardInterpret().getDecompositionSource()); +// parameter.put("file_type", +// standardInterpretDTO.getProcessStandardInterpret().getDecompositionSource()); + parameter.put("info_id", processStandardInterpret.getSplitInfoId()); List> maps = documentSplitService.queryDocumentSplitDetailByList(parameter); if (CollectionUtils.isNotEmpty(maps)){ lawsDocumentSplit.setId(String.valueOf(maps.get(0).get("id"))); @@ -785,12 +787,18 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe list = documentSplitMapper.selectClauseList(lawsDocumentSplit); // 添加标准数据 - LawsDomesticStandard lawsDomesticStandard = lawsDomesticStandardService.getById(standardId); - ProcessStandardInterpretClause processStandardInterpretClause = new ProcessStandardInterpretClause(); - processStandardInterpretClause.setClauseId(lawsDomesticStandard.getId()); - processStandardInterpretClause.setItemNum(lawsDomesticStandard.getStandardNumber()); - processStandardInterpretClause.setItemTitle(lawsDomesticStandard.getStandardName()); - list.add(0, processStandardInterpretClause); + if (CollectionUtils.isNotEmpty(list)){ + if (StringUtils.isNotBlank(list.get(0).getStandardId())) { + standardId = sarFileSplitInfoEO.getStandardId(); + list.remove(0); + } + LawsDomesticStandard lawsDomesticStandard = lawsDomesticStandardService.getById(standardId); + ProcessStandardInterpretClause processStandardInterpretClause = new ProcessStandardInterpretClause(); + processStandardInterpretClause.setClauseId(lawsDomesticStandard.getId()); + processStandardInterpretClause.setItemNum(lawsDomesticStandard.getStandardNumber()); + processStandardInterpretClause.setItemTitle(lawsDomesticStandard.getStandardName()); + list.add(0, processStandardInterpretClause); + } } return list; } @@ -1669,7 +1677,6 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe processStandardInterpretClause.setClauseId(processStandardInterpret.getStandardId()); processStandardInterpretClause.setItemNum(processStandardInterpret.getStandardNumber()); processStandardInterpretClause.setItemTitle(processStandardInterpret.getStandardName()); - processStandardInterpretClause.setItemTitle(processStandardInterpret.getStandardName()); processStandardInterpretClauseList.add(processStandardInterpretClause); }else if (CollectionUtils.isEmpty(processStandardInterpretClauseList)){ // 如果没选择条款 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 ad426b04..f9534e7f 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 @@ -50,11 +50,12 @@ INSERT INTO laws_document_split (id, create_by, create_time, update_by, update_time, sys_org_code, - is_same_as_prev_version, item_title, menu_id, item_content, translation, item_num, info_id) + is_same_as_prev_version, item_title, menu_id, item_content, translation, item_num, info_id, standard_id) values (#{item.id}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.sysOrgCode}, - #{item.isSameAsPrevVersion}, #{item.itemTitle}, #{item.menuId}, #{item.itemContent}, #{item.translation}, #{item.itemNum}, #{item.infoId}) + #{item.isSameAsPrevVersion}, #{item.itemTitle}, #{item.menuId}, #{item.itemContent}, #{item.translation}, + #{item.itemNum}, #{item.infoId}, #{item.standardId}) @@ -272,13 +273,14 @@