| | |
| | | |
| | | import com.alibaba.nacos.common.utils.StringUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; |
| | |
| | | import org.apache.poi.hssf.util.HSSFColor; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.cache.utils.CacheUtil;import com.vci.ubcs.core.log.exception.ServiceException; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | } |
| | | return tree; |
| | | } |
| | | |
| | | /** |
| | | * 根据树形查询对象来查询数据对象 |
| | | * |
| | | * @param treeQueryObject 树形查询对象 |
| | | * @return 查询结果,数据对象 |
| | | */ |
| | | @Override |
| | | public List<CodeClassifyVO> selectCodeClassifyDOByTree(TreeQueryObject treeQueryObject) { |
| | | List<CodeClassify> doList =codeClassifyMapper.selectCodeClassifyVOByTree(treeQueryObject.getParentOid()); |
| | | List<CodeClassifyVO> voList = codeClassifyDO2VOs(doList); |
| | | return voList; |
| | | } |
| | | /** |
| | | * 使用编号的路径获取对象 |
| | | * |
| | |
| | | */ |
| | | @Override |
| | | public CodeClassifyVO getObjectByClsfNamePath(String fieldPath){ |
| | | |
| | | CodeClassify classify = (CodeClassify) codeClassifyMapper.selectByFieldNamePath(fieldPath, "name"); |
| | | return codeClassifyDO2VO(classify); |
| | | CodeClassifyVO codeClassifyVO=new CodeClassifyVO(); |
| | | List<CodeClassify> classifyList = codeClassifyMapper.selectByFieldNamePath(fieldPath,"name"); |
| | | if(classifyList.size()>0){ |
| | | codeClassifyVO=codeClassifyDO2VO(classifyList.get(0)); |
| | | } |
| | | return codeClassifyVO; |
| | | } |
| | | /*** |
| | | * 根据上级节点获取下级节点代号路径和名称路径 |
| | |
| | | } |
| | | return fullInfo; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 统计子节点的个数 |
| | | * |
| | | * @param codeClassifyOid 分类的主键 |
| | | * @return 个数 |
| | | */ |
| | | @Override |
| | | public int countChildrenByClassifyOid(String codeClassifyOid) { |
| | | // Map<String,String> conditionMap = new HashMap<>(); |
| | | // conditionMap.put("parentCodeClassifyOid",codeClassifyOid); |
| | | QueryWrapper<CodeClassify> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("parentCodeClassifyOid",codeClassifyOid); |
| | | return codeClassifyMapper.selectCount(wrapper).intValue(); |
| | | } |
| | | } |