Commit f82fb03e by liuyang

修复设备驾驶舱状态逻辑

parent 8a208d1e
......@@ -386,7 +386,7 @@ public class ServiceHPBI003 extends ServiceBase {
if (params.containsKey("date")){
params.put("date", DateUtils.formatShort(params.get("date")));
}
params.put("logValues", Arrays.asList("1", "2", "4"));
params.put("logValues", Arrays.asList("1", "2", '3',"4"));
List<Map> result = new ArrayList<>();
List<Map> listMap = DaoBase.getInstance().query("HPBI003.queryBySbYes", params, 0,100);
List listMap2 = listMap.stream().map(map -> map.get("date")).sorted().distinct().collect(Collectors.toList());
......@@ -419,7 +419,7 @@ public class ServiceHPBI003 extends ServiceBase {
if (params.containsKey("date")){
params.put("date", DateUtils.formatShort(params.get("date")));
}
params.put("logValues", Arrays.asList("3", "5", "6"));
params.put("logValues", Arrays.asList("5", "6"));
List<Map> result = new ArrayList<>();
List<Map> listMap = DaoBase.getInstance().query("HPBI003.queryBySbYes", params, 0,100);
List listMap2 = listMap.stream().map(map -> map.get("date")).sorted().distinct().collect(Collectors.toList());
......
......@@ -36,25 +36,24 @@
a.DEVICE_MODEL as "deviceModel",
ifnull(c.LOG_VALUE, 0) as "status"
from ${hpjxSchema}.t_hpsb003 a
join (
left join (
select EQUIPMENT_CODE, LOG_VALUE
from ${hpjxSchema}.t_hpsb002 where EQUIPMENT_TYPE = 'STARUS_TYPE'
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="date">
CREATED_TIME =(
and CREATED_TIME =(
select MAX(CREATED_TIME) from ${hpjxSchema}.t_hpsb002
where EQUIPMENT_TYPE = 'STARUS_TYPE'
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
)
)
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
) c on a.DEVICE_CODE = c.EQUIPMENT_CODE
where
a.DELETE_FLAG = 0
and DEVICE_STATUS = 1
a.DELETE_FLAG = 0
and DEVICE_STATUS = 1
and a.REVEAL = 1
<isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode#
</isNotEmpty>
......@@ -772,7 +771,7 @@
</isNotEmpty>
group by EQUIPMENT_CODE
) c on a.DEVICE_CODE = c.EQUIPMENT_CODE
where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1
where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1 and a.REVEAL = 1
<isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode#
</isNotEmpty>
......@@ -806,7 +805,7 @@
</isNotEmpty>
group by EQUIPMENT_CODE
) c on a.DEVICE_CODE = c.EQUIPMENT_CODE
where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1
where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1 and a.REVEAL = 1
<isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode#
</isNotEmpty>
......@@ -840,7 +839,7 @@
</isNotEmpty>
group by EQUIPMENT_CODE
) c on a.DEVICE_CODE = c.EQUIPMENT_CODE
where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1
where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1 and a.REVEAL = 1
<isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode#
</isNotEmpty>
......@@ -874,7 +873,7 @@
</isNotEmpty>
group by EQUIPMENT_CODE
) c on a.DEVICE_CODE = c.EQUIPMENT_CODE
where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1
where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1 and a.REVEAL = 1
<isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode#
</isNotEmpty>
......@@ -908,7 +907,7 @@
</isNotEmpty>
group by EQUIPMENT_CODE
) c on a.DEVICE_CODE = c.EQUIPMENT_CODE
where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1
where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1 and a.REVEAL = 1
<isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode#
</isNotEmpty>
......@@ -942,7 +941,7 @@
</isNotEmpty>
group by EQUIPMENT_CODE
) c on a.DEVICE_CODE = c.EQUIPMENT_CODE
where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1
where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1 and a.REVEAL = 1
<isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode#
</isNotEmpty>
......@@ -978,7 +977,7 @@
) c on a.DEVICE_CODE = c.EQUIPMENT_CODE
where
a.DELETE_FLAG = 0
and DEVICE_STATUS = 1
and DEVICE_STATUS = 1 and a.REVEAL = 1
<isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode#
</isNotEmpty>
......
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