update 法规合规评估流程 法规工程师通过
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package com.jero.modules.activiti.config;
|
||||
|
||||
import com.jero.modules.activiti.listener.MyGlobalEventListener;
|
||||
import com.jero.modules.activiti.service.impl.image.ICustomProcessDiagramGenerator;
|
||||
import org.activiti.spring.SpringProcessEngineConfiguration;
|
||||
import org.activiti.spring.boot.ProcessEngineConfigurationConfigurer;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
|
||||
|
||||
@@ -14,13 +16,15 @@ import java.util.Collections;
|
||||
*/
|
||||
@Configuration
|
||||
public class ActivitiConfig implements ProcessEngineConfigurationConfigurer {
|
||||
|
||||
@Resource
|
||||
private ICustomProcessDiagramGenerator customProcessDiagramGenerator;
|
||||
@Override
|
||||
public void configure(SpringProcessEngineConfiguration springProcessEngineConfiguration) {
|
||||
//全局监听器
|
||||
springProcessEngineConfiguration.setEventListeners(Collections.singletonList(new MyGlobalEventListener()));
|
||||
//有bug 自定义id
|
||||
//springProcessEngineConfiguration.setIdGenerator(new MyGen());
|
||||
springProcessEngineConfiguration.setProcessDiagramGenerator(customProcessDiagramGenerator);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+10
-10
@@ -147,9 +147,9 @@ public class ActivitiController {
|
||||
public Result<Object> complete(@RequestBody Map<String,Object> map) {
|
||||
//todo 判断当前节点,执行不同的操作
|
||||
String taskId = map.get("taskId").toString();
|
||||
Integer commitFlag = Integer.valueOf(map.get("commitFlag").toString());
|
||||
String commitText = map.get("commitText").toString();
|
||||
String commitFile = map.get("commitFile").toString();
|
||||
//Integer commitFlag = Integer.valueOf(map.get("commitFlag").toString());
|
||||
//String commitText = map.get("commitText").toString();
|
||||
//String commitFile = map.get("commitFile").toString();
|
||||
|
||||
|
||||
Task task=taskService.createTaskQuery() // 创建任务查询
|
||||
@@ -161,13 +161,13 @@ public class ActivitiController {
|
||||
}else if ("其他起草人线下填写,上传".equals(taskName)){
|
||||
}
|
||||
//更新审批表为完成,填充数据
|
||||
ProcessApprovalRecord approvalRecord = processApprovalRecordService.getToDoByTaskId(taskId);
|
||||
approvalRecord.setCommitFlag(commitFlag == 1? CommitFlagEnum.PASS.getValue() : CommitFlagEnum.REJECT.getValue());
|
||||
approvalRecord.setCommitText(commitText);
|
||||
approvalRecord.setCommitFile(commitFile);
|
||||
approvalRecord.setFinishFlag(FinishFlagEnum.COMPLETE.getValue());
|
||||
approvalRecord.setEndTime(new Date());
|
||||
processApprovalRecordService.updateById(approvalRecord);
|
||||
//ProcessApprovalRecord approvalRecord = processApprovalRecordService.getToDoByTaskId(taskId);
|
||||
//approvalRecord.setCommitFlag(commitFlag == 1? CommitFlagEnum.PASS.getValue() : CommitFlagEnum.REJECT.getValue());
|
||||
//approvalRecord.setCommitText(commitText);
|
||||
//approvalRecord.setCommitFile(commitFile);
|
||||
//approvalRecord.setFinishFlag(FinishFlagEnum.COMPLETE.getValue());
|
||||
//approvalRecord.setEndTime(new Date());
|
||||
//processApprovalRecordService.updateById(approvalRecord);
|
||||
//审批节点
|
||||
taskService.complete(taskId, map);
|
||||
return Result.OK();
|
||||
|
||||
+10
@@ -11,6 +11,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
@@ -213,4 +214,13 @@ public class ProcessProjectStandardTerm {
|
||||
@ApiModelProperty(value="评估结果")
|
||||
private String assessResults_dictText;
|
||||
|
||||
/**工作令编号*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "工作令编号")
|
||||
private String workNumber;
|
||||
/**项目名称*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
}
|
||||
+2
@@ -16,6 +16,8 @@ public interface ProcessProjectStandardTermMapper extends BaseMapper<ProcessProj
|
||||
|
||||
List<ProcessProjectStandardTerm> getByModuleOwner(@Param("processId") String processId, @Param("originUserId") String originUserId, @Param("executionParentId") String executionParentId, @Param("hasDesignEngineer") Boolean hasDesignEngineer);
|
||||
|
||||
List<ProcessProjectStandardTerm> getByRejectModuleOwner(@Param("processId") String processId, @Param("originUserId") String originUserId, @Param("executionParentId") String executionParentId);
|
||||
|
||||
List<ProcessProjectStandardTerm> getByModuleOwnerAutoComplete(@Param("processId") String processId, @Param("originUserId") String originUserId, @Param("executionParentId") String executionParentId);
|
||||
|
||||
List<ProcessProjectStandardTerm> getByDesignEngineer(@Param("processId") String processId, @Param("originUserId") String originUserId, @Param("executionParentId") String executionParentId);
|
||||
|
||||
+20
@@ -82,6 +82,26 @@
|
||||
and ppstu.id is not null
|
||||
</select>
|
||||
|
||||
<select id="getByRejectModuleOwner" resultMap="BaseResultMap">
|
||||
select ppstu.id term_user_id,
|
||||
ppstu.not_involved,
|
||||
ppstu.assess_results,
|
||||
ppstu.model_series,
|
||||
ppstu.description,
|
||||
ppstu.file_id,
|
||||
ppstu.design_engineer,
|
||||
<include refid="Base_Column_List">
|
||||
<property name="alias" value="ppst"/>
|
||||
</include>
|
||||
from process_project_standard_term ppst
|
||||
left join process_project_standard_term_user ppstu on ppst.id = ppstu.term_id
|
||||
where ppst.process_id = #{processId}
|
||||
and ppstu.module_owner = #{originUserId}
|
||||
and ppstu.parent_execution_id = #{executionParentId}
|
||||
and ppstu.design_engineer is null
|
||||
and ppstu.id is not null
|
||||
</select>
|
||||
|
||||
<select id="getByModuleOwnerAutoComplete" resultMap="BaseResultMap">
|
||||
select ppstu.id term_user_id,
|
||||
ppstu.not_involved,
|
||||
|
||||
+31
-3
@@ -158,7 +158,7 @@ public class ProcessProjectStandardService extends ServiceImpl<ProcessProjectSta
|
||||
//驳回后模块责任人分发
|
||||
case ProcessProjectStandardCommon.MKZRRFF_4:
|
||||
case ProcessProjectStandardCommon.MKZRRFF_5:
|
||||
processProjectStandardTermList = termMapper.getByModuleOwner(processId, originUserId, executionParentId, false);
|
||||
processProjectStandardTermList = termMapper.getByRejectModuleOwner(processId, originUserId, executionParentId);
|
||||
break;
|
||||
//设计工程师评估
|
||||
case ProcessProjectStandardCommon.SJGCSPG_:
|
||||
@@ -569,6 +569,7 @@ public class ProcessProjectStandardService extends ServiceImpl<ProcessProjectSta
|
||||
projectLibrary.setValuationTime(date);
|
||||
projectLibrary.setProjectApproval(term.getProjectApprovalFlag());
|
||||
projectLibrary.setProcessNum(process.getPrcNum());
|
||||
projectLibrary.setProcessTermId(termId);
|
||||
//存入不符合描述
|
||||
if (termIdMap.containsKey(termId)) {
|
||||
List<ProcessProjectStandardTermUser> termUserList = termIdMap.get(termId);
|
||||
@@ -590,6 +591,7 @@ public class ProcessProjectStandardService extends ServiceImpl<ProcessProjectSta
|
||||
if (pass){
|
||||
designEngineerList = updateTermList.stream()
|
||||
.map(ProcessProjectStandardTerm::getDesignEngineer)
|
||||
.filter(Objects::nonNull)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
}else {
|
||||
@@ -599,6 +601,7 @@ public class ProcessProjectStandardService extends ServiceImpl<ProcessProjectSta
|
||||
List<ProcessProjectStandardTermUser> termUserList = termUserService.list(wrapper1);
|
||||
designEngineerList = termUserList.stream()
|
||||
.map(ProcessProjectStandardTermUser::getResponsibleUnitLeader)
|
||||
.filter(Objects::nonNull)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
@@ -722,6 +725,7 @@ public class ProcessProjectStandardService extends ServiceImpl<ProcessProjectSta
|
||||
designEngineerIds.addAll(designEngineerList);
|
||||
updateWrapper.set(ProcessProjectStandardTermUser::getDesignEngineer, designEngineerList.get(0));
|
||||
updateWrapper.set(ProcessProjectStandardTermUser::getParentExecutionId, executionId);
|
||||
updateWrapper.set(ProcessProjectStandardTermUser::getAssessResults, null);
|
||||
termUserService.update(updateWrapper);
|
||||
|
||||
if (designEngineerList.size() >= 2){
|
||||
@@ -777,13 +781,33 @@ public class ProcessProjectStandardService extends ServiceImpl<ProcessProjectSta
|
||||
ThreadLocalUtil.put(ProcessProjectAssessCommon.EXECUTION_ID,formKey);
|
||||
// 完成任务
|
||||
String taskId = processDTO.getTaskId();
|
||||
taskService.complete(taskId);
|
||||
Map<String, Object> variables = new HashMap<>();
|
||||
//variables.put(ProcessProjectStandardCommon.MANAGER_LEADER_LIST, moduleOwnerIds);
|
||||
taskService.complete(taskId,variables);
|
||||
ThreadLocalUtil.remove();
|
||||
}
|
||||
|
||||
//设计工程师补充工作令编号
|
||||
private void sjgcsbcgzlbhSubmit(ProcessInfoVO<ProcessProjectStandardVO> processInfoVO, ProcessDTO processDTO) {
|
||||
|
||||
String businessId = processInfoVO.getBusinessId();
|
||||
ProcessApprovalRecord processApprovalRecord = processDTO.getProcessApprovalRecord();
|
||||
String originUserId = processApprovalRecord.getOriginUserId();
|
||||
Task task = processDTO.getTask();
|
||||
String formKey = task.getFormKey();
|
||||
String executionId = task.getExecutionId();
|
||||
ProcessProjectStandardVO businessInfoDTO = processInfoVO.getBusinessInfoDTO();
|
||||
List<ProcessProjectStandardTerm> termList = businessInfoDTO.getProcessProjectStandardTermList();
|
||||
for (ProcessProjectStandardTerm term : termList) {
|
||||
String termId = term.getId();
|
||||
LambdaUpdateWrapper<LawsSpecialProjectLibrary> wrapper = new LambdaUpdateWrapper<>();
|
||||
wrapper.eq(LawsSpecialProjectLibrary::getProcessTermId,termId);
|
||||
wrapper.set(LawsSpecialProjectLibrary::getWorkNumber,term.getWorkNumber());
|
||||
wrapper.set(LawsSpecialProjectLibrary::getProjectName,term.getProjectName());
|
||||
lawsSpecialProjectLibraryService.update(wrapper);
|
||||
}
|
||||
// 完成任务
|
||||
String taskId = processDTO.getTaskId();
|
||||
taskService.complete(taskId);
|
||||
}
|
||||
|
||||
public IPage<StandardSelectionVO> getManyStandardSelectionBox(ManyStandardSelectionBoxVO selectionBoxVO, Integer pageNo, Integer pageSize) {
|
||||
@@ -883,4 +907,8 @@ public class ProcessProjectStandardService extends ServiceImpl<ProcessProjectSta
|
||||
wrapper1.eq(ProcessProjectStandardTermApproval::getTermId,id);
|
||||
return termApprovalService.list(wrapper1);
|
||||
}
|
||||
|
||||
public void auto(DelegateTask delegateTask) {
|
||||
taskService.complete(delegateTask.getId());
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -13,6 +13,7 @@ import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity;
|
||||
import org.activiti.engine.repository.ProcessDefinition;
|
||||
import org.activiti.engine.repository.ProcessDefinitionQuery;
|
||||
import org.activiti.engine.runtime.ProcessInstance;
|
||||
import org.activiti.image.impl.DefaultProcessDiagramGenerator;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -24,7 +24,9 @@ public class ThreadLocalUtil {
|
||||
|
||||
public static Object get(String key) {
|
||||
Map<String, Object> map = RUNTIME_DATA.get();
|
||||
//RUNTIME_DATA.remove();
|
||||
if (map == null){
|
||||
return null;
|
||||
}
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -125,4 +125,8 @@ public class LawsSpecialProjectLibrary implements Serializable {
|
||||
@Excel(name = "流程编号", width = 15)
|
||||
@ApiModelProperty(value = "流程编号")
|
||||
private String processNum;
|
||||
/**流程关联条款id*/
|
||||
@ApiModelProperty(value = "流程关联条款id")
|
||||
private String processTermId;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user