From c470afad2a9d6423a727dcbd157af0073ab21684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Sun, 5 Nov 2023 23:58:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jh/project/controller/ProjectViewController.java | 12 ++++++++++++ .../resources/mapper/project/ProjectViewMapper.xml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/controller/ProjectViewController.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/controller/ProjectViewController.java index 0b1dd08b..dd1fd8b9 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/controller/ProjectViewController.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/controller/ProjectViewController.java @@ -2,8 +2,11 @@ package com.yanzhu.jh.project.controller; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.enums.SysRoleEnum; import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.system.service.ISysDeptService; import com.yanzhu.jh.project.domain.SurProject; import com.yanzhu.jh.project.domain.vo.ProjectViewExport; import com.yanzhu.jh.project.service.IProjectViewService; @@ -26,12 +29,21 @@ import java.util.List; @RequestMapping("/statistics/project") public class ProjectViewController extends BaseBuildNodeController{ + @Autowired + private ISysDeptService sysDeptService; + @Autowired IProjectViewService projectViewService; @GetMapping("/selectStatisticsProjectList") public TableDataInfo selectStatisticsProjectList(SurProject surProject) { + surProject.setNowRole(Convert.toStr(getUserFirstRole())); + if(SysRoleEnum.ZGS.getCode().equals(surProject.getNowRole())){ + surProject.setDeptId(sysDeptService.getZGSDeptId(getDeptId())); + }else{ + surProject.setNowDept(Convert.toStr(getDeptId())); + } List list = projectViewService.selectStatisticsProjectList(surProject); return getDataTable(list); } diff --git a/yanzhu-jh/src/main/resources/mapper/project/ProjectViewMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/ProjectViewMapper.xml index a83d6724..1a3d92b6 100644 --- a/yanzhu-jh/src/main/resources/mapper/project/ProjectViewMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/project/ProjectViewMapper.xml @@ -35,7 +35,7 @@ (select count(1) from sur_project_insurance a where a.project_id = sp.id and a.dept_id=pui.unitId and a.is_del=0 and a.insurance_type=1)as yqx, (select count(1) from sur_project_insurance a where a.project_id = sp.id and a.dept_id=pui.unitId and a.is_del=0 and a.insurance_type=2)as azx, (select count(1) from sur_project_video_config a where a.project_id = sp.id and a.dept_id = pui.unitId and a.is_del=0)as ssjk, - (select count(1) from dev_ai_project_config a where a.project_id = sp.id and a.dept_id = pui.unitId and a.is_del=0)as aijk, + (select count(1) from dev_ai_project_data a where a.project_id = sp.id and a.dept_id = pui.unitId and a.is_del=0)as aijk, (select count(1) from sur_project_attendance_cfg a where a.project_id = sp.id and a.sub_dept_id = pui.unitId and a.state=0)as lwsm, (select count(1) from vw_flow_all a where a.businessKey = sp.id and a.startDeptName = pui.unitName and a.finishTime is null)as gcsq, (select count(1) from vw_flow_all a where a.businessKey = sp.id and a.startDeptName = pui.unitName and a.finishTime is not null)as gcsp,