HANDLE, SITE, SFC, OPERATION, STEP_ID, QTY, TYPE, REASON, CREATED_USER, CREATED_DATE_TIME, MODIFIED_USER,
MODIFIED_DATE_TIME, DUTY_USER
INSERT INTO Z_SFC_SCRAP
HANDLE,
SITE,
SFC,
OPERATION,
STEP_ID,
QTY,
TYPE,
REASON,
CREATED_USER,
CREATED_DATE_TIME,
MODIFIED_USER,
MODIFIED_DATE_TIME,
DUTY_USER,
VALUES
#{handle},
#{site},
#{sfc},
#{operation},
#{stepId},
#{qty},
#{type},
#{reason},
#{createdUser},
#{createdDateTime},
#{modifiedUser},
#{modifiedDateTime},
#{dutyUser},
INSERT INTO Z_SFC_SCRAP
VALUES
#{handle},
#{site},
#{sfc},
#{operation},
#{stepId},
#{qty},
#{type},
#{reason},
#{createdUser},
#{createdDateTime},
#{modifiedUser},
#{modifiedDateTime},
#{dutyUser},
UPDATE Z_SFC_SCRAP
SITE=#{et.site},
SFC=#{et.sfc},
OPERATION=#{et.operation},
STEP_ID=#{et.stepId},
QTY=#{et.qty},
TYPE=#{et.type},
REASON=#{et.reason},
CREATED_USER=#{et.createdUser},
CREATED_DATE_TIME=#{et.createdDateTime},
MODIFIED_USER=#{et.modifiedUser},
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
DUTY_USER=#{et.dutyUser},
WHERE HANDLE=#{et.handle}
and
${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}
UPDATE Z_SFC_SCRAP
SITE=#{et.site},
SFC=#{et.sfc},
OPERATION=#{et.operation},
STEP_ID=#{et.stepId},
QTY=#{et.qty},
TYPE=#{et.type},
REASON=#{et.reason},
CREATED_USER=#{et.createdUser},
CREATED_DATE_TIME=#{et.createdDateTime},
MODIFIED_USER=#{et.modifiedUser},
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
DUTY_USER=#{et.dutyUser},
WHERE HANDLE=#{et.handle}
and
${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}
UPDATE Z_SFC_SCRAP
SITE=#{et.site},
SFC=#{et.sfc},
OPERATION=#{et.operation},
STEP_ID=#{et.stepId},
QTY=#{et.qty},
TYPE=#{et.type},
REASON=#{et.reason},
CREATED_USER=#{et.createdUser},
CREATED_DATE_TIME=#{et.createdDateTime},
MODIFIED_USER=#{et.modifiedUser},
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
DUTY_USER=#{et.dutyUser},
HANDLE=#{ew.entity.handle}
AND SITE=#{ew.entity.site}
AND SFC=#{ew.entity.sfc}
AND OPERATION=#{ew.entity.operation}
AND STEP_ID=#{ew.entity.stepId}
AND QTY=#{ew.entity.qty}
AND TYPE=#{ew.entity.type}
AND REASON=#{ew.entity.reason}
AND CREATED_USER=#{ew.entity.createdUser}
AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}
AND MODIFIED_USER=#{ew.entity.modifiedUser}
AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}
AND DUTY_USER=#{ew.entity.dutyUser}
${ew.sqlSegment}
${ew.sqlSegment}
DELETE FROM Z_SFC_SCRAP WHERE HANDLE=#{handle}
DELETE FROM Z_SFC_SCRAP
${k} = #{cm[${k}]}
DELETE FROM Z_SFC_SCRAP
HANDLE=#{ew.entity.handle}
AND SITE=#{ew.entity.site}
AND SFC=#{ew.entity.sfc}
AND OPERATION=#{ew.entity.operation}
AND STEP_ID=#{ew.entity.stepId}
AND QTY=#{ew.entity.qty}
AND TYPE=#{ew.entity.type}
AND REASON=#{ew.entity.reason}
AND CREATED_USER=#{ew.entity.createdUser}
AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}
AND MODIFIED_USER=#{ew.entity.modifiedUser}
AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}
AND DUTY_USER=#{ew.entity.dutyUser}
${ew.sqlSegment}
${ew.sqlSegment}
DELETE FROM Z_SFC_SCRAP WHERE HANDLE IN (
#{item}
)