Commit ba271a44 by liuyang Committed by lyy

2024-10-21

1.新增APP设备管理接口调整
parent 47542f6d
...@@ -180,11 +180,26 @@ ...@@ -180,11 +180,26 @@
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 ${hggpSchema}.HGSB001 a from ${hggpSchema}.HGSB001 a
join ${hggpSchema}.HGSB010 c on a.DEVICE_CODE = c.EQUIPMENT_CODE left join (
where select EQUIPMENT_CODE, LOG_VALUE
a.DELETE_FLAG = 0 and DEVICE_STATUS = 1 and c.EQUIPMENT_TYPE = 'STARUS_TYPE' from ${hggpSchema}.HGSB010 where EQUIPMENT_TYPE = 'STARUS_TYPE'
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="date">
CREATED_TIME =(
select MAX(CREATED_TIME)
from ${hggpSchema}.HGSB010
where EQUIPMENT_TYPE = 'STARUS_TYPE' and left(CREATED_TIME,8) = #date#
)
</isNotEmpty>
) c on a.DEVICE_CODE = c.EQUIPMENT_CODE
where a.DELETE_FLAG = 0 and a.DEVICE_STATUS = 1
<isNotEmpty prepend=" AND " property="accountCode">
a.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode# a.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
...@@ -194,12 +209,6 @@ ...@@ -194,12 +209,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 ${hggpSchema}.HGSB010
where EQUIPMENT_TYPE = 'STARUS_TYPE' and left(CREATED_TIME,8) = #date#
)
</isNotEmpty>
order by a.DEVICE_CODE order by a.DEVICE_CODE
</select> </select>
......
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