From dcd238531d8154633b9c1e2188b81e519760a17e Mon Sep 17 00:00:00 2001 From: ludc Date: 星期二, 16 七月 2024 16:09:45 +0800 Subject: [PATCH] 调整项目结构,统一DTO、VO、PO、BO等对象到plt-web-api模块下,拷贝vci-file-integration、plt-web-api、vci-framework-api、vci-file-api等依赖下的对象到plt-web-api模块下,并取消对这些jar的引用(为了解决同路径同名独享导致打包运行时对象加载出错问题)。 --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebProcessCommandServiceImpl.java | 151 +++++++++++++++++++++++++++----------------------- 1 files changed, 81 insertions(+), 70 deletions(-) diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebProcessCommandServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebProcessCommandServiceImpl.java index 5bcf33a..6e662f9 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebProcessCommandServiceImpl.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebProcessCommandServiceImpl.java @@ -1,13 +1,19 @@ package com.vci.web.service.impl; +import com.vci.corba.common.PLException; import com.vci.corba.common.data.UserEntityInfo; import com.vci.corba.omd.data.BusinessObject; import com.vci.corba.omd.data.LinkObject; import com.vci.corba.workflow.data.FlowInstanceInfo; import com.vci.corba.workflow.data.MapTransfersInfo; import com.vci.corba.workflow.data.TasksAssignedInfo; -import com.vci.file.dto.VciFileObjectDTO; +import com.vci.dto.ProcessTemplateVO; +import com.vci.dto.VciFileObjectDTO; import com.vci.omd.utils.ObjectTool; +import com.vci.pagemodel.ProcessNodeVO; +import com.vci.pagemodel.ProcessOutcomeVO; +import com.vci.pagemodel.ProcessTaskVO; +import com.vci.pagemodel.ProcessUserVO; import com.vci.starter.web.constant.QueryOptionConstant; import com.vci.starter.web.enumpck.DataSecretEnum; import com.vci.starter.web.exception.VciBaseException; @@ -18,11 +24,10 @@ import com.vci.web.annotation.FlowNotifyAfter; import com.vci.web.annotation.FlowNotifyBefore; import com.vci.web.annotation.FlowNotifyWeb; -import com.vci.web.bo.FlowNoticeInfo; -import com.vci.web.constant.WFVariablesKeyConstant; +import com.vci.bo.FlowNoticeInfo; +import com.vci.constant.WFVariablesKeyConstant; import com.vci.web.dao.WebProcessDaoI; -import com.vci.web.dto.ProcessStartConfigDTO; -import com.vci.web.pageModel.*; +import com.vci.dto.ProcessStartConfigDTO; import com.vci.web.properties.WebProperties; import com.vci.web.service.*; import com.vci.web.util.BusAnnotationUtil; @@ -94,6 +99,13 @@ return false; } + /** + * 鍚姩娴佺▼ + * @param config 鍚姩娴佺▼鐩稿叧閰嶇疆 + * @param processNodeUsers 鍚勪釜鑺傜偣鐨勮礋璐d汉淇℃伅 + * @param variablesInfo 鐩稿叧鍙橀噺 + * @throws VciBaseException + */ @Override public void startProcess(ProcessStartConfigDTO config, Map<String, List<ProcessUserVO>> processNodeUsers, @@ -108,7 +120,6 @@ if (config.getTitle().length() > 127) { config.setTitle(config.getTitle().substring(0, 127)); } - //SessionInfo si = WebUtil.getSessionInfo(request); //weidy淇敼鑾峰彇褰撳墠鐢ㄦ埛鐨勬柟娉� SessionInfo si = WebUtil.getCurrentUserSessionInfo(); @@ -194,7 +205,7 @@ long currentTime =0L; try{ -// currentTime = platformClientUtil.getLogonFactoryService().getFrameworkService().getSystemTime(); + currentTime = platformClientUtil.getFrameworkService().getSystemTime(); }catch (Throwable e){ throw new VciBaseException(LangBaseUtil.getErrorMsg(e),new String[0],e); } @@ -205,50 +216,50 @@ noticeInfo.setProcessTemplateVO(template); BusAnnotationUtil.callForAnnotation(FlowNotifyWeb.class, FlowNotifyBefore.class,noticeInfo); String processInstanceId = ""; -// try { -// if (config.isAutoSubmitFirst()) { -// processInstanceId = processDao.getWorkService().startProcessAndExecuteFirstNode(template.getOid(), -// flowInstanceInfo, -// objIds, -// getUserEntityInfo(), -// firstNodeUserNames, -// "", -// allTaskName, -// allTaskNameUsers, -// allVariables, -// objectPropertyKeys, -// objectPropertyValues); -// }else{ -// processInstanceId = processDao.getWorkService().startPocessByPLM_v1( -// /** -// * String processDefinitionKey, 娴佺▼妯℃澘涓婚敭 -// * FlowInstanceInfo flowInstanceInfo, 娴佺▼瀹炰緥 -// * String[] objId, 鏁版嵁瀵硅薄id -// * UserEntityInfo userEntityInfo, 鐢ㄦ埛Info -// * String[] userName, 鐢ㄦ埛鍚� -// * String outcome, 鎸囧悜 -// * String[] tasknames, 涓氬姟鍚嶇О -// * String[][] taskUserNames, 鎵�灞炵敤鎴峰悕 -// * MapTransfersInfo[] mapTransfersInfos, 绉讳氦Info -// * String[] objectProperty, 涓氬姟灞炴�� -// * String[][] objectPropertyValues 涓氬姟灞炴�у�� -// */ -// template.getOid(), -// flowInstanceInfo, -// objIds, -// getUserEntityInfo(), -// firstNodeUserNames, -// "", -// allTaskName, -// allTaskNameUsers, -// allVariables, -// objectPropertyKeys, -// objectPropertyValues -// ); -// } -// } catch (VCIError e) { -// throw WebUtil.getVciBaseException(e); -// } + try { + if (config.isAutoSubmitFirst()) { + processInstanceId = processDao.getWorkService().startProcessAndExecuteFirstNode(template.getOid(), + flowInstanceInfo, + objIds, + getUserEntityInfo(), + firstNodeUserNames, + "", + allTaskName, + allTaskNameUsers, + allVariables, + objectPropertyKeys, + objectPropertyValues); + }else{ + processInstanceId = processDao.getWorkService().startPocessByPLMv1( + /** + * String processDefinitionKey, 娴佺▼妯℃澘涓婚敭 + * FlowInstanceInfo flowInstanceInfo, 娴佺▼瀹炰緥 + * String[] objId, 鏁版嵁瀵硅薄id + * UserEntityInfo userEntityInfo, 鐢ㄦ埛Info + * String[] userName, 鐢ㄦ埛鍚� + * String outcome, 鎸囧悜 + * String[] tasknames, 涓氬姟鍚嶇О + * String[][] taskUserNames, 鎵�灞炵敤鎴峰悕 + * MapTransfersInfo[] mapTransfersInfos, 绉讳氦Info + * String[] objectProperty, 涓氬姟灞炴�� + * String[][] objectPropertyValues 涓氬姟灞炴�у�� + */ + template.getOid(), + flowInstanceInfo, + objIds, + getUserEntityInfo(), + firstNodeUserNames, + "", + allTaskName, + allTaskNameUsers, + allVariables, + objectPropertyKeys, + objectPropertyValues + ); + } + } catch (PLException e) { + throw WebUtil.getVciBaseException(e); + } if (StringUtils.isNotBlank(config.getStartStatus())) { lifeCycleService.transCboStatus(allCbo, config.getStartStatus()); } @@ -262,7 +273,7 @@ private void callBefore(List<Map> preWorkitemList,String outcome,String note,long currentTime){ if(currentTime == 0L) { try { -// currentTime = platformClientUtil.getLogonFactoryService().getFrameworkService().getSystemTime(); + currentTime = platformClientUtil.getFrameworkService().getSystemTime(); } catch (Throwable e) { throw new VciBaseException(LangBaseUtil.getErrorMsg(e), new String[0], e); } @@ -490,20 +501,20 @@ List<Map> workitemList = processDao.getTaskCBOByOid(taskIds); long currentTime = 0L; try { -// currentTime = platformClientUtil.getLogonFactoryService().getFrameworkService().getSystemTime(); + currentTime = platformClientUtil.getFrameworkService().getSystemTime(); } catch (Throwable e) { throw new VciBaseException(LangBaseUtil.getErrorMsg(e), new String[0], e); } callBefore(workitemList,outCome,note,currentTime); -// try { -// if (jbpmTaskIds.length == 1) { -// processDao.getWorkService().completeTaskByPlatform_v1(jbpmTaskIds[0], outCome, nextTaskName, note, getUserEntityInfo(), nextTaskUsers, objectPropertyKeys, objectPropertyValues); -// } else { -// processDao.getWorkService().completeTasksByPlatform_v1(jbpmTaskIds, outCome, nextTaskName, note, getUserEntityInfo(), nextTaskUsers, objectPropertyKeys, objectPropertyValues); -// } -// } catch (VCIError e) { -// throw WebUtil.getVciBaseException(e); -// } + try { + if (jbpmTaskIds.length == 1) { + processDao.getWorkService().completeTaskByPlatformv1(jbpmTaskIds[0], outCome, nextTaskName, note, getUserEntityInfo(), nextTaskUsers, objectPropertyKeys, objectPropertyValues); + } else { + processDao.getWorkService().completeTasksByPlatformv1(jbpmTaskIds, outCome, nextTaskName, note, getUserEntityInfo(), nextTaskUsers, objectPropertyKeys, objectPropertyValues); + } + } catch (PLException e) { + throw WebUtil.getVciBaseException(e); + } callAfter((String)workitemList.get(0).get("executionid"),null,workitemList,currentTime); } @@ -530,11 +541,11 @@ String[] taskOidArray = taskOids.split(","); for (String taskOid : taskOidArray) { if (StringUtils.isNotBlank(taskOid)) { -// try { -// processDao.getWorkService().transmitTask(taskOid, "user:" + userIds, getUserEntityInfo()); -// } catch (VCIError vciError) { -// throw WebUtil.getVciBaseException(vciError); -// } + try { + processDao.getWorkService().transmitTask(taskOid, "user:" + userIds, getUserEntityInfo()); + } catch (PLException vciError) { + throw WebUtil.getVciBaseException(vciError); + } } } } @@ -566,7 +577,7 @@ WebUtil.alertNotNull(executionId, "娴佺▼鎵ц瀹炰緥鐨勪富閿�"); long currentTime = 0L; try { -// currentTime = platformClientUtil.getLogonFactoryService().getFrameworkService().getSystemTime(); + currentTime = platformClientUtil.getFrameworkService().getSystemTime(); } catch (Throwable e) { throw new VciBaseException(LangBaseUtil.getErrorMsg(e), new String[0], e); } @@ -617,7 +628,7 @@ } long currentTime = 0L; try { -// currentTime = platformClientUtil.getLogonFactoryService().getFrameworkService().getSystemTime(); + currentTime = platformClientUtil.getFrameworkService().getSystemTime(); } catch (Throwable e) { throw new VciBaseException(LangBaseUtil.getErrorMsg(e), new String[0], e); } @@ -657,7 +668,7 @@ } long currentTime = 0L; try { -// currentTime = platformClientUtil.getLogonFactoryService().getFrameworkService().getSystemTime(); + currentTime = platformClientUtil.getFrameworkService().getSystemTime(); } catch (Throwable e) { throw new VciBaseException(LangBaseUtil.getErrorMsg(e), new String[0], e); } -- Gitblit v1.9.3