Commit 3dfa19e5 authored by duanruiming's avatar duanruiming

[update] 状态检测-所有查询路口都是信控路口

parent 8c88dd31
......@@ -164,7 +164,7 @@ public class SituationDetectionController extends BaseController {
List<CrossDeviceStatusInfoOutVO> list = situationDetectionService.crossDeviceStatusInfo();
for (CrossDeviceStatusInfoOutVO item : list) {
int status = item.getStatus();
item.setStatus(status + 1);
item.setStatus(status);
}
JsonViewObject jsonViewObject = JsonViewObject.newInstance();
return jsonViewObject.success(list);
......
......@@ -27,19 +27,21 @@
</resultMap>
<select id="selectByEntity" parameterType="net.wanji.web.entity.TDeviceStatusInfo" resultMap="TDeviceStatusInfoMap">
select id, code, name, type, status, fault_type, gmt_create from t_device_status
select d.id, d.code, d.name, d.type, d.status, d.fault_type, d.gmt_create from t_device_status d
left join t_base_cross_info c on d.code = c.id
<where>
c.is_signal = 1
<if test="entity.code != null and entity.code != ''">
code = #{entity.code}
and d.code = #{entity.code}
</if>
<if test="entity.faultType != null and entity.faultType != ''">
fault_type = #{entity.faultType}
and d.fault_type = #{entity.faultType}
</if>
<if test="entity.status != null and entity.status != ''">
status = #{entity.status}
and d.status = #{entity.status}
</if>
<if test="entity.type != null and entity.type != ''">
type = #{entity.type}
and d.type = #{entity.type}
</if>
</where>
</select>
......
......@@ -20,7 +20,7 @@ public class CrossDeviceStatusInfoOutVO {
@ApiModelProperty(value = "经纬度")
private String location;
@ApiModelProperty(value = "设备状态:1在线;2离线;3故障")
@ApiModelProperty(value = "设备状态:0离线 1在线 2故障")
private int status;
@ApiModelProperty(value = "故障状态:0正常")
......
......@@ -245,7 +245,7 @@
select c.id, c.name, c.location, d.status, d.fault_type
from t_base_cross_info c
left join t_device_status d on c.id = d.code
where d.type = 1
where d.type = 1 and c.is_signal = 1
</select>
<select id="selectByCrossIds" resultType="net.wanji.databus.po.CrossInfoPO">
......
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