@ -35,6 +35,7 @@
<result column= "RELEASED_COMPLETE_DATE" property= "releasedCompleteDate" />
<result column= "ACTUAL_START_DATE" property= "actualStartDate" />
<result column= "ACTUAL_COMPLETE_DATE" property= "actualCompleteDate" />
<result column= "IS_UPDATE_ZJH_COMPLETE" property= "isUpdateZJHComplete" />
<result column= "IS_DISPATCH" property= "isDispatch" />
<result column= "IS_IMPORT" property= "isImport" />
<result column= "REMARK" property= "remark" />
@ -78,7 +79,7 @@
<!-- 通用查询结果列 -->
<sql id= "Base_Column_List" >
HANDLE, SITE, SHOP_ORDER, SFC, BLANKING_SIZE, DISPATCH_SEQ, DISPATCH_NO, DISPATCH_STATUS, DRAWINGS_NO, DRAWINGS_REVISION, IS_LOCK, ROUTER_BO, STEP_ID, OPERATION, RESOURCE_TYPE, WORK_CENTER, RESRCE, EMPLOYEE, EMPLOYEE_DESCRIPTION, TURN_OPERATION, DISPATCH_QTY, PROD_HOURS, PLANNED_START_DATE, PLANNED_COMP_DATE, EARLIEST_START_DATE, LATEST_END_DATE, SO_RELEASED_DATE, SFC_RELEASED_DATE, RELEASED_COMPLETE_DATE, ACTUAL_START_DATE, ACTUAL_COMPLETE_DATE, IS_DISPATCH, IS_IMPORT, REMARK, PREPOSITION_STEP_ID, PREPOSITION_OPERATION, IS_FIRST_OPERATION, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME, OTHER_1, OTHER_2, OTHER_3, OTHER_4, OTHER_5
HANDLE, SITE, SHOP_ORDER, SFC, BLANKING_SIZE, DISPATCH_SEQ, DISPATCH_NO, DISPATCH_STATUS, DRAWINGS_NO, DRAWINGS_REVISION, IS_LOCK, ROUTER_BO, STEP_ID, OPERATION, RESOURCE_TYPE, WORK_CENTER, RESRCE, EMPLOYEE, EMPLOYEE_DESCRIPTION, TURN_OPERATION, DISPATCH_QTY, PROD_HOURS, PLANNED_START_DATE, PLANNED_COMP_DATE, EARLIEST_START_DATE, LATEST_END_DATE, SO_RELEASED_DATE, SFC_RELEASED_DATE, RELEASED_COMPLETE_DATE, ACTUAL_START_DATE, ACTUAL_COMPLETE_DATE,IS_UPDATE_ZJH_COMPLETE, IS_DISPATCH, IS_IMPORT, REMARK, PREPOSITION_STEP_ID, PREPOSITION_OPERATION, IS_FIRST_OPERATION, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME, OTHER_1, OTHER_2, OTHER_3, OTHER_4, OTHER_5
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -219,6 +220,7 @@
<if test= "drawingsNo!=null" > DRAWINGS_NO,</if>
<if test= "drawingsRevision!=null" > DRAWINGS_REVISION,</if>
<if test= "isLock!=null" > IS_LOCK,</if>
<if test= "isUpdateZJHComplete!=null" > IS_UPDATE_ZJH_COMPLETE,</if>
<if test= "routerBo!=null" > ROUTER_BO,</if>
<if test= "stepId!=null" > STEP_ID,</if>
<if test= "operation!=null" > OPERATION,</if>
@ -287,6 +289,7 @@
<if test= "releasedCompleteDate!=null" > #{releasedCompleteDate},</if>
<if test= "actualStartDate!=null" > #{actualStartDate},</if>
<if test= "actualCompleteDate!=null" > #{actualCompleteDate},</if>
<if test= "isUpdateZJHComplete!=null" > #{isUpdateZJHComplete},</if>
<if test= "isDispatch!=null" > #{isDispatch},</if>
<if test= "isImport!=null" > #{isImport},</if>
<if test= "remark!=null" > #{remark},</if>
@ -342,6 +345,7 @@
#{releasedCompleteDate},
#{actualStartDate},
#{actualCompleteDate},
#{isUpdateZJHComplete},
#{isDispatch},
#{isImport},
#{remark},
@ -393,6 +397,7 @@
<if test= "et.releasedCompleteDate!=null" > RELEASED_COMPLETE_DATE=#{et.releasedCompleteDate},</if>
<if test= "et.actualStartDate!=null" > ACTUAL_START_DATE=#{et.actualStartDate},</if>
<if test= "et.actualCompleteDate!=null" > ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate},</if>
<if test= "et.isUpdateZJHComplete!=null" > IS_UPDATE_ZJH_COMPLETE=#{et.isUpdateZJHComplete},</if>
<if test= "et.isDispatch!=null" > IS_DISPATCH=#{et.isDispatch},</if>
<if test= "et.isImport!=null" > IS_IMPORT=#{et.isImport},</if>
<if test= "et.remark!=null" > REMARK=#{et.remark},</if>
@ -444,6 +449,7 @@
RELEASED_COMPLETE_DATE=#{et.releasedCompleteDate},
ACTUAL_START_DATE=#{et.actualStartDate},
ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate},
IS_UPDATE_ZJH_COMPLETE=#{et.isUpdateZJHComplete},
IS_DISPATCH=#{et.isDispatch},
IS_IMPORT=#{et.isImport},
REMARK=#{et.remark},
@ -495,6 +501,7 @@
<if test= "et.releasedCompleteDate!=null" > RELEASED_COMPLETE_DATE=#{et.releasedCompleteDate},</if>
<if test= "et.actualStartDate!=null" > ACTUAL_START_DATE=#{et.actualStartDate},</if>
<if test= "et.actualCompleteDate!=null" > ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate},</if>
<if test= "et.isUpdateZJHComplete!=null" > IS_UPDATE_ZJH_COMPLETE=#{et.isUpdateZJHComplete},</if>
<if test= "et.isDispatch!=null" > IS_DISPATCH=#{et.isDispatch},</if>
<if test= "et.isImport!=null" > IS_IMPORT=#{et.isImport},</if>
<if test= "et.remark!=null" > REMARK=#{et.remark},</if>
@ -545,6 +552,7 @@
<if test= "ew.entity.releasedCompleteDate!=null" > AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
<if test= "ew.entity.actualStartDate!=null" > AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<if test= "ew.entity.actualCompleteDate!=null" > AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
<if test= "ew.isUpdateZJHComplete!=null" > AND IS_UPDATE_ZJH_COMPLETE=#{ew.isUpdateZJHComplete},</if>
<if test= "ew.entity.isDispatch!=null" > AND IS_DISPATCH=#{ew.entity.isDispatch}</if>
<if test= "ew.entity.isImport!=null" > AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test= "ew.entity.remark!=null" > AND REMARK=#{ew.entity.remark}</if>
@ -683,7 +691,7 @@
SD.STEP_ID, SD.OPERATION, OT.DESCRIPTION OPERATION_DESCRIPTION, SD.RESOURCE_TYPE, SD.RESRCE, SD.EMPLOYEE, SD.EMPLOYEE USER_NAME, SD.DISPATCH_QTY, SD.PROD_HOURS, RS.DESCRIPTION RESOURCE_DESCRIPTION,
CASE WHEN SD.DISPATCH_STATUS = 'COMPLETE' THEN SD.DISPATCH_QTY ELSE 0 END COMPLETED_QTY, SD.PLANNED_START_DATE, SD.PLANNED_COMP_DATE, SD.WORK_CENTER, SD.IS_DISPATCH, SD.EMPLOYEE_DESCRIPTION,
SD.ACTUAL_START_DATE, SD.ACTUAL_COMPLETE_DATE, SD.REMARK, SD.DISPATCH_SEQ, SD.DISPATCH_SEQ-1 BEFORE_SEQ, SD.DISPATCH_SEQ+1 AFTER_SEQ, SD.EARLIEST_START_DATE, SD.LATEST_END_DATE,
CASE WHEN CC.VALUE = '9' THEN N'是' ELSE N'否' END IS_MAJOR, CASE WHEN SD.TURN_OPERATION = 'true' THEN N'是' ELSE N'否' END TURN_OPERATION, SD.BLANKING_SIZE, MAX(BC.COMPONENT_GBO) COMPONENT_BO,
CASE WHEN CC.VALUE = '9' THEN N'是' ELSE N'否' END IS_MAJOR, CASE WHEN SD.TURN_OPERATION = 'true' THEN N'是' ELSE N'否' END TURN_OPERATION, SD.IS_UPDATE_ZJH_COMPLETE, SD. BLANKING_SIZE, MAX(BC.COMPONENT_GBO) COMPONENT_BO,
WR.WORK_CENTER RESOURCE_WORK_CENTER, MAX(CP.ITEM) COMPONENT, MAX(CT.DESCRIPTION) COMPONENT_DESCRIPTION, MAX(C3.VALUE) TEXTURE, MAX(C4.VALUE) MAT_SPEC ,SD.OTHER_2
FROM Z_SFC_DISPATCH SD
INNER JOIN SFC SC ON SC.SITE = SD.SITE AND SC.SFC = SD.SFC
@ -781,7 +789,7 @@
SD.STEP_ID, SD.OPERATION, OT.DESCRIPTION, SD.RESOURCE_TYPE, SD.RESRCE, SD.EMPLOYEE, SD.EMPLOYEE, SD.DISPATCH_QTY, SD.PROD_HOURS, RS.DESCRIPTION,
SD.DISPATCH_STATUS, SD.DISPATCH_QTY, SD.PLANNED_START_DATE, SD.PLANNED_COMP_DATE, SD.WORK_CENTER, SD.IS_DISPATCH, SD.EMPLOYEE_DESCRIPTION,
SD.ACTUAL_START_DATE, SD.ACTUAL_COMPLETE_DATE, SD.REMARK, SD.DISPATCH_SEQ, SD.EARLIEST_START_DATE, SD.LATEST_END_DATE,
CC.VALUE, SD.TURN_OPERATION, SD.BLANKING_SIZE, WR.WORK_CENTER ,SD.OTHER_2
CC.VALUE, SD.TURN_OPERATION,SD.IS_UPDATE_ZJH_COMPLETE, SD.BLANKING_SIZE, WR.WORK_CENTER ,SD.OTHER_2
) WIP
LEFT JOIN Z_SFC_DISPATCH V1 ON V1.SITE = WIP.SITE AND V1.SFC = WIP.SFC AND V1.ROUTER_BO = WIP.ROUTER_BO AND V1.DISPATCH_SEQ = WIP.BEFORE_SEQ
LEFT JOIN Z_SFC_DISPATCH V2 ON V2.SITE = WIP.SITE AND V2.SFC = WIP.SFC AND V2.ROUTER_BO = WIP.ROUTER_BO AND V2.DISPATCH_SEQ = WIP.AFTER_SEQ
@ -789,7 +797,7 @@
<if test= "isCompleted != null and isCompleted != ''" >
WHERE WIP.IS_COMPLETED = #{isCompleted}
</if>
ORDER BY WIP.SHOP_ORDER, WIP.SFC, TO_NUMBER(WIP.DISPATCH_SEQ)
ORDER BY WIP.SHOP_ORDER,WIP.SFC,WIP.STEP_ID, TO_NUMBER(WIP.DISPATCH_SEQ)
</select>
<update id= "updateSfcDispatchStatus" >