Merge remote-tracking branch 'origin/master'
This commit is contained in:
+5
-3
@@ -2,6 +2,7 @@ package com.jero.modules.activiti.process.standardinterpret.entity;
|
|||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.jero.common.aspect.annotation.Dict;
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
import com.jero.modules.laws.documenttool.entity.BaseEntity;
|
import com.jero.modules.laws.documenttool.entity.BaseEntity;
|
||||||
@@ -18,6 +19,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|||||||
*/
|
*/
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
|
@TableName(value = "process_standard_interpret")
|
||||||
public class ProcessStandardInterpret extends BaseEntity {
|
public class ProcessStandardInterpret extends BaseEntity {
|
||||||
/**主解读人*/
|
/**主解读人*/
|
||||||
@ApiModelProperty(value = "主解读人")
|
@ApiModelProperty(value = "主解读人")
|
||||||
@@ -68,16 +70,16 @@ public class ProcessStandardInterpret extends BaseEntity {
|
|||||||
private String projectId;
|
private String projectId;
|
||||||
/**分解单来源(字典)*/
|
/**分解单来源(字典)*/
|
||||||
@ApiModelProperty(value = "分解单来源(字典)")
|
@ApiModelProperty(value = "分解单来源(字典)")
|
||||||
@Dict(dicCode = "process_manuscript")
|
@Dict(dicCode = "decomposition_source")
|
||||||
private String decompositionSource;
|
private String decompositionSource;
|
||||||
/**发起时是否选择了条款(字典:1:是,2:否)*/
|
/**发起时是否选择了条款(字典:1:是,2:否)*/
|
||||||
@ApiModelProperty(value = "发起时是否选择了条款(字典:1:是,0:否)")
|
@ApiModelProperty(value = "发起时是否选择了条款(字典:1:是,0:否)")
|
||||||
@Dict(dicCode = "yn")
|
@Dict(dicCode = "yn")
|
||||||
private String isChooseClause;
|
private String chooseClause;
|
||||||
/**是否下发(字典:1:是,2:否)*/
|
/**是否下发(字典:1:是,2:否)*/
|
||||||
@ApiModelProperty(value = "是否下发(字典:1:是,2:否)")
|
@ApiModelProperty(value = "是否下发(字典:1:是,2:否)")
|
||||||
@Dict(dicCode = "is_distribute")
|
@Dict(dicCode = "is_distribute")
|
||||||
private String isDistribute;
|
private String distribute;
|
||||||
/**会签人员*/
|
/**会签人员*/
|
||||||
@ApiModelProperty(value = "会签人员")
|
@ApiModelProperty(value = "会签人员")
|
||||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "CONCAT(realname, '(', username, ')')")
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "CONCAT(realname, '(', username, ')')")
|
||||||
|
|||||||
+2
@@ -2,6 +2,7 @@ package com.jero.modules.activiti.process.standardinterpret.entity;
|
|||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.jero.common.aspect.annotation.Dict;
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
import com.jero.modules.laws.documenttool.entity.BaseEntity;
|
import com.jero.modules.laws.documenttool.entity.BaseEntity;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@@ -17,6 +18,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
|
|||||||
*/
|
*/
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
|
@TableName("process_standard_interpret_clause")
|
||||||
public class ProcessStandardInterpretClause extends BaseEntity {
|
public class ProcessStandardInterpretClause extends BaseEntity {
|
||||||
/**标准解读流程id*/
|
/**标准解读流程id*/
|
||||||
@ApiModelProperty(value = "标准解读流程id")
|
@ApiModelProperty(value = "标准解读流程id")
|
||||||
|
|||||||
+17
@@ -2,9 +2,12 @@ package com.jero.modules.activiti.process.standardinterpret.entity;
|
|||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
import com.jero.modules.laws.documenttool.entity.BaseEntity;
|
import com.jero.modules.laws.documenttool.entity.BaseEntity;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -13,7 +16,9 @@ import org.jeecgframework.poi.excel.annotation.Excel;
|
|||||||
* @author makejava
|
* @author makejava
|
||||||
* @since 2024-06-24 14:47:59
|
* @since 2024-06-24 14:47:59
|
||||||
*/
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
|
@TableName("process_standard_interpret_clause_sublist")
|
||||||
public class ProcessStandardInterpretClauseSublist extends BaseEntity {
|
public class ProcessStandardInterpretClauseSublist extends BaseEntity {
|
||||||
/**标准解读流程_条款中间表id*/
|
/**标准解读流程_条款中间表id*/
|
||||||
@ApiModelProperty(value = "标准解读流程_条款中间表id")
|
@ApiModelProperty(value = "标准解读流程_条款中间表id")
|
||||||
@@ -49,6 +54,7 @@ public class ProcessStandardInterpretClauseSublist extends BaseEntity {
|
|||||||
/**是否与上一版相同(字典:1:是,0:否)*/
|
/**是否与上一版相同(字典:1:是,0:否)*/
|
||||||
@ApiModelProperty(value = "是否与上一版相同(字典:1:是,0:否)")
|
@ApiModelProperty(value = "是否与上一版相同(字典:1:是,0:否)")
|
||||||
@Excel(name = "是否与上一版相同", width = 15, dicCode = "yn")
|
@Excel(name = "是否与上一版相同", width = 15, dicCode = "yn")
|
||||||
|
@Dict(dicCode = "yn")
|
||||||
private String isSameAsPrevVersion;
|
private String isSameAsPrevVersion;
|
||||||
/**变化点说明*/
|
/**变化点说明*/
|
||||||
@ApiModelProperty(value = "相对上一版变化点说明")
|
@ApiModelProperty(value = "相对上一版变化点说明")
|
||||||
@@ -61,39 +67,49 @@ public class ProcessStandardInterpretClauseSublist extends BaseEntity {
|
|||||||
/**涉及系统/部件)*/
|
/**涉及系统/部件)*/
|
||||||
@ApiModelProperty(value = "涉及系统/部件)")
|
@ApiModelProperty(value = "涉及系统/部件)")
|
||||||
@Excel(name = "涉及系统/部件", width = 15)
|
@Excel(name = "涉及系统/部件", width = 15)
|
||||||
|
@Dict(dictTable = "laws_part_name", dicCode = "code", dicText = "name")
|
||||||
private String keywords;
|
private String keywords;
|
||||||
/**涉及系统/部件)*/
|
/**涉及系统/部件)*/
|
||||||
@ApiModelProperty(value = "关键控制器)")
|
@ApiModelProperty(value = "关键控制器)")
|
||||||
@Excel(name = "关键控制器", width = 15, dicCode = "key_controller")
|
@Excel(name = "关键控制器", width = 15, dicCode = "key_controller")
|
||||||
|
@Dict(dicCode = "key_controller")
|
||||||
private String keyController;
|
private String keyController;
|
||||||
/**责任部门*/
|
/**责任部门*/
|
||||||
@ApiModelProperty(value = "责任部门")
|
@ApiModelProperty(value = "责任部门")
|
||||||
@Excel(name = "责任部门", width = 15, dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
@Excel(name = "责任部门", width = 15, dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
private String responsibleDepartment;
|
private String responsibleDepartment;
|
||||||
/**责任部门专业模块*/
|
/**责任部门专业模块*/
|
||||||
@ApiModelProperty(value = "责任部门专业模块")
|
@ApiModelProperty(value = "责任部门专业模块")
|
||||||
|
@Dict(dicCode = "responsible_module")
|
||||||
private String responsibleModule;
|
private String responsibleModule;
|
||||||
/**关联部门*/
|
/**关联部门*/
|
||||||
@ApiModelProperty(value = "关联部门")
|
@ApiModelProperty(value = "关联部门")
|
||||||
@Excel(name = "关联部门", width = 15, dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
@Excel(name = "关联部门", width = 15, dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
private String relatedDepartment;
|
private String relatedDepartment;
|
||||||
/**关联部门专业模块*/
|
/**关联部门专业模块*/
|
||||||
@ApiModelProperty(value = "关联部门专业模块")
|
@ApiModelProperty(value = "关联部门专业模块")
|
||||||
|
@Dict(dicCode = "related_module")
|
||||||
private String relatedModule;
|
private String relatedModule;
|
||||||
/**适用车型*/
|
/**适用车型*/
|
||||||
@ApiModelProperty(value = "适用车型")
|
@ApiModelProperty(value = "适用车型")
|
||||||
@Excel(name = "适用车型", width = 15, dicCode = "applicable_vehicle_type")
|
@Excel(name = "适用车型", width = 15, dicCode = "applicable_vehicle_type")
|
||||||
|
@Dict(dicCode = "applicable_vehicle_type")
|
||||||
private String applications;
|
private String applications;
|
||||||
/**动力类型*/
|
/**动力类型*/
|
||||||
@ApiModelProperty(value = "动力类型")
|
@ApiModelProperty(value = "动力类型")
|
||||||
@Excel(name = "动力类型", width = 15, dicCode = "dynamic_type")
|
@Excel(name = "动力类型", width = 15, dicCode = "dynamic_type")
|
||||||
|
@Dict(dicCode = "dynamic_type")
|
||||||
private String powerType;
|
private String powerType;
|
||||||
/**专业领域*/
|
/**专业领域*/
|
||||||
@ApiModelProperty(value = "专业领域")
|
@ApiModelProperty(value = "专业领域")
|
||||||
@Excel(name = "专业领域", width = 15, dicCode = "professional_field")
|
@Excel(name = "专业领域", width = 15, dicCode = "professional_field")
|
||||||
|
@Dict(dicCode = "professional_field")
|
||||||
private String domainArea;
|
private String domainArea;
|
||||||
/**配置需求*/
|
/**配置需求*/
|
||||||
@ApiModelProperty(value = "配置需求")
|
@ApiModelProperty(value = "配置需求")
|
||||||
|
@Dict(dicCode = "configuration_requirements")
|
||||||
private String configurationRequirements;
|
private String configurationRequirements;
|
||||||
/**新认证实施日期*/
|
/**新认证实施日期*/
|
||||||
@ApiModelProperty(value = "新认证实施日期")
|
@ApiModelProperty(value = "新认证实施日期")
|
||||||
@@ -146,6 +162,7 @@ public class ProcessStandardInterpretClauseSublist extends BaseEntity {
|
|||||||
/**排查阶段*/
|
/**排查阶段*/
|
||||||
@ApiModelProperty(value = "排查阶段")
|
@ApiModelProperty(value = "排查阶段")
|
||||||
@Excel(name = "排查阶段", width = 15, dicCode = "investigation_stage")
|
@Excel(name = "排查阶段", width = 15, dicCode = "investigation_stage")
|
||||||
|
@Dict(dicCode = "investigation_stage")
|
||||||
private java.lang.String investigationStage;
|
private java.lang.String investigationStage;
|
||||||
/**p3*/
|
/**p3*/
|
||||||
@ApiModelProperty(value = "p3")
|
@ApiModelProperty(value = "p3")
|
||||||
|
|||||||
+2
@@ -14,6 +14,7 @@
|
|||||||
change_description,
|
change_description,
|
||||||
regulatory_notes,
|
regulatory_notes,
|
||||||
keywords,
|
keywords,
|
||||||
|
key_controller,
|
||||||
applicable_components,
|
applicable_components,
|
||||||
responsible_department,
|
responsible_department,
|
||||||
responsible_module,
|
responsible_module,
|
||||||
@@ -35,6 +36,7 @@
|
|||||||
dfema,
|
dfema,
|
||||||
key_technology_decomposition_table,
|
key_technology_decomposition_table,
|
||||||
other_documents_templates,
|
other_documents_templates,
|
||||||
|
investigation_stage,
|
||||||
p3,
|
p3,
|
||||||
p5,
|
p5,
|
||||||
remarks,
|
remarks,
|
||||||
|
|||||||
+2
-2
@@ -17,8 +17,8 @@
|
|||||||
split_info_id,
|
split_info_id,
|
||||||
project_id,
|
project_id,
|
||||||
decomposition_source,
|
decomposition_source,
|
||||||
is_distribute,
|
distribute,
|
||||||
is_choose_clause,
|
choose_clause,
|
||||||
countersign_person_ids,
|
countersign_person_ids,
|
||||||
uploader,
|
uploader,
|
||||||
approve_person_id,
|
approve_person_id,
|
||||||
|
|||||||
+118
-28
@@ -567,7 +567,8 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
processStandardInterpretClauseList =
|
processStandardInterpretClauseList =
|
||||||
processStandardInterpretClauseService.queryList(processStandardInterpretClause);
|
processStandardInterpretClauseService.queryList(processStandardInterpretClause);
|
||||||
// 主控部门联络人分发
|
// 主控部门联络人分发
|
||||||
if (StandardInterpretCommon.CONTACT_PERSON_DISTRIBUTE.equals(node)){
|
if (StandardInterpretCommon.CONTACT_PERSON_DISTRIBUTE.equals(node)
|
||||||
|
&& YesOrNoEnum.NO.getValue().equals(processStandardInterpret.getChooseClause())){
|
||||||
processStandardInterpretClauseList = new ArrayList<>();
|
processStandardInterpretClauseList = new ArrayList<>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -630,9 +631,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
LambdaUpdateWrapper<SarFileSplitInfoEO> queryWrapper = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<SarFileSplitInfoEO> queryWrapper = new LambdaUpdateWrapper<>();
|
||||||
queryWrapper.eq(SarFileSplitInfoEO::getStandardId, standardId);
|
queryWrapper.eq(SarFileSplitInfoEO::getStandardId, standardId);
|
||||||
List<SarFileSplitInfoEO> list = sarFileSplitInfoService.list(queryWrapper);
|
List<SarFileSplitInfoEO> list = sarFileSplitInfoService.list(queryWrapper);
|
||||||
List<DictModel> dictItems = sysDictService.getDictItems("process_manuscript");
|
List<DictModel> dictItems = sysDictService.getDictItems("decomposition_source");
|
||||||
for (DictModel dictItem : dictItems) {
|
for (DictModel dictItem : dictItems) {
|
||||||
if (list.stream().anyMatch(sarFileSplitInfoEO -> sarFileSplitInfoEO.getFileType().equals(dictItem.getValue()))){
|
if (list.stream().anyMatch(v -> v.getFileType().equals(dictItem.getValue())
|
||||||
|
|| dictItem.getValue().equals("noncarry"))){
|
||||||
dictItem.setIsDisabled(YesOrNoEnum.NO.getValue());
|
dictItem.setIsDisabled(YesOrNoEnum.NO.getValue());
|
||||||
}else {
|
}else {
|
||||||
dictItem.setIsDisabled(YesOrNoEnum.YES.getValue());
|
dictItem.setIsDisabled(YesOrNoEnum.YES.getValue());
|
||||||
@@ -968,23 +970,16 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
if (StringUtils.isNotBlank(keywords)){
|
if (StringUtils.isNotBlank(keywords)){
|
||||||
boolean flag = true;
|
boolean flag = true;
|
||||||
List<String> list = new ArrayList<>();
|
List<String> list = new ArrayList<>();
|
||||||
List<PartName> partNames = lawsPartNameService.list(new LambdaQueryWrapper<PartName>()
|
List<PartName> partNames = lawsPartNameService.list();
|
||||||
.ne(PartName::getCode, "Part"));
|
|
||||||
List<PartName> partNameList = partNameGetLevelPath(partNames);
|
|
||||||
for (String str : keywords.split(",")) {
|
for (String str : keywords.split(",")) {
|
||||||
List<PartName> path =
|
Optional<PartName> optionalPartName =
|
||||||
partNameList.stream().filter(o -> str.equals(o.getLevelPath()))
|
partNames.stream().filter(o -> str.equals(o.getCode())).findFirst();
|
||||||
.collect(Collectors.toList());
|
if (!optionalPartName.isPresent()){
|
||||||
if (path.size() > 1){
|
|
||||||
errorList.add("涉及系统/部件 中 !" + str + "存在多个!");
|
|
||||||
flag = false;
|
|
||||||
break;
|
|
||||||
}else if (path.size() == 1){
|
|
||||||
list.add(path.get(0).getId());
|
|
||||||
}else {
|
|
||||||
errorList.add("涉及系统/部件不存在!");
|
errorList.add("涉及系统/部件不存在!");
|
||||||
flag = false;
|
flag = false;
|
||||||
break;
|
break;
|
||||||
|
}else {
|
||||||
|
data.setKeywords(optionalPartName.get().getCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (flag){
|
if (flag){
|
||||||
@@ -1024,10 +1019,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
errorList.add("标准编号/条款号不能为空!");
|
errorList.add("标准编号/条款号不能为空!");
|
||||||
exist = false;
|
exist = false;
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(itemTitle)){
|
// if (StringUtils.isBlank(itemTitle)){
|
||||||
errorList.add("标准名称/条款标题不能为空!");
|
// errorList.add("标准名称/条款标题不能为空!");
|
||||||
exist = false;
|
// exist = false;
|
||||||
}
|
// }
|
||||||
if (i == 0 && exist){
|
if (i == 0 && exist){
|
||||||
// 第一行校验
|
// 第一行校验
|
||||||
String standardNumber = lawsDomesticStandard.getStandardNumber();
|
String standardNumber = lawsDomesticStandard.getStandardNumber();
|
||||||
@@ -1042,10 +1037,9 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
LawsDocumentSplit lawsDocumentSplits = documentSplitMapper.selectOne(
|
LawsDocumentSplit lawsDocumentSplits = documentSplitMapper.selectOne(
|
||||||
new LambdaQueryWrapper<LawsDocumentSplit>()
|
new LambdaQueryWrapper<LawsDocumentSplit>()
|
||||||
.eq(LawsDocumentSplit::getInfoId, splitInfoId)
|
.eq(LawsDocumentSplit::getInfoId, splitInfoId)
|
||||||
.eq(LawsDocumentSplit::getItemNum, itemNum)
|
.eq(LawsDocumentSplit::getItemNum, itemNum));
|
||||||
.eq(LawsDocumentSplit::getItemTitle, itemTitle));
|
|
||||||
if (Objects.isNull(lawsDocumentSplits)){
|
if (Objects.isNull(lawsDocumentSplits)){
|
||||||
errorList.add("不存在条号为:" + itemNum + ",条款标题为:" + itemTitle + "的条款!");
|
errorList.add("不存在条号为:" + itemNum + "的条款!");
|
||||||
}else {
|
}else {
|
||||||
data.setClauseId(lawsDocumentSplits.getId());
|
data.setClauseId(lawsDocumentSplits.getId());
|
||||||
data.setItemContent(lawsDocumentSplits.getItemContent());
|
data.setItemContent(lawsDocumentSplits.getItemContent());
|
||||||
@@ -1131,12 +1125,106 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
@Override
|
@Override
|
||||||
public void flowSave(StandardInterpretFlowDTO standardInterpretFlowDTO) {
|
public void flowSave(StandardInterpretFlowDTO standardInterpretFlowDTO) {
|
||||||
// 处理业务数据
|
// 处理业务数据
|
||||||
handleBusinessData(standardInterpretFlowDTO);
|
handleBusinessDataSave(standardInterpretFlowDTO);
|
||||||
// 保存流程信息
|
// 保存流程信息
|
||||||
flowUtility.flowSaveUpdate(standardInterpretFlowDTO.getProcessAll(),
|
flowUtility.flowSaveUpdate(standardInterpretFlowDTO.getProcessAll(),
|
||||||
standardInterpretFlowDTO.getProcessApprovalRecord());
|
standardInterpretFlowDTO.getProcessApprovalRecord());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void handleBusinessDataSave(StandardInterpretFlowDTO standardInterpretFlowDTO) {
|
||||||
|
// map(参数)
|
||||||
|
Map<String, Object> map = standardInterpretFlowDTO.getMap();
|
||||||
|
// 流程全局删除ids
|
||||||
|
List<String> processAllDelIds = standardInterpretFlowDTO.getProcessAllDelIds();
|
||||||
|
StandardInterpretDTO data = standardInterpretFlowDTO.getData();
|
||||||
|
// 标准解读流程
|
||||||
|
ProcessStandardInterpret processStandardInterpret = data.getProcessStandardInterpret();
|
||||||
|
String standardInterpretId = StringUtils.isBlank(processStandardInterpret.getId()) ?
|
||||||
|
String.valueOf(SnowflakeUtils.snowflake()) : processStandardInterpret.getId();
|
||||||
|
processStandardInterpret.setId(standardInterpretId);
|
||||||
|
// 标准解读流程_条款中间表
|
||||||
|
List<ProcessStandardInterpretClause> processStandardInterpretClauseList =
|
||||||
|
data.getProcessStandardInterpretClauseList();
|
||||||
|
// 标准解读流程_条款中间表_子表
|
||||||
|
List<ProcessStandardInterpretClauseSublist> processStandardInterpretClauseSublistList =
|
||||||
|
data.getProcessStandardInterpretClauseSublistList();
|
||||||
|
// 当前任务节点
|
||||||
|
String node = StringUtils.isBlank(standardInterpretFlowDTO.getProcessApprovalRecord().getNodeId()) ?
|
||||||
|
StandardInterpretCommon.REGULATORY_ENGINEER_START
|
||||||
|
: standardInterpretFlowDTO.getProcessApprovalRecord().getNodeId();
|
||||||
|
|
||||||
|
// 删除旧数据
|
||||||
|
processStandardInterpretService.removeByIds(processAllDelIds);
|
||||||
|
processStandardInterpretClauseService.removeByIds(processAllDelIds);
|
||||||
|
processStandardInterpretClauseSublistService.removeByIds(processAllDelIds);
|
||||||
|
|
||||||
|
switch (node){
|
||||||
|
// 主控部门联络人分发
|
||||||
|
case StandardInterpretCommon.CONTACT_PERSON_DISTRIBUTE:
|
||||||
|
processStandardInterpretService.updateById(processStandardInterpret);
|
||||||
|
processStandardInterpretClauseService.removeByIds(processAllDelIds);
|
||||||
|
break;
|
||||||
|
// 标准主解读人分发
|
||||||
|
case StandardInterpretCommon.MASTER_INTERPRET_DISTRIBUTE:
|
||||||
|
// 标准主解读人重新分发(分发)
|
||||||
|
case StandardInterpretCommon.MASTER_INTERPRET_AGAIN_DISTRIBUTE:
|
||||||
|
if (YesOrNoEnum.YES.getValue().equals(processStandardInterpret.getDistribute())){
|
||||||
|
// 分发
|
||||||
|
// 更新 标准解读流程_条款中间表
|
||||||
|
processStandardInterpretClauseService.saveOrUpdateBatch(processStandardInterpretClauseList);
|
||||||
|
}else {
|
||||||
|
// 不分发
|
||||||
|
// 保存标准解读流程_条款中间表_子表
|
||||||
|
processStandardInterpretClauseSublistService
|
||||||
|
.saveOrUpdateBatch(processStandardInterpretClauseSublistList);
|
||||||
|
|
||||||
|
// 判断是否有导入的数据,有则补齐对应中间表数据
|
||||||
|
List<ProcessStandardInterpretClause> newProcessStandardInterpretClauseList = new ArrayList<>();
|
||||||
|
for (ProcessStandardInterpretClauseSublist standardInterpretClauseSublist :
|
||||||
|
processStandardInterpretClauseSublistList) {
|
||||||
|
int count = processStandardInterpretClauseService.count(
|
||||||
|
new LambdaQueryWrapper<ProcessStandardInterpretClause>()
|
||||||
|
.eq(ProcessStandardInterpretClause::getId,
|
||||||
|
standardInterpretClauseSublist.getStandardInterpretClauseId())
|
||||||
|
.eq(ProcessStandardInterpretClause::getClauseId,
|
||||||
|
standardInterpretClauseSublist.getClauseId()));
|
||||||
|
if (count <= 0){
|
||||||
|
ProcessStandardInterpretClause newProcessStandardInterpretClause =
|
||||||
|
new ProcessStandardInterpretClause();
|
||||||
|
String snowflake = String.valueOf(SnowflakeUtils.snowflake());
|
||||||
|
newProcessStandardInterpretClause.setId(snowflake);
|
||||||
|
newProcessStandardInterpretClause.setStandardInterpretId(standardInterpretId);
|
||||||
|
newProcessStandardInterpretClause.setClauseId(standardInterpretClauseSublist.getClauseId());
|
||||||
|
newProcessStandardInterpretClause.setDecompositionSource(
|
||||||
|
processStandardInterpret.getDecompositionSource());
|
||||||
|
newProcessStandardInterpretClauseList.add(newProcessStandardInterpretClause);
|
||||||
|
// 更新 标准解读流程_条款中间表_子表关联关系
|
||||||
|
processStandardInterpretClauseSublistService.update(
|
||||||
|
new LambdaUpdateWrapper<ProcessStandardInterpretClauseSublist>()
|
||||||
|
.eq(ProcessStandardInterpretClauseSublist::getId,
|
||||||
|
standardInterpretClauseSublist.getId())
|
||||||
|
.set(ProcessStandardInterpretClauseSublist::getStandardInterpretClauseId
|
||||||
|
, snowflake));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
processStandardInterpretClauseService.saveOrUpdateBatch(newProcessStandardInterpretClauseList);
|
||||||
|
}
|
||||||
|
|
||||||
|
processStandardInterpretService.updateById(processStandardInterpret);
|
||||||
|
break;
|
||||||
|
// 标准主解读汇总(分发)
|
||||||
|
case StandardInterpretCommon.MASTER_INTERPRET_SUMMARY:
|
||||||
|
processStandardInterpretService.updateById(processStandardInterpret);
|
||||||
|
processStandardInterpretClauseSublistService
|
||||||
|
.saveOrUpdateBatch(processStandardInterpretClauseSublistList);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
processStandardInterpretClauseSublistService
|
||||||
|
.saveOrUpdateBatch(processStandardInterpretClauseSublistList);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void flowTransfer(String taskId, String userId) {
|
public void flowTransfer(String taskId, String userId) {
|
||||||
processHandleService.transfer(taskId, userId);
|
processHandleService.transfer(taskId, userId);
|
||||||
@@ -1176,7 +1264,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
processStandardInterpretService.saveOrUpdate(processStandardInterpret);
|
processStandardInterpretService.saveOrUpdate(processStandardInterpret);
|
||||||
// 如果没选择条款
|
// 如果没选择条款
|
||||||
if (CollectionUtils.isEmpty(processStandardInterpretClauseList)){
|
if (CollectionUtils.isEmpty(processStandardInterpretClauseList)){
|
||||||
processStandardInterpret.setIsChooseClause(YesOrNoEnum.NO.getValue());
|
processStandardInterpret.setChooseClause(YesOrNoEnum.NO.getValue());
|
||||||
// 自动保存所有条款
|
// 自动保存所有条款
|
||||||
processStandardInterpretClauseList =
|
processStandardInterpretClauseList =
|
||||||
getClauseList(processStandardInterpret.getStandardId(),
|
getClauseList(processStandardInterpret.getStandardId(),
|
||||||
@@ -1201,7 +1289,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
case StandardInterpretCommon.MASTER_INTERPRET_DISTRIBUTE:
|
case StandardInterpretCommon.MASTER_INTERPRET_DISTRIBUTE:
|
||||||
// 标准主解读人重新分发(分发)
|
// 标准主解读人重新分发(分发)
|
||||||
case StandardInterpretCommon.MASTER_INTERPRET_AGAIN_DISTRIBUTE:
|
case StandardInterpretCommon.MASTER_INTERPRET_AGAIN_DISTRIBUTE:
|
||||||
if (YesOrNoEnum.YES.getValue().equals(processStandardInterpret.getIsDistribute())){
|
if (YesOrNoEnum.YES.getValue().equals(processStandardInterpret.getDistribute())){
|
||||||
// 分发
|
// 分发
|
||||||
// 删除旧数据
|
// 删除旧数据
|
||||||
processStandardInterpretClauseService.removeByIds(processAllDelIds);
|
processStandardInterpretClauseService.removeByIds(processAllDelIds);
|
||||||
@@ -1297,8 +1385,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
processStandardInterpretClauseService.saveOrUpdateBatch(newProcessStandardInterpretClauseList);
|
processStandardInterpretClauseService.saveOrUpdateBatch(newProcessStandardInterpretClauseList);
|
||||||
}
|
}
|
||||||
|
|
||||||
map.put(StandardInterpretCommon.PASS_FIRST,
|
if (StringUtils.isNotBlank(processStandardInterpret.getDistribute())){
|
||||||
Integer.parseInt(processStandardInterpret.getIsDistribute()));
|
map.put(StandardInterpretCommon.PASS_FIRST,
|
||||||
|
Integer.parseInt(processStandardInterpret.getDistribute()));
|
||||||
|
}
|
||||||
processStandardInterpretService.updateById(processStandardInterpret);
|
processStandardInterpretService.updateById(processStandardInterpret);
|
||||||
break;
|
break;
|
||||||
// 标准主解读汇总(分发)
|
// 标准主解读汇总(分发)
|
||||||
|
|||||||
Reference in New Issue
Block a user