Commit 2c0e7d04 by liuyang

2024-07-19 qpp项目产量bug

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