feat(标准解读流程): 导入调整
This commit is contained in:
+4
@@ -70,6 +70,10 @@ public class ProcessStandardInterpret extends BaseEntity {
|
||||
@ApiModelProperty(value = "分解单来源(字典)")
|
||||
@Dict(dicCode = "process_manuscript")
|
||||
private String decompositionSource;
|
||||
/**发起时是否选择了条款(字典:1:是,2:否)*/
|
||||
@ApiModelProperty(value = "发起时是否选择了条款(字典:1:是,0:否)")
|
||||
@Dict(dicCode = "yn")
|
||||
private String isChooseClause;
|
||||
/**是否下发(字典:1:是,2:否)*/
|
||||
@ApiModelProperty(value = "是否下发(字典:1:是,2:否)")
|
||||
@Dict(dicCode = "is_distribute")
|
||||
|
||||
+16
-16
@@ -54,22 +54,6 @@ public class ProcessStandardInterpretClauseSublist extends BaseEntity {
|
||||
@ApiModelProperty(value = "相对上一版变化点说明")
|
||||
@Excel(name = "相对上一版变化点说明", width = 15)
|
||||
private String changeDescription;
|
||||
/**专业领域*/
|
||||
@ApiModelProperty(value = "专业领域")
|
||||
@Excel(name = "专业领域", width = 15, dicCode = "professional_field")
|
||||
private String domainArea;
|
||||
/**新认证实施日期*/
|
||||
@ApiModelProperty(value = "新认证实施日期")
|
||||
@Excel(name = "新认证实施日期", width = 15)
|
||||
private String newCerImplementDate;
|
||||
/**新生产车实施日期*/
|
||||
@ApiModelProperty(value = "新生产车实施日期")
|
||||
@Excel(name = "新生产车实施日期", width = 15)
|
||||
private String newProductionImplementation;
|
||||
/**注册日期*/
|
||||
@ApiModelProperty(value = "注册日期")
|
||||
@Excel(name = "注册日期", width = 15)
|
||||
private String registrationDate;
|
||||
/**法规注释*/
|
||||
@ApiModelProperty(value = "法规注释")
|
||||
@Excel(name = "法规注释", width = 15)
|
||||
@@ -104,9 +88,25 @@ public class ProcessStandardInterpretClauseSublist extends BaseEntity {
|
||||
@ApiModelProperty(value = "动力类型")
|
||||
@Excel(name = "动力类型", width = 15, dicCode = "dynamic_type")
|
||||
private String powerType;
|
||||
/**专业领域*/
|
||||
@ApiModelProperty(value = "专业领域")
|
||||
@Excel(name = "专业领域", width = 15, dicCode = "professional_field")
|
||||
private String domainArea;
|
||||
/**配置需求*/
|
||||
@ApiModelProperty(value = "配置需求")
|
||||
private String configurationRequirements;
|
||||
/**新认证实施日期*/
|
||||
@ApiModelProperty(value = "新认证实施日期")
|
||||
@Excel(name = "新认证实施日期", width = 15)
|
||||
private String newCerImplementDate;
|
||||
/**新生产车实施日期*/
|
||||
@ApiModelProperty(value = "新生产车实施日期")
|
||||
@Excel(name = "新生产车实施日期", width = 15)
|
||||
private String newProductionImplementation;
|
||||
/**注册日期*/
|
||||
@ApiModelProperty(value = "注册日期")
|
||||
@Excel(name = "注册日期", width = 15)
|
||||
private String registrationDate;
|
||||
/**企业标准*/
|
||||
@ApiModelProperty(value = "企业标准")
|
||||
@Excel(name = "企业标准", width = 15)
|
||||
|
||||
+2
@@ -14,9 +14,11 @@
|
||||
master_interpret_id,
|
||||
parent_id,
|
||||
standard_id,
|
||||
split_info_id,
|
||||
project_id,
|
||||
decomposition_source,
|
||||
is_distribute,
|
||||
is_choose_clause,
|
||||
countersign_person_ids,
|
||||
uploader,
|
||||
approve_person_id,
|
||||
|
||||
+18
-7
@@ -246,7 +246,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
standardInterpretDTO.getProcessStandardInterpret().getDecompositionSource());
|
||||
HashMap<String, Object> parameter = new HashMap<>();
|
||||
parameter.put("standard_id", lawsDomesticStandard.getId());
|
||||
parameter.put("standard_type",
|
||||
parameter.put("file_type",
|
||||
standardInterpretDTO.getProcessStandardInterpret().getDecompositionSource());
|
||||
List<Map<String, Object>> maps = documentSplitService.queryDocumentSplitDetailByList(parameter);
|
||||
if (!Objects.isNull(maps)){
|
||||
@@ -555,6 +555,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
ProcessStandardInterpretClause processStandardInterpretClause =
|
||||
new ProcessStandardInterpretClause();
|
||||
processStandardInterpretClause.setStandardInterpretId(processStandardInterpret.getId());
|
||||
|
||||
// 标准主解读人分发
|
||||
if (StandardInterpretCommon.MASTER_INTERPRET_DISTRIBUTE.equals(node)){
|
||||
processStandardInterpretClause.setIsDistribute(YesOrNoEnum.NO.getValue());
|
||||
@@ -565,6 +566,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
}
|
||||
processStandardInterpretClauseList =
|
||||
processStandardInterpretClauseService.queryList(processStandardInterpretClause);
|
||||
// 主控部门联络人分发
|
||||
if (StandardInterpretCommon.CONTACT_PERSON_DISTRIBUTE.equals(node)){
|
||||
processStandardInterpretClauseList = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
// 通过 标准解读流程id 查询 标准解读流程_条款中间表_子表
|
||||
@@ -702,7 +707,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
MultipartFile file = IntekeyUtils.autoDecryptFile(entity.getValue());
|
||||
ImportParams params = new ImportParams();
|
||||
params.setNeedSave(true);
|
||||
params.setHeadRows(1);
|
||||
params.setHeadRows(0);
|
||||
// excel表格头部校验
|
||||
excelHeadVerify(file, FlowImportExcel.class, 0, 0);
|
||||
List<FlowImportExcel> lists = ExcelImportUtil.importExcel(file.getInputStream(),
|
||||
@@ -710,15 +715,16 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
if (CollectionUtils.isEmpty(lists) || lists.size() <= 2) {
|
||||
return Result.error(ResultCommon.IMPORT_DATA_CANNOT_BE_EMPTY);
|
||||
}
|
||||
lists.remove(0);
|
||||
List<ProcessStandardInterpretClauseSublist> list = BeanCopyUtils.copyBeanList(lists,
|
||||
ProcessStandardInterpretClauseSublist.class);
|
||||
StringBuilder errorMSG = new StringBuilder();
|
||||
String standardInterpretId = request.getParameter("standardInterpretId");
|
||||
String standardId = request.getParameter("standardId");
|
||||
String splitInfoId = request.getParameter("splitInfoId");
|
||||
LawsDomesticStandard lawsDomesticStandard = lawsDomesticStandardService.getById(standardId);
|
||||
// 字段校验
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
list.get(i).setStandardInterpretId(standardInterpretId);
|
||||
String head = "第" + (i + 2) + "行:";
|
||||
List<String> firstVerify = firstVerify(i, list.get(i), lawsDomesticStandard, splitInfoId);
|
||||
List<String> secondVerify = secondVerify(list.get(i));
|
||||
@@ -1031,7 +1037,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
}
|
||||
}
|
||||
|
||||
if (exist){
|
||||
if (i > 0 && exist){
|
||||
// 条款校验
|
||||
LawsDocumentSplit lawsDocumentSplits = documentSplitMapper.selectOne(
|
||||
new LambdaQueryWrapper<LawsDocumentSplit>()
|
||||
@@ -1170,6 +1176,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
processStandardInterpretService.saveOrUpdate(processStandardInterpret);
|
||||
// 如果没选择条款
|
||||
if (CollectionUtils.isEmpty(processStandardInterpretClauseList)){
|
||||
processStandardInterpret.setIsChooseClause(YesOrNoEnum.NO.getValue());
|
||||
// 自动保存所有条款
|
||||
processStandardInterpretClauseList =
|
||||
getClauseList(processStandardInterpret.getStandardId(),
|
||||
@@ -1242,6 +1249,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
standardInterpretFlowDTO.getProcessAll().getProcessInstanceId());
|
||||
processStandardInterpretClauseSublistService.saveBatch(processStandardInterpretClauseSublists);
|
||||
}else {
|
||||
// 不分发
|
||||
// 保存会签人员、审核人员、批准人员
|
||||
processStandardInterpretService.updateById(processStandardInterpret);
|
||||
map.put(StandardInterpretCommon.JOINTLY_SIGN_LIST,
|
||||
@@ -1250,7 +1258,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
processStandardInterpret.getUploader());
|
||||
map.put(StandardInterpretCommon.TECHNICAL_OFFICER,
|
||||
processStandardInterpret.getApprovePersonId());
|
||||
// 不分发
|
||||
|
||||
// 删除旧数据
|
||||
processStandardInterpretClauseService.removeByIds(processAllDelIds);
|
||||
|
||||
processStandardInterpretClauseSublistService
|
||||
.saveOrUpdateBatch(processStandardInterpretClauseSublistList);
|
||||
|
||||
@@ -1260,8 +1271,8 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
processStandardInterpretClauseSublistList) {
|
||||
int count = processStandardInterpretClauseService.count(
|
||||
new LambdaQueryWrapper<ProcessStandardInterpretClause>()
|
||||
.eq(ProcessStandardInterpretClause::getStandardInterpretId,
|
||||
standardInterpretId)
|
||||
.eq(ProcessStandardInterpretClause::getId,
|
||||
standardInterpretClauseSublist.getStandardInterpretClauseId())
|
||||
.eq(ProcessStandardInterpretClause::getClauseId,
|
||||
standardInterpretClauseSublist.getClauseId()));
|
||||
if (count <= 0){
|
||||
|
||||
+9
@@ -24,6 +24,11 @@ public class FlowImportExcel {
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "标准名称/条款标题", width = 15)
|
||||
private String itemTitle;
|
||||
/**条款内容*/
|
||||
@ApiModelProperty(value = "条款内容")
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "条款内容", width = 15)
|
||||
private String itemContent;
|
||||
/**译文*/
|
||||
@ApiModelProperty(value = "译文")
|
||||
@Excel(name = "译文", width = 15)
|
||||
@@ -72,6 +77,10 @@ public class FlowImportExcel {
|
||||
@ApiModelProperty(value = "新认证实施日期")
|
||||
@Excel(name = "新认证实施日期", width = 15)
|
||||
private String newCerImplementDate;
|
||||
/**新生产车实施日期*/
|
||||
@ApiModelProperty(value = "新生产车实施日期")
|
||||
@Excel(name = "新生产车实施日期", width = 15)
|
||||
private String newProductionImplementation;
|
||||
/**注册日期*/
|
||||
@ApiModelProperty(value = "注册日期")
|
||||
@Excel(name = "注册日期", width = 15)
|
||||
|
||||
Reference in New Issue
Block a user