| | |
| | | lcStatus = treeQueryObject.getConditionMap().getOrDefault("lcStatus",null); |
| | | } |
| | | if(StringUtils.isNotBlank(id) || StringUtils.isNotBlank(lcStatus) ){ |
| | | String tableName = this.getTableName(treeQueryObject.getParentOid(),treeQueryObject.getConditionMap().get("id"), treeQueryObject.getConditionMap().get("lcStatus")); |
| | | String tableName = VciBaseUtil.getTableName(treeQueryObject.getConditionMap().get("btmTypeId"),true); |
| | | doList = codeClassifyMapper |
| | | .selectCodeClassifyDOByTree( |
| | | treeQueryObject.getConditionMap().get("id"), |
| | |
| | | } |
| | | } |
| | | return tree; |
| | | } |
| | | |
| | | /** |
| | | * 分类加载时获取业务类型id,拼接业务类型表名 |
| | | * @return |
| | | */ |
| | | private String getTableName(String parentCodeClassifyOid,String id,String lcStatus){ |
| | | LambdaQueryWrapper<CodeClassify> wrapper = Wrappers.<CodeClassify>query() |
| | | .lambda().select(CodeClassify::getBtmTypeId) |
| | | .eq(CodeClassify::getLcStatus, lcStatus) |
| | | .isNotNull(CodeClassify::getBtmTypeId) |
| | | .last("limit 1"); |
| | | if(Func.isNotBlank(id)){ |
| | | wrapper.eq(CodeClassify::getId,id).isNull(CodeClassify::getParentCodeClassifyOid); |
| | | }else{ |
| | | wrapper.eq(CodeClassify::getParentCodeClassifyOid,parentCodeClassifyOid); |
| | | } |
| | | CodeClassify codeClassify = codeClassifyMapper.selectOne(wrapper); |
| | | if(Func.isEmpty(codeClassify) || Func.isEmpty(codeClassify.getBtmTypeId())){ |
| | | throw new ServiceException("查询主数据总数时,未获取到业务类型ID!"); |
| | | } |
| | | return VciBaseUtil.getTableName(codeClassify.getBtmTypeId(),true); |
| | | } |
| | | |
| | | /** |