|
|
|
@ -665,15 +665,15 @@
|
|
|
|
|
WHERE SC.SITE = #{site} AND SC.SFC = #{sfc}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="pageByResrce" resultMap="FullResultMap">
|
|
|
|
|
SELECT PREZSD.EMPLOYEE_DESCRIPTION,CASE WHEN TO_NUMBER(zsd.DISPATCH_SEQ)=1 THEN NULL
|
|
|
|
|
WHEN SS.STEP_SEQUENCE>TO_NUMBER(zsd.DISPATCH_SEQ)-1 THEN '完成'
|
|
|
|
|
ELSE '未完成' END LAST_OPERATION_STATUS,
|
|
|
|
|
<select id="pageByResrce" resultType="com.foreverwin.mesnac.meapi.dto.SfcDto">
|
|
|
|
|
SELECT PREZSD.EMPLOYEE_DESCRIPTION,
|
|
|
|
|
CASE WHEN SS.STEP_SEQUENCE>TO_NUMBER(zsd.DISPATCH_SEQ)-1 THEN '完成'
|
|
|
|
|
ELSE '未完成' END LAST_OPERATION_STATUS,SS.STEP_ID CURRENT_STEP_ID,zsd.STEP_ID,
|
|
|
|
|
S.SFC,S.QTY,IT.DESCRIPTION ITEM_DESCRIPTION,S.ITEM_BO,S.SHOP_ORDER_BO
|
|
|
|
|
FROM SFC S
|
|
|
|
|
LEFT JOIN ITEM_T IT ON S.ITEM_BO=IT.ITEM_BO AND IT.LOCALE=#{locale}
|
|
|
|
|
JOIN Z_SFC_DISPATCH zsd ON S.SFC=zsd.SFC AND S.SITE=zsd.SITE
|
|
|
|
|
LEFT JOIN Z_SFC_DISPATCH PREZSD ON zsd.SFC=PREZSD.SFC AND PREZSD.DISPATCH_SEQ=TO_NUMBER(zsd.DISPATCH_SEQ)-1
|
|
|
|
|
LEFT JOIN Z_SFC_DISPATCH PREZSD ON zsd.SFC=PREZSD.SFC AND PREZSD.DISPATCH_SEQ=TO_NUMBER(zsd.DISPATCH_SEQ)-1 AND zsd.ROUTER_BO=PREZSD.ROUTER_BO
|
|
|
|
|
JOIN Z_PROD_READY_TASK zprt ON ZPRT.SFC_DISPATCH_BO=zsd.HANDLE
|
|
|
|
|
JOIN SFC S ON S.SFC=ZSD.SFC AND S.SITE=ZSD.SITE
|
|
|
|
|
JOIN SFC_ROUTING SR ON SR.SFC_BO=S.HANDLE
|
|
|
|
|