fix: 完善解读流程
This commit is contained in:
+3
-1
@@ -47,7 +47,9 @@ public class ProcessStandardInterpretClauseSublistServiceImpl
|
||||
processStandardInterpretClauseSublist.getSnowFlake());
|
||||
queryWrapper.eq("psics.del_flag", CommonConstant.DEL_FLAG_0);
|
||||
queryWrapper.orderByAsc("psics.id");
|
||||
return processStandardInterpretClauseSublistMapper.queryList(queryWrapper);
|
||||
List<ProcessStandardInterpretClauseSublist> processStandardInterpretClauseSublistList =
|
||||
processStandardInterpretClauseSublistMapper.queryList(queryWrapper);
|
||||
return processStandardInterpretClauseSublistList;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+17
@@ -780,6 +780,23 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
}
|
||||
processStandardInterpretClauseSublistList =
|
||||
processStandardInterpretClauseSublistService.queryList(processStandardInterpretClauseSublist);
|
||||
// 判断第一行是不是标准
|
||||
if (CollectionUtils.isNotEmpty(processStandardInterpretClauseSublistList)) {
|
||||
ProcessStandardInterpretClauseSublist clauseSublist = processStandardInterpretClauseSublistList.get(0);
|
||||
LawsDomesticStandard lawsDomesticStandard = lawsDomesticStandardService.getById(clauseSublist.getClauseId());
|
||||
if (!Objects.isNull(lawsDomesticStandard)){
|
||||
// 查询拆分信息
|
||||
List<LawsDocumentSplit> lawsDocumentSplits = lawsDocumentSplitMapper.selectList(
|
||||
new LambdaQueryWrapper<LawsDocumentSplit>()
|
||||
.eq(LawsDocumentSplit::getStandardId, lawsDomesticStandard.getId())
|
||||
.eq(LawsDocumentSplit::getInfoId, processStandardInterpret.getSplitInfoId()));
|
||||
if (CollectionUtils.isNotEmpty(lawsDocumentSplits)){
|
||||
LawsDocumentSplit lawsDocumentSplit = lawsDocumentSplits.get(0);
|
||||
clauseSublist.setItemContent(lawsDocumentSplit.getItemContent());
|
||||
clauseSublist.setTranslation(lawsDocumentSplit.getTranslation());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
standardInterpretDTO.setProcessStandardInterpret(processStandardInterpret);
|
||||
|
||||
+16
-4
@@ -50,12 +50,24 @@
|
||||
|
||||
<insert id="insertBatchLawsDocumentSplit">
|
||||
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, standard_id)
|
||||
is_same_as_prev_version, item_num, info_id, menu_id, item_title, item_content, translation,
|
||||
change_description,regulatory_notes,part_name,key_controller,applicable_components,responsible_department,responsible_module,
|
||||
related_department,related_module,applications,power_type,domain_area,configuration_requirements,new_cer_implement_date,
|
||||
new_production_implementation,registration_date,enterprise_standard,technical_specification_design_guide,drawing_template,
|
||||
technical_agreement_template,verification_report_template_checklist,dvp_template,dfema,key_technology_decomposition_table,
|
||||
other_documents_templates,investigation_stage,p3,p5,remarkss,standard_id,file_type)
|
||||
values
|
||||
<foreach collection="entity" item="item" index="index" separator=",">
|
||||
(#{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.standardId})
|
||||
(#{item.id}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.sysOrgCode},
|
||||
#{item.isSameAsPrevVersion},#{item.itemNum},#{item.infoId},#{item.menuId},#{item.itemTitle},#{item.itemContent},
|
||||
#{item.translation},#{item.changeDescription},#{item.regulatoryNotes},
|
||||
#{item.partName},#{item.keyController},#{item.applicableComponents},#{item.responsibleDepartment},
|
||||
#{item.responsibleModule},#{item.relatedDepartment},#{item.relatedModule},#{item.applications},#{item.powerType},
|
||||
#{item.domainArea},#{item.configurationRequirements},#{item.newCerImplementDate},
|
||||
#{item.newProductionImplementation},#{item.registrationDate},#{item.enterpriseStandard},#{item.technicalSpecificationDesignGuide},
|
||||
#{item.drawingTemplate},#{item.technicalAgreementTemplate},
|
||||
#{item.verificationReportTemplateChecklist},#{item.dvpTemplate},#{item.dfema},#{item.keyTechnologyDecompositionTable},
|
||||
#{item.otherDocumentsTemplates},#{item.investigationStage},#{item.p3},#{item.p5},#{item.remarkss},#{item.standardId},#{item.fileType})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
+125
-23
@@ -798,26 +798,115 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
}
|
||||
|
||||
fieldsBuilder.append("," + key);
|
||||
String valueOf = String.valueOf(value);
|
||||
switch (key){
|
||||
case "is_same_as_prev_version":
|
||||
lawsDocumentSplit1.setIsSameAsPrevVersion(String.valueOf(value));
|
||||
break;
|
||||
case "item_title":
|
||||
lawsDocumentSplit1.setItemTitle(String.valueOf(value));
|
||||
case "translation":
|
||||
lawsDocumentSplit1.setTranslation(String.valueOf(value));
|
||||
break;
|
||||
case "menu_id":
|
||||
lawsDocumentSplit1.setMenuId(String.valueOf(value));
|
||||
break;
|
||||
case "item_content":
|
||||
lawsDocumentSplit1.setItemContent(String.valueOf(value));
|
||||
break;
|
||||
case "item_num":
|
||||
lawsDocumentSplit1.setItemNum(String.valueOf(value));
|
||||
lawsDocumentSplit1.setItemNum(valueOf);
|
||||
break;
|
||||
case "info_id":
|
||||
lawsDocumentSplit1.setInfoId(String.valueOf(value));
|
||||
lawsDocumentSplit1.setInfoId(valueOf);
|
||||
break;
|
||||
case "menu_id":
|
||||
lawsDocumentSplit1.setMenuId(valueOf);
|
||||
break;
|
||||
case "item_title":
|
||||
lawsDocumentSplit1.setItemTitle(valueOf);
|
||||
break;
|
||||
case "item_content":
|
||||
lawsDocumentSplit1.setItemContent(valueOf);
|
||||
break;
|
||||
case "translation":
|
||||
lawsDocumentSplit1.setTranslation(valueOf);
|
||||
break;
|
||||
case "is_same_as_prev_version":
|
||||
lawsDocumentSplit1.setIsSameAsPrevVersion(valueOf);
|
||||
break;
|
||||
case "change_description":
|
||||
lawsDocumentSplit1.setChangeDescription(valueOf);
|
||||
break;
|
||||
case "regulatory_notes":
|
||||
lawsDocumentSplit1.setRegulatoryNotes(valueOf);
|
||||
break;
|
||||
case "part_name":
|
||||
lawsDocumentSplit1.setPartName(valueOf);
|
||||
break;
|
||||
case "key_controller":
|
||||
lawsDocumentSplit1.setKeyController(valueOf);
|
||||
break;
|
||||
case "applicable_components":
|
||||
lawsDocumentSplit1.setApplicableComponents(valueOf);
|
||||
break;
|
||||
case "responsible_department":
|
||||
lawsDocumentSplit1.setResponsibleDepartment(valueOf);
|
||||
break;
|
||||
case "responsible_module":
|
||||
lawsDocumentSplit1.setResponsibleModule(valueOf);
|
||||
break;
|
||||
case "related_department":
|
||||
lawsDocumentSplit1.setRelatedDepartment(valueOf);
|
||||
break;
|
||||
case "related_module":
|
||||
lawsDocumentSplit1.setRelatedModule(valueOf);
|
||||
break;
|
||||
case "applications":
|
||||
lawsDocumentSplit1.setApplications(valueOf);
|
||||
break;
|
||||
case "power_type":
|
||||
lawsDocumentSplit1.setPowerType(valueOf);
|
||||
break;
|
||||
case "domain_area":
|
||||
lawsDocumentSplit1.setDomainArea(valueOf);
|
||||
break;
|
||||
case "configuration_requirements":
|
||||
lawsDocumentSplit1.setConfigurationRequirements(valueOf);
|
||||
break;
|
||||
case "new_cer_implement_date":
|
||||
lawsDocumentSplit1.setNewCerImplementDate(valueOf);
|
||||
break;
|
||||
case "new_production_implementation":
|
||||
lawsDocumentSplit1.setNewCerImplementDate(valueOf);
|
||||
break;
|
||||
case "registration_date":
|
||||
lawsDocumentSplit1.setRegistrationDate(valueOf);
|
||||
break;
|
||||
case "enterprise_standard":
|
||||
lawsDocumentSplit1.setEnterpriseStandard(valueOf);
|
||||
break;
|
||||
case "technical_specification_design_guide":
|
||||
lawsDocumentSplit1.setTechnicalSpecificationDesignGuide(valueOf);
|
||||
break;
|
||||
case "drawing_template":
|
||||
lawsDocumentSplit1.setDrawingTemplate(valueOf);
|
||||
break;
|
||||
case "technical_agreement_template":
|
||||
lawsDocumentSplit1.setTechnicalAgreementTemplate(valueOf);
|
||||
break;
|
||||
case "verification_report_template_checklist":
|
||||
lawsDocumentSplit1.setVerificationReportTemplateChecklist(valueOf);
|
||||
break;
|
||||
case "dvp_template":
|
||||
lawsDocumentSplit1.setDvpTemplate(valueOf);
|
||||
break;
|
||||
case "dfema":
|
||||
lawsDocumentSplit1.setDfema(valueOf);
|
||||
break;
|
||||
case "key_technology_decomposition_table":
|
||||
lawsDocumentSplit1.setKeyTechnologyDecompositionTable(valueOf);
|
||||
break;
|
||||
case "other_documents_templates":
|
||||
lawsDocumentSplit1.setOtherDocumentsTemplates(valueOf);
|
||||
break;
|
||||
case "investigation_stage":
|
||||
lawsDocumentSplit1.setInvestigationStage(valueOf);
|
||||
break;
|
||||
case "p3":
|
||||
lawsDocumentSplit1.setP3(valueOf);
|
||||
break;
|
||||
case "p5":
|
||||
lawsDocumentSplit1.setP5(valueOf);
|
||||
break;
|
||||
case "remarkss":
|
||||
lawsDocumentSplit1.setRemarkss(valueOf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2002,17 +2091,19 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
}
|
||||
countSuccess++;
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(addItemValList)){
|
||||
batchSaveItemsVal(addItemValList);
|
||||
}
|
||||
long l = System.currentTimeMillis();
|
||||
log.error("================插入条款详情耗时:" + (l - aa) + "ms");
|
||||
boolean existStandard = false;
|
||||
if (CollectionUtils.isNotEmpty(LawsDocumentSplit)){
|
||||
// 判断第一条是否是标准
|
||||
LawsDomesticStandard lawsDomesticStandard =
|
||||
lawsDomesticStandardService.queryByStandardNumber(LawsDocumentSplit.get(0).getItemNum());
|
||||
if (!Objects.isNull(lawsDomesticStandard)){
|
||||
if (!lawsDomesticStandard.getId().equals(sarFileSplitInfoEO.getStandardId())){
|
||||
if (MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())) {
|
||||
return Result.error("表格导入标准与选择标准不一致!");
|
||||
} else {
|
||||
return Result.error("Table import criteria are inconsistent with selection criteria!");
|
||||
}
|
||||
}
|
||||
existStandard = true;
|
||||
LawsDocumentSplit.get(0).setStandardId(lawsDomesticStandard.getId());
|
||||
LawsDocumentSplit.get(0).setFileType(sarFileSplitInfoEO.getFileType());
|
||||
@@ -2020,7 +2111,14 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
batchSaveItems(LawsDocumentSplit);
|
||||
}
|
||||
long bb = System.currentTimeMillis();
|
||||
log.error("================插入条款耗时:" + (bb - l) + "ms");
|
||||
log.error("================插入条款耗时:" + (bb - aa) + "ms");
|
||||
|
||||
if (CollectionUtils.isNotEmpty(addItemValList)){
|
||||
batchSaveItemsVal(addItemValList);
|
||||
}
|
||||
long l = System.currentTimeMillis();
|
||||
log.error("================插入条款详情耗时:" + (l - bb) + "ms");
|
||||
|
||||
//导入之后的节点(包括子节点),序号加一
|
||||
SarFileSplitMenuEOPage page = new SarFileSplitMenuEOPage();
|
||||
page.setInfoId(targetMenuEO.getInfoId());
|
||||
@@ -2286,7 +2384,11 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return message;
|
||||
} catch (NullPointerException e){
|
||||
} catch (JeroBootException e){
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return Result.error(1, e.getMessage());
|
||||
}catch (NullPointerException e){
|
||||
log.error(e.getMessage());
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
|
||||
Reference in New Issue
Block a user