Commit 2c0e7d04 by liuyang

2024-07-19 qpp项目产量bug

parent ce7c9135
......@@ -650,6 +650,7 @@
select
h.proj_code,
h.proj_name,
h.product_code,
h.finish_date,
h.total_weight,
0 as finish_weight,
......@@ -674,6 +675,7 @@
select
h.proj_code,
h.proj_name,
h.product_code,
h.finish_date,
0 as totalWeight,
h.finish_weight,
......@@ -695,14 +697,26 @@
left(h1.updated_time,8) = #updatedTime#
</isNotEmpty>
)a
inner join ${hggpSchema}.HGSC007 h2 on a.proj_code = h2.proj_code
where 1=1
<isNotEmpty prepend=" AND " property="factoryCode">
h2.factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
h2.factory_name = #factoryName#
</isNotEmpty>
inner join (
select proj_code, product_code from ${hggpSchema}.HGSC007
where (product_code,process_order) in (select INVENT_CODE,max(process_order) from hggp.hgpz005a group by INVENT_CODE)
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
factory_name = #factoryName#
</isNotEmpty>
) h2 on a.proj_code = h2.proj_code and a.product_code = h2.product_code
group by a.proj_code, a.proj_name, a.finish_date, a.updated_time
order by a.updated_time desc
</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