HANDLE, SITE, SFC_DISPATCH_BO, CALL_ITEM_NO, SHOP_ORDER, SFC, OPERATION, STEP_ID, RESRCE, COMPONENT_BO,
CALL_TYPE, REQUIRED_QTY, REQUIRED_DATE_TIME, STATUS, CALL_STATUS, ISSUE_STATUS, CREATE_USER, CREATED_DATE_TIME,
MODIFY_USER, MODIFIED_DATE_TIME
INSERT INTO Z_CALL_ITEM
HANDLE,
SITE,
SFC_DISPATCH_BO,
CALL_ITEM_NO,
SHOP_ORDER,
SFC,
OPERATION,
STEP_ID,
RESRCE,
COMPONENT_BO,
CALL_TYPE,
REQUIRED_QTY,
REQUIRED_DATE_TIME,
ISSUE_QTY,
STATUS,
CALL_STATUS,
ISSUE_STATUS,
CREATE_USER,
CREATED_DATE_TIME,
MODIFY_USER,
MODIFIED_DATE_TIME,
VALUES
#{handle},
#{site},
#{sfcDispatchBo},
#{callItemNo},
#{shopOrder},
#{sfc},
#{operation},
#{stepId},
#{resrce},
#{componentBo},
#{callType},
#{requiredQty},
#{requiredDateTime},
#{issueQty},
#{status},
#{callStatus},
#{issueStatus},
#{createUser},
#{createdDateTime},
#{modifyUser},
#{modifiedDateTime},
INSERT INTO Z_CALL_ITEM
VALUES
#{handle},
#{site},
#{sfcDispatchBo},
#{callItemNo},
#{shopOrder},
#{sfc},
#{operation},
#{stepId},
#{resrce},
#{componentBo},
#{callType},
#{requiredQty},
#{requiredDateTime},
#{issueQty},
#{status},
#{callStatus},
#{issueStatus},
#{createUser},
#{createdDateTime},
#{modifyUser},
#{modifiedDateTime},
MODIFY Z_CALL_ITEM
SITE=#{et.site},
SFC_DISPATCH_BO=#{et.sfcDispatchBo},
CALL_ITEM_NO=#{et.callItemNo},
SHOP_ORDER=#{et.shopOrder},
SFC=#{et.sfc},
OPERATION=#{et.operation},
STEP_ID=#{et.stepId},
RESRCE=#{et.resrce},
COMPONENT_BO=#{et.componentBo},
CALL_TYPE=#{et.callType},
REQUIRED_QTY=#{et.requiredQty},
REQUIRED_DATE_TIME=#{et.requiredDateTime},
ISSUE_QTY=#{et.issueQty},
STATUS=#{et.status},
CALL_STATUS=#{et.callStatus},
ISSUE_STATUS=#{et.issueStatus},
CREATE_USER=#{et.createUser},
CREATED_DATE_TIME=#{et.createdDateTime},
MODIFY_USER=#{et.modifyUser},
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
WHERE HANDLE=#{et.handle}
and
${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}
MODIFY Z_CALL_ITEM
SITE=#{et.site},
SFC_DISPATCH_BO=#{et.sfcDispatchBo},
CALL_ITEM_NO=#{et.callItemNo},
SHOP_ORDER=#{et.shopOrder},
SFC=#{et.sfc},
OPERATION=#{et.operation},
STEP_ID=#{et.stepId},
RESRCE=#{et.resrce},
COMPONENT_BO=#{et.componentBo},
CALL_TYPE=#{et.callType},
REQUIRED_QTY=#{et.requiredQty},
REQUIRED_DATE_TIME=#{et.requiredDateTime},
ISSUE_QTY=#{et.issueQty},
STATUS=#{et.status},
CALL_STATUS=#{et.callStatus},
ISSUE_STATUS=#{et.issueStatus},
CREATE_USER=#{et.createUser},
CREATED_DATE_TIME=#{et.createdDateTime},
MODIFY_USER=#{et.modifyUser},
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
WHERE HANDLE=#{et.handle}
and
${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}
MODIFY Z_CALL_ITEM
SITE=#{et.site},
SFC_DISPATCH_BO=#{et.sfcDispatchBo},
CALL_ITEM_NO=#{et.callItemNo},
SHOP_ORDER=#{et.shopOrder},
SFC=#{et.sfc},
OPERATION=#{et.operation},
STEP_ID=#{et.stepId},
RESRCE=#{et.resrce},
COMPONENT_BO=#{et.componentBo},
CALL_TYPE=#{et.callType},
REQUIRED_QTY=#{et.requiredQty},
REQUIRED_DATE_TIME=#{et.requiredDateTime},
ISSUE_QTY=#{et.issueQty},
STATUS=#{et.status},
CALL_STATUS=#{et.callStatus},
ISSUE_STATUS=#{et.issueStatus},
CREATE_USER=#{et.createUser},
CREATED_DATE_TIME=#{et.createdDateTime},
MODIFY_USER=#{et.modifyUser},
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
HANDLE=#{ew.entity.handle}
AND SITE=#{ew.entity.site}
AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}
AND CALL_ITEM_NO=#{ew.entity.callItemNo}
AND SHOP_ORDER=#{ew.entity.shopOrder}
AND SFC=#{ew.entity.sfc}
AND OPERATION=#{ew.entity.operation}
AND STEP_ID=#{ew.entity.stepId}
AND RESRCE=#{ew.entity.resrce}
AND COMPONENT_BO=#{ew.entity.componentBo}
AND CALL_TYPE=#{ew.entity.callType}
AND REQUIRED_QTY=#{ew.entity.requiredQty}
AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}
AND ISSUE_QTY=#{ew.entity.issueQty}
AND STATUS=#{ew.entity.status}
AND CALL_STATUS=#{ew.entity.callStatus}
AND ISSUE_STATUS=#{ew.entity.issueStatus}
AND CREATE_USER=#{ew.entity.createUser}
AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}
AND MODIFY_USER=#{ew.entity.modifyUser}
AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}
${ew.sqlSegment}
${ew.sqlSegment}
DELETE FROM Z_CALL_ITEM WHERE HANDLE=#{handle}
DELETE FROM Z_CALL_ITEM
${k} = #{cm[${k}]}
DELETE FROM Z_CALL_ITEM
HANDLE=#{ew.entity.handle}
AND SITE=#{ew.entity.site}
AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}
AND CALL_ITEM_NO=#{ew.entity.callItemNo}
AND SHOP_ORDER=#{ew.entity.shopOrder}
AND SFC=#{ew.entity.sfc}
AND OPERATION=#{ew.entity.operation}
AND STEP_ID=#{ew.entity.stepId}
AND RESRCE=#{ew.entity.resrce}
AND COMPONENT_BO=#{ew.entity.componentBo}
AND CALL_TYPE=#{ew.entity.callType}
AND REQUIRED_QTY=#{ew.entity.requiredQty}
AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}
AND ISSUE_QTY=#{ew.entity.issueQty}
AND STATUS=#{ew.entity.status}
AND CALL_STATUS=#{ew.entity.callStatus}
AND ISSUE_STATUS=#{ew.entity.issueStatus}
AND CREATE_USER=#{ew.entity.createUser}
AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}
AND MODIFY_USER=#{ew.entity.modifyUser}
AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}
${ew.sqlSegment}
${ew.sqlSegment}
DELETE FROM Z_CALL_ITEM WHERE HANDLE IN (
#{item}
)
DELETE FROM Z_CALL_ITEM WHERE STATUS != '803' AND SFC_DISPATCH_BO IN
#{item.handle}
DELETE FROM Z_CALL_ITEM WHERE SFC_DISPATCH_BO IN
#{item.handle}
UPDATE Z_CALL_ITEM SET STATUS = #{status}, MODIFY_USER = #{user}, MODIFIED_DATE_TIME = #{dateTime}
WHERE STATUS != '804' AND HANDLE IN
#{item.handle}
UPDATE Z_CALL_ITEM SET STATUS = #{status}, MODIFY_USER = #{user}, MODIFIED_DATE_TIME = #{dateTime}
WHERE STATUS != '804' AND SFC_DISPATCH_BO IN
#{item}
UPDATE Z_CALL_ITEM SET STATUS = #{status}, MODIFY_USER = #{user}, MODIFIED_DATE_TIME = #{dateTime}
WHERE SITE = #{site} AND STATUS = #{callItem.status} AND SHOP_ORDER = #{callItem.shopOrder}
AND COMPONENT_BO = #{callItem.componentBo}
UPDATE Z_CALL_ITEM SET STATUS = #{status}, MODIFY_USER = #{user}, MODIFIED_DATE_TIME = #{dateTime}
WHERE STATUS != '804' AND CALL_ITEM_NO IN
#{item}
UPDATE Z_CALL_ITEM SET MODIFY_USER = #{user}, MODIFIED_DATE_TIME = #{dateTime}, REQUIRED_DATE_TIME = (
SELECT ZSD.PLANNED_START_DATE
FROM Z_SFC_DISPATCH ZSD
WHERE Z_CALL_ITEM.SFC_DISPATCH_BO = ZSD.HANDLE
)
WHERE Z_CALL_ITEM.CALL_ITEM_NO IN
#{item}