diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/dto/SfcDto.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/dto/SfcDto.java index e2bd9138..fb855522 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/dto/SfcDto.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/dto/SfcDto.java @@ -16,6 +16,7 @@ public class SfcDto extends Sfc { private String dispatchNo; private String abnormalNo; private String stepId; + private String currentStepId; private String plannedStartDate; private String plannedCompDate; private String stepSequence; @@ -24,6 +25,14 @@ public class SfcDto extends Sfc { private String employeeDescription; private String lastOperationStatus; + public String getCurrentStepId() { + return currentStepId; + } + + public void setCurrentStepId(String currentStepId) { + this.currentStepId = currentStepId; + } + public String getStepSequence() { return stepSequence; } diff --git a/meapi/src/main/resources/mapper/SfcMapper.xml b/meapi/src/main/resources/mapper/SfcMapper.xml index 1dda6858..45a7dcfe 100644 --- a/meapi/src/main/resources/mapper/SfcMapper.xml +++ b/meapi/src/main/resources/mapper/SfcMapper.xml @@ -665,15 +665,15 @@ WHERE SC.SITE = #{site} AND SC.SFC = #{sfc} - + 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