select plan_maint_id, plan_maint_code, maint_level, maint_group, maint_supervisor, maint_time,job_id,time_limit, cycle_period, maint_status, create_method, is_flag, remark, create_by, create_time, update_by, update_time, cron_expression from dms_plan_maint
SELECT HAIWEI.SEQ_DMS_PLAN_MAINT.NEXTVAL FROM DUAL
insert into dms_plan_maint
plan_maint_id,
plan_maint_code,
maint_level,
maint_group,
maint_supervisor,
maint_time,
time_limit,
job_id,
cycle_period,
maint_status,
create_method,
is_flag,
remark,
create_by,
create_time,
update_by,
update_time,
cron_expression,
#{planMaintId,jdbcType=NUMERIC},
#{planMaintCode},
#{maintLevel,jdbcType=NUMERIC},
#{maintGroup},
#{maintSupervisor},
#{maintTime},
#{timeLimit,jdbcType=NUMERIC},
#{jobId,jdbcType=NUMERIC},
#{cyclePeriod,jdbcType=NUMERIC},
#{maintStatus,jdbcType=NUMERIC},
#{createMethod,jdbcType=NUMERIC},
#{isFlag},
#{remark},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{cronExpression},
update dms_plan_maint
plan_maint_code = #{planMaintCode},
maint_level = #{maintLevel},
maint_group = #{maintGroup},
maint_supervisor = #{maintSupervisor},
maint_time = #{maintTime},
time_limit = #{timeLimit},
job_id = #{jobId},
cycle_period = #{cyclePeriod},
maint_status = #{maintStatus},
create_method = #{createMethod},
is_flag = #{isFlag},
remark = #{remark},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
cron_expression = #{cronExpression},
where plan_maint_id = #{planMaintId}
delete from dms_plan_maint where plan_maint_id = #{planMaintId}
delete from dms_plan_maint where plan_maint_id in
#{planMaintId}
delete from dms_plan_maint_detail where plan_maint_id in
#{planMaintId}
delete from dms_plan_maint_detail where plan_maint_id = #{planMaintId}
insert into dms_plan_maint_detail( plan_maint_detail_id, plan_maint_id,
device_id, maint_station_id, maint_protocol, operation_description, is_flag, remark,
create_by, create_time, update_by, update_time) values
( #{item.planMaintDetailId}, #{item.planMaintId}, #{item.deviceId}, #{item.maintStationId}, #{item.maintProtocol}, #{item.operationDescription}, #{item.isFlag}, #{item.remark}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime})
UPDATE dms_plan_maint
SET maint_time = #{maintTime}, update_time = SYSDATE
WHERE plan_maint_id = #{planMaintId}