Commit 9aa89f6e authored by hanbing's avatar hanbing

[update] 修改路口管理全部路口返回逻辑

parent 452a821a
...@@ -290,8 +290,13 @@ public class CrossManageServiceImpl implements CrossManageService { ...@@ -290,8 +290,13 @@ public class CrossManageServiceImpl implements CrossManageService {
Integer isSend = areaDetailBO.getIsSend(); Integer isSend = areaDetailBO.getIsSend();
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
List<AreaDetailPOExt> areaDetailPOExtList = baseAreaInfoMapper.selectJoinDetail( List<AreaDetailPOExt> areaDetailPOExtList = new ArrayList<>();
areaId, crossName, isSignal, isStart, isSend); // 如果不传areaId或ID为0,则返回全部路口
if (areaId == null || areaId == 0) {
areaDetailPOExtList = baseAreaInfoMapper.selectAllJoinDetail(crossName, isSignal, isStart, isSend);
} else {
areaDetailPOExtList = baseAreaInfoMapper.selectJoinDetail(areaId, crossName, isSignal, isStart, isSend);
}
PageInfo<AreaDetailPOExt> extPageInfo = new PageInfo<>(areaDetailPOExtList); PageInfo<AreaDetailPOExt> extPageInfo = new PageInfo<>(areaDetailPOExtList);
PageInfo<AreaDetailVO> voPageInfo = new PageInfo<>(); PageInfo<AreaDetailVO> voPageInfo = new PageInfo<>();
......
spring:
application:
# dubbo启动需要程序名称
name: signal-optimize-service
cloud:
nacos:
config:
server-addr: 10.102.1.182:8848
file-extension: yaml
group: signal
namespace: signal
username: nacos
password: nacos
main:
allow-circular-references: true
\ No newline at end of file
...@@ -37,4 +37,6 @@ public interface BaseAreaInfoMapper { ...@@ -37,4 +37,6 @@ public interface BaseAreaInfoMapper {
Integer isSend); Integer isSend);
List<BaseAreaInfoPO> selectAllArea(Integer type); List<BaseAreaInfoPO> selectAllArea(Integer type);
List<AreaDetailPOExt> selectAllJoinDetail(String crossName, Integer isSignal, Integer isStart, Integer isSend);
} }
...@@ -107,4 +107,28 @@ ...@@ -107,4 +107,28 @@
where type = #{type} where type = #{type}
</select> </select>
<select id="selectAllJoinDetail" resultType="net.wanji.databus.po.AreaDetailPOExt">
SELECT t_area.id AS areaId, t_cross.id AS crossId, t_cross.name as crossName,
t_area.name AS areaName, t_cross.is_signal AS isSignal, t_cross.is_start AS isStart,
t_cross.is_send AS isSend
FROM t_base_cross_info t_cross
LEFT JOIN t_base_area_cross t_area_cross ON t_cross.id = t_area_cross.cross_id
LEFT JOIN t_base_area_info t_area ON t_area_cross.area_id = t_area.id
<where>
<if test="crossName != null and crossName != ''">
AND t_cross.name like concat('%',#{crossName},'%')
</if>
<if test="isSignal != null">
AND t_cross.is_signal = #{isSignal}
</if>
<if test="isStart != null">
AND t_cross.is_start = #{isStart}
</if>
<if test="isSend != null">
AND t_cross.is_send = #{isSend}
</if>
</where>
ORDER BY t_cross.id
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment