Commit 6d87e6c7 by liuyang

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

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