ElectLock_Monitor/src/com/dev/lock/comm/Lock_Task_SQL.java
@@ -89,6 +89,7 @@
                  " ,lock_online =  " + state.getLock_online() +
                  " ,lock_mac =  '" + state.getLockMacAddr() + "'" +
                  " ,lock_open_count =  " + state.getLock_open_count() + 
                  " ,model =  " + state.getWorkmodel() +
                  " ,last_update_time = '" + Com.getDateTimeFormat(state.getLast_update_time(), Com.DTF_YMDhms) + "'" +
                  " WHERE lock_id = " + inf.getLock_id();
      Sql_Mysql sql = new Sql_Mysql(pool.getConn());
@@ -399,6 +400,38 @@
      
   }
   
   /**
    *    当平台锁具模式未配置时返回-1
    *    返回0-离线模式   1-在线模式
    * @param pool
    * @return
    */
   public static int querySystemLockMode(MysqlConnPool pool) {
      int sys_model = -1;
      String sql_str_sel = "SELECT plate_model FROM " + Sql_Mysql.Plate_Info_Table;
      Sql_Mysql sql = new Sql_Mysql(pool.getConn());
      ResultSet res = null;
      try {
         res = sql.sqlMysqlQuery(sql_str_sel);
         if(res.next()) {
            sys_model = res.getInt("plate_model");
         }
      } catch (SQLException e) {
         sql.logger.error(e.toString(),e);
      } finally {
         if(null != res) {
            try {
               res.close();
            } catch (SQLException e) {
               sql.logger.error(e.toString(),e);
            }
         }
         sql.close_con();
      }
      return sys_model;
   }
   /**
    * 插入远程开锁失败记录
    */