| | |
| | | Map<String, String> conditionMap = WebUtil.getOidQuery(config.getOids()); |
| | | conditionMap.put(WebBoServiceI.QUERY_FILTER_SECRET, "false"); |
| | | conditionMap.put(WebBoServiceI.QUERY_FILTER_DATARIGHT, "false"); |
| | | List<ClientBusinessObject> allCbo = boService.queryCBO(config.getBtmType().toLowerCase().trim(), conditionMap); |
| | | List<com.vci.client.bof.ClientBusinessObject> allCbo = boService.queryCBO(config.getBtmType().toLowerCase().trim(), conditionMap); |
| | | if (allCbo == null || allCbo.size() == 0) { |
| | | throw new VciBaseException(msgCodePrefix + "dataNotNull", new String[]{}); |
| | | } |
| | |
| | | //查询数据是否已经发起了流程 |
| | | //查询input连接里是不是有流程实例,并且流程实例不等于终止 |
| | | conditionMap.put("oid", " in (select f_oid from platformlt_" + processDao.getTaskDataLink() + " where oid " + conditionMap.get("oid").replace("\\IN", " in ") + ")"); |
| | | List<ClientBusinessObject> workInstanceCbos = boService.queryCBO(processDao.getWorkIntanceBtmType(), conditionMap); |
| | | List<com.vci.client.bof.ClientBusinessObject> workInstanceCbos = boService.queryCBO(processDao.getWorkIntanceBtmType(), conditionMap); |
| | | if (workInstanceCbos != null && workInstanceCbos.size() > 0) { |
| | | for (ClientBusinessObject workInstance : workInstanceCbos) { |
| | | for (com.vci.client.bof.ClientBusinessObject workInstance : workInstanceCbos) { |
| | | if (!workInstance.getLcStatus().equalsIgnoreCase("Obsoleted")) { |
| | | throw new VciBaseException(msgCodePrefix + "dataSubmitedToProcess", new String[]{workInstance.getName(), workInstance.getCreator()}); |
| | | } |
| | |
| | | String[][] objectPropertyValues = new String[allCbo.size()][4]; |
| | | String[] objIds = new String[allCbo.size()];//业务数据的组件 |
| | | for (int i = 0; i < allCbo.size(); i++) { |
| | | ClientBusinessObject cbo = allCbo.get(i); |
| | | com.vci.client.bof.ClientBusinessObject cbo = allCbo.get(i); |
| | | String[] values = new String[4]; |
| | | values[0] = cbo.getOid(); |
| | | values[1] = cbo.getRevisionid(); |
| | |
| | | //查询流程实例 |
| | | Map<String, String> conditionMap = new HashMap<String, String>(); |
| | | conditionMap.put("executionid", executionId.trim() + "*");//会有子流程 |
| | | List<ClientBusinessObject> workInstanceCbos = boService.queryCBO(processDao.getWorkIntanceBtmType(), conditionMap); |
| | | List<com.vci.client.bof.ClientBusinessObject> workInstanceCbos = boService.queryCBO(processDao.getWorkIntanceBtmType(), conditionMap); |
| | | if (workInstanceCbos == null || workInstanceCbos.size() == 0) { |
| | | throw new VciBaseException(msgCodePrefix + "executionNotExist"); |
| | | } |
| | | //判断是否都是执行状态,前端的判断能被跳过 |
| | | List<ClientBusinessObject> needUpdateCbos = new ArrayList<ClientBusinessObject>(); |
| | | List<com.vci.client.bof.ClientBusinessObject> needUpdateCbos = new ArrayList<>(); |
| | | List<String> workInstanceOids = new ArrayList<String>(); |
| | | for (ClientBusinessObject cbo : workInstanceCbos) { |
| | | for (com.vci.client.bof.ClientBusinessObject cbo : workInstanceCbos) { |
| | | if (!cbo.getLcStatus().equalsIgnoreCase("Executing")) { |
| | | throw new VciBaseException(msgCodePrefix + "processNotExecutionStatus"); |
| | | } |
| | |
| | | //找相关的流程任务对象,并且是正在执行中的 |
| | | conditionMap.put("executionid", QueryOptionConstant.IN + "(" + WebUtil.toInSql(workInstanceOids.toArray(new String[0])) + ")"); |
| | | conditionMap.put("lcstatus", "Executing"); |
| | | List<ClientBusinessObject> workItemCbos = boService.queryCBO(processDao.getWorkitemBtmType(), conditionMap); |
| | | List<com.vci.client.bof.ClientBusinessObject> workItemCbos = boService.queryCBO(processDao.getWorkitemBtmType(), conditionMap); |
| | | if (workItemCbos != null && workItemCbos.size() > 0) { |
| | | needUpdateCbos.addAll(workItemCbos); |
| | | } |
| | |
| | | //查询流程实例 |
| | | Map<String, String> conditionMap = new HashMap<String, String>(); |
| | | conditionMap.put("executionid", executionId.trim() + "*");//会有子流程 |
| | | List<ClientBusinessObject> workInstanceCbos = boService.queryCBO(processDao.getWorkIntanceBtmType(), conditionMap); |
| | | List<com.vci.client.bof.ClientBusinessObject> workInstanceCbos = boService.queryCBO(processDao.getWorkIntanceBtmType(), conditionMap); |
| | | if (workInstanceCbos == null || workInstanceCbos.size() == 0) { |
| | | throw new VciBaseException(msgCodePrefix + "executionNotExist"); |
| | | } |
| | | //判断是否都是执行状态,前端的判断能被跳过 |
| | | List<ClientBusinessObject> needUpdateCbos = new ArrayList<ClientBusinessObject>(); |
| | | List<com.vci.client.bof.ClientBusinessObject> needUpdateCbos = new ArrayList<>(); |
| | | List<String> workInstanceOids = new ArrayList<String>(); |
| | | for (ClientBusinessObject cbo : workInstanceCbos) { |
| | | for (com.vci.client.bof.ClientBusinessObject cbo : workInstanceCbos) { |
| | | if (!cbo.getLcStatus().equalsIgnoreCase("Suspended")) { |
| | | throw new VciBaseException(msgCodePrefix + "processNotSuspendedStatus"); |
| | | } |
| | |
| | | //找相关的流程任务对象,并且是正在执行中的 |
| | | conditionMap.put("executionid", QueryOptionConstant.IN + "(" + WebUtil.toInSql(workInstanceOids.toArray(new String[0])) + ")"); |
| | | conditionMap.put("lcstatus", "Suspended"); |
| | | List<ClientBusinessObject> workItemCbos = boService.queryCBO(processDao.getWorkitemBtmType(), conditionMap); |
| | | List<com.vci.client.bof.ClientBusinessObject> workItemCbos = boService.queryCBO(processDao.getWorkitemBtmType(), conditionMap); |
| | | if (workItemCbos != null && workItemCbos.size() > 0) { |
| | | needUpdateCbos.addAll(workItemCbos); |
| | | } |
| | |
| | | } |
| | | } |
| | | List<String> causeList = Arrays.asList(new String[]{primaryKeyName}); |
| | | List<ClientBusinessObject> cbos = boService.queryCBO(btmType, conditionMap, null, causeList); |
| | | List<com.vci.client.bof.ClientBusinessObject> cbos = boService.queryCBO(btmType, conditionMap, null, causeList); |
| | | if (cbos == null || cbos.size() == 0) { |
| | | throw new VciBaseException("发起流程的业务数据全部不符合要求"); |
| | | } |
| | |
| | | for (String oid : oidArray) { |
| | | oidSet.add(oid); |
| | | } |
| | | for (ClientBusinessObject cbo : cbos) { |
| | | for (com.vci.client.bof.ClientBusinessObject cbo : cbos) { |
| | | if (oidSet.contains(cbo.getAttributeValue(primaryKeyName))) { |
| | | oidSet.remove(cbo.getAttributeValue(primaryKeyName)); |
| | | } |