| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | |
| | | @Autowired |
| | | private WebProcessCommandServiceI proCmdService; |
| | | |
| | | @Autowired |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | /** |
| | | * 业务数据服务 |
| | |
| | | * @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); |
| | | } |
| | |
| | | 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()); |
| | |
| | | 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); |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取我的待办事项--平台不支持查询数据总条数,不清楚在这种情况下,start和pagesize是用来做什么用的 |
| | | * @param conditionMap 条件查询 |
| | | * @param ph 分页和排序 |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | @Override |
| | | public DataGrid getMyUndoProcessTask( |
| | | Map<String, String> conditionMap, PageHelper ph) throws VciBaseException { |
| | |
| | | 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 { |
| | |
| | | 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(","); |
| | |
| | | } |
| | | 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("读取流程的xml内容出现了错误"); |
| | |
| | | */ |
| | | @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(); |