From aa6cb32c9c436aa9c9f9956a489bd8a2f2e2050b Mon Sep 17 00:00:00 2001 From: yjz <3131811435@qq.com> Date: Wed, 31 Jul 2024 11:14:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(87407):=20=20=E6=A0=87=E5=87=86=E8=A7=A3?= =?UTF-8?q?=E8=AF=BB=E6=B5=81=E7=A8=8B=EF=BC=88=E6=A0=87=E5=87=86=E4=B8=BB?= =?UTF-8?q?=E8=A7=A3=E8=AF=BB=E4=BA=BA=E5=88=86=E5=8F=91=EF=BC=89=20--?= =?UTF-8?q?=E4=B8=8D=E5=88=86=E5=8F=91--=E5=AF=BC=E5=85=A5=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E6=A8=A1=E6=9D=BF=E4=B8=8E=E5=88=97=E8=A1=A8=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E4=B8=8D=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ProcessStandardInterpretClauseSublist.java | 13 +++--- ...ssStandardInterpretClauseSublistMapper.xml | 2 +- .../StandardInterpretFlowServiceImpl.java | 42 ++++++++++++++++++- 3 files changed, 50 insertions(+), 7 deletions(-) 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 1d6eac8a..362cae0c 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 @@ -82,7 +82,8 @@ public class ProcessStandardInterpretClauseSublist extends BaseEntity { private String responsibleDepartment; /**责任部门专业模块*/ @ApiModelProperty(value = "责任部门专业模块") - @Dict(dicCode = "responsible_module") + @Excel(name = "责任部门专业模块", width = 18, dicCode = "professional_module") + @Dict(dicCode = "professional_module") private String responsibleModule; /**关联部门*/ @ApiModelProperty(value = "关联部门") @@ -91,7 +92,8 @@ public class ProcessStandardInterpretClauseSublist extends BaseEntity { private String relatedDepartment; /**关联部门专业模块*/ @ApiModelProperty(value = "关联部门专业模块") - @Dict(dicCode = "related_module") + @Excel(name = "关联部门专业模块", width = 18, dicCode = "professional_module") + @Dict(dicCode = "professional_module") private String relatedModule; /**适用车型*/ @ApiModelProperty(value = "适用车型") @@ -110,15 +112,16 @@ public class ProcessStandardInterpretClauseSublist extends BaseEntity { private String domainArea; /**配置需求*/ @ApiModelProperty(value = "配置需求") + @Excel(name = "配置需求", width = 15, dicCode = "configuration_requirements") @Dict(dicCode = "configuration_requirements") private String configurationRequirements; /**新认证实施日期*/ - @ApiModelProperty(value = "新认证实施日期") - @Excel(name = "新认证实施日期", width = 15) + @ApiModelProperty(value = "新认证车实施日期") + @Excel(name = "新认证车实施日期", width = 18) private String newCerImplementDate; /**新生产车实施日期*/ @ApiModelProperty(value = "新生产车实施日期") - @Excel(name = "新生产车实施日期", width = 15) + @Excel(name = "新生产车实施日期", width = 18) private String newProductionImplementation; /**注册日期*/ @ApiModelProperty(value = "注册日期") 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 330af677..9dbfa1d2 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 @@ -13,7 +13,7 @@ is_same_as_prev_version, change_description, regulatory_notes, - keywords, + part_name, key_controller, applicable_components, responsible_department, 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 4c16b37c..845a81ad 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 @@ -1037,6 +1037,26 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe } } + String responsibleModule = data.getResponsibleModule(); + if (StringUtils.isNotBlank(responsibleModule)){ + boolean flag = true; + List list = new ArrayList<>(); + List dictItems = sysDictService.getDictItems("professional_module"); + for (String str : responsibleModule.split(",")) { + Optional optionalDictModel = dictItems.stream() + .filter(dictModel -> dictModel.getText().equals(str)).findFirst(); + if (!optionalDictModel.isPresent()){ + errorList.add("责任部门专业模块不存在!"); + flag = false; + break; + } + list.add(optionalDictModel.get().getValue()); + } + if (flag){ + data.setResponsibleModule(String.join(",", list)); + } + } + String relatedDepartment = data.getRelatedDepartment(); if (StringUtils.isNotBlank(relatedDepartment)){ boolean flag = true; @@ -1056,6 +1076,26 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe data.setRelatedDepartment(String.join(",", list)); } } + + String relatedModule = data.getRelatedModule(); + if (StringUtils.isNotBlank(relatedModule)){ + boolean flag = true; + List list = new ArrayList<>(); + List dictItems = sysDictService.getDictItems("professional_module"); + for (String str : relatedModule.split(",")) { + Optional optionalDictModel = dictItems.stream() + .filter(dictModel -> dictModel.getText().equals(str)).findFirst(); + if (!optionalDictModel.isPresent()){ + errorList.add("关联部门专业模块不存在!"); + flag = false; + break; + } + list.add(optionalDictModel.get().getValue()); + } + if (flag){ + data.setRelatedModule(String.join(",", list)); + } + } return errorList; } @@ -1179,7 +1219,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe try { dateFormat.parse(str); } catch (ParseException e) { - errorList.add("新认证实施日期格式错误!"); + errorList.add("新认证车实施日期格式错误!"); break; } }