| | |
| | | sb.append(" where 1=1 "); |
| | | sb.append(" and lastr=1 and lastv=1" ); |
| | | if(isCodeOrGroupCode) { |
| | | sb.append(" and groupcode in ("); |
| | | sb.append(" and ( groupcode in ("); |
| | | sb.append(VciBaseUtil.toInSql(codeDataMap.keySet().toArray(new String[0]))); |
| | | sb.append(")"); |
| | | sb.append(" or id in ("); |
| | | sb.append(VciBaseUtil.toInSql(codeDataMap.keySet().toArray(new String[0]))); |
| | | sb.append("))"); |
| | | }else{ |
| | | sb.append(" and id in ("); |
| | | sb.append(VciBaseUtil.toInSql(codeDataMap.keySet().toArray(new String[0]))); |
| | | sb.append(")"); |
| | | } |
| | | sb.append(VciBaseUtil.toInSql(codeDataMap.keySet().toArray(new String[0]))); |
| | | sb.append(")"); |
| | | |
| | | List<Map<String,String>> dataMapList=commonsMapper.queryByOnlySqlForMap(sb.toString()); |
| | | List<ClientBusinessObject> cboList= ChangeMapTOClientBusinessObjects(dataMapList); |
| | |
| | | List<CodeAllCode>newCodeAllCodeList= codeAllCodeService.selectByWrapper(Wrappers.<CodeAllCode>query().lambda().eq(CodeAllCode::getCreateCodeOid, cbo.getOid())); |
| | | log.info("codeCbos size:" + newCodeAllCodeList.size()); |
| | | if (!CollectionUtils.isEmpty(newCodeAllCodeList)) { |
| | | CodeAllCode codeCbo = codeAllCodeList.get(0); |
| | | CodeAllCode codeCbo = newCodeAllCodeList.get(0); |
| | | log.info("codeCbos code:" + codeCbo.getId()); |
| | | codeCbo.setLcStatus(CodeDefaultLC.TASK_BACK.getValue()); |
| | | codeAllCodeList.add(codeCbo); |
| | |
| | | //没有限制分类,但是一个模板只可能在一个业务类型里面,所以直接查询这个业务类型即可 |
| | | |
| | | if (!CollectionUtils.isEmpty(conditionMap)) { |
| | | final String[] sql = {"select count(*) from " + VciBaseUtil.getTableName(classifyFullInfo.getTopClassifyVO().getBtmTypeId()) + " t where 1 = 1 "}; |
| | | String tableName=""; |
| | | R<BtmTypeVO> r = btmTypeClient.getAllAttributeByBtmId(templateVO.getBtmTypeId()); |
| | | if(r.isSuccess()) { |
| | | BtmTypeVO btmTypeVO = r.getData(); |
| | | if (btmTypeVO != null) { |
| | | tableName = btmTypeVO.getTableName(); |
| | | |
| | | } |
| | | } |
| | | if (StringUtils.isBlank(tableName)) { |
| | | String errormsg="根据业务类型为查询到相关业务表"; |
| | | errorMap.put(orderDTO.getId(),errorMap.getOrDefault(orderDTO.getId(),"")+errormsg); |
| | | return; |
| | | } |
| | | final String[] sql = {"select count(*) from " + tableName + " t where 1 = 1 "}; |
| | | conditionMap.forEach((key, value) -> { |
| | | if(StringUtils.isBlank(value)||value.equals(QueryOptionConstant.ISNULL)){ |
| | | sql[0] += " and " + key + " is null "; |
| | |
| | | ClientBusinessObject sysDataObject= codeSystemObjectMap.get(code); |
| | | if(isCodeOrGroupCode){ |
| | | code=sysDataObject.getAttributeValue("GROUPCODE"); |
| | | if(StringUtils.isBlank(code)){ |
| | | code=sysDataObject.getId(); |
| | | } |
| | | } |
| | | CodeOrderDTO orderDTO = new CodeOrderDTO(); |
| | | if(codeDataMap.containsKey(code)){ |
| | |
| | | orderDTO.setCodeClassifyOid(codeClassifyVO.getOid());//分类主键 |
| | | orderDTO.setOid(sysDataObject.getOid());//数据oid |
| | | orderDTO.setLcStatus(rowDatas.getStatus());//状态 |
| | | if(isCodeOrGroupCode){ |
| | | orderDTO.setId(sysDataObject.getId()); |
| | | }else{ |
| | | orderDTO.setId(code); |
| | | } |
| | | orderDTO.setId(code); |
| | | orderDTO.setTs(sysDataObject.getTs()); |
| | | orderDTO.setBtmname(codeClassifyVO.getBtmname());//业务类型 |
| | | orderDTO.setDescription("集成调用:更新");//数据描述 |