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.total_weight),0)/1000, 4) as totalWeight,
ROUND(ifnull(sum(a.finish_weight),0)/1000, 4) as finishWeight,
a.updated_time as updatedTime
from (
select
...
...
@@ -656,8 +656,7 @@
left(h1.updated_time,8) as updated_time
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}.HGSC007 h2 on h.company_code = h2.company_code AND h.proj_code = h2.proj_code
where 1 = 1 and h1.commit_status = 2
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)
<includerefid="appCondition"/>
<isNotEmptyprepend=" AND "property="accountCode">
h.account_code = #accountCode#
...
...
@@ -668,12 +667,6 @@
<isNotEmptyprepend=" AND "property="companyName">
h.company_name = #companyName#
</isNotEmpty>
<isNotEmptyprepend=" AND "property="factoryCode">
h2.factory_code = #factoryCode#
</isNotEmpty>
<isNotEmptyprepend=" AND "property="factoryName">
h2.factory_name = #factoryName#
</isNotEmpty>
<isNotEmptyprepend=" AND "property="updatedTime">
left(h1.updated_time,8) = #updatedTime#
</isNotEmpty>
...
...
@@ -687,8 +680,7 @@
left(h1.updated_time,8) as updated_time
from ${hggpSchema}.HGSC005a h
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
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)
<includerefid="appCondition"/>
<isNotEmptyprepend=" AND "property="accountCode">
h.account_code = #accountCode#
...
...
@@ -699,16 +691,18 @@
<isNotEmptyprepend=" AND "property="companyName">
h.company_name = #companyName#
</isNotEmpty>
<isNotEmptyprepend=" AND "property="factoryCode">
h2.factory_code = #factoryCode#
</isNotEmpty>
<isNotEmptyprepend=" AND "property="factoryName">
h2.factory_name = #factoryName#
</isNotEmpty>
<isNotEmptyprepend=" AND "property="updatedTime">
left(h1.updated_time,8) = #updatedTime#
</isNotEmpty>
)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