16189507 张雷

安环底图问题修改

1 个父辈 2526e61c
......@@ -24,13 +24,15 @@
SELECT
d.id AS depart_id,
d.depart_name AS depart_name,
NULL AS danger_date,
NULL AS danger_location,
NULL AS is_fault
r.report_date AS danger_date,
r.danger_name AS danger_location,
1 AS is_fault
FROM
sys_depart d
LEFT JOIN danger_inspection_record r ON d.id = r.depart_id
WHERE
d.depart_type = 1
AND r.report_date LIKE CONCAT(#{year},'%')
</select>
<select id="getMapData" resultType="com.skua.modules.emergency.vo.MapDatabaseResult">
......
......@@ -38,6 +38,7 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -172,7 +173,18 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven
if(year==null){
year = String.valueOf(DateUtils.getYear());
}
List<DangerDatabaseResult> dangerList = emergencyRiskEventMapper.getDangerList(year);
List<MapDatabaseResult> list = emergencyRiskEventMapper.getMapData(year);
for (MapDatabaseResult mapDatabaseResult : list) {
List<DangerDatabaseResult> daList = new ArrayList<>();
String departId = mapDatabaseResult.getDepartId();
for (DangerDatabaseResult da : dangerList) {
if(departId.equals(da.getDepartId())){
daList.add(da);
}
}
mapDatabaseResult.setYhList(daList);
}
return list;
}
......
......@@ -27,6 +27,6 @@ public class MapDatabaseResult {
private String latitude;
/**隐患排查事件*/
@ApiModelProperty(value = "隐患排查事件")
private List<Map<String,Object>> yhList;
private List<DangerDatabaseResult> yhList;
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!