|
|
|
@ -801,46 +801,4 @@
|
|
|
|
|
<if test="dto.handle!=null"> AND HANDLE=#{dto.handle}</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- 零件加工进度表-->
|
|
|
|
|
<select id="partsManufacturing" resultType="Map">
|
|
|
|
|
SELECT CF.VALUE ITEM_NUMBER,ZSD.SHOP_ORDER SHOP_ORDER,I.ITEM ITEM,IT.DESCRIPTION ITEM_DESCRIPTION,SO.QTY_TO_BUILD SHOP_ORDER_QTY , ZSD.OPERATION ,OT.DESCRIPTION OPERATION_DESCRIPTION,
|
|
|
|
|
ZNU.FULL_NAME OPERATION_USER,ZSD.SFC SFC,ZSD.DISPATCH_STATUS ,
|
|
|
|
|
ZSD.EARLIEST_START_DATE EARLIEST_START_DATE,ZSD.LATEST_END_DATE LATEST_END_DATE,
|
|
|
|
|
ZSD.ACTUAL_START_DATE ACTUAL_START_DATE,ZSD.ACTUAL_COMPLETE_DATE ACTUAL_COMPLETE_DATE
|
|
|
|
|
FROM SFC S
|
|
|
|
|
INNER JOIN SHOP_ORDER SO ON SO.HANDLE = S.SHOP_ORDER_BO
|
|
|
|
|
INNER JOIN ITEM I ON I.HANDLE = SO.ITEM_BO
|
|
|
|
|
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = I.HANDLE AND IT.LOCALE = #{locale}
|
|
|
|
|
INNER JOIN Z_SFC_DISPATCH ZSD ON S.SFC = ZSD.SFC AND S.SITE = ZSD.SITE
|
|
|
|
|
AND ZSD.DISPATCH_SEQ = (
|
|
|
|
|
SELECT MAX(ZSD2.DISPATCH_SEQ) FROM Z_SFC_DISPATCH ZSD2 WHERE S.SFC = ZSD2.SFC AND S.SITE = ZSD2.SITE
|
|
|
|
|
)
|
|
|
|
|
INNER JOIN OPERATION O ON O.OPERATION = ZSD.OPERATION AND O.SITE = S.SITE AND O.CURRENT_REVISION = 'true'
|
|
|
|
|
INNER JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE AND OT.LOCALE = #{locale}
|
|
|
|
|
INNER JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = ZSD.EMPLOYEE
|
|
|
|
|
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = S.SHOP_ORDER_BO AND CF."ATTRIBUTE" = 'ITEM_NUMBER'
|
|
|
|
|
<where>
|
|
|
|
|
S.SITE = #{site}
|
|
|
|
|
<if test="partsManufacturing != null">
|
|
|
|
|
<if test="partsManufacturing.itemNumber != null and partsManufacturing.itemNumber != ''">
|
|
|
|
|
AND CF.VALUE LIKE '%${partsManufacturing.itemNumber}%'
|
|
|
|
|
</if>
|
|
|
|
|
<if test="partsManufacturing.shopOrder != null and partsManufacturing.shopOrder != ''">
|
|
|
|
|
AND ZSD.SHOP_ORDER LIKE '%${partsManufacturing.shopOrder}%'
|
|
|
|
|
</if>
|
|
|
|
|
<if test="partsManufacturing.item != null and partsManufacturing.item != ''">
|
|
|
|
|
AND I.ITEM LIKE '%${partsManufacturing.item}%'
|
|
|
|
|
</if>
|
|
|
|
|
<if test="partsManufacturing.itemDescription != null and partsManufacturing.itemDescription != ''">
|
|
|
|
|
AND IT.DESCRIPTION LIKE '%${partsManufacturing.itemDescription}%'
|
|
|
|
|
</if>
|
|
|
|
|
<if test="partsManufacturing.startDateTime != null">
|
|
|
|
|
AND ZSD.ACTUAL_START_DATE >= #{partsManufacturing.startDateTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="partsManufacturing.endDateTime != null">
|
|
|
|
|
AND ZSD.ACTUAL_COMPLETE_DATE <= #{partsManufacturing.endDateTime}
|
|
|
|
|
</if>
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|