安全隐患大屏后台

dev_xd
lj7788@126.com 2025-03-08 15:39:41 +08:00
parent 898e4a5dd4
commit dea174ab73
7 changed files with 171 additions and 1 deletions

View File

@ -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;

View File

@ -58,4 +58,5 @@ public interface SmzSspAuditinfoMapper
* @return
*/
public int deleteSmzSspAuditinfoByIds(Long[] ids);
}

View File

@ -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);
}

View File

@ -410,5 +410,66 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and a.checkState not in (4) and date(nickedTime) &lt;= 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>

View File

@ -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);
}
}

View File

@ -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);
}

View File

@ -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);
}
}