安环底图问题修改
正在显示
3 个修改的文件
包含
18 行增加
和
4 行删除
... | @@ -24,13 +24,15 @@ | ... | @@ -24,13 +24,15 @@ |
24 | SELECT | 24 | SELECT |
25 | d.id AS depart_id, | 25 | d.id AS depart_id, |
26 | d.depart_name AS depart_name, | 26 | d.depart_name AS depart_name, |
27 | NULL AS danger_date, | 27 | r.report_date AS danger_date, |
28 | NULL AS danger_location, | 28 | r.danger_name AS danger_location, |
29 | NULL AS is_fault | 29 | 1 AS is_fault |
30 | FROM | 30 | FROM |
31 | sys_depart d | 31 | sys_depart d |
32 | LEFT JOIN danger_inspection_record r ON d.id = r.depart_id | ||
32 | WHERE | 33 | WHERE |
33 | d.depart_type = 1 | 34 | d.depart_type = 1 |
35 | AND r.report_date LIKE CONCAT(#{year},'%') | ||
34 | </select> | 36 | </select> |
35 | 37 | ||
36 | <select id="getMapData" resultType="com.skua.modules.emergency.vo.MapDatabaseResult"> | 38 | <select id="getMapData" resultType="com.skua.modules.emergency.vo.MapDatabaseResult"> | ... | ... |
... | @@ -38,6 +38,7 @@ import org.springframework.stereotype.Service; | ... | @@ -38,6 +38,7 @@ import org.springframework.stereotype.Service; |
38 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 38 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
39 | import org.springframework.transaction.annotation.Transactional; | 39 | import org.springframework.transaction.annotation.Transactional; |
40 | 40 | ||
41 | import java.util.ArrayList; | ||
41 | import java.util.HashMap; | 42 | import java.util.HashMap; |
42 | import java.util.List; | 43 | import java.util.List; |
43 | import java.util.Map; | 44 | import java.util.Map; |
... | @@ -172,7 +173,18 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven | ... | @@ -172,7 +173,18 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven |
172 | if(year==null){ | 173 | if(year==null){ |
173 | year = String.valueOf(DateUtils.getYear()); | 174 | year = String.valueOf(DateUtils.getYear()); |
174 | } | 175 | } |
176 | List<DangerDatabaseResult> dangerList = emergencyRiskEventMapper.getDangerList(year); | ||
175 | List<MapDatabaseResult> list = emergencyRiskEventMapper.getMapData(year); | 177 | List<MapDatabaseResult> list = emergencyRiskEventMapper.getMapData(year); |
178 | for (MapDatabaseResult mapDatabaseResult : list) { | ||
179 | List<DangerDatabaseResult> daList = new ArrayList<>(); | ||
180 | String departId = mapDatabaseResult.getDepartId(); | ||
181 | for (DangerDatabaseResult da : dangerList) { | ||
182 | if(departId.equals(da.getDepartId())){ | ||
183 | daList.add(da); | ||
184 | } | ||
185 | } | ||
186 | mapDatabaseResult.setYhList(daList); | ||
187 | } | ||
176 | return list; | 188 | return list; |
177 | } | 189 | } |
178 | 190 | ... | ... |
... | @@ -27,6 +27,6 @@ public class MapDatabaseResult { | ... | @@ -27,6 +27,6 @@ public class MapDatabaseResult { |
27 | private String latitude; | 27 | private String latitude; |
28 | /**隐患排查事件*/ | 28 | /**隐患排查事件*/ |
29 | @ApiModelProperty(value = "隐患排查事件") | 29 | @ApiModelProperty(value = "隐患排查事件") |
30 | private List<Map<String,Object>> yhList; | 30 | private List<DangerDatabaseResult> yhList; |
31 | 31 | ||
32 | } | 32 | } | ... | ... |
-
请 注册 或 登录 后发表评论