From a13255b4129ee8a7a7b7e1ecd8e02dd2c78f7c17 Mon Sep 17 00:00:00 2001
From: 田源 <tianyuan@vci-tech.com>
Date: 星期四, 16 一月 2025 16:19:20 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/dao/impl/WebProcessDaoImpl.java |   94 +++++++++++++++++++++++-----------------------
 1 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/dao/impl/WebProcessDaoImpl.java b/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/dao/impl/WebProcessDaoImpl.java
index 92cdb96..afa9c1c 100644
--- a/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/dao/impl/WebProcessDaoImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/dao/impl/WebProcessDaoImpl.java
@@ -6,8 +6,9 @@
 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.WorkflowServicePrx;
-import com.vci.corba.workflow.data.*;
+import com.vci.corba.wf.WFServicePrx;
+import com.vci.corba.wf.data.*;
+import com.vci.corba.workflow.data.FlowApproveHistoryInfo;
 import com.vci.dto.ProcessTemplateVO;
 import com.vci.model.ProcessInstance;
 import com.vci.model.ProcessTask;
@@ -19,7 +20,6 @@
 import com.vci.starter.web.exception.VciBaseException;
 import com.vci.starter.web.pagemodel.DataGrid;
 import com.vci.starter.web.pagemodel.PageHelper;
-import com.vci.starter.web.pagemodel.SessionInfo;
 import com.vci.starter.web.util.BeanUtilForVCI;
 import com.vci.starter.web.util.VciBaseUtil;
 import com.vci.starter.web.util.VciDateUtil;
@@ -80,7 +80,7 @@
 	/**
 	 * 骞冲彴鐨勬祦绋嬫湇鍔�
 	 */
