update code
parent
056dbef838
commit
624707bd1e
|
@ -80,7 +80,16 @@ public class ProjectController extends BaseController {
|
|||
return AjaxResult.success(obj);
|
||||
}
|
||||
|
||||
List<SurProject> list= isurProjectService.selectProgressProjects(deptId);
|
||||
SurProject where=new SurProject();
|
||||
if(deptId<=0){
|
||||
if (SecurityUtils.isUserB()) {
|
||||
where.setPrjIds(getProjectIds());
|
||||
}
|
||||
}else{
|
||||
where.setDeptId(deptId);
|
||||
}
|
||||
|
||||
List<SurProject> list= isurProjectService.selectProgressProjects(where);
|
||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
@ -92,7 +101,16 @@ public class ProjectController extends BaseController {
|
|||
if(obj!=null){
|
||||
return AjaxResult.success(obj);
|
||||
}
|
||||
List<SurProject> list= isurProjectService.groupByProjectCategory(deptId);
|
||||
SurProject where=new SurProject();
|
||||
if(deptId<=0){
|
||||
if (SecurityUtils.isUserB()) {
|
||||
where.setPrjIds(getProjectIds());
|
||||
}
|
||||
}else{
|
||||
where.setDeptId(deptId);
|
||||
}
|
||||
|
||||
List<SurProject> list= isurProjectService.groupByProjectCategory(where);
|
||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
|
|
@ -60,6 +60,12 @@ public class ProjectQuarterlyAssessController extends BaseController {
|
|||
if(obj!=null){
|
||||
return AjaxResult.success(obj);
|
||||
}
|
||||
Long deptId= where.getDeptId();
|
||||
if(deptId==null || deptId<=0){
|
||||
if (SecurityUtils.isUserB()) {
|
||||
where.setPrjIds(getProjectIds());
|
||||
}
|
||||
}
|
||||
List list=smzProjectQuarterlyAssessService.queryByProjectType(where);
|
||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||
return AjaxResult.success(list);
|
||||
|
|
|
@ -45,6 +45,11 @@ public class ProjectScheduleController extends BaseController {
|
|||
SurProjectScheduleWhere where =new SurProjectScheduleWhere();
|
||||
where.setPrjType(type);
|
||||
where.setDeptId(deptId);
|
||||
if(deptId==null || deptId<=0){
|
||||
if (SecurityUtils.isUserB()) {
|
||||
where.setPrjIds(getProjectIds());
|
||||
}
|
||||
}
|
||||
List<SurProjectSchedule> list=isurProjectScheduleService.selectByProjectType(where);
|
||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||
return AjaxResult.success(list);
|
||||
|
|
|
@ -74,9 +74,9 @@ public interface SurProjectMapper
|
|||
*/
|
||||
public List<SurProject> groupByLevel(SurProject surProject);
|
||||
|
||||
public List<SurProject> selectProgressProjects(long deptId);
|
||||
public List<SurProject> selectProgressProjects(SurProject surProject);
|
||||
|
||||
public List<SurProject> groupByProjectCategory(long deptId);
|
||||
public List<SurProject> groupByProjectCategory(SurProject surProject);
|
||||
|
||||
/**
|
||||
* 监理单位、总包单位、分包单位用户不展示项目概况菜单,二级菜单只展示自已参与的项目
|
||||
|
|
|
@ -59,9 +59,9 @@ public interface ISurProjectService
|
|||
*/
|
||||
public int deleteSurProjectById(Long id);
|
||||
|
||||
public List<SurProject> selectProgressProjects(long deptId);
|
||||
public List<SurProject> selectProgressProjects(SurProject surProject);
|
||||
|
||||
public List<SurProject> groupByProjectCategory(long deptId);
|
||||
public List<SurProject> groupByProjectCategory(SurProject surProject);
|
||||
|
||||
public List<SurProject> groupByCategory(SurProject surProject);
|
||||
|
||||
|
|
|
@ -97,13 +97,13 @@ public class SurProjectServiceImpl implements ISurProjectService
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<SurProject> selectProgressProjects(long deptId) {
|
||||
return surProjectMapper.selectProgressProjects(deptId);
|
||||
public List<SurProject> selectProgressProjects(SurProject surProject) {
|
||||
return surProjectMapper.selectProgressProjects(surProject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SurProject> groupByProjectCategory(long deptId) {
|
||||
return surProjectMapper.groupByProjectCategory(deptId);
|
||||
public List<SurProject> groupByProjectCategory(SurProject surProject) {
|
||||
return surProjectMapper.groupByProjectCategory(surProject);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -107,6 +107,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="finishDate != null "> and finish_date = #{finishDate}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
@ -327,19 +327,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectProgressProjects" parameterType="Long" resultMap="SurProjectResult">
|
||||
<select id="selectProgressProjects" parameterType="SurProject" resultMap="SurProjectResult">
|
||||
<include refid="selectSurProjectVo"/>
|
||||
where progressVisible = 0
|
||||
<if test="deptId!=0">and deptid=#{deptId}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
order by projectSort,projectName
|
||||
</select>
|
||||
|
||||
<select id="groupByProjectCategory" parameterType="Long" resultMap="SurProjectResult">
|
||||
<select id="groupByProjectCategory" parameterType="SurProject" resultMap="SurProjectResult">
|
||||
SELECT d.dict_value dept_name,d.dict_label projectName,p.projectSchedule ,COUNT(1) deptId FROM
|
||||
(SELECT * FROM sys_dict_data WHERE dict_type='project_category') d
|
||||
LEFT JOIN
|
||||
(SELECT projectType,IF(projectSchedule IS NULL,1,projectSchedule) projectSchedule FROM sur_project WHERE isDel=0
|
||||
<if test="deptId!=null and deptId>0">and deptid=#{deptId}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
) p
|
||||
ON p.projectType=d.dict_value
|
||||
GROUP BY d.dict_value,d.dict_label,p.projectSchedule
|
||||
|
@ -355,6 +367,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="deptId!=null and deptId>0">
|
||||
and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{deptId} and spui.del_flag=0)
|
||||
</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and sp.id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
) as sp
|
||||
left join sys_dept d on d.dept_id = sp.deptId
|
||||
left join china_area a on sp.projectRegional = a.id
|
||||
|
|
Loading…
Reference in New Issue