| | |
| | | sb.append(" select * from "); |
| | | sb.append(tableName); |
| | | sb.append(" where 1=1 "); |
| | | if(isCodeOrGroupCode) { |
| | | sb.append(" groupcode in ("); |
| | | }else{ |
| | | sb.append(" id in ("); |
| | | } |
| | | 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); |
| | | Map<String, ClientBusinessObject> codeSystemObjectMap = cboList.stream().filter(systeDataObject -> systeDataObject != null && StringUtils.isNotBlank(systeDataObject.getId())).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getId(), t -> t)); |
| | | Map<String, String> errorMap = new HashMap<>(); |
| | | List<CodeOrderDTO> codeOrderDTOList = new ArrayList<>(); |
| | | this.getCodeOrderDTOs(codeClassifyVO, templateVO, codeDataMap, codeSystemObjectMap, codeOrderDTOList, errorMap); |
| | | this.getCodeOrderDTOs(codeClassifyVO, templateVO, codeDataMap, codeSystemObjectMap, codeOrderDTOList, errorMap,isCodeOrGroupCode); |
| | | // List<CodeClassifyProcessTempVO> codeClassifyProcessTempVOS=codeClassifyProcessTempService.listProcessTemplate(templateVO.getOid(),"code_cls_flow_use_order"); |
| | | boolean isProcess=false; |
| | | /** if(!CollectionUtils.isEmpty(codeClassifyProcessTempVOS)){ |
| | |
| | | * @param errorMap |
| | | * @return |
| | | */ |
| | | private void getCodeOrderDTOs(CodeClassifyVO codeClassifyVO,CodeClassifyTemplateVO templateVO,Map<String ,RowDatas>codeDataMap,Map<String, ClientBusinessObject> codeSystemObjectMap,List<CodeOrderDTO> codeOrderDTOList,Map<String,String> errorMap){ |
| | | codeDataMap.keySet().forEach(code->{ |
| | | private void getCodeOrderDTOs(CodeClassifyVO codeClassifyVO,CodeClassifyTemplateVO templateVO,Map<String ,RowDatas>codeDataMap,Map<String, ClientBusinessObject> codeSystemObjectMap,List<CodeOrderDTO> codeOrderDTOList,Map<String,String> errorMap,boolean isCodeOrGroupCode){ |
| | | codeSystemObjectMap.keySet().forEach(code->{ |
| | | ClientBusinessObject sysDataObject= codeSystemObjectMap.get(code); |
| | | if(isCodeOrGroupCode){ |
| | | code=sysDataObject.getAttributeValue("GROUPCODE"); |
| | | } |
| | | CodeOrderDTO orderDTO = new CodeOrderDTO(); |
| | | if(codeDataMap.containsKey(code)){ |
| | | RowDatas rowDatas=codeDataMap.get(code); |
| | | Map<String, String> data= rowDatas.getFiledValue(); |
| | | CodeOrderDTO orderDTO = new CodeOrderDTO(); |
| | | if(codeSystemObjectMap.containsKey(code)){ |
| | | ClientBusinessObject sysDataObject= codeSystemObjectMap.get(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.setTs(sysDataObject.getTs()); |
| | | orderDTO.setBtmname(codeClassifyVO.getBtmname());//业务类型 |
| | | orderDTO.setDescription("集成调用:更新");//数据描述 |