“mitao”
2026-01-23 3abe9cbd0fcbd51f3a9049cfe286cd75735be4a7
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DashboardStatisticsController.java
@@ -9,6 +9,8 @@
import com.ruoyi.system.model.*;
import com.ruoyi.system.query.StoryListQuery;
import com.ruoyi.system.service.*;
import com.ruoyi.system.vo.ClientDashboardQuery;
import com.ruoyi.system.vo.ClientDashboardVO;
import com.ruoyi.system.vo.ScreenUserVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -72,13 +74,18 @@
                    screenUserVo.setName(param.getName());
                    screenUserVo.setPermissionClient(param.getPermissionClient());
                    screenUserVo.setPermissionProject(param.getPermissionProject());
                    screenUserVo.setCommentType(param.getCommentType());
                }
            }else if(type==2){
                Project project = projectService.getById(id);
                if(project==null){
                    return R.fail("项目不存在");
                }
                Client client = clientService.getById(project.getClientId());
                ClientParam param = clientParamService.getOne(new LambdaQueryWrapper<ClientParam>().eq(ClientParam::getClientId, client.getId()));
                if(param!=null){
                    screenUserVo.setCommentType(param.getCommentType());
                }
                screenUserVo.setName(project.getName());
                screenUserVo.setPermissionProject(project.getPermission());
            }
@@ -125,7 +132,18 @@
        return R.ok(accidentBrief);
    }
    /**
     * 获取委托方大屏首页统计数据
     *
     * @param query 查询参数
     * @return 统计数据
     */
    @PostMapping("/index")
    @ApiOperation(value = "获取委托方大屏首页统计数据",tags = {"委托方端"})
    public R<ClientDashboardVO> index(@RequestBody ClientDashboardQuery query) {
        ClientDashboardVO dashboard = clientService.getClientDashboard(query);
        return R.ok(dashboard);
    }