Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev
commit
745f2ee510
|
@ -92,8 +92,7 @@ public class ProblemmodifyController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 质量整改-安全分类汇总(按项目)
|
* 质量整改-安全分类汇总(按项目)
|
||||||
* @param deptId
|
* @param where 查询条件
|
||||||
* @param roleType
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/safetySummaryByProject")
|
@PostMapping("/safetySummaryByProject")
|
||||||
|
|
|
@ -425,31 +425,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="selectSummary" parameterType="SmzSspProblemmodifyWhere" 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
|
SELECT
|
||||||
<where>
|
sp.danger_type as id,
|
||||||
<if test="infoType==0">and dict_type='ssp_aqyhlx'</if>
|
sd.dict_label as problemArea,
|
||||||
<if test="infoType>0">and dict_type='ssp_zlyhlx'</if>
|
COUNT(1) as roleType
|
||||||
|
FROM
|
||||||
</where>
|
smz_ssp_problemmodify sp
|
||||||
) a
|
left join sys_dict_data sd on sd.dict_value=sp.danger_type
|
||||||
LEFT JOIN ( SELECT danger_type,COUNT(1) cnt FROM smz_ssp_problemmodify WHERE projectId IN(
|
<if test="infoType==0">and sd.dict_type = 'ssp_aqyhlx'</if>
|
||||||
SELECT id FROM sur_project
|
<if test="infoType==1">and sd.dict_type = 'ssp_zlyhlx'</if>
|
||||||
where isDel=0
|
WHERE sp.isDel = 0
|
||||||
<if test="projectId>0">and projectId=#{projectId}</if>
|
AND sp.infotype = #{infoType}
|
||||||
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
<if test="roleType > 0">AND sp.roletype=#{roleType}</if>
|
||||||
<if test="prjIds !=null and prjIds.size()>0">
|
<if test="startDate!=null">and DATE(sp.createtime) >= DATE(#{startDate})</if>
|
||||||
and projectId in
|
<if test="endDate!=null">and DATE(sp.createtime) <= DATE(#{endDate})</if>
|
||||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
<if test="projectId>0">and sp.projectId=#{projectId}</if>
|
||||||
#{item}
|
<if test="deptId >0 ">AND sp.deptid = #{deptId}</if>
|
||||||
</foreach>
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
</if>
|
and sp.projectId in
|
||||||
) AND infotype=#{infoType} and isDel=0
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
<if test="roleType > 0">AND roletype=#{roleType}</if>
|
#{item}
|
||||||
<if test="startDate!=null">and DATE(createtime)>=DATE(#{startDate})</if>
|
</foreach>
|
||||||
<if test="endDate!=null">and DATE(createtime) <= DATE(#{endDate})</if>
|
</if>
|
||||||
GROUP BY danger_type) b
|
GROUP BY
|
||||||
ON a.dict_value=b.danger_type ORDER BY cnt DESC,a.dict_value+0
|
sp.danger_type
|
||||||
|
ORDER BY
|
||||||
|
roleType desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSummaryByProject" parameterType="SmzSspProblemmodifyWhere" 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,
|
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,
|
if(c.timoutComp is null,0,c.timoutComp) checkState,
|
||||||
|
|
Loading…
Reference in New Issue