select id, code, facility_name, facility_type, branch_factory, installation_location, facility_grade, rated_power, production_date, putrun_date, manufacturer, person_charge, technical_data, start_time, check_cycle, reminder_cycle, remark, create_time, create_by, update_time, update_by,point_flag,(start_time+check_cycle-reminder_cycle)<=current_date as txflage from facility_archives
insert into facility_archives
id,
code,
facility_name,
facility_type,
branch_factory,
installation_location,
facility_grade,
rated_power,
production_date,
putrun_date,
manufacturer,
person_charge,
technical_data,
start_time,
check_cycle,
reminder_cycle,
remark,
create_time,
create_by,
update_time,
update_by,
point_flag,
#{id},
#{code},
#{facilityName},
#{facilityType},
#{branchFactory},
#{istallationLocationn},
#{facilityGrade},
#{ratedPower},
#{productionDate},
#{putrunDate},
#{manufacturer},
#{personCharge},
#{technicalData},
#{startTime},
#{checkCycle},
#{reminderCycle},
#{remark},
#{createTime},
#{createBy},
#{updateTime},
#{updateBy},
#{pointFlag},
update facility_archives
code = #{code},
facility_name = #{facilityName},
facility_type = #{facilityType},
branch_factory = #{branchFactory},
installation_location = #{istallationLocationn},
facility_grade = #{facilityGrade},
rated_power = #{ratedPower},
production_date = #{productionDate},
putrun_date = #{putrunDate},
manufacturer = #{manufacturer},
person_charge = #{personCharge},
technical_data = #{technicalData},
start_time = #{startTime},
check_cycle = #{checkCycle},
reminder_cycle = #{reminderCycle},
remark = #{remark},
create_time = #{createTime},
create_by = #{createBy},
update_time = #{updateTime},
update_by = #{updateBy},
point_flag = #{pointFlag},
where id = #{id}
delete from facility_archives where id = #{id}
delete from facility_archives where id in
#{id}
update facility_archives
set start_time = NOW()
where id in
#{id}