Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
545a15397e
|
|
@ -69,4 +69,13 @@ public interface DigitalSignageDao {
|
||||||
* @date 2025/4/25 9:11
|
* @date 2025/4/25 9:11
|
||||||
*/
|
*/
|
||||||
List<DigitalSignageVo.TowerInfoVo> getTowersInfo(QueryParamDto dto);
|
List<DigitalSignageVo.TowerInfoVo> getTowersInfo(QueryParamDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询交叉跨越信息
|
||||||
|
* @param dto
|
||||||
|
* @return List<TowerInfoVo>
|
||||||
|
* @author cwchen
|
||||||
|
* @date 2025/4/25 10:35
|
||||||
|
*/
|
||||||
|
List<DigitalSignageVo.SpanInfoVo> getSpanInfoVos(QueryParamDto dto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.digitalSignage.backstage.entity.vo;
|
package com.bonus.digitalSignage.backstage.entity.vo;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
@ -147,6 +148,7 @@ public class DigitalSignageVo {
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public static class TowerInfoVo{
|
public static class TowerInfoVo{
|
||||||
|
private Long id;
|
||||||
/**杆塔名称*/
|
/**杆塔名称*/
|
||||||
private String towerName;
|
private String towerName;
|
||||||
/**百度经度*/
|
/**百度经度*/
|
||||||
|
|
@ -176,5 +178,41 @@ public class DigitalSignageVo {
|
||||||
private Date time7;
|
private Date time7;
|
||||||
/**是否存在跨越 1.存在 0.不存在*/
|
/**是否存在跨越 1.存在 0.不存在*/
|
||||||
private int existSpan;
|
private int existSpan;
|
||||||
|
/**杆塔完成进度 1.基础开挖 2.基础开挖完成 3.基础浇筑完成 4.铁塔组立 5.铁塔组立完成 6.架线施工完成 7.附件安装完成*/
|
||||||
|
private int towerProgress;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class SpanInfoVo{
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String spanTowerName;
|
||||||
|
|
||||||
|
private TowerInfoVo towerInfoVo;
|
||||||
|
|
||||||
|
private String lonAndLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上层线路
|
||||||
|
*/
|
||||||
|
private String upperLine;
|
||||||
|
/**
|
||||||
|
* 下层线路
|
||||||
|
*/
|
||||||
|
private String lowerLine;
|
||||||
|
/**
|
||||||
|
* 交叉角度
|
||||||
|
*/
|
||||||
|
private String intersectionAngle;
|
||||||
|
/**
|
||||||
|
* 垂直距离(m)
|
||||||
|
*/
|
||||||
|
private String verticalDistance;
|
||||||
|
/**
|
||||||
|
* 安全裕度(°)
|
||||||
|
*/
|
||||||
|
private String safetyMargin;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,5 +20,9 @@ public class ProTreeVo {
|
||||||
|
|
||||||
private String parentId;
|
private String parentId;
|
||||||
|
|
||||||
|
private String lon;
|
||||||
|
|
||||||
|
private String lat;
|
||||||
|
|
||||||
private List<ProTreeVo> children;
|
private List<ProTreeVo> children;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,10 +96,17 @@ public class DigitalSignageServiceImpl implements DigitalSignageService {
|
||||||
try {
|
try {
|
||||||
// 查询索道运输信息
|
// 查询索道运输信息
|
||||||
List<DigitalSignageVo.CablewaTransVo> cablewaTransVos = Optional.ofNullable(dao.getCablewaTrans(dto)).orElseGet(ArrayList::new);
|
List<DigitalSignageVo.CablewaTransVo> cablewaTransVos = Optional.ofNullable(dao.getCablewaTrans(dto)).orElseGet(ArrayList::new);
|
||||||
// 查询交叉跨越信息
|
|
||||||
// 查询杆塔数据
|
// 查询杆塔数据
|
||||||
List<DigitalSignageVo.TowerInfoVo> towerInfoVos = Optional.ofNullable(dao.getTowersInfo(dto)).orElseGet(ArrayList::new);
|
List<DigitalSignageVo.TowerInfoVo> towerInfoVos = Optional.ofNullable(dao.getTowersInfo(dto)).orElseGet(ArrayList::new);
|
||||||
|
// 查询交叉跨越信息
|
||||||
|
List<DigitalSignageVo.SpanInfoVo> spanInfoVo = Optional.ofNullable(dao.getSpanInfoVos(dto)).orElseGet(ArrayList::new);
|
||||||
|
for (DigitalSignageVo.SpanInfoVo vo : spanInfoVo) {
|
||||||
|
Optional<DigitalSignageVo.TowerInfoVo> first = towerInfoVos.stream().filter(towerInfoVo -> towerInfoVo.getId().equals(vo.getId())).findFirst();
|
||||||
|
vo.setTowerInfoVo(first.get());
|
||||||
|
}
|
||||||
map.put("cablewaTransVos", cablewaTransVos);
|
map.put("cablewaTransVos", cablewaTransVos);
|
||||||
|
map.put("towerInfoVos", towerInfoVos);
|
||||||
|
map.put("spanInfoVos", spanInfoVo);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.toString(),e);
|
log.error(e.toString(),e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,15 @@
|
||||||
SELECT DISTINCT A.* FROM (
|
SELECT DISTINCT A.* FROM (
|
||||||
SELECT '0' AS id,
|
SELECT '0' AS id,
|
||||||
'全部工程' AS title,
|
'全部工程' AS title,
|
||||||
null AS parentId
|
null AS parentId,
|
||||||
|
null AS lon,
|
||||||
|
null AS lat
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT CONCAT('departId-',td.id) AS id,
|
SELECT CONCAT('departId-',td.id) AS id,
|
||||||
td2.depart_name AS title,
|
td2.depart_name AS title,
|
||||||
'0' AS parentId
|
'0' AS parentId,
|
||||||
|
null AS lon,
|
||||||
|
null AS lat
|
||||||
FROM tb_project tp
|
FROM tb_project tp
|
||||||
LEFT JOIN tb_depart td ON tp.depart_id = td.id
|
LEFT JOIN tb_depart td ON tp.depart_id = td.id
|
||||||
LEFT JOIN tb_depart td2 ON td.parent_id = td2.id
|
LEFT JOIN tb_depart td2 ON td.parent_id = td2.id
|
||||||
|
|
@ -28,7 +32,9 @@
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT tp.id,
|
SELECT tp.id,
|
||||||
tp.pro_name AS title,
|
tp.pro_name AS title,
|
||||||
CONCAT('departId-',depart_id) AS parentId
|
CONCAT('departId-',depart_id) AS parentId,
|
||||||
|
tp.lon AS lon,
|
||||||
|
tp.lat AS lat
|
||||||
FROM tb_project tp
|
FROM tb_project tp
|
||||||
<where>
|
<where>
|
||||||
<if test="level != '1' and departs != null and departs.size() > 0">
|
<if test="level != '1' and departs != null and departs.size() > 0">
|
||||||
|
|
@ -99,14 +105,63 @@
|
||||||
<!--查询杆塔数据-->
|
<!--查询杆塔数据-->
|
||||||
<select id="getTowersInfo"
|
<select id="getTowersInfo"
|
||||||
resultType="com.bonus.digitalSignage.backstage.entity.vo.DigitalSignageVo$TowerInfoVo">
|
resultType="com.bonus.digitalSignage.backstage.entity.vo.DigitalSignageVo$TowerInfoVo">
|
||||||
SELECT tt.tower_name AS towerName,
|
SELECT tt.id,
|
||||||
|
tt.tower_name AS towerName,
|
||||||
tt.baidu_lon AS baiduLon,
|
tt.baidu_lon AS baiduLon,
|
||||||
tt.baidu_lat AS baiduLat
|
tt.baidu_lat AS baiduLat,
|
||||||
|
A.time1,
|
||||||
|
A.time2,
|
||||||
|
A.time3,
|
||||||
|
A.time4,
|
||||||
|
A.time5,
|
||||||
|
A.time6,
|
||||||
|
A.time7,
|
||||||
|
IF(B.tower_id IS NOT NULL OR B.tower_id IS NOT NULL, 1, 0) AS existSpan,
|
||||||
|
tt.tower_progress AS towerProgress
|
||||||
FROM tb_tower tt
|
FROM tb_tower tt
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT ttp.tower_id
|
SELECT tower_id,next_tower_id
|
||||||
FROM tb_tower_progress ttp
|
FROM tb_three_span tts
|
||||||
|
WHERE tts.span_type = '1'
|
||||||
|
GROUP BY tower_id,next_tower_id
|
||||||
|
) B ON (tt.id = B.tower_id) OR (tt.id = B.next_tower_id)
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
ttp.tower_id,
|
||||||
|
MAX(CASE WHEN progress_type = 1 THEN create_time END) AS time1,
|
||||||
|
MAX(CASE WHEN progress_type = 2 THEN create_time END) AS time2,
|
||||||
|
MAX(CASE WHEN progress_type = 3 THEN create_time END) AS time3,
|
||||||
|
MAX(CASE WHEN progress_type = 4 THEN create_time END) AS time4,
|
||||||
|
MAX(CASE WHEN progress_type = 5 THEN create_time END) AS time5,
|
||||||
|
MAX(CASE WHEN progress_type = 6 THEN create_time END) AS time6,
|
||||||
|
MAX(CASE WHEN progress_type = 7 THEN create_time END) AS time7
|
||||||
|
FROM
|
||||||
|
tb_tower_progress ttp
|
||||||
|
GROUP BY
|
||||||
|
ttp.tower_id
|
||||||
) A ON tt.id = A.tower_id
|
) A ON tt.id = A.tower_id
|
||||||
WHERE tt.pro_id = #{id}
|
WHERE tt.pro_id = #{id}
|
||||||
|
ORDER BY tt.sort
|
||||||
|
</select>
|
||||||
|
<!--查询交叉跨越信息-->
|
||||||
|
<select id="getSpanInfoVos"
|
||||||
|
resultType="com.bonus.digitalSignage.backstage.entity.vo.DigitalSignageVo$SpanInfoVo">
|
||||||
|
SELECT CONCAT(tt.tower_name,'-',tt2.tower_name) AS spanTowerName,
|
||||||
|
tts.upper_line AS upperLine,
|
||||||
|
tts.lower_line AS lowerLine,
|
||||||
|
tts.intersection_angle AS intersectionAngle,
|
||||||
|
tts.vertical_distance AS verticalDistance,
|
||||||
|
tts.safety_margin AS safetyMargin,
|
||||||
|
A.lonAndLat AS lonAndLat,
|
||||||
|
tts.tower_id AS id
|
||||||
|
FROM tb_three_span tts
|
||||||
|
LEFT JOIN tb_tower tt ON tts.tower_id = tt.id
|
||||||
|
LEFT JOIN tb_tower tt2 ON tts.next_tower_id = tt2.id
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT three_span_id,GROUP_CONCAT(baidu_lon,'@',baidu_lat) AS lonAndLat
|
||||||
|
FROM tb_span_tower
|
||||||
|
GROUP BY three_span_id
|
||||||
|
) A ON tts.id = A.three_span_id
|
||||||
|
WHERE tts.pro_id = #{id} AND tts.span_type = '1'
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,9 @@
|
||||||
WHERE sd2.dict_code = 'pro_status' AND sd.del_flag = 0
|
WHERE sd2.dict_code = 'pro_status' AND sd.del_flag = 0
|
||||||
) B ON B.dict_value = tp.voltage_level
|
) B ON B.dict_value = tp.voltage_level
|
||||||
where tp.is_active = '1'
|
where tp.is_active = '1'
|
||||||
|
<if test="departName != '' and departName != null">and td.depart_name = #{departName}</if>
|
||||||
|
<if test="proName != '' and proName != null"> and tp.pro_name = #{proName}</if>
|
||||||
|
<if test="proStatus != '' and proStatus != null"> and tp.pro_status = #{proStatus}</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="getTbProjectById" resultType="com.bonus.digitalSignage.basic.vo.TbProjectVo">
|
<select id="getTbProjectById" resultType="com.bonus.digitalSignage.basic.vo.TbProjectVo">
|
||||||
select tp.id as id,tp.pro_name as proName,tp.voltage_level as voltageLevel,tp.line_length as lineLength,
|
select tp.id as id,tp.pro_name as proName,tp.voltage_level as voltageLevel,tp.line_length as lineLength,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue