Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev
commit
4f0181d7db
|
@ -1,6 +1,7 @@
|
|||
package com.yanzhu.jh.bigscreen.web.controller;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
|
@ -34,16 +35,19 @@ public class ProblemmodifyController extends BaseController {
|
|||
* @param roleType
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/safetySummary")
|
||||
public List<SmzSspProblemmodify> safetySummary(int deptId,int roleType,int projectId)
|
||||
@PostMapping("/safetySummary")
|
||||
public List<SmzSspProblemmodify> safetySummary(@RequestBody SmzSspProblemmodifyWhere where)
|
||||
{
|
||||
//3集团//4子公司//5监理单位//6总包//7分包
|
||||
String key="problemmodify_safetySummary-"+deptId+"-"+roleType+"_"+projectId;
|
||||
where.setInfoType(0l);
|
||||
String startDate=where.getStartDate()==null?"":DateUtil.format(where.getStartDate(),"yyyy-MM-dd");
|
||||
String endDate=where.getEndDate()==null?"":DateUtil.format(where.getEndDate(),"yyyy-MM-dd");
|
||||
String key="problemmodify_safetySummary-"+where.getDeptId()+"-"+where.getRoleType()+"_"+where.getProjectId()+"-"+startDate+"_"+endDate;
|
||||
Object obj=redisCache.getCacheObject(key);
|
||||
if(obj!=null){
|
||||
return (List<SmzSspProblemmodify>) obj;
|
||||
}
|
||||
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummary(deptId,roleType,projectId,0);
|
||||
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummary(where);
|
||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||
return list;
|
||||
}
|
||||
|
@ -55,16 +59,19 @@ public class ProblemmodifyController extends BaseController {
|
|||
* @param roleType
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/qualitySummary")
|
||||
public List<SmzSspProblemmodify> qualitySummary(int deptId,int roleType,int projectId)
|
||||
@PostMapping("/qualitySummary")
|
||||
public List<SmzSspProblemmodify> qualitySummary(@RequestBody SmzSspProblemmodifyWhere where)
|
||||
{
|
||||
//3集团//4子公司//5监理单位//6总包//7分包
|
||||
String key="problemmodify_qualitySummary-"+deptId+"-"+roleType+"_"+projectId;
|
||||
where.setInfoType(1l);
|
||||
String startDate=where.getStartDate()==null?"":DateUtil.format(where.getStartDate(),"yyyy-MM-dd");
|
||||
String endDate=where.getEndDate()==null?"":DateUtil.format(where.getEndDate(),"yyyy-MM-dd");
|
||||
String key="problemmodify_qualitySummary-"+where.getDeptId()+"-"+where.getRoleType()+"_"+where.getProjectId()+"-"+startDate+"_"+endDate;
|
||||
Object obj=redisCache.getCacheObject(key);
|
||||
if(obj!=null){
|
||||
return (List<SmzSspProblemmodify>) obj;
|
||||
}
|
||||
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummary(deptId,roleType,projectId,1);
|
||||
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummary(where);
|
||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||
return list;
|
||||
}
|
||||
|
@ -76,16 +83,19 @@ public class ProblemmodifyController extends BaseController {
|
|||
* @param roleType
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/safetySummaryByProject")
|
||||
public List<SmzSspProblemmodify> safetySummaryByProject(int deptId,int roleType,int projectId)
|
||||
@PostMapping("/safetySummaryByProject")
|
||||
public List<SmzSspProblemmodify> safetySummaryByProject(@RequestBody SmzSspProblemmodifyWhere where)
|
||||
{
|
||||
//3集团//4子公司//5监理单位//6总包//7分包
|
||||
String key="problemmodify_safetySummaryByProject-"+deptId+"-"+roleType+"_"+projectId;
|
||||
where.setInfoType(0l);
|
||||
String startDate=where.getStartDate()==null?"":DateUtil.format(where.getStartDate(),"yyyy-MM-dd");
|
||||
String endDate=where.getEndDate()==null?"":DateUtil.format(where.getEndDate(),"yyyy-MM-dd");
|
||||
String key="problemmodify_safetySummaryByProject-"+where.getDeptId()+"-"+where.getRoleType()+"_"+where.getProjectId()+"-"+startDate+"_"+endDate;
|
||||
Object obj=redisCache.getCacheObject(key);
|
||||
if(obj!=null){
|
||||
return (List<SmzSspProblemmodify>) obj;
|
||||
}
|
||||
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummaryByProject(deptId,roleType,projectId,0);
|
||||
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummaryByProject(where);
|
||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||
return list;
|
||||
}
|
||||
|
@ -97,16 +107,20 @@ public class ProblemmodifyController extends BaseController {
|
|||
* @param roleType
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/qualitySummaryByProject")
|
||||
public List<SmzSspProblemmodify> qualitySummaryByProject(int deptId,int roleType,int projectId)
|
||||
@PostMapping("/qualitySummaryByProject")
|
||||
public List<SmzSspProblemmodify> qualitySummaryByProject(@RequestBody SmzSspProblemmodifyWhere where)
|
||||
{
|
||||
//3集团//4子公司//5监理单位//6总包//7分包
|
||||
String key="problemmodify_qualitySummaryByProject-"+deptId+"-"+roleType+"_"+projectId;
|
||||
//3集团//4子公司//5监理单位//6总包//7分包 int deptId,int roleType,int projectId
|
||||
where.setInfoType(1l);
|
||||
String startDate=where.getStartDate()==null?"":DateUtil.format(where.getStartDate(),"yyyy-MM-dd");
|
||||
String endDate=where.getEndDate()==null?"":DateUtil.format(where.getEndDate(),"yyyy-MM-dd");
|
||||
String key="problemmodify_qualitySummaryByProject-"+where.getDeptId()+"-"+where.getRoleType()+"_"+where.getProjectId()+"-"+startDate+"_"+endDate;
|
||||
|
||||
Object obj=redisCache.getCacheObject(key);
|
||||
if(obj!=null){
|
||||
return (List<SmzSspProblemmodify>) obj;
|
||||
}
|
||||
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummaryByProject(deptId,roleType,projectId,1);
|
||||
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummaryByProject(where);
|
||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||
return list;
|
||||
}
|
||||
|
|
|
@ -94,17 +94,17 @@ public interface SmzSspProblemmodifyMapper
|
|||
|
||||
/**
|
||||
* 按安全类型分组查询
|
||||
* @param smzSspProblemmodify
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<SmzSspProblemmodify> selectSummary(SmzSspProblemmodify smzSspProblemmodify);
|
||||
public List<SmzSspProblemmodify> selectSummary(SmzSspProblemmodifyWhere where);
|
||||
|
||||
/**
|
||||
* 按项目分组统计
|
||||
* @param smzSspProblemmodify
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<SmzSspProblemmodify> selectSummaryByProject(SmzSspProblemmodify smzSspProblemmodify);
|
||||
public List<SmzSspProblemmodify> selectSummaryByProject(SmzSspProblemmodifyWhere where);
|
||||
|
||||
/**
|
||||
* 查询某天预警数
|
||||
|
|
|
@ -93,7 +93,7 @@ public interface ISmzSspProblemmodifyService
|
|||
* @param infoType 信息类型(0安全,1质量)
|
||||
* @return
|
||||
*/
|
||||
public List<SmzSspProblemmodify> selectSummary(int deptId, int roleType,int projectId, int infoType);
|
||||
public List<SmzSspProblemmodify> selectSummary(SmzSspProblemmodifyWhere where);
|
||||
|
||||
/**
|
||||
* 分类汇总(按项目)
|
||||
|
@ -102,7 +102,7 @@ public interface ISmzSspProblemmodifyService
|
|||
* @param infoType 信息类型(0安全,1质量)
|
||||
* @return
|
||||
*/
|
||||
public List<SmzSspProblemmodify> selectSummaryByProject(int deptId, int roleType,int projectId, int infoType);
|
||||
public List<SmzSspProblemmodify> selectSummaryByProject(SmzSspProblemmodifyWhere where);
|
||||
|
||||
public List<SmzSspProblemmodify> countByDate(SmzSspProblemmodifyWhere where);
|
||||
|
||||
|
|
|
@ -202,23 +202,13 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
|
|||
}
|
||||
|
||||
@Override
|
||||
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);
|
||||
public List<SmzSspProblemmodify> selectSummary(SmzSspProblemmodifyWhere where) {
|
||||
return smzSspProblemmodifyMapper.selectSummary(where);
|
||||
}
|
||||
|
||||
@Override
|
||||
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);
|
||||
public List<SmzSspProblemmodify> selectSummaryByProject(SmzSspProblemmodifyWhere where) {
|
||||
return smzSspProblemmodifyMapper.selectSummaryByProject(where);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -349,7 +349,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectSummary" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
|
||||
<select id="selectSummary" parameterType="SmzSspProblemmodifyWhere" resultMap="SmzSspProblemmodifyResult">
|
||||
SELECT a.dict_value id,a.dict_label problemArea,b.cnt roleType FROM (SELECT * FROM sys_dict_data
|
||||
<where>
|
||||
<if test="infoType==0">and dict_type='ssp_aqyhlx'</if>
|
||||
|
@ -361,21 +361,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SELECT id FROM sur_project
|
||||
where isDel=0
|
||||
<if test="projectId>0">and projectId=#{projectId}</if>
|
||||
<if test="id >0 ">AND deptid = #{id}</if>
|
||||
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
||||
|
||||
) AND infotype=#{infoType} and isDel=0
|
||||
<if test="roleType > 0">AND roletype=#{roleType}</if>
|
||||
<if test="startDate!=null">and DATE(createtime)>=DATE(#{startDate})</if>
|
||||
<if test="endDate!=null">and DATE(createtime) <= DATE(#{endDate})</if>
|
||||
GROUP BY danger_type) b
|
||||
ON a.dict_value=b.danger_type ORDER BY cnt DESC,a.dict_value+0
|
||||
</select>
|
||||
<select id="selectSummaryByProject" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
|
||||
<select id="selectSummaryByProject" parameterType="SmzSspProblemmodifyWhere" resultMap="SmzSspProblemmodifyResult">
|
||||
select a.projectId,a.prjName projectName,a.proble id,if(b.timoutNoComp is null,0,b.timoutNoComp) infoType,if(c.timoutComp is null,0,c.timoutComp) checkState from
|
||||
(
|
||||
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="deptId >0 ">AND deptid = #{deptId}</if>
|
||||
<if test="roleType > 0">AND roletype=#{roleType}</if>
|
||||
<if test="startDate!=null">and DATE(createtime)>=DATE(#{startDate})</if>
|
||||
<if test="endDate!=null">and DATE(createtime) <= DATE(#{endDate})</if>
|
||||
group by projectId,prjName
|
||||
)
|
||||
a
|
||||
|
@ -384,8 +388,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
((updateTime is null and date(nickedTime) < 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="deptId >0 ">AND deptid = #{deptId}</if>
|
||||
<if test="roleType > 0">AND roletype=#{roleType}</if>
|
||||
<if test="startDate!=null">and DATE(createtime)>=DATE(#{startDate})</if>
|
||||
<if test="endDate!=null">and DATE(createtime) <= DATE(#{endDate})</if>
|
||||
group by projectId
|
||||
|
||||
) b on a.projectId=b.projectId
|
||||
|
@ -393,8 +399,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SELECT projectid,COUNT(1) timoutComp FROM vw_smz_ssp_problemmodify_audit WHERE (updateTime is null and date(nickedTime) < date(now()) )
|
||||
and infoType=#{infoType}
|
||||
<if test="projectId>0">and projectId=#{projectId}</if>
|
||||
<if test="id >0 ">AND deptid = #{id}</if>
|
||||
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
||||
<if test="roleType > 0">AND roletype=#{roleType}</if>
|
||||
<if test="startDate!=null">and DATE(createtime)>=DATE(#{startDate})</if>
|
||||
<if test="endDate!=null">and DATE(createtime) <= DATE(#{endDate})</if>
|
||||
GROUP BY projectid
|
||||
|
||||
) c on a.projectId=c.projectId
|
||||
|
@ -407,7 +415,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="projectId <= 0">
|
||||
AND projectId IN (
|
||||
SELECT id FROM sur_project WHERE isdel=0
|
||||
<if test="deptId >0 ">AND deptid = #{id}</if>
|
||||
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
||||
)
|
||||
</if>
|
||||
and DATE(createTime)=Date(#{startDate})
|
||||
|
|
Loading…
Reference in New Issue