| | |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeKeyAttrRepeatRuleVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO; |
| | | import com.vci.ubcs.core.log.exception.ServiceException; |
| | | import com.vci.ubcs.starter.bo.WriteExcelData; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.poi.bo.ReadExcelOption; |
| | |
| | | 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.mp.support.Condition; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | if(StringUtils.isBlank(oid)){ |
| | | throw new ServiceException("oid不能为空!"); |
| | | } |
| | | return !codeClassifyMapper.checkHasChild(oid.trim()); |
| | | return codeClassifyMapper.checkHasChild(oid.trim()); |
| | | } |
| | | |
| | | |
| | |
| | | CodeClassify classifyDO = selectByOid(codeClassifyOid); |
| | | //查询上级 |
| | | fullInfo.setCurrentClassifyVO(codeClassifyDO2VO(classifyDO)); |
| | | List<Map<String, Object>> maps = codeClassifyMapper.selectAllLevelParentByOid(codeClassifyOid); |
| | | List<CodeClassify> codeClassifyList = new ArrayList<>(); |
| | | for (Map<String, Object> map : maps) { |
| | | CodeClassify codeClassify = new CodeClassify(); |
| | | codeClassify.setOid(String.valueOf(map.get("OID"))); |
| | | codeClassify.setOid(String.valueOf(map.get("LEVEL"))); |
| | | codeClassifyList.add(codeClassify); |
| | | } |
| | | // List<Map<String, Object>> maps = codeClassifyMapper.selectAllLevelParentByOid(codeClassifyOid); |
| | | // List<Map<String, Object>> maps = selectAllLevelParentByOid(codeClassifyOid); |
| | | List<CodeClassify> codeClassifyList = selectAllLevelParentByOid(codeClassifyOid); |
| | | // for (Map<String, Object> map : maps) { |
| | | // CodeClassify codeClassify = new CodeClassify(); |
| | | // codeClassify.setOid(String.valueOf(map.get("OID"))); |
| | | // codeClassify.setDataLevel((Integer) map.get("LEVEL")); |
| | | // codeClassifyList.add(codeClassify); |
| | | // } |
| | | |
| | | fullInfo.setParentClassifyVOs(codeClassifyDO2VOs(codeClassifyList)); |
| | | if(!CollectionUtils.isEmpty(fullInfo.getParentClassifyVOs())){ |
| | | fullInfo.setTopClassifyVO(fullInfo.getParentClassifyVOs().stream().filter(s->StringUtils.isBlank(s.getParentcodeclassifyoid())).findFirst().orElseGet(()->null)); |