【业务功能篇40】下篇:Springboot+activiti7 工作流引擎 增加网关组件、Assignment分配权限

news/2024/11/17 20:25:49/

service层 失效分析服务接口实现类

package com.service.impl.dao;import com.domain.entity.process.CompFailProcessContent;
import com.domain.model.process.CompFailAnalysisTab;
import com.domain.model.process.CompFailApplicationTab;
import com.domain.model.process.CompFailRiskLaborTab;
import com.domain.model.process.CompFailRiskMainTab;
import com.qualitybigdata.impl.CommonFileServiceDelegateImpl;
import com.qualitybigdata.model.CommonFile;
import com.qualitybigdata.model.CompFailAnalysisParam;
import com.qualitybigdata.model.CompFailApplicationParam;
import com.qualitybigdata.model.CompFailRiskLaborParam;
import com.qualitybigdata.model.CompFailRiskParam;
import com.service.dao.CompFailDaoService;
import com.service.dao.iservice.process.CompFailRiskLaborService;
import com.service.dao.mapper.process.CompFailAnalysisMapper;
import com.service.dao.mapper.process.CompFailApplicationMapper;
import com.service.dao.mapper.process.CompFailRiskLaborMapper;
import com.service.dao.mapper.process.CompFailRiskMainMapper;
import com.utils.MyBeanUtils;import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;import javax.annotation.Resource;/*** CompFailDaoServiceImpl**/
@Service
public class CompFailDaoServiceImpl implements CompFailDaoService {private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");private static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd");private static final String REJECTED_STATE = "REJECTED";private static final String DRAFT_STATE = "DRAFT";private static final String SUBMITTED_STATE = "SUBMITTED";@Resourceprivate CompFailApplicationMapper applicationMapper;@Resourceprivate CompFailAnalysisMapper analysisMapper;@Resourceprivate CompFailRiskMainMapper riskMainMapper;@Resourceprivate CompFailRiskLaborMapper riskLaborMapper;@Resourceprivate CompFailRiskLaborService iRiskLaborService;@Resourceprivate CommonFileServiceDelegateImpl commonFileService;/*** commitApplication* * @param content content* @param compFailApplicationParam compFailApplicationParam*/@Transactional(rollbackFor = Exception.class)@Overridepublic void commitApplication(CompFailProcessContent content, CompFailApplicationParam compFailApplicationParam) {saveApplication(content, compFailApplicationParam, true);}/*** draftApplication* * @param content content* @param compFailApplicationParam compFailApplicationParam*/@Overridepublic void draftApplication(CompFailProcessContent content, CompFailApplicationParam compFailApplicationParam) {saveApplication(content, compFailApplicationParam, false);}/*** saveApplication* * @param content content* @param compFailApplicationParam compFailApplicationParam* @param submitted submitted*/private void saveApplication(CompFailProcessContent content, CompFailApplicationParam compFailApplicationParam, boolean submitted) {String faId = compFailApplicationParam.getFaId();applicationMapper.delete(new LambdaQueryWrapper<CompFailApplicationTab>().eq(CompFailApplicationTab::getFaId,faId));applicationMapper.insert(convertToApplication(content, compFailApplicationParam, submitted));}/*** getApplication* * @param faId faId* @return CompFailApplicationParam*/@Overridepublic CompFailApplicationParam getApplication(String faId) {CompFailApplicationTab tab = applicationMapper.selectOne(new LambdaQueryWrapper<CompFailApplicationTab>().eq(CompFailApplicationTab::getFaId, faId));CompFailApplicationParam vo = tab == null ? new CompFailApplicationParam() : convertToApplicationParam(tab);List<CommonFile> fileList = commonFileService.getFileList(faId, "器件失效委托填写申请");vo.setFileList(fileList);return vo;}/*** rejectApplication* * @param faId faId*/@Overridepublic void rejectApplication(String faId) {CompFailApplicationTab condition = new CompFailApplicationTab();condition.setState(REJECTED_STATE);applicationMapper.update(condition, new LambdaQueryWrapper<CompFailApplicationTab>().eq(CompFailApplicationTab::getFaId,faId));}/*** commitAnalysis* * @param content content* @param analysisParam analysisParam*/@Transactional(rollbackFor = Exception.class)@Overridepublic void commitAnalysis(CompFailProcessContent content, CompFailAnalysisParam analysisParam) {saveAnalysis(content, analysisParam, true);}/*** draftAnalysis* * @param content content* @param analysisParam analysisParam*/@Overridepublic void draftAnalysis(CompFailProcessContent content, CompFailAnalysisParam analysisParam) {saveAnalysis(content, analysisParam, false);}/*** saveAnalysis* * @param content content* @param analysisParam analysisParam* @param submitted submitted*/private void saveAnalysis(CompFailProcessContent content, CompFailAnalysisParam analysisParam, boolean submitted) {String faId = analysisParam.getFaId();analysisMapper.delete(new LambdaQueryWrapper<CompFailAnalysisTab>().eq(CompFailAnalysisTab::getFaId, faId));analysisMapper.insert(convertToAnalysis(content, analysisParam, submitted));}/*** getAnalysis* * @param faId faId* @return CompFailAnalysisParam*/@Overridepublic CompFailAnalysisParam getAnalysis(String faId) {CompFailAnalysisTab analysisTab = analysisMapper.selectOne(new LambdaQueryWrapper<CompFailAnalysisTab>().eq(CompFailAnalysisTab::getFaId, faId));if (analysisTab == null) {analysisTab = new CompFailAnalysisTab();// 自动填充业务背景信息CompFailApplicationTab applicationTab = applicationMapper.selectOne(new LambdaQueryWrapper<CompFailApplicationTab>().eq(CompFailApplicationTab::getFaId, faId));if (applicationTab != null) {MyBeanUtils.shallowCopy(applicationTab, analysisTab);}}CompFailAnalysisParam vo = convertToAnalysisParam(analysisTab);List<CommonFile> itemFileList = commonFileService.getFileList(faId, "器件实验室分析报告");List<CommonFile> facFileList = commonFileService.getFileList(faId, "厂家分析报告");vo.setFacFileList(facFileList);vo.setItemFileList(itemFileList);return vo;}/*** rejectAnalysis* * @param faId faId*/@Overridepublic void rejectAnalysis(String faId) {CompFailAnalysisTab condition = new CompFailAnalysisTab();condition.setState(REJECTED_STATE);analysisMapper.update(condition, new LambdaQueryWrapper<CompFailAnalysisTab>().eq(CompFailAnalysisTab::getFaId, faId));}/*** commitRisk* * @param content content* @param riskParam riskParam*/@Transactional(rollbackFor = Exception.class)@Overridepublic void commitRisk(CompFailProcessContent content, CompFailRiskParam riskParam) {saveRisk(content, riskParam,true);}/*** draftRisk* * @param content content* @param riskParam riskParam*/@Overridepublic void draftRisk(CompFailProcessContent content, CompFailRiskParam riskParam) {saveRisk(content, riskParam,false);}/*** saveRisk* * @param content content* @param riskParam riskParam* @param submitted submitted*/private void saveRisk(CompFailProcessContent content, CompFailRiskParam riskParam, boolean submitted) {String faId = riskParam.getFaId();riskMainMapper.delete(new LambdaQueryWrapper<CompFailRiskMainTab>().eq(CompFailRiskMainTab::getFaId, faId));riskMainMapper.insert(convertToRiskMain(content, riskParam, submitted));iRiskLaborService.remove(new LambdaQueryWrapper<CompFailRiskLaborTab>().eq(CompFailRiskLaborTab::getFaId, faId));List<CompFailRiskLaborTab> itemList = convertToRiskLabor(riskParam.getFaId(), riskParam.getItemRiskList(), "ITEM", submitted);List<CompFailRiskLaborTab> boardList = convertToRiskLabor(riskParam.getFaId(), riskParam.getBoardRiskList(), "BOARD", submitted);itemList.addAll(boardList);iRiskLaborService.saveBatch(itemList);}/*** getRisk* * @param faId faId* @return CompFailRiskParam*/@Overridepublic CompFailRiskParam getRisk(String faId) {CompFailRiskParam vo = riskMainMapper.selectRisk(faId, "ITEM", "BOARD");if (vo == null) {vo = new CompFailRiskParam();// 自动填充业务背景信息(四位编码与器件小类)CompFailApplicationTab applicationTab = applicationMapper.selectOne(new LambdaQueryWrapper<CompFailApplicationTab>().eq(CompFailApplicationTab::getFaId, faId));if (applicationTab != null) {String prevCode = applicationTab.getItemCode();if (!StringUtils.isBlank(prevCode)) {prevCode = prevCode.length() >= 4 ? prevCode.substring(0, 4) : prevCode;}String subType = applicationTab.getItemSubtype() != null ? applicationTab.getItemSubtype() : null;vo.setModeCode(prevCode);vo.setMechanismCode(prevCode);vo.setCaseCode(prevCode);vo.setRuleCode(prevCode);vo.setModeSubName(subType);vo.setMechanismName(subType);vo.setCaseName(subType);vo.setRuleName(subType);}}List<CommonFile> itemFileList = commonFileService.getFileList(faId, "重大问题决策纪要");List<CommonFile> facFileList = commonFileService.getFileList(faId, "可靠性案例");vo.setProIssueList(itemFileList);vo.setProCaseList(facFileList);return vo;}/*** rejectRisk* * @param faId faId*/@Overridepublic void rejectRisk(String faId) {CompFailRiskMainTab riskMainTabCondition = new CompFailRiskMainTab();riskMainTabCondition.setState(REJECTED_STATE);riskMainMapper.update(riskMainTabCondition, new LambdaQueryWrapper<CompFailRiskMainTab>().eq(CompFailRiskMainTab::getFaId, faId));CompFailRiskLaborTab riskLaborTabCondition = new CompFailRiskLaborTab();riskLaborTabCondition.setState(REJECTED_STATE);riskLaborMapper.update(riskLaborTabCondition, new LambdaQueryWrapper<CompFailRiskLaborTab>().eq(CompFailRiskLaborTab::getFaId, faId));}/*** convertToApplication* * @param content content* @param input input* @param submitted submitted* @return CompFailApplicationTab*/private CompFailApplicationTab convertToApplication(CompFailProcessContent content, CompFailApplicationParam input, boolean submitted) {CompFailApplicationTab result = new CompFailApplicationTab();MyBeanUtils.shallowCopy(input, result);result.setTaskId(content.getCurTask().getId());result.setProcessInstanceId(content.getProcessInstance().getId());result.setState(submitted ? SUBMITTED_STATE : DRAFT_STATE);String issueTime = input.getIssueTime();if (!StringUtils.isBlank(issueTime)) {result.setIssueTime(LocalDateTime.parse(issueTime, DATE_TIME_FORMATTER));}String planFinishedDate = input.getPlanFinishedDate();if (!StringUtils.isBlank(planFinishedDate)) {result.setPlanFinishedDate(LocalDate.parse(planFinishedDate, DATE_FORMATTER));}result.setCreateTime(LocalDateTime.now());result.setLastUpdatedTime(LocalDateTime.now());return result;}/*** convertToApplicationParam* * @param source source* @return CompFailApplicationParam*/private CompFailApplicationParam convertToApplicationParam(CompFailApplicationTab source) {CompFailApplicationParam target = new CompFailApplicationParam();MyBeanUtils.shallowCopy(source, target);if (source.getIssueTime() != null) {target.setIssueTime(source.getIssueTime().format(DATE_TIME_FORMATTER));}if (source.getPlanFinishedDate() != null) {target.setPlanFinishedDate(source.getPlanFinishedDate().format(DATE_FORMATTER));}return target;}/*** convertToAnalysis* * @param content content* @param input input* @param submitted submitted* @return CompFailAnalysisTab*/private CompFailAnalysisTab convertToAnalysis(CompFailProcessContent content, CompFailAnalysisParam input, boolean submitted) {CompFailAnalysisTab result = new CompFailAnalysisTab();MyBeanUtils.shallowCopy(input, result);result.setTaskId(content.getCurTask().getId());result.setProcessInstanceId(content.getProcessInstance().getId());result.setState(submitted ? SUBMITTED_STATE : DRAFT_STATE);result.setCreateTime(LocalDateTime.now());result.setLastUpdatedTime(LocalDateTime.now());return result;}/*** convertToAnalysisParam* * @param source source* @return CompFailAnalysisParam*/private CompFailAnalysisParam convertToAnalysisParam(CompFailAnalysisTab source) {CompFailAnalysisParam target = new CompFailAnalysisParam();MyBeanUtils.shallowCopy(source, target);return target;}/*** convertToRiskMain* * @param content content* @param input input* @param submitted submitted* @return CompFailRiskMainTab*/private CompFailRiskMainTab convertToRiskMain(CompFailProcessContent content, CompFailRiskParam input, boolean submitted) {CompFailRiskMainTab result = new CompFailRiskMainTab();MyBeanUtils.shallowCopy(input, result);result.setTaskId(content.getCurTask().getId());result.setProcessInstanceId(content.getProcessInstance().getId());result.setState(submitted ? SUBMITTED_STATE : DRAFT_STATE);result.setCreateTime(LocalDateTime.now());result.setLastUpdatedTime(LocalDateTime.now());return result;}/*** convertToRiskLabor* * @param faId faId* @param list list* @param riskType riskType* @param submitted submitted* @return List<CompFailRiskLaborTab>*/private List<CompFailRiskLaborTab> convertToRiskLabor(String faId, List<CompFailRiskLaborParam> list, String riskType, boolean submitted) {List<CompFailRiskLaborTab> result = new ArrayList<>();for (CompFailRiskLaborParam param : list) {CompFailRiskLaborTab tab = new CompFailRiskLaborTab();MyBeanUtils.shallowCopy(param, tab);tab.setFaId(faId).setState(submitted ? SUBMITTED_STATE : DRAFT_STATE).setRiskType(riskType).setCreateTime(LocalDateTime.now()).setLastUpdatedTime(LocalDateTime.now());result.add(tab);}return result;}
}

service层 子接口 集成mp的IService接口,获得对应的数据操作接口方法 其他不再展开...

package com.service.dao.iservice.process;import com.domain.model.process.CompFailRiskLaborTab;import com.baomidou.mybatisplus.extension.service.IService;/*** CompFailRiskLaborService* */
public interface CompFailRiskLaborService extends IService<CompFailRiskLaborTab> { }

电子流常量类

统一类管理相关的变量 ,修改及调用  减少重复多次的写值

package com.constants.process;/*** 失效分析电子流变量**/
public class CompFailConstants {// 流程以及流程任务定义/*** 失效分析 流程定义 key* */public static final String COMP_FAIL_PROCESS_DEF_KEY = "COMP_FAIL_PROCESS_DEF_KEY";/*** FA*/public static final String COMP_FAIL_PROCESS_BUSINESS_PREFIX = "FA";// comp_fail_task/*** 失效分析 第一步任务 填写申请 定义 key* */public static final String COMP_FAIL_TASK_APPLICATION_DEF_KEY = "COMP_FAIL_TASK_APPLICATION";/*** 失效分析 第二步任务 接口人分配 定义 key* */public static final String COMP_FAIL_TASK_CONTACT_REVIEW_DEF_KEY = "COMP_FAIL_TASK_CONTACT_REVIEW";/*** 失效分析 第三步任务 分析人分析 定义 key* */public static final String COMP_FAIL_TASK_ANALYSIS_DEF_KEY = "COMP_FAIL_TASK_ANALYSIS";/*** 失效分析 第四步任务 风险评估及改进 定义 key* */public static final String COMP_FAIL_TASK_RISK_DEF_KEY = "COMP_FAIL_TASK_RISK";/*** 失效分析 第五步任务 项目经理审核 定义 key* */public static final String COMP_FAIL_TASK_PM_REVIEW_DEF_KEY = "COMP_FAIL_TASK_PM_REVIEW";/*** 失效分析 第六步任务 专家组审核 定义 key* */public static final String COMP_FAIL_TASK_ML_REVIEW_DEF_KEY = "COMP_FAIL_TASK_ML_REVIEW";/*** 失效分析 第七步任务 问题关闭审核 定义 key* */public static final String COMP_FAIL_TASK_CLOSE_REVIEW_DEF_KEY = "COMP_FAIL_TASK_CLOSE_REVIEW";/*** 失效分析 第八步任务 委托人反馈意见 定义 key* */public static final String COMP_FAIL_TASK_FEEDBACK_DEF_KEY = "COMP_FAIL_TASK_FEEDBACK";/*** 失效分析 流程完成 定义 key* */public static final String COMP_FAIL_TASK_END_DEF_KEY = "COMP_FAIL_TASK_END";// assignee/*** 失效分析 申请 处理人变量* */public static final String COMP_FAIL_TASK_APPLICATION_ASSIGNEE = "COMP_FAIL_TASK_APPLICATION_ASSIGNEE";/*** 失效分析 接口人审核 处理人变量* */public static final String COMP_FAIL_TASK_CONTACT_REVIEW_ASSIGNEE = "COMP_FAIL_TASK_CONTACT_REVIEW_ASSIGNEE";/*** 失效分析 分析人分析 处理人变量* */public static final String COMP_FAIL_TASK_ANALYSIS_ASSIGNEE = "COMP_FAIL_TASK_ANALYSIS_ASSIGNEE";/*** 失效分析 风险分析以及改进 处理人变量* */public static final String COMP_FAIL_TASK_RISK_ASSIGNEE = "COMP_FAIL_TASK_RISK_ASSIGNEE";/*** 失效分析 项目经理审核 处理人变量* */public static final String COMP_FAIL_TASK_PM_REVIEW_ASSIGNEE = "COMP_FAIL_TASK_PM_REVIEW_ASSIGNEE";/*** 失效分析 组审核 处理人变量* */public static final String COMP_FAIL_TASK_ML_REVIEW_ASSIGNEE = "COMP_FAIL_TASK_ML_REVIEW_ASSIGNEE";/*** 失效分析 PL问题关闭审核 处理人变量* */public static final String COMP_FAIL_TASK_CLOSE_REVIEW_ASSIGNEE = "COMP_FAIL_TASK_CLOSE_REVIEW_ASSIGNEE";/*** 失效分析 反馈意见 处理人变量* */public static final String COMP_FAIL_TASK_FEEDBACK_ASSIGNEE = "COMP_FAIL_TASK_FEEDBACK_ASSIGNEE";// comp_fail_excl_gateway/*** 失效分析 申请 排他网关 是否取消申请* */public static final String COMP_FAIL_EXCL_GATEWAY_APPLICATION_DEF_KEY = "COMP_FAIL_EXCL_GATEWAY_APPLICATION_DEF_KEY";/*** 失效分析 接口人审核 排他网关 申请是否合理* */public static final String COMP_FAIL_EXCL_GATEWAY_CONTACT_REVIEW_DEF_KEY = "COMP_FAIL_EXCL_GATEWAY_CONTACT_REVIEW_DEF_KEY";/*** 失效分析 分析人分析 排他网关 分析人是否指定正确* */public static final String COMP_FAIL_EXCL_GATEWAY_ANALYSIS_DEF_KEY = "COMP_FAIL_EXCL_GATEWAY_ANALYSIS_DEF_KEY";/*** 失效分析 风险分析以及改进 排他网关 风险评估人是否指定正确* */public static final String COMP_FAIL_EXCL_GATEWAY_RISK_DEF_KEY = "COMP_FAIL_EXCL_GATEWAY_RISK_DEF_KEY";/*** 失效分析 项目经理审核 排他网关 项目经理审核是否通过* */public static final String COMP_FAIL_EXCL_GATEWAY_PM_REVIEW_DEF_KEY = "COMP_FAIL_EXCL_GATEWAY_PM_REVIEW_DEF_KEY";/*** 失效分析 组审核 排他网关 专家审核是否通过* */public static final String COMP_FAIL_EXCL_GATEWAY_ML_REVIEW_DEF_KEY = "COMP_FAIL_EXCL_GATEWAY_ML_REVIEW_DEF_KEY";/*** 失效分析 PL问题关闭审核 排他网关 审核问题关闭是否通过* */public static final String COMP_FAIL_EXCL_GATEWAY_CLOSE_REVIEW_DEF_KEY = "COMP_FAIL_EXCL_GATEWAY_CLOSE_REVIEW_DEF_KEY";// comp_fail_gateway_normal_advance/*** 失效分析 是否取消申请 网关变量;* 流程流向变量(为true则正常前进,为false则后退,如application网关处,为true则前进到contact review,为false则后退到end)** */public static final String COMP_FAIL_GATEWAY_APPLICATION_NORMAL_ADVANCE = "COMP_FAIL_GATEWAY_CONDITION_APPLICATION";/*** 失效分析 审核 申请是否通过 网关变量* */public static final String COMP_FAIL_GATEWAY_CONTACT_REVIEW_NORMAL_ADVANCE = "COMP_FAIL_GATEWAY_CONTACT_REVIEW_NORMAL_ADVANCE";/*** 失效分析 分析人是否指定正确 网关变量* */public static final String COMP_FAIL_GATEWAY_ANALYSIS_NORMAL_ADVANCE = "COMP_FAIL_GATEWAY_ANALYSIS_NORMAL_ADVANCE";/*** 失效分析 风险评估人是否指定正确 网关变量* */public static final String COMP_FAIL_GATEWAY_RISK_NORMAL_ADVANCE = "COMP_FAIL_GATEWAY_RISK_NORMAL_ADVANCE";/*** 失效分析 项目经理审核是否通过 网关变量* */public static final String COMP_FAIL_GATEWAY_PM_REVIEW_NORMAL_ADVANCE = "COMP_FAIL_GATEWAY_PM_REVIEW_NORMAL_ADVANCE";/*** 失效分析 组长审核是否通过 网关变量* */public static final String COMP_FAIL_GATEWAY_ML_REVIEW_NORMAL_ADVANCE = "COMP_FAIL_GATEWAY_ML_REVIEW_NORMAL_ADVANCE";/*** 失效分析 PL审核是否关闭问题 网关变量* */public static final String COMP_FAIL_GATEWAY_CLOSE_REVIEW_NORMAL_ADVANCE = "COMP_FAIL_GATEWAY_CLOSE_REVIEW_NORMAL_ADVANCE";/*** comp_fail_var_common,流程公用变量*/public static final String COMP_FAIL_FA_ID = "COMP_FAIL_FA_ID";/*** 编码变量*/public static final String COMP_FAIL_COMP_CODE = "COMP_FAIL_COMP_CODE";/*** 接口人审核 意见*/public static final String COMP_FAIL_TASK_CONTACT_REVIEW_OPINION = "COMP_FAIL_TASK_CONTACT_REVIEW_OPINION";/*** 分析人 意见*/public static final String COMP_FAIL_TASK_ANALYSIS_OPINION = "COMP_FAIL_TASK_ANALYSIS_OPINION";/*** 风险评估人 意见*/public static final String COMP_FAIL_TASK_RISK_OPINION = "COMP_FAIL_TASK_RISK_OPINION";/*** 关闭审核 意见*/public static final String COMP_FAIL_TASK_CLOSE_REVIEW_OPINION = "COMP_FAIL_TASK_CLOSE_REVIEW_OPINION";/*** PL审核 意见*/public static final String COMP_FAIL_TASK_PM_REVIEW_OPINION = "COMP_FAIL_TASK_PM_REVIEW_OPINION";/*** ML审核人 意见*/public static final String COMP_FAIL_TASK_ML_REVIEW_OPINION = "COMP_FAIL_TASK_ML_REVIEW_OPINION";/*** 接口人审核 启动分析*/public static final String COMP_FAIL_TASK_CONTACT_REVIEW_IS_START_ANALYSIS = "COMP_FAIL_TASK_CONTACT_REVIEW_IS_START_ANALYSIS";/*** 接口人审核 重要性*/public static final String COMP_FAIL_TASK_CONTACT_REVIEW_IMPORTANCE = "COMP_FAIL_TASK_CONTACT_REVIEW_IMPORTANCE";/*** 共享知识库*/public static final String COMP_FAIL_TASK_PM_REVIEW_SHARE = "COMP_FAIL_TASK_PM_REVIEW_SHARE";/*** 委托人满意度*/public static final String COMP_FAIL_TASK_FEEDBACK_SATISFACTION = "COMP_FAIL_TASK_FEEDBACK_SATISFACTION";/*** 委托人意见*/public static final String COMP_FAIL_TASK_FEEDBACK_ADVISE = "COMP_FAIL_TASK_FEEDBACK_ADVISE";/*** 委托人评价*/public static final String COMP_FAIL_TASK_FEEDBACK_EVALUATION = "COMP_FAIL_TASK_FEEDBACK_EVALUATION";}

流程枚举类,转换流程对应的几个子任务的key,任务名称,状态,顺序等

package com.enums.process;import com.constants.process.CompFailConstants;/***/
public enum CompFailProcessTask {// 枚举名与NameEn相等COMP_FAIL_TASK_APPLICATION(CompFailConstants.COMP_FAIL_TASK_APPLICATION_DEF_KEY, "委托人填写委托分析申请", CompFailState.APPLICATION, 1, CompFailConstants.COMP_FAIL_TASK_APPLICATION_ASSIGNEE),COMP_FAIL_TASK_CONTACT_REVIEW(CompFailConstants.COMP_FAIL_TASK_CONTACT_REVIEW_DEF_KEY, "接口人审核", CompFailState.CONTACT_REVIEW, 2, CompFailConstants.COMP_FAIL_TASK_CONTACT_REVIEW_ASSIGNEE),COMP_FAIL_TASK_ANALYSIS(CompFailConstants.COMP_FAIL_TASK_ANALYSIS_DEF_KEY, "分析人分析", CompFailState.ANALYSIS, 3, CompFailConstants.COMP_FAIL_TASK_ANALYSIS_ASSIGNEE),COMP_FAIL_TASK_RISK(CompFailConstants.COMP_FAIL_TASK_RISK_DEF_KEY, "风险评估及改进", CompFailState.RISK, 4, CompFailConstants.COMP_FAIL_TASK_RISK_ASSIGNEE),COMP_FAIL_TASK_PM_REVIEW(CompFailConstants.COMP_FAIL_TASK_PM_REVIEW_DEF_KEY, "项目经理审核", CompFailState.PM_REVIEW, 5, CompFailConstants.COMP_FAIL_TASK_PM_REVIEW_ASSIGNEE),COMP_FAIL_TASK_ML_REVIEW(CompFailConstants.COMP_FAIL_TASK_ML_REVIEW_DEF_KEY, "专家组长审核", CompFailState.ML_REVIEW, 6, CompFailConstants.COMP_FAIL_TASK_ML_REVIEW_ASSIGNEE),COMP_FAIL_TASK_CLOSE_REVIEW(CompFailConstants.COMP_FAIL_TASK_CLOSE_REVIEW_DEF_KEY, "问题关闭审核", CompFailState.CLOSE_REVIEW,7, CompFailConstants.COMP_FAIL_TASK_CLOSE_REVIEW_ASSIGNEE),COMP_FAIL_TASK_FEEDBACK(CompFailConstants.COMP_FAIL_TASK_FEEDBACK_DEF_KEY, "委托人反馈意见", CompFailState.FEEDBACK, 8, CompFailConstants.COMP_FAIL_TASK_FEEDBACK_ASSIGNEE);private final String definitionKey;private final String nameCn;private final CompFailState state;private final int order;/*** getAssigneeDefKey* * @return String*/public String getAssigneeDefKey() {return assigneeDefKey;}private final String assigneeDefKey;CompFailProcessTask(String definitionKey, String nameCn, CompFailState state, int order, String assigneeDefKey) {this.definitionKey = definitionKey;this.nameCn = nameCn;this.state = state;this.order = order;this.assigneeDefKey = assigneeDefKey;}/*** getDefinitionKey* * @return String*/public String getDefinitionKey() {return definitionKey;}/*** getState* * @return CompFailState*/public CompFailState getState() {return state;}/*** getOrder* * @return int*/public int getOrder() {return order;}/*** getNameCn* * @return String*/public String getNameCn() {return nameCn;}}

流程状态枚举类

package com.enums.process;/*** CompFailState**/
public enum CompFailState {CLOSED("已关闭", 0),CANCELED("已撤销", -1),APPLICATION("填写申请中",1),CONTACT_REVIEW("接口人审核中", 2),ANALYSIS("分析中",3),RISK("风险评估中",4),PM_REVIEW("项目经理审核中",5),ML_REVIEW("专家组审核中",6),CLOSE_REVIEW("问题关闭审核中",7),FEEDBACK("申请人反馈意见中",8);/*** stateName*/public final String stateName;/*** stateCode*/public final int stateCode;CompFailState(String stateName, int stateCode) {this.stateCode = stateCode;this.stateName = stateName;}/*** getStateName* * @return String*/public String getStateName() {return stateName;}
}

由于多个子任务,对应多个工单,这里就不再展开描述其实体类,核心程序主要还是看如何利用内置的一些接口方法调用流程的任务信息,进行数据修改,保存 ,变量赋值等


http://www.ppmy.cn/news/744423.html

相关文章

nginx+lua(openresty) lua-mongodb 安装及使用(四)

前言 前章已经讲述 ua-protobuf 安装及使用 这章主要讲述 openresty 环境下 lua-mongodb 安装及使用 1:环境 ubuntu16(18) mongodb 3.6 2:安装mongodb 3.6 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 #创…

学生用计算机的额定功率,电脑电源额定功率要多少才合适?

有一点电脑常识的朋友都知道&#xff0c;决定电脑的性能最关键的就是CPU、显卡&#xff0c;内存等等&#xff0c;在自行组装电脑的朋友就尤其注重电脑的Cpu&#xff0c;显卡以及主板这三样东西&#xff0c;CPU的中文名字就是处理器&#xff0c;但是很好有人会主要到机箱的电源、…

计算机电源在线工作,一般计算机电源都在什么电压范围内公

台式计算机工作时功率大&#xff0c;且要求电网电压稳定。其工作电压范围为200~230V; 笔记本电脑功率小&#xff0c;使用电器适配器供电&#xff0c;工作电压范围为100~240V。 功率一般为150W&#xff5e;220W&#xff0c;共有四路输出(5V、12V)&#xff0c;另向主板提供一个P.…

学习系统编程No.28【多线程概念实战】

引言&#xff1a; 北京时间&#xff1a;2023/6/29/15:33&#xff0c;刚刚更新完博客&#xff0c;目前没什么状态&#xff0c;不好趁热打铁&#xff0c;需要去睡一会会&#xff0c;昨天睡的有点迟&#xff0c;然后忘记把7点到8点30之间的4个闹钟关掉了&#xff0c;恶心了我自己…

mysql redis区别

一、.redis和mysql的区别总结 &#xff08;1&#xff09;类型上 从类型上来说&#xff0c;mysql是关系型数据库&#xff0c;redis是缓存数据库 &#xff08;2&#xff09;作用上 mysql用于持久化的存储数据到硬盘&#xff0c;功能强大&#xff0c;但是速度较慢 redis用于存储使…

唯品会用户数据分析

2021年2月25日&#xff0c;品牌特卖电商唯品会披露了其未经审计的2020年第四季度财务报告。财报数据显示&#xff0c;唯品会第四季度净营收达358亿元。按照通用会计准则&#xff0c;唯品会归属股东净利润为24亿元&#xff08;约合3.741亿美元&#xff09;&#xff0c;相较于201…

双十一 唯品会内部优惠入口

【唯享客】是唯品会旗下分享导购平台APP&#xff0c;自己购物有返利&#xff0c;分享能挣钱&#xff0c;每天还有惊喜零元购。邀请好友注册&#xff0c;同样拿奖励。免费加入的哦 注册分享网址&#xff1a;https://wxk.vip.com/register 这段时间想必大家被网易考拉海购店主模…

唯品会商品数据

接口数据返回如下 ret: [ "SUCCESS::调用成功" ], v: "1.0", msg: "success", {data: {code: 1,data: {context: "{"615":"1","872":"1"}",products: [{attrs: [{name: "弹性",va…