-	private WorkflowServicePrx workService = null;
+	private WFServicePrx wfService = null;
 
 	/**
 	 * 骞冲彴璋冪敤瀹㈡埛绔�
@@ -107,7 +107,7 @@
 	 */
 	private void getCategory() throws VciBaseException {
 		try {
-			ProcessCategoryInfo[] pcia = getWorkService().getProcessCategories("root");
+			ProcessCategoryInfo[] pcia = getWFService().getProcessCategories("root");
 			if(pcia!=null&&pcia.length>0){
 				for(ProcessCategoryInfo pci : pcia){
 					categoryMap.put(pci.name.toLowerCase(), pci.id);
@@ -144,7 +144,7 @@
 				throw new VciBaseException(msgCodePrefix + "typeNotExist", new String[]{type});
 			}
 			try {
-				allFlowInType = getWorkService().getProcessDefinitions(typeOid);
+				allFlowInType = getWFService().getProcessDefinitions(typeOid);
 			} catch (PLException e) {
 				throw WebUtil.getVciBaseException(e);
 			}
@@ -153,14 +153,14 @@
 			List<String> templateList = VciBaseUtil.str2List(filterTemplate);
 			if(!CollectionUtils.isEmpty(templateList)){
 				templateList.forEach(name->{
-					try {
+					/*try {*/
 						String nameUnRev = name;
 						String revision = "";
 						if(name.contains("-")){
 							nameUnRev = name.substring(0,name.lastIndexOf("-"));
 							revision = name.substring(name.lastIndexOf("-")+1);
 						}
-						ProcessDefinitionInfo[] definition = getWorkService().getProcessDefinitionByProcessDefinitionName(nameUnRev, "");
+						ProcessDefinitionInfo[] definition = null;//getWFService()().getProcessDefinitionByProcessDefinitionName(nameUnRev, "");
 						if(definition!=null){
 							if(StringUtils.isBlank(revision)) {
 								Collections.addAll(infoList, definition);
@@ -170,9 +170,9 @@
 								infoList.addAll(Arrays.stream(definition).filter(s -> finalRevision.equalsIgnoreCase(String.valueOf(s.version))).collect(Collectors.toList()));
 							}
 						}
-					} catch (PLException e) {
+					/*} catch (PLException e) {
 						throw WebUtil.getVciBaseException(e);
-					}
+					}*/
 				});
 			}
 			allFlowInType = infoList.toArray(new ProcessDefinitionInfo[0]);
@@ -191,7 +191,7 @@
 		WebUtil.alertNotNull(deployId,"娴佺▼閮ㄧ讲涓婚敭");
 		ProcessDefinitionInfo pdi = null;
 		try {
-			pdi = getWorkService().getProcessDefinitionByDeployId(deployId.trim());
+			pdi = getWFService().getProcessDefinitionByDeployId(deployId.trim());
 		} catch (PLException e) {
 			throw new VciBaseException(msgCodePrefix + "deployIdNotExist", new String[]{deployId});
 		}
@@ -255,7 +255,7 @@
 	public String getFirstNodeName(String deployId) throws VciBaseException {
     	WebUtil.alertNotNull(deployId,"閮ㄧ讲涓婚敭");
     	try {
-			ProcessTaskInfo firstProcessTask = getWorkService().getFirstProcessTask(deployId);
+			ProcessTaskInfo firstProcessTask = getWFService().getFirstProcessTask(deployId);
 			if(firstProcessTask!=null){
 				return firstProcessTask.taskName;
 			}
@@ -291,7 +291,7 @@
 	public String[] getAllProcessNodeNameByDeploy(String deploymentId) throws VciBaseException{
 		String[] allTaskNames = null;
 	    try {
-			allTaskNames = getWorkService().getAllTaskNames(deploymentId);
+			allTaskNames = getWFService().getAllTaskNames(deploymentId);
 		} catch (PLException e) {
 			throw WebUtil.getVciBaseException(e);
 		}
@@ -305,7 +305,7 @@
 	@Override
 	public String getJbpmDeploymentId(String processOid) throws VciBaseException{
 		WebUtil.alertNotNull(processOid,"娴佺▼妯℃澘涓婚敭");
-		return getWorkService().getDeploymentID(processOid);
+		return null;//getWFService()().getDeploymentID(processOid);
 	}
 
 	/**
@@ -318,7 +318,7 @@
 	public String getJbpmDeploymentIdByExecutionId(String executionId) throws VciBaseException{
 		WebUtil.alertNotNull(executionId,"娴佺▼鎵ц涓婚敭");
 		try {
-			return getWorkService().getDeploymentIdByExecutionId(executionId);
+			return getWFService().getDeploymentIdByExecutionId(executionId);
 		} catch (PLException e) {
 			throw WebUtil.getVciBaseException(e);
 		}
@@ -337,7 +337,7 @@
 		ProcessNodeVO pn = new ProcessNodeVO();
 		pn.setName(taskName);
 		try {
-			String[] nodePresideUsers = getWorkService().getCurCandidates(deploymentId, taskName, "", "");
+			String[] nodePresideUsers = getWFService().getCurCandidates(deploymentId, taskName, "", "");
 			if(nodePresideUsers!=null&& nodePresideUsers.length>0){
 				for(String preUsers : nodePresideUsers){
 					//骞冲彴瀛樺偍鐨勬柟寮忔槸鐢ㄦ埛;瑙掕壊;閮ㄩ棬;鑷畾涔�....
@@ -399,7 +399,7 @@
 			return null;
 		}
 		//涓嶈兘浣跨敤workitem鍘绘煡璇紝鍥犱负鍙兘浠诲姟杩樻病鍒�
-		String users = getWorkService().getNextTaskAssigner(executionid, taskName);
+		String users = getWFService().getNextTaskAssigner(executionid, taskName);
 		List<ProcessUserVO> allProUser = new ArrayList<ProcessUserVO>();
 		if(StringUtils.isNotEmpty(users)){
 			String userIds = users.replace("user:", "");//鐜板湪鍙敮鎸佽缃敤鎴�
@@ -602,16 +602,16 @@
 	@Override
 	public String getVariablesInProcess(String executionId,String key) throws VciBaseException{
 		WebUtil.alertNotNull(executionId,"娴佺▼鎵ц涓婚敭",key,"鍙傛暟Key");
-		UserEntityInfo ueo = new UserEntityInfo();
-		SessionInfo si = WebUtil.getCurrentUserSessionInfo();
-		ueo.modules = "娴佺▼";
-		ueo.userName = si.getUserId();
+//		UserEntityInfo ueo = new UserEntityInfo();
+//		SessionInfo si = WebUtil.getCurrentUserSessionInfo();
+//		ueo.modules = "娴佺▼";
+//		ueo.userName = si.getUserId();
 		while(StringUtils.countMatches(executionId,".")>1){
 			//璇存槑鏄瓙浠诲姟锛岀敤鐖朵换鍔¤幏鍙栦竴涓嬪彉閲�
 			executionId = executionId.substring(0,executionId.lastIndexOf("."));
 		}
 		try {
-			return getWorkService().getProcessVariable(executionId, key, ueo);
+			return getWFService().getProcessVariable(executionId, key);
 		} catch (PLException e) {
 			throw WebUtil.getVciBaseException(e);
 		}
@@ -718,11 +718,7 @@
 		WebUtil.alertNotNull(executionId,"娴佺▼鎵ц涓婚敭");
 		List<ProcessHistoryVO> hisList = new ArrayList<ProcessHistoryVO>();
 		FlowApproveHistoryInfo[] historyActivitys = null;
-		try {
-			historyActivitys = getWorkService().getHistoryActivityByProInsIdbyPLM(executionId);
-		} catch (PLException e) {
-			throw WebUtil.getVciBaseException(e);
-		}
+
 		//闇�瑕佸幓闄ゆ湭澶勭悊鐨勯噸澶嶉」
 		for (int i = 0; i < historyActivitys.length; i++) {
 			FlowApproveHistoryInfo historyActivity = historyActivitys[i];
@@ -752,7 +748,11 @@
 			//濡傛灉endTime涓虹┖琛ㄧず鏄緟鍔炵殑锛屼絾鏄湇鍔$鐨勬帴鍙d腑鏈変釜闂鏄紝浼氭妸浼氱鎴栬�呭瓙娴佺▼涓凡缁忓鐞嗙殑鍜屾湭澶勭悊鐨勬贩鍚堝湪涓�璧�
 			//鐩存帴浠庡緟鍔炰换鍔¢噷鍘绘煡璇�
 		}
-
+		/*try {
+			historyActivitys = getWFService()().getHistoryActivityByProInsIdbyPLM(executionId);
+		} catch (PLException e) {
+			throw WebUtil.getVciBaseException(e);
+		}*/
 		Map<String,String> conditionMap = new HashMap<String, String>();
 		conditionMap.put("businesstype", "5");//鏈」鐩病鏈夊疄闄呯殑鎰忎箟
 		conditionMap.put("lcstatus", "Executing");
@@ -806,7 +806,7 @@
 			throws VciBaseException{
 		WebUtil.alertNotNull(executionId,"娴佺▼鎵ц涓婚敭",taskName,"娴佺▼浠诲姟鍚嶇О");
 		try {
-			byte[] processChart =  getWorkService().getExecutionImageByExecutionId(executionId, taskName);
+			byte[] processChart = null;//getWFService()().getExecutionImageByExecutionId(executionId, taskName);
 			return processChart;
 		} catch (Throwable e) {
 			String msg = "鏈夊彲鑳借繖涓换鍔″叧鑱旂殑娴佺▼宸茬粡缁撴潫鎴栬�呰缁堟锛屼笉鑳藉啀鏌ョ湅鍏舵祦绋嬪浘浜�";
@@ -820,7 +820,7 @@
 			throws VciBaseException{
 		WebUtil.alertNotNull(executionId,"娴佺▼瀹炰緥涓婚敭");
 		try {
-			byte[] processChart =  getWorkService().getFlowImageByDeployID(executionId);
+			byte[] processChart =  getWFService().getFlowImageByDeployID(executionId);
 			return processChart;
 		} catch (PLException e) {
 			throw WebUtil.getVciBaseException(e);
@@ -836,7 +836,7 @@
 	@Override
 	public String[] getAllOutComes(String taskOid) throws VciBaseException{
 		try {
-			return getWorkService().getAllOutComes(taskOid);
+			return getWFService().getAllOutComes(taskOid);
 		} catch (PLException e) {
 			throw WebUtil.getVciBaseException(e);
 		}
@@ -854,7 +854,7 @@
 		WebUtil.alertNotNull(executionid,"娴佺▼鎵ц涓婚敭",taskName,"浠诲姟鍚嶇О");
 		String deployId = getJbpmDeploymentIdByExecutionId(executionid);
 		try {
-			return getWorkService().getNextTaskNameByJbpmId(deployId, taskName, outCome);
+			return getWFService().getNextTaskNameByJbpmId(deployId, taskName, outCome);
 		} catch (PLException e) {
 			throw WebUtil.getVciBaseException(e);
 		}
@@ -865,11 +865,11 @@
 	 * @return
 	 */
 	@Override
-	public WorkflowServicePrx getWorkService() throws VciBaseException{
-		if(workService == null){
-			this.workService = platformClientUtil.getWorkflowService();
+	public WFServicePrx getWFService() throws VciBaseException{
+		if(wfService == null){
+			this.wfService = platformClientUtil.getWFService();
 		}
-		return workService;
+		return wfService;
 	}
 
 	@Override
@@ -910,11 +910,11 @@
 		taskAss.endTime = VciDateUtil.getTime(endDate);
 		taskAss.isTrue = isNowEnable?true:false;
 		taskAss.fromUser =WebUtil.getCurrentUserSessionInfo().getUserId();
-		try {
-			getWorkService().saveOrUpdateTasksAssigned(taskAss, WebUtil.getUserEntityInfo("娴佺▼"));
+		/*try {
+			getWFService().saveOrUpdateTasksAssigned(taskAss, WebUtil.getUserEntityInfo("娴佺▼"));
 		} catch (PLException e) {
 			throw WebUtil.getVciBaseException(e);
-		}
+		}*/
 	}
 	
 	
@@ -925,7 +925,7 @@
 		//骞冲彴涓嶆敮鎸佸仠鐢ㄥ惎鐢ㄤ唬鐞嗕俊鎭�..鍙互鏌ヨ鍑烘潵鍐嶉噸鏂版坊鍔犮��
 		try {
 			UserEntityInfo  uei = WebUtil.getUserEntityInfo( "娴佺▼");
-			getWorkService().deleteTasksAssignedByUserName(new String[]{uei.userName}, uei);
+			getWFService().deleteTasksAssignedByUserName(new String[]{uei.userName});
 		} catch (PLException e) {
 			throw WebUtil.getVciBaseException(e);
 		}
@@ -935,7 +935,7 @@
 	public TasksAssignedInfo getProxy() throws VciBaseException{
 		TasksAssignedInfo assign = null;
 		try {
-			assign = getWorkService().getTasksAssignedByUserName("", WebUtil.getUserEntityInfo( "娴佺▼"));
+			assign = getWFService().getTasksAssignedByUserName("");
 		} catch (PLException e) {
 			throw WebUtil.getVciBaseException(e);
 		}
@@ -956,11 +956,11 @@
 			UserEntityInfo userEntityInfo = WebUtil.getUserEntityInfo("娴佺▼");
 			String resetStatus = null;
 			try{
-				resetStatus = getWorkService().getProcessVariable(executionId, WFVariablesKeyConstant.RESET_STATUS, userEntityInfo);
+				resetStatus = getWFService().getProcessVariable(executionId, WFVariablesKeyConstant.RESET_STATUS);
 			}catch (Throwable e){
 				logger.error("鑾峰彇娴佺▼鐨勫彉閲忓嚭閿�",e);
 			}
-			getWorkService().endProcessInstanceByplatform(executionId,userEntityInfo);
+			//getWFService().endProcessInstanceByplatform(executionId,userEntityInfo);
 			//骞冲彴娌℃湁鑷姩灏嗕笟鍔℃暟鎹仮澶嶅埌涔嬪墠鐨勭姸鎬�
 			if(StringUtils.isNotBlank(resetStatus)){
 				resetLcStatusForBusinessData(dataGrid.getData(),resetStatus);
@@ -1053,11 +1053,11 @@
 	@Override
 	public byte[] getProcessXmlContent(String jbpmDeploymentId) throws VciBaseException {
 		WebUtil.alertNotNull("娴佺▼鎵ц涓婚敭淇℃伅",jbpmDeploymentId);
-		try {
-			return getWorkService().getProcessResource(jbpmDeploymentId,".xml");
-		} catch (PLException e) {
+		/*try {*/
+			return null;//getWFService().getProcessResource(jbpmDeploymentId,".xml");
+		/*} catch (PLException e) {
 			throw WebUtil.getVciBaseException(e);
-		}
+		}*/
 	}
 
 	/**

--
Gitblit v1.9.3