| | |
| | | import java.sql.ResultSet;
|
| | | import java.sql.SQLException;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import com.base.Com;
|
| | | import com.mode.Device_Inf;
|
| | | import com.mode.Dynamicload_State_rt;
|
| | | import com.sql.MysqlConnPool;
|
| | | import com.sql.Sql_Mysql;
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | //加载负载实时数据
|
| | | public static void updateDynamicload(MysqlConnPool conn_pool, Dynamicload_State_rt state) {
|
| | | String sql_str = " UPDATE " + Sql_Mysql.Tb_Dynamicload_State_Rt_Table |
| | | + " SET "
|
| | | +" record_time='" + Com.getDateTimeFormat(state.getRecord_time(), Com.DTF_YMDhms)+"'"
|
| | | +",start_auto=" + state.getStart_auto()
|
| | | +",stop_auto=" + state.getStop_auto()
|
| | | +",sudden_crease=" + state.getSudden_crease()
|
| | | +",all_open=" + state.getAll_open()
|
| | | +",actual_set_power=" + state.getActual_set_power()
|
| | | +",output_power=" + state.getOutput_power()
|
| | | +",set_power=" + state.getSet_power()
|
| | | +",interval_time=" + state.getInterval_time()
|
| | | +",actual_curr=" + state.getActual_curr()
|
| | | +",actual_mov=" + state.getActual_mov()
|
| | | +",switch_on=" + state.getSwitch_on()
|
| | | +",FZ_autostate1=" + state.getFZ_autostate1()
|
| | | +",FZ_autostate2=" + state.getFZ_autostate2()
|
| | | +",FZ_autostate3=" + state.getFZ_autostate3()
|
| | | +",FZ_autostate4=" + state.getFZ_autostate4()
|
| | | +",FZ_autostate5=" + state.getFZ_autostate5()
|
| | | +",react_overtem=" + state.getReact_overtem()
|
| | | +",water_overtem=" + state.getWater_overtem()
|
| | | +",water_level_low=" + state.getWater_level_low()
|
| | | +",water_pressure_high=" + state.getWater_pressure_high()
|
| | | +",local_control=" + state.getLocal_control()
|
| | | +",back_control=" + state.getBack_control()
|
| | | +",central_control=" + state.getCentral_control()
|
| | | +",switch_state=" + state.getSwitch_state()
|
| | | +",inter_volume_M200=" + state.getInter_volume_M200()
|
| | | +",fan_button=" + state.getFan_button()
|
| | | +",fan_output=" + state.getFan_output()
|
| | | +",allow_close=" + state.allow_close
|
| | | + " WHERE dev_id = " + state.dev_id;
|
| | | Sql_Mysql sql = new Sql_Mysql(conn_pool.getConn());
|
| | | try {
|
| | | //System.out.println(sql_str);
|
| | | sql.sqlMysqlExecute(sql_str);
|
| | | } catch (SQLException e) {
|
| | | e.printStackTrace();
|
| | | } finally {
|
| | | sql.close_con();
|
| | | }
|
| | | }
|
| | | }
|