Commit 7c8a7fd3 by lyy

设备驾驶舱数据修复

parent 78e5deee
...@@ -34,13 +34,27 @@ ...@@ -34,13 +34,27 @@
a.DEVICE_CODE as "deviceCode", a.DEVICE_CODE as "deviceCode",
a.DEVICE_NAME as "deviceName", a.DEVICE_NAME as "deviceName",
a.DEVICE_MODEL as "deviceModel", a.DEVICE_MODEL as "deviceModel",
c.LOG_VALUE as status ifnull(c.LOG_VALUE, 0) as "status"
from ${hpjxSchema}.t_hpsb003 a from ${hpjxSchema}.t_hpsb003 a
join ${hpjxSchema}.t_hpsb002 c on a.DEVICE_CODE = c.EQUIPMENT_CODE 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 =(
select MAX(CREATED_TIME) from ${hpjxSchema}.t_hpsb002
where EQUIPMENT_TYPE = 'STARUS_TYPE' and left(CREATED_TIME,8) = #date#
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
)
</isNotEmpty>
) c on a.DEVICE_CODE = c.EQUIPMENT_CODE
where where
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0
and DEVICE_STATUS = 1 and DEVICE_STATUS = 1
and c.EQUIPMENT_TYPE = 'STARUS_TYPE'
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode# a.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
...@@ -50,13 +64,6 @@ ...@@ -50,13 +64,6 @@
<isNotEmpty prepend=" AND " property="deviceCode"> <isNotEmpty prepend=" AND " property="deviceCode">
a.DEVICE_CODE = #deviceCode# a.DEVICE_CODE = #deviceCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="date">
c.CREATED_TIME =(
select MAX(CREATED_TIME) from hpjx.t_hpsb002
where EQUIPMENT_TYPE = 'STARUS_TYPE' and left(CREATED_TIME,8) = #date#
)
</isNotEmpty>
order by a.DEVICE_CODE order by a.DEVICE_CODE
</select> </select>
......
...@@ -271,18 +271,23 @@ ...@@ -271,18 +271,23 @@
this.setOption2(); this.setOption2();
// var _this = this;
// setTimeout(function() {
// _this.initPage();
// }, 60000);
setTimeout(function() { setTimeout(function() {
this.init(); window.location.reload();
}, 60000); }, 60000);
}, },
methods: { methods: {
init(){ // initPage(){
this.getYesterdayDateFormatted(); // this.getYesterdayDateFormatted();
this.queryCompanyInfo(); // this.queryCompanyInfo();
this.queryBySbStatus(); // this.queryBySbStatus();
this.querySbYes(); // this.querySbYes();
this.querySbNo(); // this.querySbNo();
}, // },
formatTime(currentTime) { formatTime(currentTime) {
const formattedTime = const formattedTime =
currentTime.getFullYear() + currentTime.getFullYear() +
......
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