kangwei: 风险库列表显示,巡检工单数、隐患记录数,风险内容数据
正在显示
7 个修改的文件
包含
88 行增加
和
5 行删除
... | @@ -82,7 +82,7 @@ public class DangerLevelManageController { | ... | @@ -82,7 +82,7 @@ public class DangerLevelManageController { |
82 | Result<IPage<DangerLevelManage>> result = new Result<IPage<DangerLevelManage>>(); | 82 | Result<IPage<DangerLevelManage>> result = new Result<IPage<DangerLevelManage>>(); |
83 | QueryWrapper<DangerLevelManage> queryWrapper = QueryGenerator.initQueryWrapper(dangerLevelManage, req.getParameterMap()); | 83 | QueryWrapper<DangerLevelManage> queryWrapper = QueryGenerator.initQueryWrapper(dangerLevelManage, req.getParameterMap()); |
84 | Page<DangerLevelManage> page = new Page<DangerLevelManage>(pageNo, pageSize); | 84 | Page<DangerLevelManage> page = new Page<DangerLevelManage>(pageNo, pageSize); |
85 | IPage<DangerLevelManage> pageList = dangerLevelManageService.page(page, queryWrapper); | 85 | IPage<DangerLevelManage> pageList = dangerLevelManageService.queryPage(page, queryWrapper); |
86 | result.setSuccess(true); | 86 | result.setSuccess(true); |
87 | result.setResult(pageList); | 87 | result.setResult(pageList); |
88 | return result; | 88 | return result; | ... | ... |
... | @@ -68,6 +68,12 @@ public class DangerLevelManage{ | ... | @@ -68,6 +68,12 @@ public class DangerLevelManage{ |
68 | @Excel(name = "管控措施", width = 15) | 68 | @Excel(name = "管控措施", width = 15) |
69 | @ApiModelProperty(value = "管控措施") | 69 | @ApiModelProperty(value = "管控措施") |
70 | private String dangerWay; | 70 | private String dangerWay; |
71 | |||
72 | /**管控措施*/ | ||
73 | @Excel(name = "检查频次(H)", width = 15) | ||
74 | @ApiModelProperty(value = "检查频次(H)") | ||
75 | private String frequency; | ||
76 | |||
71 | /**管控层级*/ | 77 | /**管控层级*/ |
72 | @Excel(name = "管控层级", width = 15,dicCode = "dangerRank") | 78 | @Excel(name = "管控层级", width = 15,dicCode = "dangerRank") |
73 | @ApiModelProperty(value = "管控层级") | 79 | @ApiModelProperty(value = "管控层级") |
... | @@ -141,22 +147,29 @@ public class DangerLevelManage{ | ... | @@ -141,22 +147,29 @@ public class DangerLevelManage{ |
141 | @ApiModelProperty(value = "关联设备名称") | 147 | @ApiModelProperty(value = "关联设备名称") |
142 | private String equipmentName; | 148 | private String equipmentName; |
143 | 149 | ||
144 | |||
145 | @TableField(exist=false) | 150 | @TableField(exist=false) |
146 | @ApiModelProperty(value = "风险等级名称") | 151 | @ApiModelProperty(value = "风险等级名称") |
147 | private String dangerLevelName; | 152 | private String dangerLevelName; |
148 | 153 | ||
149 | |||
150 | @TableField(exist=false) | 154 | @TableField(exist=false) |
151 | @ApiModelProperty(value = "风险类型名称") | 155 | @ApiModelProperty(value = "风险类型名称") |
152 | private String dangerTypeName; | 156 | private String dangerTypeName; |
153 | 157 | ||
154 | |||
155 | @TableField(exist=false) | 158 | @TableField(exist=false) |
156 | @ApiModelProperty(value = "风险位置名称") | 159 | @ApiModelProperty(value = "风险位置名称") |
157 | private String dangerPlaceName; | 160 | private String dangerPlaceName; |
158 | 161 | ||
162 | @TableField(exist=false) | ||
163 | @ApiModelProperty(value = "检查内容@分割") | ||
164 | private String inspectContent; | ||
159 | 165 | ||
166 | @TableField(exist=false) | ||
167 | @ApiModelProperty(value = "隐患数量") | ||
168 | private String inspectionNum; | ||
169 | |||
170 | @TableField(exist=false) | ||
171 | @ApiModelProperty(value = "异常巡检数量") | ||
172 | private String rectificationNum; | ||
160 | 173 | ||
161 | 174 | ||
162 | 175 | ... | ... |
... | @@ -65,6 +65,11 @@ public class DangerLevelManageShare { | ... | @@ -65,6 +65,11 @@ public class DangerLevelManageShare { |
65 | @Excel(name = "管控措施", width = 15) | 65 | @Excel(name = "管控措施", width = 15) |
66 | @ApiModelProperty(value = "管控措施") | 66 | @ApiModelProperty(value = "管控措施") |
67 | private String dangerWay; | 67 | private String dangerWay; |
68 | |||
69 | /**管控措施*/ | ||
70 | @Excel(name = "检查频次(H)", width = 15) | ||
71 | @ApiModelProperty(value = "检查频次(H)") | ||
72 | private String frequency; | ||
68 | /**管控层级*/ | 73 | /**管控层级*/ |
69 | @Excel(name = "管控层级", width = 15,dicCode = "dangerRank") | 74 | @Excel(name = "管控层级", width = 15,dicCode = "dangerRank") |
70 | @ApiModelProperty(value = "管控层级") | 75 | @ApiModelProperty(value = "管控层级") | ... | ... |
... | @@ -2,9 +2,12 @@ package com.skua.modules.safe.mapper; | ... | @@ -2,9 +2,12 @@ package com.skua.modules.safe.mapper; |
2 | 2 | ||
3 | import java.util.List; | 3 | import java.util.List; |
4 | 4 | ||
5 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
5 | import org.apache.ibatis.annotations.Param; | 7 | import org.apache.ibatis.annotations.Param; |
6 | import com.skua.modules.safe.entity.DangerLevelManage; | 8 | import com.skua.modules.safe.entity.DangerLevelManage; |
7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 9 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
10 | import org.apache.ibatis.annotations.Select; | ||
8 | 11 | ||
9 | /** | 12 | /** |
10 | * 风险分级管控清单 | 13 | * 风险分级管控清单 |
... | @@ -17,4 +20,12 @@ public interface DangerLevelManageMapper extends BaseMapper<DangerLevelManage> { | ... | @@ -17,4 +20,12 @@ public interface DangerLevelManageMapper extends BaseMapper<DangerLevelManage> { |
17 | * @return | 20 | * @return |
18 | */ | 21 | */ |
19 | public DangerLevelManage queryById(@Param("id") String id); | 22 | public DangerLevelManage queryById(@Param("id") String id); |
23 | |||
24 | //List<DangerLevelManage> queryByList(Page page, @Param("param") DangerLevelManage dangerLevelManage); | ||
25 | @Select("SELECT t.*,ifnull(aaa.inspect_content,'') inspect_content, ifnull(bbb.inspection_num,0) inspection_num, ifnull(ccc.rectification_num,0) 'rectification_num' " + | ||
26 | " FROM danger_level_manage t" + | ||
27 | " left join (select danger_id ,GROUP_CONCAT(inspect_name SEPARATOR '@') 'inspect_content' from danger_inspect_info group by danger_id)aaa on aaa.danger_id = t.id " + | ||
28 | " left join (select danger_id, count(id) 'inspection_num' from danger_inspection_record group by danger_id)bbb on bbb.danger_id = t.id " + | ||
29 | " left join (select danger_id, count(id) 'rectification_num' from ajh_rectification_info group by danger_id)ccc on ccc.danger_id = t.id ${ew.customSqlSegment}") | ||
30 | List<DangerLevelManage> getListByWrapper(Page page,@Param("ew") QueryWrapper<DangerLevelManage> queryWrapper); | ||
20 | } | 31 | } | ... | ... |
... | @@ -12,4 +12,30 @@ | ... | @@ -12,4 +12,30 @@ |
12 | left join sys_struct_dict sd on sd.id = m.danger_place | 12 | left join sys_struct_dict sd on sd.id = m.danger_place |
13 | where m.id = #{id} | 13 | where m.id = #{id} |
14 | </select> | 14 | </select> |
15 | </mapper> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
15 | |||
16 | |||
17 | <select id="queryByList" resultType="com.skua.modules.safe.entity.DangerLevelManage"> | ||
18 | select ifnull(aaa.inspect_content,'') inspect_content, ifnull(bbb.inspection_num,0) inspection_num, ifnull(ccc.rectification_num,0) 'rectification_num', t.* from danger_level_manage t | ||
19 | left join (select danger_id ,GROUP_CONCAT(inspect_name SEPARATOR '@') 'inspect_content' from danger_inspect_info group by danger_id)aaa on aaa.danger_id = t.id | ||
20 | left join (select danger_id, count(id) 'inspection_num' from danger_inspection_record group by danger_id)bbb on bbb.danger_id = t.id | ||
21 | left join (select danger_id, count(id) 'rectification_num' from ajh_rectification_info group by danger_id)ccc on ccc.danger_id = t.id | ||
22 | <where> | ||
23 | <if test="param.departId != null and param.departId != ''"> and t.depart_id = #{param.departId}</if> | ||
24 | <if test="param.dangerType != null and param.dangerType != ''"> and t.danger_type = #{param.dangerType}</if> | ||
25 | <if test="param.dangerName != null and param.dangerName != ''"> and t.danger_name like concat('%', #{param.dangerName}, '%')</if> | ||
26 | <if test="param.dangerContent != null and param.dangerContent != ''"> and t.danger_content = #{param.dangerContent}</if> | ||
27 | <if test="param.dangerStandard != null and param.dangerStandard != ''"> and t.danger_standard = #{param.dangerStandard}</if> | ||
28 | <if test="param.dangerLevel != null and param.dangerLevel != ''"> and t.danger_level = #{param.dangerLevel}</if> | ||
29 | <if test="param.dangerResult != null and param.dangerResult != ''"> and t.danger_result = #{param.dangerResult}</if> | ||
30 | <if test="param.dangerWay != null and param.dangerWay != ''"> and t.danger_way = #{param.dangerWay}</if> | ||
31 | <if test="param.dangerRank != null and param.dangerRank != ''"> and t.danger_rank = #{param.dangerRank}</if> | ||
32 | <if test="param.dangerDept != null and param.dangerDept != ''"> and t.danger_dept = #{param.dangerDept}</if> | ||
33 | <if test="param.dangerUser != null and param.dangerUser != ''"> and t.danger_user = #{param.dangerUser}</if> | ||
34 | <if test="param.dangerFour != null and param.dangerFour != ''"> and t.danger_four = #{param.dangerFour}</if> | ||
35 | <if test="param.dangerPlace != null and param.dangerPlace != ''"> and t.danger_place = #{param.dangerPlace}</if> | ||
36 | <if test="param.equipInfoId != null and param.equipInfoId != ''"> and t.equip_info_id = #{param.equipInfoId}</if> | ||
37 | <if test="param.share != null and param.share != ''"> and share = #{param.share}</if> | ||
38 | <if test="param.frequency != null and param.frequency != ''"> and frequency = #{param.frequency}</if> | ||
39 | </where> | ||
40 | </select> | ||
41 | </mapper> | ... | ... |
1 | package com.skua.modules.safe.service; | 1 | package com.skua.modules.safe.service; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
4 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
6 | import com.skua.modules.ajh.entity.AjhMeetingSend; | ||
3 | import com.skua.modules.safe.entity.DangerLevelManage; | 7 | import com.skua.modules.safe.entity.DangerLevelManage; |
4 | import com.baomidou.mybatisplus.extension.service.IService; | 8 | import com.baomidou.mybatisplus.extension.service.IService; |
5 | 9 | ||
... | @@ -14,4 +18,12 @@ public interface IDangerLevelManageService extends IService<DangerLevelManage> { | ... | @@ -14,4 +18,12 @@ public interface IDangerLevelManageService extends IService<DangerLevelManage> { |
14 | * @return | 18 | * @return |
15 | */ | 19 | */ |
16 | public DangerLevelManage queryById(String id); | 20 | public DangerLevelManage queryById(String id); |
21 | |||
22 | /*** | ||
23 | * 分页检索 | ||
24 | * @param page | ||
25 | * @param queryWrapper | ||
26 | * @return | ||
27 | */ | ||
28 | public IPage<DangerLevelManage> queryPage(Page<DangerLevelManage> page, QueryWrapper<DangerLevelManage> queryWrapper) ; | ||
17 | } | 29 | } | ... | ... |
1 | package com.skua.modules.safe.service.impl; | 1 | package com.skua.modules.safe.service.impl; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
5 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
7 | import com.skua.modules.ajh.entity.AjhMeetingSend; | ||
4 | import com.skua.modules.safe.entity.DangerLevelManage; | 8 | import com.skua.modules.safe.entity.DangerLevelManage; |
5 | import com.skua.modules.safe.mapper.DangerLevelManageMapper; | 9 | import com.skua.modules.safe.mapper.DangerLevelManageMapper; |
6 | import com.skua.modules.safe.service.IDangerLevelManageService; | 10 | import com.skua.modules.safe.service.IDangerLevelManageService; |
... | @@ -24,4 +28,16 @@ public class DangerLevelManageServiceImpl extends ServiceImpl<DangerLevelManageM | ... | @@ -24,4 +28,16 @@ public class DangerLevelManageServiceImpl extends ServiceImpl<DangerLevelManageM |
24 | public DangerLevelManage queryById(String id){ | 28 | public DangerLevelManage queryById(String id){ |
25 | return this.baseMapper.queryById(id); | 29 | return this.baseMapper.queryById(id); |
26 | } | 30 | } |
31 | |||
32 | /*** | ||
33 | * 分页检索 | ||
34 | * @param page | ||
35 | * @param queryWrapper | ||
36 | * @return | ||
37 | */ | ||
38 | public IPage<DangerLevelManage> queryPage(Page<DangerLevelManage> page, QueryWrapper<DangerLevelManage> queryWrapper) { | ||
39 | List<DangerLevelManage> list = this.baseMapper.getListByWrapper(page, queryWrapper); | ||
40 | page.setRecords(list); | ||
41 | return page; | ||
42 | } | ||
27 | } | 43 | } | ... | ... |
-
请 注册 或 登录 后发表评论