diff --git a/jero-boot/db/蔚来标准sql/dev_third_record.sql b/jero-boot/db/蔚来标准sql/dev_third_record.sql
index cbbca7f82..2cee5351c 100644
--- a/jero-boot/db/蔚来标准sql/dev_third_record.sql
+++ b/jero-boot/db/蔚来标准sql/dev_third_record.sql
@@ -58,4 +58,6 @@ CREATE TABLE `laws_process_history` (
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '法规-流程历史表' ROW_FORMAT = Dynamic;
-
+-- 参数项收集清单表 添加字段
+ALTER TABLE `laws_weilai`.`params_collect_manifest`
+ ADD COLUMN `del_flag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除标识' AFTER `change_flag`;
\ No newline at end of file
diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestEO.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestEO.java
index 10e880fa3..48e923c42 100644
--- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestEO.java
+++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestEO.java
@@ -35,6 +35,11 @@ public class ParamsCollectManifestEO extends ParamsCollectManifestBaseEO impleme
@ApiModelProperty(value = "变更标识")
private String changeFlag;
+ /**删除标识*/
+ @Excel(name = "删除标识", width = 15)
+ @ApiModelProperty(value = "删除标识")
+ private String delFlag;
+
@TableField(exist = false)
private String userTypes;
diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/enums/CollectManifestChangeFlagEnum.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/enums/CollectManifestChangeFlagEnum.java
index e807d9b8c..399c666b1 100644
--- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/enums/CollectManifestChangeFlagEnum.java
+++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/enums/CollectManifestChangeFlagEnum.java
@@ -7,7 +7,9 @@ package com.jero.modules.cert.collect.enums;
*/
public enum CollectManifestChangeFlagEnum {
CHANGE_BEFORE("变更前","0"),
- CHANGE_AFTER("变更后","1");
+ CHANGE_AFTER("变更后","1"),
+ DELETE_BEFORE("变更时未删除","0"),
+ DELETE_AFTER("变更时已删除","1");
String name;
String value;
diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml
index 794c1e696..0f5304025 100644
--- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml
+++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml
@@ -27,6 +27,7 @@
+
diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java
index a98fc0d03..a33e6ac74 100644
--- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java
+++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java
@@ -378,57 +378,78 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl nioNumberList = oldParamsCollectManifestEOList.stream().map(ParamsCollectManifestEO::getNioNumber).collect(Collectors.toList());
- List sameList = newParamsInfoPublishEOList.stream().filter(e->nioNumberList.contains(e.getNioNumber())).collect(Collectors.toList());
+ List oldNioNumberList = oldParamsCollectManifestEOList.stream().map(ParamsCollectManifestEO::getNioNumber).collect(Collectors.toList());
+ List sameList = newParamsInfoPublishEOList.stream().filter(e->oldNioNumberList.contains(e.getNioNumber())).collect(Collectors.toList());
+
+ List newNioNumberList = sameList.stream().map(ParamsInfoPublishEO::getNioNumber).collect(Collectors.toList());
+ List diffList = oldParamsCollectManifestEOList.stream().filter(e->!newNioNumberList.contains(e.getNioNumber())).collect(Collectors.toList());
+
List delCollectManifestIdList = new ArrayList<>();
List updateCollectManifestEOList = new ArrayList<>();
- for (ParamsInfoPublishEO paramsInfoPublishEO : sameList) {
- ParamsCollectManifestEO oldCollectManifestEO = oldParamsCollectManifestEOList.stream()
- .filter(e->e.getNioNumber().equals(paramsInfoPublishEO.getNioNumber()))
- .collect(Collectors.toList()).get(0);
- String newControlType = paramsInfoPublishEO.getControlType();
- String newControlVerify = paramsInfoPublishEO.getControlVerify();
- String newControlValues = paramsInfoPublishEO.getControlValues();
+ // 模板里没有,清单里有
+ if (CollectionUtil.isNotEmpty(diffList)) {
+ for (ParamsCollectManifestEO oldCollectManifestEO : diffList) {
+ ParamsCollectManifestEO updateCollectManifestEO = new ParamsCollectManifestEO();
+ updateCollectManifestEO.setId(oldCollectManifestEO.getId());
+ updateCollectManifestEO.setState(CollectManifestStateEnum.CHANGE.getValue());
+ updateCollectManifestEO.setChangeFlag(CollectManifestChangeFlagEnum.CHANGE_BEFORE.getValue()); // 标记为变更前参数项
+ updateCollectManifestEO.setDelFlag(CollectManifestChangeFlagEnum.DELETE_AFTER.getValue()); // 因新发布模板中没有该参数项,标记为变更时已删除参数项
- String oldControlType = oldCollectManifestEO.getControlType();
- String oldControlVerify = oldCollectManifestEO.getControlVerify();
- String oldControlValues = oldCollectManifestEO.getControlValues();
+ updateCollectManifestEOList.add(updateCollectManifestEO);
+ }
+ }
- ParamsCollectManifestEO updateCollectManifestEO = new ParamsCollectManifestEO();
- BeanUtils.copyProperties(paramsInfoPublishEO, updateCollectManifestEO);
- // 比较参数填写规则
- if (!newControlType.equals(oldControlType)
- || (newControlVerify != null && !newControlVerify.equals(oldControlVerify))
- || (oldControlVerify != null && !oldControlVerify.equals(newControlVerify))
- || (newControlValues != null && !newControlValues.equals(oldControlValues))
- || (oldControlValues != null && !oldControlValues.equals(newControlValues))) {
+ // 模板里有,清单里也有
+ if (CollectionUtil.isNotEmpty(sameList)) {
+ for (ParamsInfoPublishEO paramsInfoPublishEO : sameList) {
+ ParamsCollectManifestEO oldCollectManifestEO = oldParamsCollectManifestEOList.stream()
+ .filter(e -> e.getNioNumber().equals(paramsInfoPublishEO.getNioNumber()))
+ .collect(Collectors.toList()).get(0);
+ String newControlType = paramsInfoPublishEO.getControlType();
+ String newControlVerify = paramsInfoPublishEO.getControlVerify();
+ String newControlValues = paramsInfoPublishEO.getControlValues();
- // 参数填写规则改变,删除参数项配置数据,状态变为:待发起收集,拍列表前边
- updateCollectManifestEO.setId(oldCollectManifestEO.getId()); // 为收集参数项id
- updateCollectManifestEO.setState(CollectManifestStateEnum.WAIT_COLLECT.getValue());
- updateCollectManifestEO.setChangeFlag(CollectManifestChangeFlagEnum.CHANGE_AFTER.getValue());
+ String oldControlType = oldCollectManifestEO.getControlType();
+ String oldControlVerify = oldCollectManifestEO.getControlVerify();
+ String oldControlValues = oldCollectManifestEO.getControlValues();
+
+ ParamsCollectManifestEO updateCollectManifestEO = new ParamsCollectManifestEO();
+ BeanUtils.copyProperties(paramsInfoPublishEO, updateCollectManifestEO);
+ // 比较参数填写规则
+ if (!newControlType.equals(oldControlType)
+ || (newControlVerify != null && !newControlVerify.equals(oldControlVerify))
+ || (oldControlVerify != null && !oldControlVerify.equals(newControlVerify))
+ || (newControlValues != null && !newControlValues.equals(oldControlValues))
+ || (oldControlValues != null && !oldControlValues.equals(newControlValues))) {
+
+ // 参数填写规则改变,删除参数项配置数据,状态变为:待发起收集,拍列表前边
+ updateCollectManifestEO.setId(oldCollectManifestEO.getId()); // 为收集参数项id
+ updateCollectManifestEO.setState(CollectManifestStateEnum.WAIT_COLLECT.getValue());
+ updateCollectManifestEO.setChangeFlag(CollectManifestChangeFlagEnum.CHANGE_AFTER.getValue()); // 因新发布模板中该参数项控件变化,标记为变更后参数项
+ updateCollectManifestEO.setDelFlag(CollectManifestChangeFlagEnum.DELETE_BEFORE.getValue()); // 标记为变更时未删除参数项
// updateCollectManifestEO.setControlType(newControlType);
// updateCollectManifestEO.setControlVerify(newControlVerify);
// updateCollectManifestEO.setControlValues(newControlValues);
- delCollectManifestIdList.add(oldCollectManifestEO.getId());
- } else {
- // 参数填写规则没有改变,状态变为:变更
- updateCollectManifestEO.setId(oldCollectManifestEO.getId());
- updateCollectManifestEO.setState(CollectManifestStateEnum.CHANGE.getValue());
- updateCollectManifestEO.setChangeFlag(CollectManifestChangeFlagEnum.CHANGE_BEFORE.getValue());
+ delCollectManifestIdList.add(oldCollectManifestEO.getId());
+ } else {
+ // 参数填写规则没有改变,状态变为:变更
+ updateCollectManifestEO.setId(oldCollectManifestEO.getId());
+ updateCollectManifestEO.setState(CollectManifestStateEnum.CHANGE.getValue());
+ updateCollectManifestEO.setChangeFlag(CollectManifestChangeFlagEnum.CHANGE_BEFORE.getValue()); // 标记为变更前参数项
+ updateCollectManifestEO.setDelFlag(CollectManifestChangeFlagEnum.DELETE_BEFORE.getValue()); // 标记为变更时未删除参数项
- }
- // 更新附件模板字段
- if (StringUtils.isNotEmpty(paramsInfoPublishEO.getFileTemplateConnectId())) {
- updateCollectManifestEO.setFileTemplateConnectId(paramsInfoPublishEO.getFileTemplateConnectId());
- }
+ }
+ // 更新附件模板字段
+ if (StringUtils.isNotEmpty(paramsInfoPublishEO.getFileTemplateConnectId())) {
+ updateCollectManifestEO.setFileTemplateConnectId(paramsInfoPublishEO.getFileTemplateConnectId());
+ }
- updateCollectManifestEOList.add(updateCollectManifestEO);
+ updateCollectManifestEOList.add(updateCollectManifestEO);
+ }
}
-
// 删除参数项配置数据
if (CollectionUtil.isNotEmpty(delCollectManifestIdList)) {
paramsConfigDataEOService.deleteByParamsCollectManifestIdList(delCollectManifestIdList);
diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java
index 4f06abf50..b360a0c73 100644
--- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java
+++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java
@@ -110,6 +110,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ParamsInfoEO::getNioNumber, paramsInfoEO.getNioNumber());
+ queryWrapper.eq(ParamsInfoEO::getParamsTemplateId, paramsInfoEO.getParamsTemplateId());
List paramsInfoEOList = list(queryWrapper);
if (CollectionUtil.isNotEmpty(paramsInfoEOList)) {
if (CutEnum.CN.getValue().equals(paramsInfoEO.getCut())) {
@@ -189,6 +190,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ParamsInfoEO::getNioNumber, paramsInfoEO.getNioNumber());
+ queryWrapper.eq(ParamsInfoEO::getParamsTemplateId, paramsInfoEO.getParamsTemplateId());
List paramsInfoEOList = list(queryWrapper);
if (CollectionUtil.isNotEmpty(paramsInfoEOList)) {
if (CutEnum.CN.getValue().equals(paramsInfoEO.getCut())) {
@@ -1051,6 +1053,8 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl stringMessage = new ArrayList<>();
+ List nioNumberImport = new ArrayList<>(); // 记录导入的nio编号
+
int i = 1; //记录行号
int num = 0; //记录是第几条数据
//循环验证数据
@@ -1080,12 +1084,26 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl