|
|
|
@ -119,6 +119,10 @@ public class ClassifyServiceImpl extends BaseServiceImpl<ClassifyMapper, Classif
|
|
|
|
|
classifyDTO.setCreateDept(createDept); |
|
|
|
|
classifyDTO.setExamineDeptName(examineDeptName); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查询所有的分类
|
|
|
|
|
List<ClassifyEntity> all = baseMapper.findAll(); |
|
|
|
|
|
|
|
|
|
IPage<ClassifyVO> pages = baseMapper.pageList(page, classifyDTO); |
|
|
|
|
List<ClassifyVO> records = pages.getRecords(); |
|
|
|
|
|
|
|
|
@ -143,22 +147,27 @@ public class ClassifyServiceImpl extends BaseServiceImpl<ClassifyMapper, Classif
|
|
|
|
|
if (!"1".equals(isPid)) { |
|
|
|
|
Long classifyId = record.getId(); |
|
|
|
|
Long pId1 = record.getPId(); |
|
|
|
|
ClassifyEntity classifyEntity = getById(pId1); |
|
|
|
|
record.setParentClassifyName(classifyEntity.getName()); |
|
|
|
|
QueryWrapper<PointsEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("classify_id", classifyId) |
|
|
|
|
.eq("is_deleted", 0); |
|
|
|
|
List<PointsEntity> list = pointsService.list(queryWrapper); |
|
|
|
|
String pointStr = ""; |
|
|
|
|
for (PointsEntity pointsEntity : list) { |
|
|
|
|
if(StringUtil.isBlank(pointStr)){ |
|
|
|
|
pointStr = pointStr + pointsEntity.getPoint(); |
|
|
|
|
}else{ |
|
|
|
|
pointStr = pointStr + "," + pointsEntity.getPoint(); |
|
|
|
|
|
|
|
|
|
ClassifyEntity classifyEntity =all.stream().filter(item -> item.getId().equals(pId1)).findFirst().orElse(null); |
|
|
|
|
|
|
|
|
|
if(classifyEntity!=null){ |
|
|
|
|
record.setParentClassifyName(classifyEntity.getName()); |
|
|
|
|
QueryWrapper<PointsEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("classify_id", classifyId) |
|
|
|
|
.eq("is_deleted", 0); |
|
|
|
|
List<PointsEntity> list = pointsService.list(queryWrapper); |
|
|
|
|
String pointStr = ""; |
|
|
|
|
for (PointsEntity pointsEntity : list) { |
|
|
|
|
if(StringUtil.isBlank(pointStr)){ |
|
|
|
|
pointStr = pointStr + pointsEntity.getPoint(); |
|
|
|
|
}else{ |
|
|
|
|
pointStr = pointStr + "," + pointsEntity.getPoint(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
record.setPointStr(pointStr); |
|
|
|
|
record.setPointsEntities(list); |
|
|
|
|
} |
|
|
|
|
record.setPointStr(pointStr); |
|
|
|
|
record.setPointsEntities(list); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|