安全隐患大屏后台
parent
898e4a5dd4
commit
dea174ab73
|
@ -145,6 +145,19 @@ public class SmzSspProblemmodify extends BaseEntity
|
|||
@Excel(name = "问题类型", readConverterExp = "1=常规问题,2专项问题")
|
||||
private String problemType;
|
||||
|
||||
/**
|
||||
* 是否最新(1-排序规则(按id降序))
|
||||
*/
|
||||
private Long isNew;
|
||||
|
||||
public Long getIsNew() {
|
||||
return isNew;
|
||||
}
|
||||
|
||||
public void setIsNew(Long isNew) {
|
||||
this.isNew = isNew;
|
||||
}
|
||||
|
||||
private String problemTypeName;
|
||||
private String dangerTypeName;
|
||||
private String createUserName;
|
||||
|
|
|
@ -58,4 +58,5 @@ public interface SmzSspAuditinfoMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteSmzSspAuditinfoByIds(Long[] ids);
|
||||
|
||||
}
|
||||
|
|
|
@ -81,4 +81,18 @@ public interface SmzSspProblemmodifyMapper
|
|||
* @return
|
||||
*/
|
||||
public List<SmzSspProblemmodify> selectList(SmzSspProblemmodify where);
|
||||
|
||||
/**
|
||||
* 按检查类型(ssp_proble_type)分组查询
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<SmzSspProblemmodify> groupByProblemType(SmzSspProblemmodify where);
|
||||
|
||||
/**
|
||||
* 按隐患类型(ssp_proble_sub_type)分组查询
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<SmzSspProblemmodify> groupByDangerType(SmzSspProblemmodify where);
|
||||
}
|
||||
|
|
|
@ -410,5 +410,66 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and a.checkState not in (4) and date(nickedTime) <= curdate()
|
||||
</if>
|
||||
<include refid="countUserWhere"></include>
|
||||
<if test="isNew!=null and isNew!=0">
|
||||
order by a.id desc
|
||||
</if>
|
||||
</select>
|
||||
<select id="groupByProblemType" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
|
||||
select a.dict_value nickedInfo,a.dict_label problemType,b.cnt id
|
||||
from (SELECT * from sys_dict_data dic WHERE dict_type='ssp_proble_type') a
|
||||
left join (
|
||||
SELECT dic.dict_value,count(1) cnt
|
||||
from smz_ssp_problemmodify ssp,sys_dict_data dic
|
||||
where ssp.problemType=dic.dict_value and dic.dict_type='ssp_proble_type'
|
||||
and ssp.isDel=0
|
||||
<if test="comId != null "> and ssp.comId = #{comId}</if>
|
||||
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
|
||||
<if test="infoType != null "> and ssp.infoType = #{infoType}</if>
|
||||
group by dic.dict_value )b on a.dict_value =b.dict_value
|
||||
</select>
|
||||
|
||||
<select id="groupByDangerType" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
|
||||
SELECT
|
||||
a.cnt id,
|
||||
b.cnt comId,
|
||||
dic.dict_value nickedInfo,
|
||||
dic.dict_label danger_type
|
||||
FROM
|
||||
( SELECT * FROM sys_dict_data dic WHERE dict_type = 'ssp_proble_sub_type' ) dic
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
dic.dict_value,
|
||||
count( 1 ) cnt
|
||||
FROM
|
||||
smz_ssp_problemmodify ssp,
|
||||
sys_dict_data dic
|
||||
WHERE
|
||||
ssp.danger_type = dic.dict_value
|
||||
and ssp.isDel=0
|
||||
<if test="comId != null "> and ssp.comId = #{comId}</if>
|
||||
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
|
||||
<if test="infoType != null "> and ssp.infoType = #{infoType}</if>
|
||||
AND dic.dict_type = 'ssp_proble_sub_type'
|
||||
GROUP BY
|
||||
dic.dict_value
|
||||
) a ON a.dict_value = dic.dict_value
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
dic.dict_value,
|
||||
count( 1 ) cnt
|
||||
FROM
|
||||
smz_ssp_problemmodify ssp,
|
||||
sys_dict_data dic
|
||||
WHERE
|
||||
ssp.danger_type = dic.dict_value
|
||||
and ssp.isDel=0
|
||||
<if test="comId != null "> and ssp.comId = #{comId}</if>
|
||||
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
|
||||
<if test="infoType != null "> and ssp.infoType = #{infoType}</if>
|
||||
AND dic.dict_type = 'ssp_proble_sub_type'
|
||||
AND ssp.checkState IN ( 0, 3 )
|
||||
GROUP BY
|
||||
dic.dict_value
|
||||
) b ON b.dict_value = dic.dict_value
|
||||
</select>
|
||||
</mapper>
|
|
@ -226,4 +226,51 @@ public class SmzSspProblemmodifyController extends BaseController
|
|||
List<SmzSspProblemmodify> data = smzSspProblemmodifyService.selectSmzSspProblemmodifyList(query);
|
||||
return success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按检查类型(ssp_proble_type)分组查询
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("trouble:problemmodify:list")
|
||||
@PostMapping("/groupByProblemType")
|
||||
public AjaxResult groupByProblemType(@RequestBody SmzSspProblemmodify where){
|
||||
return success(smzSspProblemmodifyService.groupByProblemType(where));
|
||||
}
|
||||
|
||||
/**
|
||||
* 按隐患类型(ssp_proble_sub_type)分组查询
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("trouble:problemmodify:list")
|
||||
@PostMapping("/groupByDangerType")
|
||||
public AjaxResult groupByDangerType(@RequestBody SmzSspProblemmodify where){
|
||||
return success(smzSspProblemmodifyService.groupByDangerType(where));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类计数
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("trouble:problemmodify:list")
|
||||
@GetMapping("/listCountForBG")
|
||||
public AjaxResult listCountForBG(SmzSspProblemmodify where){
|
||||
List<SmzSspProblemmodify> result=smzSspProblemmodifyService.getListCount(where);
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询隐患问题列表
|
||||
*/
|
||||
@RequiresPermissions("trouble:problemmodify:list")
|
||||
@GetMapping("/listForBG")
|
||||
public TableDataInfo listForBG(SmzSspProblemmodify where)
|
||||
{
|
||||
where.setIsNew(1L);
|
||||
startPage();
|
||||
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectList(where);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,4 +83,18 @@ public interface ISmzSspProblemmodifyService
|
|||
* @return
|
||||
*/
|
||||
public List<SmzSspProblemmodify> selectList(SmzSspProblemmodify where);
|
||||
|
||||
/**
|
||||
* 按检查类型(ssp_proble_type)分组查询
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<SmzSspProblemmodify> groupByProblemType(SmzSspProblemmodify where);
|
||||
|
||||
/**
|
||||
* 按隐患类型(ssp_proble_sub_type)分组查询
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<SmzSspProblemmodify> groupByDangerType(SmzSspProblemmodify where);
|
||||
}
|
||||
|
|
|
@ -150,4 +150,24 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
|
|||
public List<SmzSspProblemmodify> selectList(SmzSspProblemmodify where) {
|
||||
return smzSspProblemmodifyMapper.selectList(where);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按检查类型(ssp_proble_type)分组查询
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SmzSspProblemmodify> groupByProblemType(SmzSspProblemmodify where) {
|
||||
return smzSspProblemmodifyMapper.groupByProblemType(where);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按隐患类型(ssp_proble_sub_type)分组查询
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SmzSspProblemmodify> groupByDangerType(SmzSspProblemmodify where) {
|
||||
return smzSspProblemmodifyMapper.groupByDangerType(where);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue