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,