fix(87407): 标准解读流程(标准主解读人分发) --不分发--导入导出模板与列表字段不一致

This commit is contained in:
yjz
2024-07-31 11:14:11 +08:00
parent d1157ed145
commit aa6cb32c9c
3 changed files with 50 additions and 7 deletions
@@ -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 = "注册日期")
@@ -13,7 +13,7 @@
is_same_as_prev_version,
change_description,
regulatory_notes,
keywords,
part_name,
key_controller,
applicable_components,
responsible_department,
@@ -1037,6 +1037,26 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
}
}
String responsibleModule = data.getResponsibleModule();
if (StringUtils.isNotBlank(responsibleModule)){
boolean flag = true;
List<String> list = new ArrayList<>();
List<DictModel> dictItems = sysDictService.getDictItems("professional_module");
for (String str : responsibleModule.split(",")) {
Optional<DictModel> 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<String> list = new ArrayList<>();
List<DictModel> dictItems = sysDictService.getDictItems("professional_module");
for (String str : relatedModule.split(",")) {
Optional<DictModel> 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;
}
}