@ -88,7 +88,14 @@
</select>
</select>
<select id= "selectList" resultMap= "BaseResultMap" >
<select id= "selectList" resultMap= "BaseResultMap" >
SELECT <choose > <when test= "ew != null and ew.sqlSelect != null" > ${ew.sqlSelect}</when> <otherwise > <include refid= "Base_Column_List" > </include> </otherwise> </choose> FROM Z_SFC_DISPATCH
SELECT
<choose >
<when test= "ew != null and ew.sqlSelect != null" > ${ew.sqlSelect}</when>
<otherwise >
<include refid= "Base_Column_List" > </include>
</otherwise>
</choose>
FROM Z_SFC_DISPATCH
<where >
<where >
<if test= "ew!=null" >
<if test= "ew!=null" >
<if test= "ew.entity!=null" >
<if test= "ew.entity!=null" >
@ -115,21 +122,33 @@
<if test= "ew.entity.turnOperation!=null" > AND TURN_OPERATION=#{ew.entity.turnOperation}</if>
<if test= "ew.entity.turnOperation!=null" > AND TURN_OPERATION=#{ew.entity.turnOperation}</if>
<if test= "ew.entity.dispatchQty!=null" > AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
<if test= "ew.entity.dispatchQty!=null" > AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
<if test= "ew.entity.prodHours!=null" > AND PROD_HOURS=#{ew.entity.prodHours}</if>
<if test= "ew.entity.prodHours!=null" > AND PROD_HOURS=#{ew.entity.prodHours}</if>
<if test= "ew.entity.plannedStartDate!=null" > AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
<if test= "ew.entity.plannedStartDate!=null" > AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}
</if>
<if test= "ew.entity.plannedCompDate!=null" > AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<if test= "ew.entity.plannedCompDate!=null" > AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<if test= "ew.entity.earliestStartDate!=null" > AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
<if test= "ew.entity.earliestStartDate!=null" > AND
EARLIEST_START_DATE=#{ew.entity.earliestStartDate}
</if>
<if test= "ew.entity.latestEndDate!=null" > AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
<if test= "ew.entity.latestEndDate!=null" > AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
<if test= "ew.entity.soReleasedDate!=null" > AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
<if test= "ew.entity.soReleasedDate!=null" > AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
<if test= "ew.entity.sfcReleasedDate!=null" > AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
<if test= "ew.entity.sfcReleasedDate!=null" > AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
<if test= "ew.entity.releasedCompleteDate!=null" > AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
<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.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.entity.actualCompleteDate!=null" > AND
ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}
</if>
<if test= "ew.entity.isDispatch!=null" > AND IS_DISPATCH=#{ew.entity.isDispatch}</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.isImport!=null" > AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test= "ew.entity.remark!=null" > AND REMARK=#{ew.entity.remark}</if>
<if test= "ew.entity.remark!=null" > AND REMARK=#{ew.entity.remark}</if>
<if test= "ew.entity.prepositionStepId!=null" > AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test= "ew.entity.prepositionStepId!=null" > AND
<if test= "ew.entity.prepositionOperation!=null" > AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}
<if test= "ew.entity.isFirstOperation!=null" > AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
</if>
<if test= "ew.entity.prepositionOperation!=null" > AND
PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}
</if>
<if test= "ew.entity.isFirstOperation!=null" > AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}
</if>
<if test= "ew.entity.createUser!=null" > AND CREATE_USER=#{ew.entity.createUser}</if>
<if test= "ew.entity.createUser!=null" > AND CREATE_USER=#{ew.entity.createUser}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</if>
</if>
@ -144,7 +163,14 @@
</select>
</select>
<select id= "selectPage" resultMap= "BaseResultMap" >
<select id= "selectPage" resultMap= "BaseResultMap" >
SELECT <choose > <when test= "ew != null and ew.sqlSelect != null" > ${ew.sqlSelect}</when> <otherwise > <include refid= "Base_Column_List" > </include> </otherwise> </choose> FROM Z_SFC_DISPATCH
SELECT
<choose >
<when test= "ew != null and ew.sqlSelect != null" > ${ew.sqlSelect}</when>
<otherwise >
<include refid= "Base_Column_List" > </include>
</otherwise>
</choose>
FROM Z_SFC_DISPATCH
<where >
<where >
<if test= "ew!=null" >
<if test= "ew!=null" >
<if test= "ew.entity!=null" >
<if test= "ew.entity!=null" >
@ -171,25 +197,38 @@
<if test= "ew.entity.turnOperation!=null" > AND TURN_OPERATION=#{ew.entity.turnOperation}</if>
<if test= "ew.entity.turnOperation!=null" > AND TURN_OPERATION=#{ew.entity.turnOperation}</if>
<if test= "ew.entity.dispatchQty!=null" > AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
<if test= "ew.entity.dispatchQty!=null" > AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
<if test= "ew.entity.prodHours!=null" > AND PROD_HOURS=#{ew.entity.prodHours}</if>
<if test= "ew.entity.prodHours!=null" > AND PROD_HOURS=#{ew.entity.prodHours}</if>
<if test= "ew.entity.plannedStartDate!=null" > AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
<if test= "ew.entity.plannedStartDate!=null" > AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}
</if>
<if test= "ew.entity.plannedCompDate!=null" > AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<if test= "ew.entity.plannedCompDate!=null" > AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<if test= "ew.entity.earliestStartDate!=null" > AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
<if test= "ew.entity.earliestStartDate!=null" > AND
EARLIEST_START_DATE=#{ew.entity.earliestStartDate}
</if>
<if test= "ew.entity.latestEndDate!=null" > AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
<if test= "ew.entity.latestEndDate!=null" > AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
<if test= "ew.entity.soReleasedDate!=null" > AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
<if test= "ew.entity.soReleasedDate!=null" > AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
<if test= "ew.entity.sfcReleasedDate!=null" > AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
<if test= "ew.entity.sfcReleasedDate!=null" > AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
<if test= "ew.entity.releasedCompleteDate!=null" > AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
<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.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.entity.actualCompleteDate!=null" > AND
ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}
</if>
<if test= "ew.entity.isDispatch!=null" > AND IS_DISPATCH=#{ew.entity.isDispatch}</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.isImport!=null" > AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test= "ew.entity.remark!=null" > AND REMARK=#{ew.entity.remark}</if>
<if test= "ew.entity.remark!=null" > AND REMARK=#{ew.entity.remark}</if>
<if test= "ew.entity.prepositionStepId!=null" > AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test= "ew.entity.prepositionStepId!=null" > AND
<if test= "ew.entity.prepositionOperation!=null" > AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}
<if test= "ew.entity.isFirstOperation!=null" > AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
</if>
<if test= "ew.entity.prepositionOperation!=null" > AND
PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}
</if>
<if test= "ew.entity.isFirstOperation!=null" > AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}
</if>
<if test= "ew.entity.createUser!=null" > AND CREATE_USER=#{ew.entity.createUser}</if>
<if test= "ew.entity.createUser!=null" > AND CREATE_USER=#{ew.entity.createUser}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.modifyUser!=null" > AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test= "ew.entity.modifyUser!=null" > AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test= "ew.entity.modifiedDateTime!=null" > AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test= "ew.entity.modifiedDateTime!=null" > AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}
</if>
<if test= "ew.entity.other1!=null" > AND OTHER_1=#{ew.entity.other1}</if>
<if test= "ew.entity.other1!=null" > AND OTHER_1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER_2=#{ew.entity.other2}</if>
<if test= "ew.entity.other2!=null" > AND OTHER_2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER_3=#{ew.entity.other3}</if>
<if test= "ew.entity.other3!=null" > AND OTHER_3=#{ew.entity.other3}</if>
@ -256,7 +295,8 @@
<if test= "other3!=null" > OTHER_3,</if>
<if test= "other3!=null" > OTHER_3,</if>
<if test= "other4!=null" > OTHER_4,</if>
<if test= "other4!=null" > OTHER_4,</if>
<if test= "other5!=null" > OTHER_5,</if>
<if test= "other5!=null" > OTHER_5,</if>
</trim> VALUES
</trim>
VALUES
<trim prefix= "(" suffix= ")" suffixOverrides= "," >
<trim prefix= "(" suffix= ")" suffixOverrides= "," >
#{handle},
#{handle},
<if test= "site!=null" > #{site},</if>
<if test= "site!=null" > #{site},</if>
@ -312,7 +352,8 @@
INSERT INTO Z_SFC_DISPATCH
INSERT INTO Z_SFC_DISPATCH
<trim prefix= "(" suffix= ")" suffixOverrides= "," >
<trim prefix= "(" suffix= ")" suffixOverrides= "," >
<include refid= "Base_Column_List" > </include>
<include refid= "Base_Column_List" > </include>
</trim> VALUES
</trim>
VALUES
<trim prefix= "(" suffix= ")" suffixOverrides= "," >
<trim prefix= "(" suffix= ")" suffixOverrides= "," >
#{handle},
#{handle},
#{site},
#{site},
@ -366,7 +407,8 @@
<update id= "updateById" >
<update id= "updateById" >
UPDATE Z_SFC_DISPATCH <trim prefix= "SET" suffixOverrides= "," >
UPDATE Z_SFC_DISPATCH
<trim prefix= "SET" suffixOverrides= "," >
<if test= "et.site!=null" > SITE=#{et.site},</if>
<if test= "et.site!=null" > SITE=#{et.site},</if>
<if test= "et.shopOrder!=null" > SHOP_ORDER=#{et.shopOrder},</if>
<if test= "et.shopOrder!=null" > SHOP_ORDER=#{et.shopOrder},</if>
<if test= "et.sfc!=null" > SFC=#{et.sfc},</if>
<if test= "et.sfc!=null" > SFC=#{et.sfc},</if>
@ -413,7 +455,13 @@
<if test= "et.other3!=null" > OTHER_3=#{et.other3},</if>
<if test= "et.other3!=null" > OTHER_3=#{et.other3},</if>
<if test= "et.other4!=null" > OTHER_4=#{et.other4},</if>
<if test= "et.other4!=null" > OTHER_4=#{et.other4},</if>
<if test= "et.other5!=null" > OTHER_5=#{et.other5},</if>
<if test= "et.other5!=null" > OTHER_5=#{et.other5},</if>
</trim> WHERE HANDLE=#{et.handle} <if test= "et instanceof java.util.Map" > <if test= "et.MP_OPTLOCK_VERSION_ORIGINAL!=null" > and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if> </if>
</trim>
WHERE HANDLE=#{et.handle}
<if test= "et instanceof java.util.Map" >
<if test= "et.MP_OPTLOCK_VERSION_ORIGINAL!=null" > and
${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}
</if>
</if>
</update>
</update>
@ -465,12 +513,18 @@
OTHER_3=#{et.other3},
OTHER_3=#{et.other3},
OTHER_4=#{et.other4},
OTHER_4=#{et.other4},
OTHER_5=#{et.other5},
OTHER_5=#{et.other5},
</trim> WHERE HANDLE=#{et.handle} <if test= "et instanceof java.util.Map" > <if test= "et.MP_OPTLOCK_VERSION_ORIGINAL!=null" > and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if> </if>
</trim> WHERE HANDLE=#{et.handle}
<if test= "et instanceof java.util.Map" >
<if test= "et.MP_OPTLOCK_VERSION_ORIGINAL!=null" > and
${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}
</if>
</if>
</update>
</update>
<update id= "update" >
<update id= "update" >
UPDATE Z_SFC_DISPATCH <trim prefix= "SET" suffixOverrides= "," >
UPDATE Z_SFC_DISPATCH
<trim prefix= "SET" suffixOverrides= "," >
<if test= "et.site!=null" > SITE=#{et.site},</if>
<if test= "et.site!=null" > SITE=#{et.site},</if>
<if test= "et.shopOrder!=null" > SHOP_ORDER=#{et.shopOrder},</if>
<if test= "et.shopOrder!=null" > SHOP_ORDER=#{et.shopOrder},</if>
<if test= "et.sfc!=null" > SFC=#{et.sfc},</if>
<if test= "et.sfc!=null" > SFC=#{et.sfc},</if>
@ -539,30 +593,45 @@
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.resrce!=null" > AND RESRCE=#{ew.entity.resrce}</if>
<if test= "ew.entity.resrce!=null" > AND RESRCE=#{ew.entity.resrce}</if>
<if test= "ew.entity.employee!=null" > AND EMPLOYEE=#{ew.entity.employee}</if>
<if test= "ew.entity.employee!=null" > AND EMPLOYEE=#{ew.entity.employee}</if>
<if test= "et.entity.employeeDescription!=null" > EMPLOYEE_DESCRIPTION=#{et.entity.employeeDescription},</if>
<if test= "et.entity.employeeDescription!=null" >
EMPLOYEE_DESCRIPTION=#{et.entity.employeeDescription},
</if>
<if test= "ew.entity.turnOperation!=null" > AND TURN_OPERATION=#{ew.entity.turnOperation}</if>
<if test= "ew.entity.turnOperation!=null" > AND TURN_OPERATION=#{ew.entity.turnOperation}</if>
<if test= "ew.entity.dispatchQty!=null" > AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
<if test= "ew.entity.dispatchQty!=null" > AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
<if test= "ew.entity.prodHours!=null" > AND PROD_HOURS=#{ew.entity.prodHours}</if>
<if test= "ew.entity.prodHours!=null" > AND PROD_HOURS=#{ew.entity.prodHours}</if>
<if test= "ew.entity.plannedStartDate!=null" > AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
<if test= "ew.entity.plannedStartDate!=null" > AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}
</if>
<if test= "ew.entity.plannedCompDate!=null" > AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<if test= "ew.entity.plannedCompDate!=null" > AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<if test= "ew.entity.earliestStartDate!=null" > AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
<if test= "ew.entity.earliestStartDate!=null" > AND
EARLIEST_START_DATE=#{ew.entity.earliestStartDate}
</if>
<if test= "ew.entity.latestEndDate!=null" > AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
<if test= "ew.entity.latestEndDate!=null" > AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
<if test= "ew.entity.soReleasedDate!=null" > AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
<if test= "ew.entity.soReleasedDate!=null" > AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
<if test= "ew.entity.sfcReleasedDate!=null" > AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
<if test= "ew.entity.sfcReleasedDate!=null" > AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
<if test= "ew.entity.releasedCompleteDate!=null" > AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
<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.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.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.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.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.isImport!=null" > AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test= "ew.entity.remark!=null" > AND REMARK=#{ew.entity.remark}</if>
<if test= "ew.entity.remark!=null" > AND REMARK=#{ew.entity.remark}</if>
<if test= "ew.entity.prepositionStepId!=null" > AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test= "ew.entity.prepositionStepId!=null" > AND
<if test= "ew.entity.prepositionOperation!=null" > AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}
<if test= "ew.entity.isFirstOperation!=null" > AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
</if>
<if test= "ew.entity.prepositionOperation!=null" > AND
PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}
</if>
<if test= "ew.entity.isFirstOperation!=null" > AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}
</if>
<if test= "ew.entity.createUser!=null" > AND CREATE_USER=#{ew.entity.createUser}</if>
<if test= "ew.entity.createUser!=null" > AND CREATE_USER=#{ew.entity.createUser}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.modifyUser!=null" > AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test= "ew.entity.modifyUser!=null" > AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test= "ew.entity.modifiedDateTime!=null" > AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test= "ew.entity.modifiedDateTime!=null" > AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}
</if>
<if test= "ew.entity.other1!=null" > AND OTHER_1=#{ew.entity.other1}</if>
<if test= "ew.entity.other1!=null" > AND OTHER_1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER_2=#{ew.entity.other2}</if>
<if test= "ew.entity.other2!=null" > AND OTHER_2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER_3=#{ew.entity.other3}</if>
<if test= "ew.entity.other3!=null" > AND OTHER_3=#{ew.entity.other3}</if>
@ -621,29 +690,44 @@
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.resrce!=null" > AND RESRCE=#{ew.entity.resrce}</if>
<if test= "ew.entity.resrce!=null" > AND RESRCE=#{ew.entity.resrce}</if>
<if test= "ew.entity.employee!=null" > AND EMPLOYEE=#{ew.entity.employee}</if>
<if test= "ew.entity.employee!=null" > AND EMPLOYEE=#{ew.entity.employee}</if>
<if test= "ew.entity.employeeDescription!=null" > EMPLOYEE_DESCRIPTION=#{et.entity.employeeDescription},</if>
<if test= "ew.entity.employeeDescription!=null" >
EMPLOYEE_DESCRIPTION=#{et.entity.employeeDescription},
</if>
<if test= "ew.entity.turnOperation!=null" > AND TURN_OPERATION=#{ew.entity.turnOperation}</if>
<if test= "ew.entity.turnOperation!=null" > AND TURN_OPERATION=#{ew.entity.turnOperation}</if>
<if test= "ew.entity.dispatchQty!=null" > AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
<if test= "ew.entity.dispatchQty!=null" > AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
<if test= "ew.entity.prodHours!=null" > AND PROD_HOURS=#{ew.entity.prodHours}</if>
<if test= "ew.entity.prodHours!=null" > AND PROD_HOURS=#{ew.entity.prodHours}</if>
<if test= "ew.entity.plannedStartDate!=null" > AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
<if test= "ew.entity.plannedStartDate!=null" > AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}
</if>
<if test= "ew.entity.plannedCompDate!=null" > AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<if test= "ew.entity.plannedCompDate!=null" > AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<if test= "ew.entity.earliestStartDate!=null" > AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
<if test= "ew.entity.earliestStartDate!=null" > AND
EARLIEST_START_DATE=#{ew.entity.earliestStartDate}
</if>
<if test= "ew.entity.latestEndDate!=null" > AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
<if test= "ew.entity.latestEndDate!=null" > AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
<if test= "ew.entity.soReleasedDate!=null" > AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
<if test= "ew.entity.soReleasedDate!=null" > AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
<if test= "ew.entity.sfcReleasedDate!=null" > AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
<if test= "ew.entity.sfcReleasedDate!=null" > AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
<if test= "ew.entity.releasedCompleteDate!=null" > AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
<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.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.entity.actualCompleteDate!=null" > AND
ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}
</if>
<if test= "ew.entity.isDispatch!=null" > AND IS_DISPATCH=#{ew.entity.isDispatch}</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.isImport!=null" > AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test= "ew.entity.remark!=null" > AND REMARK=#{ew.entity.remark}</if>
<if test= "ew.entity.remark!=null" > AND REMARK=#{ew.entity.remark}</if>
<if test= "ew.entity.prepositionStepId!=null" > AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test= "ew.entity.prepositionStepId!=null" > AND
<if test= "ew.entity.prepositionOperation!=null" > AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}
<if test= "ew.entity.isFirstOperation!=null" > AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
</if>
<if test= "ew.entity.prepositionOperation!=null" > AND
PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}
</if>
<if test= "ew.entity.isFirstOperation!=null" > AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}
</if>
<if test= "ew.entity.createUser!=null" > AND CREATE_USER=#{ew.entity.createUser}</if>
<if test= "ew.entity.createUser!=null" > AND CREATE_USER=#{ew.entity.createUser}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.modifyUser!=null" > AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test= "ew.entity.modifyUser!=null" > AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test= "ew.entity.modifiedDateTime!=null" > AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test= "ew.entity.modifiedDateTime!=null" > AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}
</if>
<if test= "ew.entity.other1!=null" > AND OTHER_1=#{ew.entity.other1}</if>
<if test= "ew.entity.other1!=null" > AND OTHER_1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER_2=#{ew.entity.other2}</if>
<if test= "ew.entity.other2!=null" > AND OTHER_2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER_3=#{ew.entity.other3}</if>
<if test= "ew.entity.other3!=null" > AND OTHER_3=#{ew.entity.other3}</if>
@ -665,9 +749,14 @@
<foreach item= "item" index= "index" collection= "coll" separator= "," > #{item}
<foreach item= "item" index= "index" collection= "coll" separator= "," > #{item}
</foreach> )
</foreach> )
</delete>
</delete>
<resultMap id= "findSfcDispatchResult" type= "SfcDispatch" >
<id column= "HANDLE" property= "handle" />
</resultMap>
<!-- BaseMapper标准查询/修改/删除 -->
<!-- BaseMapper标准查询/修改/删除 -->
<select id= "findSfcDispatch" resultMap= "BaseResultMap" >
<select id= "findSfcDispatch" resultMap= "findSfcDispatchResult" >
SELECT <include refid= "Base_Column_List" />
SELECT
<include refid= "Base_Column_List" />
FROM Z_SFC_DISPATCH
FROM Z_SFC_DISPATCH
WHERE SITE = #{site} AND SFC = #{sfc}
WHERE SITE = #{site} AND SFC = #{sfc}
<if test= "operation != null and operation != ''" >
<if test= "operation != null and operation != ''" >
@ -687,12 +776,19 @@
WHEN WIP.DISPATCH_STATUS = 'PAUSE' THEN N'暂停' WHEN WIP.DISPATCH_STATUS = 'RELEASE' THEN N'发布'
WHEN WIP.DISPATCH_STATUS = 'PAUSE' THEN N'暂停' WHEN WIP.DISPATCH_STATUS = 'RELEASE' THEN N'发布'
END AS STATUS_NAME, 'ADMINISTRATOR' AS ROLE
END AS STATUS_NAME, 'ADMINISTRATOR' AS ROLE
FROM (
FROM (
SELECT SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, SD.ROUTER_BO, C2.VALUE ITEM_NUMBER, C1.VALUE WORK_ORDER, IM.HANDLE ITEM_BO, IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS,SD.DRAWINGS_REVISION,
SELECT SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, SD.ROUTER_BO, C2.VALUE ITEM_NUMBER, C1.VALUE
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,
WORK_ORDER, IM.HANDLE ITEM_BO, IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION, SD.SFC,
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.DISPATCH_STATUS,SD.DRAWINGS_REVISION,
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,
SD.STEP_ID, SD.OPERATION, OT.DESCRIPTION OPERATION_DESCRIPTION, SD.RESOURCE_TYPE, SD.RESRCE, SD.EMPLOYEE,
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,
SD.EMPLOYEE USER_NAME, SD.DISPATCH_QTY, SD.PROD_HOURS, RS.DESCRIPTION RESOURCE_DESCRIPTION,
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
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.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
FROM Z_SFC_DISPATCH SD
INNER JOIN SFC SC ON SC.SITE = SD.SITE AND SC.SFC = SD.SFC
INNER JOIN SFC SC ON SC.SITE = SD.SITE AND SC.SFC = SD.SFC
LEFT JOIN RESRCE RS ON SD.SITE = RS.SITE AND SD.RESRCE = RS.RESRCE
LEFT JOIN RESRCE RS ON SD.SITE = RS.SITE AND SD.RESRCE = RS.RESRCE
@ -710,7 +806,8 @@
LEFT JOIN ITEM_T CT ON CT.ITEM_BO = CP.HANDLE AND CT.LOCALE = 'zh'
LEFT JOIN ITEM_T CT ON CT.ITEM_BO = CP.HANDLE AND CT.LOCALE = 'zh'
LEFT JOIN CUSTOM_FIELDS C3 ON C3.HANDLE = CP.HANDLE AND C3.ATTRIBUTE = 'TEXTTURE'
LEFT JOIN CUSTOM_FIELDS C3 ON C3.HANDLE = CP.HANDLE AND C3.ATTRIBUTE = 'TEXTTURE'
LEFT JOIN CUSTOM_FIELDS C4 ON C4.HANDLE = CP.HANDLE AND C4.ATTRIBUTE = 'MAT_SPEC'
LEFT JOIN CUSTOM_FIELDS C4 ON C4.HANDLE = CP.HANDLE AND C4.ATTRIBUTE = 'MAT_SPEC'
LEFT JOIN WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = 'ResourceBO:' || SD.SITE || ',' || SD.RESRCE
LEFT JOIN WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = 'ResourceBO:' || SD.SITE || ',' ||
SD.RESRCE
LEFT JOIN WORK_CENTER WR ON WR.HANDLE = WCM.WORK_CENTER_BO
LEFT JOIN WORK_CENTER WR ON WR.HANDLE = WCM.WORK_CENTER_BO
WHERE SD.SITE = #{site}
WHERE SD.SITE = #{site}
<if test= "workCenter != null and workCenter != ''" >
<if test= "workCenter != null and workCenter != ''" >
@ -722,6 +819,9 @@
<if test= "status != null and status != ''" >
<if test= "status != null and status != ''" >
AND SD.DISPATCH_STATUS IN ${status}
AND SD.DISPATCH_STATUS IN ${status}
</if>
</if>
<if test= "userName != null and userName != ''" >
AND SD.EMPLOYEE_DESCRIPTION = #{userName}
</if>
<if test= "item != null and item != ''" >
<if test= "item != null and item != ''" >
AND IM.ITEM = #{item}
AND IM.ITEM = #{item}
</if>
</if>
@ -761,6 +861,9 @@
<if test= "blankingSize != null and blankingSize != ''" >
<if test= "blankingSize != null and blankingSize != ''" >
AND SD.BLANKING_SIZE LIKE '%'||#{blankingSize}||'%'
AND SD.BLANKING_SIZE LIKE '%'||#{blankingSize}||'%'
</if>
</if>
<if test= "step != null and step != ''" >
AND SD.STEP_ID = #{step}
</if>
<if test= "component != null and component != ''" >
<if test= "component != null and component != ''" >
AND CP.ITEM = #{component}
AND CP.ITEM = #{component}
</if>
</if>
@ -785,14 +888,20 @@
<if test= "completeToDate != null" >
<if test= "completeToDate != null" >
AND SD.PLANNED_COMP_DATE < = TO_DATE(#{completeToDate}|| '23:59:59', 'YYYY-MM-DD HH24:MI:SS')
AND SD.PLANNED_COMP_DATE < = TO_DATE(#{completeToDate}|| '23:59:59', 'YYYY-MM-DD HH24:MI:SS')
</if>
</if>
GROUP BY SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, SD.ROUTER_BO, C2.VALUE, C1.VALUE, IM.HANDLE, IM.ITEM, IT.DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS,SD.DRAWINGS_REVISION,
GROUP BY SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, SD.ROUTER_BO, C2.VALUE, C1.VALUE, IM.HANDLE,
SD.STEP_ID, SD.OPERATION, OT.DESCRIPTION, SD.RESOURCE_TYPE, SD.RESRCE, SD.EMPLOYEE, SD.EMPLOYEE, SD.DISPATCH_QTY, SD.PROD_HOURS, RS.DESCRIPTION,
IM.ITEM, IT.DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS,SD.DRAWINGS_REVISION,
SD.DISPATCH_STATUS, SD.DISPATCH_QTY, SD.PLANNED_START_DATE, SD.PLANNED_COMP_DATE, SD.WORK_CENTER, SD.IS_DISPATCH, SD.EMPLOYEE_DESCRIPTION,
SD.STEP_ID, SD.OPERATION, OT.DESCRIPTION, SD.RESOURCE_TYPE, SD.RESRCE, SD.EMPLOYEE, SD.EMPLOYEE,
SD.ACTUAL_START_DATE, SD.ACTUAL_COMPLETE_DATE, SD.REMARK, SD.DISPATCH_SEQ, SD.EARLIEST_START_DATE, SD.LATEST_END_DATE,
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.IS_UPDATE_ZJH_COMPLETE, 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
) 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 V1 ON V1.SITE = WIP.SITE AND V1.SFC = WIP.SFC AND V1.ROUTER_BO = WIP.ROUTER_BO AND
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
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
) WIP
) WIP
<if test= "isCompleted != null and isCompleted != ''" >
<if test= "isCompleted != null and isCompleted != ''" >
WHERE WIP.IS_COMPLETED = #{isCompleted}
WHERE WIP.IS_COMPLETED = #{isCompleted}
@ -801,7 +910,8 @@
</select>
</select>
<update id= "updateSfcDispatchStatus" >
<update id= "updateSfcDispatchStatus" >
UPDATE Z_SFC_DISPATCH SET DISPATCH_STATUS = #{dispatchStatus}, MODIFY_USER = #{modifyUser}, MODIFIED_DATE_TIME = #{modifiedDateTime}
UPDATE Z_SFC_DISPATCH SET DISPATCH_STATUS = #{dispatchStatus}, MODIFY_USER = #{modifyUser}, MODIFIED_DATE_TIME =
#{modifiedDateTime}
<if test= "dispatchStatus== 'COMPLETE'" >
<if test= "dispatchStatus== 'COMPLETE'" >
, ACTUAL_COMPLETE_DATE = #{modifiedDateTime} , ACTUAL_PROD_HOURS = #{workHour}
, ACTUAL_COMPLETE_DATE = #{modifiedDateTime} , ACTUAL_PROD_HOURS = #{workHour}
</if>
</if>
@ -834,10 +944,25 @@
<select id= "findSplitSfcDispatch" resultMap= "BaseResultMap" >
<select id= "findSplitSfcDispatch" resultMap= "BaseResultMap" >
SELECT <include refid= "Base_Column_List" > </include>
SELECT
<include refid= "Base_Column_List" > </include>
FROM Z_SFC_DISPATCH
FROM Z_SFC_DISPATCH
WHERE SITE = #{site} AND SFC = #{sfc} AND TO_NUMBER(STEP_ID) >= #{stepId}
WHERE SITE = #{site} AND SFC = #{sfc} AND TO_NUMBER(STEP_ID) >= #{stepId}
</select>
</select>
<select id= "findsfcComplete" resultType= "com.foreverwin.mesnac.dispatch.model.SfcDispatch" >
SELECT
<include refid= "Base_Column_List" />
FROM Z_SFC_DISPATCH
WHERE SITE = #{site}
<if test= "shopOrder != null and shopOrder != ''" >
AND SHOP_ORDER = #{shopOrder}
</if>
<if test= "stepId != null and stepId != ''" >
AND STEP_ID = #{stepId}
</if>
AND ACTUAL_COMPLETE_DATE IS NOT NULL
AND ROWNUM=1 ORDER BY ACTUAL_COMPLETE_DATE DESC
</select>
<update id= "updateSfcDispatchQty" >
<update id= "updateSfcDispatchQty" >