Commit 6d87e6c7 by liuyang

调整设备驾驶舱显示设备逻辑

parent 1d9778cd
......@@ -183,7 +183,7 @@
<isNotEmpty prepend=" AND " property="factoryCode">
B.FACTORY_CODE = #factoryCode#
</isNotEmpty>
INNER join (
left join (
select EQUIPMENT_CODE, LOG_VALUE
from ${hggpSchema}.HGSB010 where EQUIPMENT_TYPE = 'STARUS_TYPE'
and CREATED_TIME =(
......@@ -200,7 +200,7 @@
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
) c on a.DEVICE_CODE = c.EQUIPMENT_CODE
where a.DELETE_FLAG = 0 and a.DEVICE_STATUS = 1
where a.DELETE_FLAG = 0 and a.DEVICE_STATUS = 1 and a.REVEAL = 1
<isNotEmpty prepend=" AND " property="accountCode">
a.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
......@@ -230,7 +230,7 @@
<isNotEmpty prepend=" AND " property="factoryCode">
B.FACTORY_CODE = #factoryCode#
</isNotEmpty>
join (
left join (
select
EQUIPMENT_CODE, count(1) as NUM
from ${hggpSchema}.HGSB010
......@@ -247,7 +247,7 @@
group by EQUIPMENT_CODE
) 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 REVEAL = 1
<isNotEmpty prepend=" AND " property="accountCode">
a.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
......@@ -268,7 +268,7 @@
<isNotEmpty prepend=" AND " property="factoryCode">
B.FACTORY_CODE = #factoryCode#
</isNotEmpty>
join (
left join (
select
EQUIPMENT_CODE, count(1) as NUM
from ${hggpSchema}.HGSB010
......@@ -284,7 +284,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 REVEAL = 1
<isNotEmpty prepend=" AND " property="accountCode">
a.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
......@@ -305,7 +305,7 @@
<isNotEmpty prepend=" AND " property="factoryCode">
B.FACTORY_CODE = #factoryCode#
</isNotEmpty>
join (
left join (
select
EQUIPMENT_CODE, count(1) as NUM
from ${hggpSchema}.HGSB010
......@@ -322,7 +322,7 @@
group by EQUIPMENT_CODE
) 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 REVEAL = 1
<isNotEmpty prepend=" AND " property="accountCode">
a.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
......@@ -343,7 +343,7 @@
<isNotEmpty prepend=" AND " property="factoryCode">
B.FACTORY_CODE = #factoryCode#
</isNotEmpty>
join (
left join (
select
EQUIPMENT_CODE, count(1) as NUM
from ${hggpSchema}.HGSB010
......@@ -359,7 +359,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 REVEAL = 1
<isNotEmpty prepend=" AND " property="accountCode">
a.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
......@@ -380,7 +380,7 @@
<isNotEmpty prepend=" AND " property="factoryCode">
B.FACTORY_CODE = #factoryCode#
</isNotEmpty>
join (
left join (
select
EQUIPMENT_CODE, count(1) as NUM
from ${hggpSchema}.HGSB010
......@@ -396,7 +396,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 REVEAL = 1
<isNotEmpty prepend=" AND " property="accountCode">
a.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
......@@ -417,7 +417,7 @@
<isNotEmpty prepend=" AND " property="factoryCode">
B.FACTORY_CODE = #factoryCode#
</isNotEmpty>
join (
left join (
select
EQUIPMENT_CODE, count(1) as NUM
from ${hggpSchema}.HGSB010
......@@ -433,7 +433,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 REVEAL = 1
<isNotEmpty prepend=" AND " property="accountCode">
a.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
......@@ -454,7 +454,7 @@
<isNotEmpty prepend=" AND " property="factoryCode">
B.FACTORY_CODE = #factoryCode#
</isNotEmpty>
join (
left join (
select
EQUIPMENT_CODE, count(1) as NUM
from ${hggpSchema}.HGSB010
......@@ -470,7 +470,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 REVEAL = 1
<isNotEmpty prepend=" AND " property="accountCode">
a.ACCOUNT_CODE = #accountCode#
</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