public static synchronized PreparedStatement getPs_selectBoat(Connection conn) throws Exception {
        if (ps_seGPS == null) {
            String selectSql = "select count(0) from BOATINFO b where b.id = ? ";
            ps_seGPS = conn.prepareStatement(selectSql);
        }
        return ps_seGPS;
    } public static String selectBoatInfo(String id, Connection conn) throws Exception {
        String resul1t = "0";
        PreparedStatement ps = getPs_selectBoat(conn);
        ps.setString(1, id);
        ResultSet rs = ps.executeQuery();
        if (rs.next()) {
            resul1t = rs.getObject(1).toString();
        }
        return resul1t;
    }查询时当表中没有数据还是返回1.