Commit 7bdcc9b5 by liuyang

动态查询工序

parent 4c4b4713
......@@ -1268,12 +1268,14 @@
<!--工序累计产量-->
<select id="queryBySunWt" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select
A.SORT as "sort",
A.process_name as "processName",
ROUND(ifnull(SUM(B.INV_WEIGHT),0)/1000, 4) "totalWeight"
from ${hggpSchema}.HGGY001 A
join ${platSchema}.TXSOG01 C on A.FACTORY_CODE = C.COMPANY_CODE
left join (
select
h.COMPANY_CODE,
h2.process_code ,
ROUND(ifnull(SUM(h.INV_WEIGHT), 0)/ 1000, 4) "INV_WEIGHT"
from ${hggpSchema}.hgkc003 h
......@@ -1285,8 +1287,8 @@
<isNotEmpty prepend=" AND " property="depositDate">
left(h.DEPOSIT_DATE,6) = left(#depositDate#,6)
</isNotEmpty>
group by h2.process_code
) B on A.process_code = B.process_code
group by h.COMPANY_CODE, h2.process_code
) B on A.FACTORY_CODE = B.COMPANY_CODE AND A.process_code = B.process_code
where 1=1 and DELETE_FLAG = '0' and reveal = 1
<isNotEmpty prepend=" AND " property="accountCode">
A.account_code = #accountCode#
......@@ -1294,11 +1296,15 @@
<isNotEmpty prepend=" AND " property="processNames">
A.process_name IN <iterate close=")" open="(" conjunction="," property="processNames">#processNames[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
C.factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
C.factory_name = #factoryName#
</isNotEmpty>
group by
a.sort, A.process_name
A.SORT, A.process_name
order by A.SORT
</select>
<!--日期到条件7天日产量-->
<select id="queryByDayWt" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
......
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