| | |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.client.bof.ClientLinkObject; |
| | | import com.vci.common.utility.ObjectUtility; |
| | | 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.WorkflowService; |
| | | import com.vci.corba.workflow.WorkflowServicePrx; |
| | | import com.vci.corba.workflow.data.*; |
| | | import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; |
| | | import com.vci.frameworkcore.pagemodel.SmUserVO; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | |
| | | * @throws VciBaseException |
| | | */ |
| | | @Override |
| | | public List<ClientLinkObject> getDataCloInTask(String taskOid, String executionid) throws VciBaseException { |
| | | public List<LinkObject> getDataCloInTask(String taskOid, String executionid) throws VciBaseException { |
| | | Map<String,String> conditionMap = new HashMap<String, String>(); |
| | | if(StringUtils.isNotBlank(taskOid)) { |
| | | conditionMap.put("f_oid", taskOid.trim()); |
| | |
| | | } |
| | | |
| | | private DataGrid getData(String linkType,Map<String,String> conditionMap,String referColumns) throws VciBaseException{ |
| | | List<ClientLinkObject> clos = loService.queryCLO(taskDataLink, conditionMap); |
| | | List<LinkObject> clos = loService.queryCLO(taskDataLink, conditionMap); |
| | | Map<String,List<String>> btmOidMap = new HashMap<String, List<String>>(); |
| | | if(clos!=null&&clos.size()>0){ |
| | | for(ClientLinkObject clo : clos){ |
| | | for(LinkObject clo : clos){ |
| | | List<String> oids = null; |
| | | String btm = clo.getToBTMName().toLowerCase(); |
| | | String btm = clo.toBTName.toLowerCase(); |
| | | if(btmOidMap.containsKey(btm)){ |
| | | oids = btmOidMap.get(btm); |
| | | }else{ |
| | | oids = new ArrayList<String>(); |
| | | } |
| | | oids.add(clo.getToOid()); |
| | | oids.add(clo.toOid); |
| | | btmOidMap.put(btm, oids); |
| | | } |
| | | } |
| | |
| | | }else { |
| | | caluesList.add("*"); |
| | | } |
| | | List<com.vci.client.bof.ClientBusinessObject> cbos = boService.queryCBO(btm, conditionMap,null,caluesList); |
| | | List<BusinessObject> cbos = boService.queryCBO(btm, conditionMap,null,caluesList); |
| | | data.addAll(boService.cbos2Map(cbos)); |
| | | } |
| | | } |
| | |
| | | PageHelper pageHelper = new PageHelper(-1); |
| | | pageHelper.setSort("endTime"); |
| | | pageHelper.setOrder(pageHelper.asc); |
| | | List<com.vci.client.bof.ClientBusinessObject> undoTaskCbos= boService.queryCBO(workitemBtmType, conditionMap); |
| | | List<BusinessObject> undoTaskCbos= boService.queryCBO(workitemBtmType, conditionMap); |
| | | if(undoTaskCbos != null && undoTaskCbos.size() > 0) { |
| | | for(com.vci.client.bof.ClientBusinessObject cbo : undoTaskCbos) { |
| | | for(BusinessObject cbo : undoTaskCbos) { |
| | | ProcessHistoryVO his = new ProcessHistoryVO(); |
| | | String taskName = cbo.getName(); |
| | | String taskName = cbo.name; |
| | | if(StringUtils.contains(taskName,"-")) { |
| | | taskName = taskName.substring(taskName.lastIndexOf("-") + 1); |
| | | } |
| | | his.setTaskName(taskName); |
| | | his.setCreateTime(String.valueOf(cbo.getCreateTime())); |
| | | String userIdString = cbo.getAttributeValue("principal"); |
| | | his.setCreateTime(String.valueOf(cbo.createTime)); |
| | | String userIdString = ObjectTool.getBOAttributeValue(cbo,"principal"); |
| | | if(StringUtils.contains(userIdString,":")) { |
| | | userIdString = userIdString.substring(userIdString.indexOf(":") + 1); |
| | | } |
| | | his.setAssignee(cbo.getAttributeValue("principal")); |
| | | his.setAssignee(ObjectTool.getBOAttributeValue(cbo,"principal")); |
| | | String userShowInfoString = ""; |
| | | SmUserVO user = userQueryService.getUserByUserId(userIdString); |
| | | if(user != null){ |
| | |
| | | userShowInfoString = userIdString; |
| | | } |
| | | his.setAssigneeName(userShowInfoString); |
| | | his.setExecutionId(cbo.getAttributeValue("executionid")); |
| | | his.setExecutionId(ObjectTool.getBOAttributeValue(cbo,"executionid")); |
| | | |
| | | hisList.add(his); |
| | | } |
| | |
| | | oidList.add(oid); |
| | | } |
| | | //转换成500长度的 |
| | | List<com.vci.client.bof.ClientBusinessObject> cboList = new ArrayList<com.vci.client.bof.ClientBusinessObject>(); |
| | | List<BusinessObject> cboList = new ArrayList<BusinessObject>(); |
| | | if(oidList.size()>500){ |
| | | List<List<String>> oidListForIn = WebUtil.switchListForOracleIn(oidList); |
| | | for(List<String> oidListForInRecord : oidListForIn){ |
| | | Map<String,String> conditionMap = new HashMap<String, String>(); |
| | | conditionMap.put("oid",QueryOptionConstant.IN + "(" + WebUtil.toInSql(oidListForInRecord.toArray(new String[0])) + ")" ); |
| | | List<com.vci.client.bof.ClientBusinessObject> tempCbos = boService.queryCBO(btmType,conditionMap); |
| | | List<BusinessObject> tempCbos = boService.queryCBO(btmType,conditionMap); |
| | | cboList.addAll(tempCbos); |
| | | } |
| | | }else{ |
| | | Map<String,String> conditionMap = new HashMap<String, String>(); |
| | | conditionMap.put("oid",QueryOptionConstant.IN + "(" + WebUtil.toInSql(oidList.toArray(new String[0])) + ")" ); |
| | | List<com.vci.client.bof.ClientBusinessObject> tempCbos = boService.queryCBO(btmType,conditionMap); |
| | | List<BusinessObject> tempCbos = boService.queryCBO(btmType,conditionMap); |
| | | cboList.addAll(tempCbos); |
| | | } |
| | | //找到这个业务类型的起始状态 |