From e019e6cffffe3b4b764bff4d60fffb5d62b160cd Mon Sep 17 00:00:00 2001 From: xiejun <xiejun@vci-tech.com> Date: 星期三, 28 八月 2024 19:12:11 +0800 Subject: [PATCH] 表单表格导出功能开发 --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebProcessDefineServiceImpl.java | 86 ++++++++++++++++++++++++++++--------------- 1 files changed, 56 insertions(+), 30 deletions(-) diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebProcessDefineServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebProcessDefineServiceImpl.java index 77b29f6..ca79668 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebProcessDefineServiceImpl.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebProcessDefineServiceImpl.java @@ -1,14 +1,11 @@ package com.vci.web.service.impl; -import com.vci.client.bof.ClientLinkObject; -import com.vci.client.workflow.editor.FlowConstants; -import com.vci.file.pagemodel.VciFileObjectVO; +import com.vci.corba.omd.data.LinkObject; +import com.vci.dto.ProcessTemplateVO; import com.vci.frameworkcore.compatibility.OrgDeptQueryServiceI; import com.vci.frameworkcore.compatibility.SmRoleQueryServiceI; import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; -import com.vci.frameworkcore.pagemodel.OrgDepartmentVO; -import com.vci.frameworkcore.pagemodel.SmRoleVO; -import com.vci.frameworkcore.pagemodel.SmUserVO; +import com.vci.pagemodel.*; import com.vci.starter.web.enumpck.DataSecretEnum; import com.vci.starter.web.enumpck.UserSecretEnum; import com.vci.starter.web.exception.VciBaseException; @@ -16,13 +13,13 @@ import com.vci.starter.web.util.Md5; import com.vci.starter.web.util.VciBaseUtil; import com.vci.starter.web.wrapper.VciQueryWrapperForDO; -import com.vci.web.constant.FileTypeConstants; -import com.vci.web.constant.WFVariablesKeyConstant; +import com.vci.constant.FileTypeConstants; +import com.vci.constant.WFVariablesKeyConstant; import com.vci.web.dao.WebProcessDaoI; -import com.vci.web.model.WFProcessClassifyDO; -import com.vci.web.pageModel.*; +import com.vci.model.WFProcessClassifyDO; import com.vci.web.properties.WebProperties; import com.vci.web.service.*; +import com.vci.web.util.PlatformClientUtil; import com.vci.web.util.WebUtil; import org.apache.commons.lang3.StringUtils; import org.dom4j.Document; @@ -60,6 +57,9 @@ @Autowired private WebProcessCommandServiceI proCmdService; + + @Autowired + private PlatformClientUtil platformClientUtil; /** * 涓氬姟鏁版嵁鏈嶅姟 @@ -103,8 +103,8 @@ * @param showAll 鏄惁鏄剧ず鎵�鏈夌殑鐗堟湰 */ @Override - public List<ProcessTemplateVO> getMyTemplates(String type,String filterTemplate, - boolean showAll) throws VciBaseException { + public List<ProcessTemplateVO> getMyTemplates(String type, String filterTemplate, + boolean showAll) throws VciBaseException { //鐜板湪娌℃湁娣诲姞鐢ㄦ埛鐨勮繃婊� return processDao.getTemplatesByType(type,filterTemplate,showAll); } @@ -235,7 +235,6 @@ List<ProcessUserVO> pul = copyUsersToProcessNode(users,maxSecret); if(isHasCurrentUser){//褰撳墠鐢ㄦ埛鏀惧湪鍓嶉潰 ProcessUserVO pu = new ProcessUserVO(); - //SessionInfo si = WebUtil.getSessionInfo(request); SessionInfo si = WebUtil.getCurrentUserSessionInfo(); pu.setOid(si.getUserOid()); pu.setId(si.getUserId()); @@ -302,12 +301,24 @@ ProcessNodeVO pn = processDao.getNodePresideUsers(processTemplateOid, nodeName); return getProcessUsersByNode(pn,-1); } - + + /** + * 鑾峰彇閮ㄧ讲id + * @param executionId 鎵ц涓婚敭 + * @return + * @throws VciBaseException + */ @Override public String getDeployIdByExecutionId(String executionId) throws VciBaseException { return processDao.getJbpmDeploymentIdByExecutionId(executionId); } - + + /** + * 鑾峰彇浠诲姟涓缃殑褰撳墠澶勭悊浜� + * @param taskOid 浠诲姟涓婚敭 + * @return + * @throws VciBaseException + */ @Override public List<ProcessUserVO> getProcessUserByTask(String taskOid) throws VciBaseException{ List<ProcessTaskVO> task = processDao.getTaskByOid(taskOid); @@ -318,6 +329,13 @@ } } + /** + * 鑾峰彇鎴戠殑寰呭姙浜嬮」--骞冲彴涓嶆敮鎸佹煡璇㈡暟鎹�绘潯鏁帮紝涓嶆竻妤氬湪杩欑鎯呭喌涓嬶紝start鍜宲agesize鏄敤鏉ュ仛浠�涔堢敤鐨� + * @param conditionMap 鏉′欢鏌ヨ + * @param ph 鍒嗛〉鍜屾帓搴� + * @return + * @throws VciBaseException + */ @Override public DataGrid getMyUndoProcessTask( Map<String, String> conditionMap, PageHelper ph) throws VciBaseException { @@ -327,6 +345,13 @@ return processDao.getUndoTask(conditionMap,ph,WebUtil.getCurrentUserId()); } + /** + * 鑾峰彇鎴戝鐞嗕簡鐨勪换鍔� + * @param conditionMap 鏌ヨ鏉′欢 + * @param ph 鍒嗛〉淇℃伅 + * @return + * @throws VciBaseException + */ @Override public DataGrid getMyDoneProcessTask(Map<String, String> conditionMap, PageHelper ph) throws VciBaseException { @@ -440,14 +465,14 @@ map.put("detailUrl",detailUrl== null?"":detailUrl); map.put("UIContentCode",UIContent); //澧炲姞鏌ヨ鍏宠仈鐨勪笟鍔℃暟鎹� - List<ClientLinkObject> linkObjects = processDao.getDataCloInTask("",executionid); + List<LinkObject> linkObjects = processDao.getDataCloInTask("",executionid); StringBuilder sb = new StringBuilder(); String thisBusinessOid = ""; if(linkObjects!=null && linkObjects.size()>0){ Set<String> oidSet = new HashSet<String>(); //鍘婚櫎閲嶅 - for(ClientLinkObject clo : linkObjects){ - oidSet.add(clo.getToOid()); + for(LinkObject clo : linkObjects){ + oidSet.add(clo.toOid); } for(String oidString : oidSet) { sb.append(oidString).append(","); @@ -480,11 +505,12 @@ } for (Iterator<?> a = root.elementIterator(); a.hasNext();) { Element next = (Element) a.next(); - String cellName = next.attributeValue(FlowConstants.XMLNAME); - if(cellName != null && cellName.equals(name)) { - map.put("customerbuttoninfo",next.attributeValue(FlowConstants.URL_PATH)); - break; - } + //todo FlowConstants姝ゅ崰鏃犳硶寮曠敤锛屽悗缁細杩涜璋冩暣锛屽啀杩涜寮曠敤 +// String cellName = next.attributeValue(FlowConstants.XMLNAME); +// if(cellName != null && cellName.equals(name)) { +// map.put("customerbuttoninfo",next.attributeValue(FlowConstants.URL_PATH)); +// break; +// } } }catch (Exception e) { throw new VciBaseException("璇诲彇娴佺▼鐨剎ml鍐呭鍑虹幇浜嗛敊璇�"); @@ -644,19 +670,19 @@ */ @Override public DataGrid getFilesInProcess(Map<String, String> conditionMap, String taskOid, String executionId,PageHelper pageHelper) throws VciBaseException{ - List<ClientLinkObject> cloByTask = processDao.getDataCloInTask(taskOid,executionId); + List<LinkObject> cloByTask = processDao.getDataCloInTask(taskOid,executionId); if(cloByTask == null || cloByTask.size() == 0){ throw new VciBaseException("娌℃湁鍏宠仈鐨勪笟鍔℃暟鎹�"); } Map<String,List<String>> busOid_btmMap = new HashMap<String, List<String>>(); Set<String> fileOidSet = new HashSet(); - for(ClientLinkObject clo:cloByTask){ - if(FileTypeConstants.FILE_DATA_TABLE.equals(clo.getToBTMName())){ - fileOidSet.add(clo.getToOid()); + for(LinkObject clo:cloByTask){ + if(FileTypeConstants.FILE_DATA_TABLE.equals(clo.toBTName)){ + fileOidSet.add(clo.toOid); }else { - List<String> thisBtmOids = busOid_btmMap.getOrDefault(clo.getToBTMName(),new ArrayList<>()); - thisBtmOids.add(clo.getToOid()); - busOid_btmMap.put(clo.getToBTMName(), thisBtmOids); + List<String> thisBtmOids = busOid_btmMap.getOrDefault(clo.toBTName,new ArrayList<>()); + thisBtmOids.add(clo.toOid); + busOid_btmMap.put(clo.toBTName, thisBtmOids); } } DataGrid dg = new DataGrid(); -- Gitblit v1.9.3