ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DataStatisticsController.java
@@ -75,7 +75,7 @@ TProjectDept parent = projectDeptService.getById(projectDept.getParentId()); List<TProjectDept> children = new ArrayList<>(); children.add(projectDept); parent.setChildren(children); // parent.setChildren(children); projectDeptList.add(parent); }else { projectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class) @@ -85,7 +85,7 @@ projectDeptList.forEach(projectDept -> { List<TProjectDept> children = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class) .eq(TProjectDept::getParentId, projectDept.getId())); projectDept.setChildren(children); // projectDept.setChildren(children); }); } return R.ok(projectDeptList); ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/ReportController.java
@@ -74,6 +74,8 @@ private TLeaveService leaveService; @Resource private TInspectorService inspectorService; @Resource private TCleanerService cleanerService; @ApiOperation(value = "任务进度分页列表查询") @PostMapping(value = "/taskProgress") @@ -250,6 +252,8 @@ } for (ProjectDeptDetailsVO re : res) { for (ProjectDeptDetailsChildVO projectDeptDetailsChildVO : re.getProjectChild()) { int cleanerCount = cleanerService.lambdaQuery().eq(TCleaner::getProjectId, projectDeptDetailsChildVO.getProjectId()).list().size(); projectDeptDetailsChildVO.setCleanerCount(cleanerCount); List<LocationTypeListByProjectVO> locationTypeListByProjectVOS1 = new ArrayList<>(); for (LocationTypeListByProjectVO locationTypeListByProjectVO : locationTypeListByProjectVOS) { LocationTypeListByProjectVO temp = new LocationTypeListByProjectVO(); @@ -317,6 +321,8 @@ locationTypeListByProjectVOS1.add(temp); } projectDeptDetailsChildVO.setLocationTypeList(locationTypeListByProjectVOS1); projectDeptDetailsChildVO.setCleanerCount(0); } } ruoyi-system/src/main/java/com/ruoyi/system/model/TProjectDept.java
@@ -45,7 +45,7 @@ @TableField("status") private Integer status; @TableField(exist = false) private List<TProjectDept> children; // @TableField(exist = false) // private List<TProjectDept> children; } ruoyi-system/src/main/java/com/ruoyi/system/vo/system/ProjectDeptDetailsChildVO.java
@@ -18,7 +18,8 @@ private String projectChildName; @ApiModelProperty("片区id") private String projectId; @ApiModelProperty("保洁员数量") private Integer cleanerCount; @ApiModelProperty("总数") private Integer total; @ApiModelProperty("清洁合格") ruoyi-system/src/main/java/com/ruoyi/system/vo/system/ProjectDeptDetailsVO.java
@@ -15,4 +15,5 @@ private List<ProjectDeptDetailsChildVO> projectChild; @ApiModelProperty("项目名称") private String projectName; }