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
*/
@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分包
String key="problemmodify_safetySummary-"+deptId+'-'+roleType;
String key="problemmodify_safetySummary-"+deptId+"-"+roleType+"_"+projectId;
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
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);
return list;
}
@ -56,15 +56,15 @@ public class ProblemmodifyController extends BaseController {
* @return
*/
@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分包
String key="problemmodify_qualitySummary-"+deptId+'-'+roleType;
String key="problemmodify_qualitySummary-"+deptId+"-"+roleType+"_"+projectId;
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
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);
return list;
}
@ -77,15 +77,15 @@ public class ProblemmodifyController extends BaseController {
* @return
*/
@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分包
String key="problemmodify_safetySummaryByProject-"+deptId+'-'+roleType;
String key="problemmodify_safetySummaryByProject-"+deptId+"-"+roleType+"_"+projectId;
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
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);
return list;
}
@ -98,15 +98,15 @@ public class ProblemmodifyController extends BaseController {
* @return
*/
@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分包
String key="problemmodify_qualitySummaryByProject-"+deptId+'-'+roleType;
String key="problemmodify_qualitySummaryByProject-"+deptId+"-"+roleType+"_"+projectId;
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
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);
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
* @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
* @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);

View File

@ -96,18 +96,20 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
}
@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.setRoleType(roleType);
smzSspProblemmodify.setProjectId((long)projectId);
smzSspProblemmodify.setInfoType((long)infoType);
smzSspProblemmodify.setId((long)deptId);
return smzSspProblemmodifyMapper.selectSummary(smzSspProblemmodify);
}
@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.setRoleType(roleType);
smzSspProblemmodify.setProjectId((long)projectId);
smzSspProblemmodify.setInfoType((long)infoType);
smzSspProblemmodify.setId((long)deptId);
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(
SELECT id FROM sur_project
where isDel=0
<if test="projectId>0">and projectId=#{projectId}</if>
<if test="id >0 ">AND deptid = #{id}</if>
) 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
where infoType=#{infoType}
<if test="projectId>0">and projectId=#{projectId}</if>
<if test="id >0 ">AND deptid = #{id}</if>
<if test="roleType > 0">AND roletype=#{roleType}</if>
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
((updateTime is null and date(nickedTime) &lt; date(now()) ) or date(updateTime )>date(nickedTime))
and infoType=#{infoType}
<if test="projectId>0">and projectId=#{projectId}</if>
<if test="id >0 ">AND deptid = #{id}</if>
<if test="roleType > 0">AND roletype=#{roleType}</if>
group by projectId
@ -235,6 +238,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join (
SELECT projectid,COUNT(1) timoutComp FROM vw_smz_ssp_problemmodify_audit WHERE (updateTime is null and date(nickedTime) &lt; date(now()) )
and infoType=#{infoType}
<if test="projectId>0">and projectId=#{projectId}</if>
<if test="id >0 ">AND deptid = #{id}</if>
<if test="roleType > 0">AND roletype=#{roleType}</if>
GROUP BY projectid