ROUND(ifnull(sum(a.total_weight),0)/1000, 4) as totalWeight,
ROUND(ifnull(sum(a.total_weight),0)/1000, 4) as totalWeight,
ROUND(ifnull(sum(a.finish_weight),0)/1000, 4) as finishWeight,
ROUND(ifnull(sum(a.finish_weight),0)/1000, 4) as finishWeight,
a.updated_time as updatedTime
a.updated_time as updatedTime
from (
from (
select
select
...
@@ -656,8 +656,7 @@
...
@@ -656,8 +656,7 @@
left(h1.updated_time,8) as updated_time
left(h1.updated_time,8) as updated_time
from ${hggpSchema}.HGSC005a h
from ${hggpSchema}.HGSC005a h
inner join ${hggpSchema}.HGSC005 h1 on h.company_code = h1.company_code and h.plan_code = h1.plan_code
inner join ${hggpSchema}.HGSC005 h1 on h.company_code = h1.company_code and h.plan_code = h1.plan_code
inner join ${hggpSchema}.HGSC007 h2 on h.company_code = h2.company_code AND h.proj_code = h2.proj_code
where 1 = 1 and h1.commit_status = 2 and (h.product_code,h.process_order) in (select INVENT_CODE,max(process_order) from hggp.hgpz005a group by INVENT_CODE)
where 1 = 1 and h1.commit_status = 2
<includerefid="appCondition"/>
<includerefid="appCondition"/>
<isNotEmptyprepend=" AND "property="accountCode">
<isNotEmptyprepend=" AND "property="accountCode">
h.account_code = #accountCode#
h.account_code = #accountCode#
...
@@ -668,12 +667,6 @@
...
@@ -668,12 +667,6 @@
<isNotEmptyprepend=" AND "property="companyName">
<isNotEmptyprepend=" AND "property="companyName">
h.company_name = #companyName#
h.company_name = #companyName#
</isNotEmpty>
</isNotEmpty>
<isNotEmptyprepend=" AND "property="factoryCode">
h2.factory_code = #factoryCode#
</isNotEmpty>
<isNotEmptyprepend=" AND "property="factoryName">
h2.factory_name = #factoryName#
</isNotEmpty>
<isNotEmptyprepend=" AND "property="updatedTime">
<isNotEmptyprepend=" AND "property="updatedTime">
left(h1.updated_time,8) = #updatedTime#
left(h1.updated_time,8) = #updatedTime#
</isNotEmpty>
</isNotEmpty>
...
@@ -687,8 +680,7 @@
...
@@ -687,8 +680,7 @@
left(h1.updated_time,8) as updated_time
left(h1.updated_time,8) as updated_time
from ${hggpSchema}.HGSC005a h
from ${hggpSchema}.HGSC005a h
inner join ${hggpSchema}.HGSC005 h1 on h.plan_code = h1.plan_code
inner join ${hggpSchema}.HGSC005 h1 on h.plan_code = h1.plan_code
inner join ${hggpSchema}.HGSC007 h2 on h.company_code = h2.company_code AND h.proj_code = h2.proj_code
where 1 = 1 and h1.commit_status = 2 and (h.product_code,h.process_order) in (select INVENT_CODE,max(process_order) from hggp.hgpz005a group by INVENT_CODE)
where 1 = 1 and h1.commit_status = 2
<includerefid="appCondition"/>
<includerefid="appCondition"/>
<isNotEmptyprepend=" AND "property="accountCode">
<isNotEmptyprepend=" AND "property="accountCode">
h.account_code = #accountCode#
h.account_code = #accountCode#
...
@@ -699,16 +691,18 @@
...
@@ -699,16 +691,18 @@
<isNotEmptyprepend=" AND "property="companyName">
<isNotEmptyprepend=" AND "property="companyName">
h.company_name = #companyName#
h.company_name = #companyName#
</isNotEmpty>
</isNotEmpty>
<isNotEmptyprepend=" AND "property="factoryCode">
h2.factory_code = #factoryCode#
</isNotEmpty>
<isNotEmptyprepend=" AND "property="factoryName">
h2.factory_name = #factoryName#
</isNotEmpty>
<isNotEmptyprepend=" AND "property="updatedTime">
<isNotEmptyprepend=" AND "property="updatedTime">
left(h1.updated_time,8) = #updatedTime#
left(h1.updated_time,8) = #updatedTime#
</isNotEmpty>
</isNotEmpty>
)a
)a
inner join ${hggpSchema}.HGSC007 h2 on a.proj_code = h2.proj_code
where 1=1
<isNotEmptyprepend=" AND "property="factoryCode">
h2.factory_code = #factoryCode#
</isNotEmpty>
<isNotEmptyprepend=" AND "property="factoryName">
h2.factory_name = #factoryName#
</isNotEmpty>
group by a.proj_code, a.proj_name, a.finish_date, a.updated_time
group by a.proj_code, a.proj_name, a.finish_date, a.updated_time