Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -9,4 +9,5 @@ public class ActivitiCommon {
|
||||
public static final String MAIN_INSTANCE_ID = "mainInstanceId";
|
||||
public static final String PARENT_TASK_ID = "parentTaskId";
|
||||
public static final String DISTRIBUTE = "distribute";
|
||||
public static final String UNALLOCATED_QUANTITY = "unallocatedQuantity";
|
||||
}
|
||||
|
||||
+4
@@ -12,6 +12,10 @@ public class ProcessStandardComplianceCheckConstants {
|
||||
public static final String DEPT_USER = "deptUser";
|
||||
/** 主排查人 */
|
||||
public static final String MAIN_CHECK_USER = "mainCheckUser";
|
||||
/** 设计师 */
|
||||
public static final String DESIGNER = "designer";
|
||||
/** 设计师列表 */
|
||||
public static final String DESIGNER_LIST = "designerList";
|
||||
/** 会签人员列表 */
|
||||
public static final String COUNTERSIGN_USER_LIST = "countersignUserList";
|
||||
/** 设计工程师科室经理审核 */
|
||||
|
||||
+21
-9
@@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.util.MinioUtil;
|
||||
import com.jero.modules.activiti.common.ActivitiCommon;
|
||||
@@ -12,7 +13,6 @@ import com.jero.modules.activiti.entity.ProcessApprovalRecord;
|
||||
import com.jero.modules.activiti.enums.ProcessTypeEnum;
|
||||
import com.jero.modules.activiti.process.common.enums.ProcessType;
|
||||
import com.jero.modules.activiti.process.common.service.ActFlowCommonService;
|
||||
import com.jero.modules.activiti.process.demo.common.ProcessDemoCommon;
|
||||
import com.jero.modules.activiti.process.demo.vo.ProcessDemoVO;
|
||||
import com.jero.modules.activiti.process.fb.common.ProcessDefinitionKey;
|
||||
import com.jero.modules.activiti.process.fb.dto.BasicProcessInfoDTO;
|
||||
@@ -54,6 +54,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.jero.modules.activiti.common.ActivitiCommon.DISTRIBUTE;
|
||||
import static com.jero.modules.activiti.common.ActivitiCommon.PASS;
|
||||
@@ -240,6 +241,8 @@ public class ProcessStandardComplianceCheckServiceImpl extends ServiceImpl<Proce
|
||||
actFlowCommonService.updateApprovalInfo(processTask, taskId);
|
||||
String curUserId = UserUtils.getUserId();
|
||||
ProcessSccVO businessInfoDTO = processInfoVO.getBusinessInfoDTO();
|
||||
ProcessStandardComplianceCheck standardInfo = businessInfoDTO.getStandardInfo();
|
||||
List<ProcessStandardComplianceCheckDetail> detailInfoList = businessInfoDTO.getDetailInfoList();
|
||||
switch (xmlNodeId) {
|
||||
case DEPT_USER_DISTRIBUTE:
|
||||
// 设置主排查人
|
||||
@@ -248,6 +251,17 @@ public class ProcessStandardComplianceCheckServiceImpl extends ServiceImpl<Proce
|
||||
break;
|
||||
case MAIN_CHECK_USER_DISTRIBUTE:
|
||||
// 驳回
|
||||
boolean distributeFlag = businessInfoDTO.getStandardInfo().getDistributeFlag().equals(YesOrNoEnum.YES.getValue());
|
||||
int unallocatedQuantity = 0;
|
||||
if (distributeFlag) {
|
||||
// 分发需要设置未分发数据条数
|
||||
unallocatedQuantity = (int) detailInfoList.stream().filter(e -> StrUtil.isBlank(e.getDesignEngineer())).count();
|
||||
// 去重找到所有设计师
|
||||
List<String> designEngineerList = detailInfoList.stream().map(ProcessStandardComplianceCheckDetail::getDesignEngineer).distinct().collect(Collectors.toList());
|
||||
runtimeService.setVariable(processInstanceId, DESIGNER_LIST, designEngineerList);
|
||||
}
|
||||
runtimeService.setVariable(processInstanceId, DISTRIBUTE, distributeFlag);
|
||||
runtimeService.setVariable(processInstanceId, UNALLOCATED_QUANTITY, unallocatedQuantity);
|
||||
break;
|
||||
}
|
||||
// 审批节点
|
||||
@@ -321,15 +335,15 @@ public class ProcessStandardComplianceCheckServiceImpl extends ServiceImpl<Proce
|
||||
Map<String, Object> variables = new HashMap<>();
|
||||
variables.put(ActivitiCommon.MAIN_INSTANCE_ID, mainInstanceId != null ? mainInstanceId : processInstanceId);
|
||||
variables.put(ActivitiCommon.PARENT_TASK_ID, taskId);
|
||||
|
||||
String mainCheckUser = (String) delegateTask.getVariable(MAIN_CHECK_USER);
|
||||
switch (taskDefinitionKey) {
|
||||
//主排查人分批下发后自动任务
|
||||
case AUTO_TASK_1:
|
||||
case AUTO_TASK_3:
|
||||
// TODO
|
||||
List<String> interpreterList = (List<String>) delegateTask.getVariable(ProcessDemoCommon.INTERPRETER);
|
||||
for (String interpreter : interpreterList) {
|
||||
userInfoMap.put(ProcessDemoCommon.INTERPRETER, interpreter);
|
||||
List<String> designerList = (List<String>) delegateTask.getVariable(DESIGNER_LIST);
|
||||
for (String designer : designerList) {
|
||||
userInfoMap.put(DESIGNER, designer);
|
||||
userInfoMap.put(MAIN_CHECK_USER, mainCheckUser);
|
||||
// 流程定义id
|
||||
String definitionId = processHandleService.getDefinitionIdByKey(ProcessDefinitionKey.STANDARD_COMPLIANCE_CHECK_DISTRIBUTE);
|
||||
basicProcessInfoDTO.setProcessDefinitionId(definitionId);
|
||||
@@ -343,9 +357,7 @@ public class ProcessStandardComplianceCheckServiceImpl extends ServiceImpl<Proce
|
||||
break;
|
||||
//设计工程师驳回后自动任务
|
||||
case AUTO_TASK_2:
|
||||
// TODO
|
||||
String mainInterpreter = (String) delegateTask.getVariable(ProcessDemoCommon.MAIN_INTERPRETER);
|
||||
userInfoMap.put(ProcessDemoCommon.MAIN_INTERPRETER, mainInterpreter);
|
||||
userInfoMap.put(MAIN_CHECK_USER, mainCheckUser);
|
||||
// 流程定义id
|
||||
String definitionId = processHandleService.getDefinitionIdByKey(ProcessDefinitionKey.STANDARD_COMPLIANCE_CHECK_REDISTRIBUTE);
|
||||
basicProcessInfoDTO.setProcessDefinitionId(definitionId);
|
||||
|
||||
+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