64 lines
4.4 KiB
SQL
64 lines
4.4 KiB
SQL
INSERT INTO `$TableName$` (`id`, `device_id`, `created_time`, `collection_time`, `receive_time`,
|
|
`device_time`, `run_mode`, `well_status`, `plug_status`, `status_start_time`,
|
|
`status_end_time`, `oil_pressure`, `cas_pressure`, `pre_pressure`, `pipe_pressure`,
|
|
`liquid_level`, `temperature`, `humidity`, `op_mode`, `timer_able1`,
|
|
`timer_able2`, `timer_open1`, `timer_close1`, `timer_open2`, `timer_close2`,
|
|
`timing_open`, `timing_close`, `timing_delay`, `presource`, `pressure_open`,
|
|
`pressure_close`, `trigger_type`, `stability_time`, `max_open_well`, `max_close_well`,
|
|
`min_open_well`, `min_close_well`, `prespro_tect`, `prespro_source`,
|
|
`open_well_limit_max`, `open_well_limit_min`, `plug_init_status`, `plug_sustain_time`,
|
|
`plug_close_time`, `tp_init_status`, `tp_open_source`, `tp_open_trigger`,
|
|
`tp_open_pressure`, `tp_open_time`, `tp_close_source`, `tp_close_trigger`,
|
|
`tp_close_pressure`, `tp_close_time`, `tp_stability_time`)
|
|
VALUES (?, ?, NOW(), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
|
|
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
ON DUPLICATE KEY UPDATE receive_time=VALUES(receive_time),
|
|
device_time=VALUES(device_time),
|
|
run_mode=VALUES(run_mode),
|
|
well_status=VALUES(well_status),
|
|
plug_status=VALUES(plug_status),
|
|
status_start_time=VALUES(status_start_time),
|
|
status_end_time=VALUES(status_end_time),
|
|
oil_pressure=VALUES(oil_pressure),
|
|
cas_pressure=VALUES(cas_pressure),
|
|
pre_pressure=VALUES(pre_pressure),
|
|
pipe_pressure=VALUES(pipe_pressure),
|
|
liquid_level=VALUES(liquid_level),
|
|
temperature=VALUES(temperature),
|
|
humidity=VALUES(humidity),
|
|
op_mode=VALUES(op_mode),
|
|
timer_able1=VALUES(timer_able1),
|
|
timer_able2=VALUES(timer_able2),
|
|
timer_open1=VALUES(timer_open1),
|
|
timer_close1=VALUES(timer_close1),
|
|
timer_open2=VALUES(timer_open2),
|
|
timer_close2=VALUES(timer_close2),
|
|
timing_open=VALUES(timing_open),
|
|
timing_close=VALUES(timing_close),
|
|
timing_delay=VALUES(timing_delay),
|
|
presource=VALUES(presource),
|
|
pressure_open=VALUES(pressure_open),
|
|
pressure_close=VALUES(pressure_close),
|
|
trigger_type=VALUES(trigger_type),
|
|
stability_time=VALUES(stability_time),
|
|
max_open_well=VALUES(max_open_well),
|
|
max_close_well=VALUES(max_close_well),
|
|
min_open_well=VALUES(min_open_well),
|
|
min_close_well=VALUES(min_close_well),
|
|
prespro_tect=VALUES(prespro_tect),
|
|
prespro_source=VALUES(prespro_source),
|
|
open_well_limit_max=VALUES(open_well_limit_max),
|
|
open_well_limit_min=VALUES(open_well_limit_min),
|
|
plug_init_status=VALUES(plug_init_status),
|
|
plug_sustain_time=VALUES(plug_sustain_time),
|
|
plug_close_time=VALUES(plug_close_time),
|
|
tp_init_status=VALUES(tp_init_status),
|
|
tp_open_source=VALUES(tp_open_source),
|
|
tp_open_trigger=VALUES(tp_open_trigger),
|
|
tp_open_pressure=VALUES(tp_open_pressure),
|
|
tp_open_time=VALUES(tp_open_time),
|
|
tp_close_source=VALUES(tp_close_source),
|
|
tp_close_trigger=VALUES(tp_close_trigger),
|
|
tp_close_pressure=VALUES(tp_close_pressure),
|
|
tp_close_time=VALUES(tp_close_time),
|
|
tp_stability_time=VALUES(tp_stability_time) |