update code

dev_xds
haha 2023-08-17 22:47:17 +08:00
parent 7353c8a0e2
commit e49e3fe4ed
5 changed files with 26 additions and 16 deletions

View File

@ -35,15 +35,15 @@ public class ProblemmodifyController extends BaseController {
* @return * @return
*/ */
@GetMapping("/safetySummary") @GetMapping("/safetySummary")
public List<SmzSspProblemmodify> safetySummary(int deptId,int roleType) public List<SmzSspProblemmodify> safetySummary(int deptId,int roleType,int projectId)
{ {
//3集团//4子公司//5监理单位//6总包//7分包 //3集团//4子公司//5监理单位//6总包//7分包
String key="problemmodify_safetySummary-"+deptId+'-'+roleType; String key="problemmodify_safetySummary-"+deptId+"-"+roleType+"_"+projectId;
Object obj=redisCache.getCacheObject(key); Object obj=redisCache.getCacheObject(key);
if(obj!=null){ if(obj!=null){
return (List<SmzSspProblemmodify>) obj; return (List<SmzSspProblemmodify>) obj;
} }
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummary(deptId,roleType,0); List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummary(deptId,roleType,projectId,0);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES); redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return list; return list;
} }
@ -56,15 +56,15 @@ public class ProblemmodifyController extends BaseController {
* @return * @return
*/ */
@GetMapping("/qualitySummary") @GetMapping("/qualitySummary")
public List<SmzSspProblemmodify> qualitySummary(int deptId,int roleType) public List<SmzSspProblemmodify> qualitySummary(int deptId,int roleType,int projectId)
{ {
//3集团//4子公司//5监理单位//6总包//7分包 //3集团//4子公司//5监理单位//6总包//7分包
String key="problemmodify_qualitySummary-"+deptId+'-'+roleType; String key="problemmodify_qualitySummary-"+deptId+"-"+roleType+"_"+projectId;
Object obj=redisCache.getCacheObject(key); Object obj=redisCache.getCacheObject(key);
if(obj!=null){ if(obj!=null){
return (List<SmzSspProblemmodify>) obj; return (List<SmzSspProblemmodify>) obj;
} }
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummary(deptId,roleType,1); List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummary(deptId,roleType,projectId,1);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES); redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return list; return list;
} }
@ -77,15 +77,15 @@ public class ProblemmodifyController extends BaseController {
* @return * @return
*/ */
@GetMapping("/safetySummaryByProject") @GetMapping("/safetySummaryByProject")
public List<SmzSspProblemmodify> safetySummaryByProject(int deptId,int roleType) public List<SmzSspProblemmodify> safetySummaryByProject(int deptId,int roleType,int projectId)
{ {
//3集团//4子公司//5监理单位//6总包//7分包 //3集团//4子公司//5监理单位//6总包//7分包
String key="problemmodify_safetySummaryByProject-"+deptId+'-'+roleType; String key="problemmodify_safetySummaryByProject-"+deptId+"-"+roleType+"_"+projectId;
Object obj=redisCache.getCacheObject(key); Object obj=redisCache.getCacheObject(key);
if(obj!=null){ if(obj!=null){
return (List<SmzSspProblemmodify>) obj; return (List<SmzSspProblemmodify>) obj;
} }
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummaryByProject(deptId,roleType,0); List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummaryByProject(deptId,roleType,projectId,0);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES); redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return list; return list;
} }
@ -98,15 +98,15 @@ public class ProblemmodifyController extends BaseController {
* @return * @return
*/ */
@GetMapping("/qualitySummaryByProject") @GetMapping("/qualitySummaryByProject")
public List<SmzSspProblemmodify> qualitySummaryByProject(int deptId,int roleType) public List<SmzSspProblemmodify> qualitySummaryByProject(int deptId,int roleType,int projectId)
{ {
//3集团//4子公司//5监理单位//6总包//7分包 //3集团//4子公司//5监理单位//6总包//7分包
String key="problemmodify_qualitySummaryByProject-"+deptId+'-'+roleType; String key="problemmodify_qualitySummaryByProject-"+deptId+"-"+roleType+"_"+projectId;
Object obj=redisCache.getCacheObject(key); Object obj=redisCache.getCacheObject(key);
if(obj!=null){ if(obj!=null){
return (List<SmzSspProblemmodify>) obj; return (List<SmzSspProblemmodify>) obj;
} }
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummaryByProject(deptId,roleType,1); List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummaryByProject(deptId,roleType,projectId,1);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES); redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return list; return list;
} }

View File

@ -0,0 +1,4 @@
package com.yanzhu.jh.project.domain.where;
public class SurProjectBuildNodeDataExport {
}

View File

@ -67,7 +67,7 @@ public interface ISmzSspProblemmodifyService
* @param infoType 01 * @param infoType 01
* @return * @return
*/ */
public List<SmzSspProblemmodify> selectSummary(int deptId, int roleType, int infoType); public List<SmzSspProblemmodify> selectSummary(int deptId, int roleType,int projectId, int infoType);
/** /**
* () * ()
@ -76,7 +76,7 @@ public interface ISmzSspProblemmodifyService
* @param infoType 01 * @param infoType 01
* @return * @return
*/ */
public List<SmzSspProblemmodify> selectSummaryByProject(int deptId, int roleType, int infoType); public List<SmzSspProblemmodify> selectSummaryByProject(int deptId, int roleType,int projectId, int infoType);
public List<SmzSspProblemmodify> countByDate(SmzSspProblemmodifyWhere where); public List<SmzSspProblemmodify> countByDate(SmzSspProblemmodifyWhere where);

