HANDLE, SITE, REPAIR_NO, DESCRIPTION, STATUS, RESOURCE_NO, REPORT_USER, NC_CODE_NO, REPAIR_TYPE, STOP_MACHINE, BREAK_DOWN_DESCRIPTION, FIND_LINK, REPORT_SOURCE, OBJECT_BO, PLAN_START_DATE, PLAN_COMPLETE_DATE, ACTUAL_START_DATE, ACTUAL_COMPLETE_DATE, REPAIR_USERS, CANCEL_CODE, CANCEL_DATE, CANCEL_DESCRIPTION, CANCEL_USER, DEAL_WAY, PRELIMINARY_REASON, DEAL_WAY_DESCRIPTION, WAIT_TIME, WAIT_START_DATE, WAIT_END_DATE, WAIT_DESCRIPTION, PRIMARY_REASON, PRIMARY_REASON_DESCRIPTION, PRECAUTION_MEASURE_DESCRIPTION, REMARK, OTHER, ANOTHER, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME
INSERT INTO Z_RESOURCE_REPAIR_TASK
HANDLE,
SITE,REPAIR_NO,DESCRIPTION,STATUS,RESOURCE_NO,REPORT_USER,NC_CODE_NO,REPAIR_TYPE,STOP_MACHINE,BREAK_DOWN_DESCRIPTION,FIND_LINK,REPORT_SOURCE,OBJECT_BO,PLAN_START_DATE,PLAN_COMPLETE_DATE,ACTUAL_START_DATE,ACTUAL_COMPLETE_DATE,REPAIR_USERS,CANCEL_CODE,CANCEL_DATE,CANCEL_DESCRIPTION,CANCEL_USER,DEAL_WAY,PRELIMINARY_REASON,DEAL_WAY_DESCRIPTION,WAIT_TIME,WAIT_START_DATE,WAIT_END_DATE,WAIT_DESCRIPTION,PRIMARY_REASON,PRIMARY_REASON_DESCRIPTION,PRECAUTION_MEASURE_DESCRIPTION,REMARK,OTHER,ANOTHER,CREATE_USER,CREATED_DATE_TIME,MODIFY_USER,MODIFIED_DATE_TIME, VALUES
#{handle},
#{site},#{repairNo},#{description},#{status},#{resourceNo},#{reportUser},#{ncCodeNo},#{repairType},#{stopMachine},#{breakDownDescription},#{findLink},#{reportSource},#{objectBo},#{planStartDate},#{planCompleteDate},#{actualStartDate},#{actualCompleteDate},#{repairUsers},#{cancelCode},#{cancelDate},#{cancelDescription},#{cancelUser},#{dealWay},#{preliminaryReason},#{dealWayDescription},#{waitTime},#{waitStartDate},#{waitEndDate},#{waitDescription},#{primaryReason},#{primaryReasonDescription},#{precautionMeasureDescription},#{remark},#{other},#{another},#{createUser},#{createdDateTime},#{modifyUser},#{modifiedDateTime},
INSERT INTO Z_RESOURCE_REPAIR_TASK
VALUES
#{handle},
#{site},
#{repairNo},
#{description},
#{status},
#{resourceNo},
#{reportUser},
#{ncCodeNo},
#{repairType},
#{stopMachine},
#{breakDownDescription},
#{findLink},
#{reportSource},
#{objectBo},
#{planStartDate},
#{planCompleteDate},
#{actualStartDate},
#{actualCompleteDate},
#{repairUsers},
#{cancelCode},
#{cancelDate},
#{cancelDescription},
#{cancelUser},
#{dealWay},
#{preliminaryReason},
#{dealWayDescription},
#{waitTime},
#{waitStartDate},
#{waitEndDate},
#{waitDescription},
#{primaryReason},
#{primaryReasonDescription},
#{precautionMeasureDescription},
#{remark},
#{other},
#{another},
#{createUser},
#{createdDateTime},
#{modifyUser},
#{modifiedDateTime},
UPDATE Z_RESOURCE_REPAIR_TASK SITE=#{et.site},REPAIR_NO=#{et.repairNo},DESCRIPTION=#{et.description},STATUS=#{et.status},RESOURCE_NO=#{et.resourceNo},REPORT_USER=#{et.reportUser},NC_CODE_NO=#{et.ncCodeNo},REPAIR_TYPE=#{et.repairType},STOP_MACHINE=#{et.stopMachine},BREAK_DOWN_DESCRIPTION=#{et.breakDownDescription},FIND_LINK=#{et.findLink},REPORT_SOURCE=#{et.reportSource},OBJECT_BO=#{et.objectBo},PLAN_START_DATE=#{et.planStartDate},PLAN_COMPLETE_DATE=#{et.planCompleteDate},ACTUAL_START_DATE=#{et.actualStartDate},ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate},REPAIR_USERS=#{et.repairUsers},CANCEL_CODE=#{et.cancelCode},CANCEL_DATE=#{et.cancelDate},CANCEL_DESCRIPTION=#{et.cancelDescription},CANCEL_USER=#{et.cancelUser},DEAL_WAY=#{et.dealWay},PRELIMINARY_REASON=#{et.preliminaryReason},DEAL_WAY_DESCRIPTION=#{et.dealWayDescription},WAIT_TIME=#{et.waitTime},WAIT_START_DATE=#{et.waitStartDate},WAIT_END_DATE=#{et.waitEndDate},WAIT_DESCRIPTION=#{et.waitDescription},PRIMARY_REASON=#{et.primaryReason},PRIMARY_REASON_DESCRIPTION=#{et.primaryReasonDescription},PRECAUTION_MEASURE_DESCRIPTION=#{et.precautionMeasureDescription},REMARK=#{et.remark},OTHER=#{et.other},ANOTHER=#{et.another},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}
UPDATE Z_RESOURCE_REPAIR_TASK
SITE=#{et.site},
REPAIR_NO=#{et.repairNo},
DESCRIPTION=#{et.description},
STATUS=#{et.status},
RESOURCE_NO=#{et.resourceNo},
REPORT_USER=#{et.reportUser},
NC_CODE_NO=#{et.ncCodeNo},
REPAIR_TYPE=#{et.repairType},
STOP_MACHINE=#{et.stopMachine},
BREAK_DOWN_DESCRIPTION=#{et.breakDownDescription},
FIND_LINK=#{et.findLink},
REPORT_SOURCE=#{et.reportSource},
OBJECT_BO=#{et.objectBo},
PLAN_START_DATE=#{et.planStartDate},
PLAN_COMPLETE_DATE=#{et.planCompleteDate},
ACTUAL_START_DATE=#{et.actualStartDate},
ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate},
REPAIR_USERS=#{et.repairUsers},
CANCEL_CODE=#{et.cancelCode},
CANCEL_DATE=#{et.cancelDate},
CANCEL_DESCRIPTION=#{et.cancelDescription},
CANCEL_USER=#{et.cancelUser},
DEAL_WAY=#{et.dealWay},
PRELIMINARY_REASON=#{et.preliminaryReason},
DEAL_WAY_DESCRIPTION=#{et.dealWayDescription},
WAIT_TIME=#{et.waitTime},
WAIT_START_DATE=#{et.waitStartDate},
WAIT_END_DATE=#{et.waitEndDate},
WAIT_DESCRIPTION=#{et.waitDescription},
PRIMARY_REASON=#{et.primaryReason},
PRIMARY_REASON_DESCRIPTION=#{et.primaryReasonDescription},
PRECAUTION_MEASURE_DESCRIPTION=#{et.precautionMeasureDescription},
REMARK=#{et.remark},
OTHER=#{et.other},
ANOTHER=#{et.another},
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}
UPDATE Z_RESOURCE_REPAIR_TASK SITE=#{et.site},REPAIR_NO=#{et.repairNo},DESCRIPTION=#{et.description},STATUS=#{et.status},RESOURCE_NO=#{et.resourceNo},REPORT_USER=#{et.reportUser},NC_CODE_NO=#{et.ncCodeNo},REPAIR_TYPE=#{et.repairType},STOP_MACHINE=#{et.stopMachine},BREAK_DOWN_DESCRIPTION=#{et.breakDownDescription},FIND_LINK=#{et.findLink},REPORT_SOURCE=#{et.reportSource},OBJECT_BO=#{et.objectBo},PLAN_START_DATE=#{et.planStartDate},PLAN_COMPLETE_DATE=#{et.planCompleteDate},ACTUAL_START_DATE=#{et.actualStartDate},ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate},REPAIR_USERS=#{et.repairUsers},CANCEL_CODE=#{et.cancelCode},CANCEL_DATE=#{et.cancelDate},CANCEL_DESCRIPTION=#{et.cancelDescription},CANCEL_USER=#{et.cancelUser},DEAL_WAY=#{et.dealWay},PRELIMINARY_REASON=#{et.preliminaryReason},DEAL_WAY_DESCRIPTION=#{et.dealWayDescription},WAIT_TIME=#{et.waitTime},WAIT_START_DATE=#{et.waitStartDate},WAIT_END_DATE=#{et.waitEndDate},WAIT_DESCRIPTION=#{et.waitDescription},PRIMARY_REASON=#{et.primaryReason},PRIMARY_REASON_DESCRIPTION=#{et.primaryReasonDescription},PRECAUTION_MEASURE_DESCRIPTION=#{et.precautionMeasureDescription},REMARK=#{et.remark},OTHER=#{et.other},ANOTHER=#{et.another},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 REPAIR_NO=#{ew.entity.repairNo} AND DESCRIPTION=#{ew.entity.description} AND STATUS=#{ew.entity.status} AND RESOURCE_NO=#{ew.entity.resourceNo} AND REPORT_USER=#{ew.entity.reportUser} AND NC_CODE_NO=#{ew.entity.ncCodeNo} AND REPAIR_TYPE=#{ew.entity.repairType} AND STOP_MACHINE=#{ew.entity.stopMachine} AND BREAK_DOWN_DESCRIPTION=#{ew.entity.breakDownDescription} AND FIND_LINK=#{ew.entity.findLink} AND REPORT_SOURCE=#{ew.entity.reportSource} AND OBJECT_BO=#{ew.entity.objectBo} AND PLAN_START_DATE=#{ew.entity.planStartDate} AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate} AND ACTUAL_START_DATE=#{ew.entity.actualStartDate} AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate} AND REPAIR_USERS=#{ew.entity.repairUsers} AND CANCEL_CODE=#{ew.entity.cancelCode} AND CANCEL_DATE=#{ew.entity.cancelDate} AND CANCEL_DESCRIPTION=#{ew.entity.cancelDescription} AND CANCEL_USER=#{ew.entity.cancelUser} AND DEAL_WAY=#{ew.entity.dealWay} AND PRELIMINARY_REASON=#{ew.entity.preliminaryReason} AND DEAL_WAY_DESCRIPTION=#{ew.entity.dealWayDescription} AND WAIT_TIME=#{ew.entity.waitTime} AND WAIT_START_DATE=#{ew.entity.waitStartDate} AND WAIT_END_DATE=#{ew.entity.waitEndDate} AND WAIT_DESCRIPTION=#{ew.entity.waitDescription} AND PRIMARY_REASON=#{ew.entity.primaryReason} AND PRIMARY_REASON_DESCRIPTION=#{ew.entity.primaryReasonDescription} AND PRECAUTION_MEASURE_DESCRIPTION=#{ew.entity.precautionMeasureDescription} AND REMARK=#{ew.entity.remark} AND OTHER=#{ew.entity.other} AND ANOTHER=#{ew.entity.another} 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_RESOURCE_REPAIR_TASK WHERE HANDLE=#{handle}
DELETE FROM Z_RESOURCE_REPAIR_TASK
${k} = #{cm[${k}]}
DELETE FROM Z_RESOURCE_REPAIR_TASK
HANDLE=#{ew.entity.handle}
AND SITE=#{ew.entity.site} AND REPAIR_NO=#{ew.entity.repairNo} AND DESCRIPTION=#{ew.entity.description} AND STATUS=#{ew.entity.status} AND RESOURCE_NO=#{ew.entity.resourceNo} AND REPORT_USER=#{ew.entity.reportUser} AND NC_CODE_NO=#{ew.entity.ncCodeNo} AND REPAIR_TYPE=#{ew.entity.repairType} AND STOP_MACHINE=#{ew.entity.stopMachine} AND BREAK_DOWN_DESCRIPTION=#{ew.entity.breakDownDescription} AND FIND_LINK=#{ew.entity.findLink} AND REPORT_SOURCE=#{ew.entity.reportSource} AND OBJECT_BO=#{ew.entity.objectBo} AND PLAN_START_DATE=#{ew.entity.planStartDate} AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate} AND ACTUAL_START_DATE=#{ew.entity.actualStartDate} AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate} AND REPAIR_USERS=#{ew.entity.repairUsers} AND CANCEL_CODE=#{ew.entity.cancelCode} AND CANCEL_DATE=#{ew.entity.cancelDate} AND CANCEL_DESCRIPTION=#{ew.entity.cancelDescription} AND CANCEL_USER=#{ew.entity.cancelUser} AND DEAL_WAY=#{ew.entity.dealWay} AND PRELIMINARY_REASON=#{ew.entity.preliminaryReason} AND DEAL_WAY_DESCRIPTION=#{ew.entity.dealWayDescription} AND WAIT_TIME=#{ew.entity.waitTime} AND WAIT_START_DATE=#{ew.entity.waitStartDate} AND WAIT_END_DATE=#{ew.entity.waitEndDate} AND WAIT_DESCRIPTION=#{ew.entity.waitDescription} AND PRIMARY_REASON=#{ew.entity.primaryReason} AND PRIMARY_REASON_DESCRIPTION=#{ew.entity.primaryReasonDescription} AND PRECAUTION_MEASURE_DESCRIPTION=#{ew.entity.precautionMeasureDescription} AND REMARK=#{ew.entity.remark} AND OTHER=#{ew.entity.other} AND ANOTHER=#{ew.entity.another} 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_RESOURCE_REPAIR_TASK WHERE HANDLE IN (
#{item}
)
INSERT INTO Z_RESOURCE_REPAIR_TASK_LOG
HANDLE,
SITE,REPAIR_NO,DESCRIPTION,STATUS,RESOURCE_NO,REPORT_USER,NC_CODE_NO,REPAIR_TYPE,STOP_MACHINE,BREAK_DOWN_DESCRIPTION,FIND_LINK,REPORT_SOURCE,OBJECT_BO,PLAN_START_DATE,PLAN_COMPLETE_DATE,ACTUAL_START_DATE,ACTUAL_COMPLETE_DATE,REPAIR_USERS,CANCEL_CODE,CANCEL_DATE,CANCEL_DESCRIPTION,CANCEL_USER,DEAL_WAY,PRELIMINARY_REASON,DEAL_WAY_DESCRIPTION,WAIT_TIME,WAIT_START_DATE,WAIT_END_DATE,WAIT_DESCRIPTION,PRIMARY_REASON,PRIMARY_REASON_DESCRIPTION,PRECAUTION_MEASURE_DESCRIPTION,REMARK,OTHER,ANOTHER,CREATE_USER,CREATED_DATE_TIME,MODIFY_USER,MODIFIED_DATE_TIME, VALUES
#{handle},
#{site},#{repairNo},#{description},#{status},#{resourceNo},#{reportUser},#{ncCodeNo},#{repairType},#{stopMachine},#{breakDownDescription},#{findLink},#{reportSource},#{objectBo},#{planStartDate},#{planCompleteDate},#{actualStartDate},#{actualCompleteDate},#{repairUsers},#{cancelCode},#{cancelDate},#{cancelDescription},#{cancelUser},#{dealWay},#{preliminaryReason},#{dealWayDescription},#{waitTime},#{waitStartDate},#{waitEndDate},#{waitDescription},#{primaryReason},#{primaryReasonDescription},#{precautionMeasureDescription},#{remark},#{other},#{another},#{createUser},#{createdDateTime},#{modifyUser},#{modifiedDateTime},