| | |
| | | propertyVOS.stream().forEach(propertyVO -> { |
| | | sb.append( " and "+propertyVO.getFiledName()+"='"+propertyVO.getFiledValue()+"'"); |
| | | }); |
| | | sb.append(" and islastr=1 and islastv=1" ); |
| | | sb.append(" and lastr=1 and lastv=1" ); |
| | | sb.append(" and codeclsfid in (" + VciBaseUtil.toInSql(oidCodeclassifyDOMap.keySet().toArray(new String[0])) +")"); |
| | | sb.append(" and Lcstatus in (" + VciBaseUtil.toInSql(statusList.toArray(new String[]{})) +")"); |
| | | List<Map<String,String>> newDataList= commonsMapper.queryByOnlySqlForMap(sb.toString()); |
| | |
| | | log.info("查询分类的数据类型:->"+dataType); |
| | | ResultClassifyVO resultClassifyVO =new ResultClassifyVO(); |
| | | List<ClassifyVO> classifyVOList=new ArrayList<>(); |
| | | ResultData resultData=new ResultData(); |
| | | try { |
| | | if (StringUtils.isBlank(data)) { |
| | | errorid = "101"; |
| | |
| | | treeQueryObject.setQueryAllLevel(true); |
| | | codeClassifyVOS=classifyService.selectCodeClassifyDOByTree(treeQueryObject); |
| | | } |
| | | |
| | | LibraryVO libraryVo=new LibraryVO(); |
| | | libraryVo.setId(libId); |
| | | libraryVo.setName(""); |
| | | if(!CollectionUtils.isEmpty(codeClassifyVOS)){ |
| | | errorid = "0"; |
| | | msg="成功!"; |
| | | codeClassifyVOS.stream().forEach(codeClassifyDO -> { |
| | | ClassifyVO classifyVO=new ClassifyVO(); |
| | | classifyVO.setId(codeClassifyDO.getOid()); |
| | | classifyVO.setLcStatus(codeClassifyDO.getLcStatus()); |
| | | classifyVO.setClassCode(codeClassifyDO.getId()); |
| | | classifyVO.setDescription(codeClassifyDO.getDescription()); |
| | | classifyVO.setName(codeClassifyDO.getName()); |
| | | classifyVO.setPid(codeClassifyDO.getParentcodeclassifyoid()); |
| | | classifyVO.setFullPathName(codeClassifyDO.getPath()); |
| | | classifyVOList.add(classifyVO); |
| | | }); |
| | | libraryVo.setClassify(classifyVOList); |
| | | }else{ |
| | | errorid = "100"; |
| | | msg="未查询到相关的分类信息"; |
| | | } |
| | | issucess=true; |
| | | resultData.setLibrary(libraryVo); |
| | | }catch (Throwable e){ |
| | | e.printStackTrace();; |
| | | msg="查询分类失败:"+e.getMessage(); |
| | | }finally { |
| | | // resultData.setErrorid(errorid); |
| | | // resultData.setMsg(msg); |
| | | // resultClassifyVO.setResultData(resultData); |
| | | resultData.setErrorid(errorid); |
| | | resultData.setMsg(msg); |
| | | resultClassifyVO.setResultData(resultData); |
| | | } |
| | | if(dataType.equals("xml")){ |
| | | //组织返回接口信息 |
| | | XStream xStream = new XStream(new DomDriver()); |
| | | xStream.processAnnotations(XMLResultSystemVO.class); |
| | | xStream.autodetectAnnotations(true); |
| | | //resultStr = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + xStream.toXML(resultData); |
| | | resultStr = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + xStream.toXML(resultData); |
| | | |
| | | }else{ |
| | | Object object = JSONObject.toJSON(resultClassifyVO); |