View File

@ -96,18 +96,20 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
} }
@Override @Override
public List<SmzSspProblemmodify> selectSummary(int deptId, int roleType, int infoType) { public List<SmzSspProblemmodify> selectSummary(int deptId, int roleType,int projectId, int infoType) {
SmzSspProblemmodify smzSspProblemmodify=new SmzSspProblemmodify(); SmzSspProblemmodify smzSspProblemmodify=new SmzSspProblemmodify();
smzSspProblemmodify.setRoleType(roleType); smzSspProblemmodify.setRoleType(roleType);
smzSspProblemmodify.setProjectId((long)projectId);
smzSspProblemmodify.setInfoType((long)infoType); smzSspProblemmodify.setInfoType((long)infoType);
smzSspProblemmodify.setId((long)deptId); smzSspProblemmodify.setId((long)deptId);
return smzSspProblemmodifyMapper.selectSummary(smzSspProblemmodify); return smzSspProblemmodifyMapper.selectSummary(smzSspProblemmodify);
} }
@Override @Override
public List<SmzSspProblemmodify> selectSummaryByProject(int deptId, int roleType, int infoType) { public List<SmzSspProblemmodify> selectSummaryByProject(int deptId, int roleType,int projectId, int infoType) {
SmzSspProblemmodify smzSspProblemmodify=new SmzSspProblemmodify(); SmzSspProblemmodify smzSspProblemmodify=new SmzSspProblemmodify();
smzSspProblemmodify.setRoleType(roleType); smzSspProblemmodify.setRoleType(roleType);
smzSspProblemmodify.setProjectId((long)projectId);
smzSspProblemmodify.setInfoType((long)infoType); smzSspProblemmodify.setInfoType((long)infoType);
smzSspProblemmodify.setId((long)deptId); smzSspProblemmodify.setId((long)deptId);
return smzSspProblemmodifyMapper.selectSummaryByProject(smzSspProblemmodify); return smzSspProblemmodifyMapper.selectSummaryByProject(smzSspProblemmodify);

View File

@ -206,6 +206,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ( SELECT danger_type,COUNT(1) cnt FROM smz_ssp_problemmodify WHERE projectId IN( LEFT JOIN ( SELECT danger_type,COUNT(1) cnt FROM smz_ssp_problemmodify WHERE projectId IN(
SELECT id FROM sur_project SELECT id FROM sur_project
where isDel=0 where isDel=0
<if test="projectId>0">and projectId=#{projectId}</if>
<if test="id >0 ">AND deptid = #{id}</if> <if test="id >0 ">AND deptid = #{id}</if>
) AND infotype=#{infoType} and isDel=0 ) AND infotype=#{infoType} and isDel=0
@ -218,6 +219,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
( (
select projectId,prjName,count(1) proble from vw_smz_ssp_problemmodify_audit select projectId,prjName,count(1) proble from vw_smz_ssp_problemmodify_audit
where infoType=#{infoType} where infoType=#{infoType}
<if test="projectId>0">and projectId=#{projectId}</if>
<if test="id >0 ">AND deptid = #{id}</if> <if test="id >0 ">AND deptid = #{id}</if>
<if test="roleType > 0">AND roletype=#{roleType}</if> <if test="roleType > 0">AND roletype=#{roleType}</if>
group by projectId,prjName group by projectId,prjName
@ -227,6 +229,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select projectid,count(1) timoutNoComp from vw_smz_ssp_problemmodify_audit where select projectid,count(1) timoutNoComp from vw_smz_ssp_problemmodify_audit where
((updateTime is null and date(nickedTime) &lt; date(now()) ) or date(updateTime )>date(nickedTime)) ((updateTime is null and date(nickedTime) &lt; date(now()) ) or date(updateTime )>date(nickedTime))
and infoType=#{infoType} and infoType=#{infoType}
<if test="projectId>0">and projectId=#{projectId}</if>
<if test="id >0 ">AND deptid = #{id}</if> <if test="id >0 ">AND deptid = #{id}</if>
<if test="roleType > 0">AND roletype=#{roleType}</if> <if test="roleType > 0">AND roletype=#{roleType}</if>
group by projectId group by projectId
@ -235,6 +238,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join ( left join (
SELECT projectid,COUNT(1) timoutComp FROM vw_smz_ssp_problemmodify_audit WHERE (updateTime is null and date(nickedTime) &lt; date(now()) ) SELECT projectid,COUNT(1) timoutComp FROM vw_smz_ssp_problemmodify_audit WHERE (updateTime is null and date(nickedTime) &lt; date(now()) )
and infoType=#{infoType} and infoType=#{infoType}
<if test="projectId>0">and projectId=#{projectId}</if>
<if test="id >0 ">AND deptid = #{id}</if> <if test="id >0 ">AND deptid = #{id}</if>
<if test="roleType > 0">AND roletype=#{roleType}</if> <if test="roleType > 0">AND roletype=#{roleType}</if>
GROUP BY projectid GROUP BY projectid