diff --git a/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/ProjectQuarterlyAssessController.java b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/ProjectQuarterlyAssessController.java index 47824c24..81af218a 100644 --- a/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/ProjectQuarterlyAssessController.java +++ b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/ProjectQuarterlyAssessController.java @@ -27,13 +27,13 @@ public class ProjectQuarterlyAssessController extends BaseController { @GetMapping("/currentListByDept") - public TableDataInfo currentListByDept(Long deptId,String proType){ - String key="bgscreen_asscess_currentListByDept"+deptId+"_"+proType; + public TableDataInfo currentListByDept(Long deptId){ + SmzProjectQuarterlyAssess smzProjectQuarterlyAssess=new SmzProjectQuarterlyAssess(); + String key="bgscreen_asscess_currentListByDept"+deptId+"_"+smzProjectQuarterlyAssess.getProType(); Object obj=redisCache.getCacheObject(key); if(obj!=null){ return getDataTable((List) obj); } - SmzProjectQuarterlyAssess smzProjectQuarterlyAssess=new SmzProjectQuarterlyAssess(); smzProjectQuarterlyAssess.setDeptId(deptId); if(deptId==null || deptId<=0){ if (SecurityUtils.isUserB()) { @@ -45,9 +45,6 @@ public class ProjectQuarterlyAssessController extends BaseController { int month=calendar.get(Calendar.MONTH)+1; smzProjectQuarterlyAssess.setQuarterly((long)(month+2)/3); - if(StringUtils.isNotNull(proType) && !"0".equals(proType)){ - smzProjectQuarterlyAssess.setProType(proType); - } List list= smzProjectQuarterlyAssessService.currentListByDept(smzProjectQuarterlyAssess); redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES); return getDataTable(list); diff --git a/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/ProjectScheduleController.java b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/ProjectScheduleController.java index e17d8948..b70204d6 100644 --- a/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/ProjectScheduleController.java +++ b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/ProjectScheduleController.java @@ -34,7 +34,7 @@ public class ProjectScheduleController extends BaseController { } @GetMapping("/constructionProgressByDept") - public AjaxResult getConstructionProgressByDept(Long deptId,String proType){ + public AjaxResult getConstructionProgressByDept(Long deptId){ SurProjectSchedule where=new SurProjectSchedule(); if(deptId==null || deptId<=0){ if (SecurityUtils.isUserB()) { @@ -43,9 +43,6 @@ public class ProjectScheduleController extends BaseController { }else{ where.setDeptId(deptId); } - if(StringUtils.isNotNull(proType) && !"0".equals(proType)){ - where.setProType(proType); - } List list=isurProjectScheduleService.getConstructionProgressByDept(where); return AjaxResult.success(list); } @@ -55,13 +52,13 @@ public class ProjectScheduleController extends BaseController { * @return */ @GetMapping("/selectByProjectType") - public AjaxResult selectByProjectType(Long type,Long deptId,String proType){ - String key="bgscreen_schedule_selectByProjectType_"+type+"_"+deptId+"_"+proType; + public AjaxResult selectByProjectType(Long type,Long deptId){ + SurProjectScheduleWhere where =new SurProjectScheduleWhere(); + String key="bgscreen_schedule_selectByProjectType_"+type+"_"+deptId+"_"+where.getProType(); Object obj=redisCache.getCacheObject(key); if(obj!=null){ return AjaxResult.success(obj); } - SurProjectScheduleWhere where =new SurProjectScheduleWhere(); where.setPrjType(type); where.setDeptId(deptId); if(deptId==null || deptId<=0){ @@ -69,9 +66,6 @@ public class ProjectScheduleController extends BaseController { where.setPrjIds(getProjectIds()); } } - if(StringUtils.isNotNull(proType) && !"0".equals(proType)){ - where.setProType(proType); - } List list=isurProjectScheduleService.selectByProjectType(where); redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES); return AjaxResult.success(list); diff --git a/yanzhu-jh/src/main/resources/mapper/project/SmzProjectQuarterlyAssessMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/SmzProjectQuarterlyAssessMapper.xml index c41b9f1a..e75e214d 100644 --- a/yanzhu-jh/src/main/resources/mapper/project/SmzProjectQuarterlyAssessMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/project/SmzProjectQuarterlyAssessMapper.xml @@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - ) AND a.project_id=p.id and plan_target is not null AND p.deptId=d.dept_id + ) AND a.project_id=p.id and plan_target is not null AND p.deptId=d.dept_id and p.isDel=0 and p.progressVisible=0 and year = #{year} and quarterly = #{quarterly} @@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"