123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627 |
- package com.sinosoft.em.response.team.service;
- import java.sql.Connection;
- import java.sql.PreparedStatement;
- import java.sql.ResultSet;
- import java.sql.SQLException;
- import javax.ws.rs.POST;
- import javax.ws.rs.Path;
- import javax.ws.rs.ProduceMime;
- import com.persistence.DbConnection;
- import com.sinosoft.lz.system.Utils;
- @Path("TeamAllotUpdateTeamState")
- public class TeamAllotUpdateTeamState {
- @POST
- @ProduceMime("application/json")
- @Path("/updateTeamStateToBusiness/")
- public String updateTeamStateToBusiness(String param){
- String fdObjectid = Utils.getParameter("FD_OBJECTID", param) == null ? "" : Utils.getParameter("FD_OBJECTID", param);
-
- String sql="update ECM_AM_EMERGENCY_TEAM set TEAM_STAT='2' where FD_OBJECTID=? and is_del='0'";
- DbConnection dbConn = new DbConnection();//数据库连接
- Connection conn = null;
- PreparedStatement pstm = null;//sql语句的执行者
- int n = 0;
- try {
- conn = dbConn.getConnection();
- pstm = conn.prepareStatement(sql);
- pstm.setString(1, fdObjectid);
- n = pstm.executeUpdate();
- } catch (SQLException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }finally{
- try {
- if(pstm!=null)
- pstm.close();
- if(conn!=null)
- conn.close();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- /*String usersJson = JsonPluginsUtil.listToJson(userList);
- Log.info(usersJson);
- return usersJson;*/
- return "00";
-
- }
-
- @POST
- @ProduceMime("application/json")
- @Path("/updateTeamStateToFree/")
- public String updateTeamStateToFree(String param){
- String fdObjectid = Utils.getParameter("FD_OBJECTID", param) == null ? "" : Utils.getParameter("FD_OBJECTID", param);
- String sql="update ECM_AM_EMERGENCY_TEAM set TEAM_STAT='1' where FD_OBJECTID=? and is_del='0'";
- DbConnection dbConn = new DbConnection();//数据库连接
- Connection conn = null;
- PreparedStatement pstm = null;//sql语句的执行者
- /*List userList = new ArrayList();*/
- //sb.append("{\"result\":");
- int n = 0;
- try {
- conn = dbConn.getConnection();
- pstm = conn.prepareStatement(sql);
- pstm.setString(1, fdObjectid);
- n = pstm.executeUpdate();
- //while(rs.next()){
- //sb.append("{\"key\":\"" + rs.getString("REAL_NAME") + "\",\"value\":\""+rs.getString("USER_ID")+"\"},");
- //sb.append("true}");
- //}
- //sb.append("]}");
- } catch (SQLException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }finally{
- try {
- if(pstm!=null)
- pstm.close();
- if(conn!=null)
- conn.close();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- return "";
- }
-
- @POST
- @ProduceMime("application/json")
- @Path("/updateTeamDemandStateToAlloting/")
- public String updateTeamDemandStateToAlloting(String param){
- String fdObjectid = Utils.getParameter("FD_OBJECTID", param) == null ? "" : Utils.getParameter("FD_OBJECTID", param);
-
- // String sql="update ECM_EM_TEAM_WRR set STATE='136' where FD_OBJECTID=? and is_del='0'";
- String sql="update ECM_EM_TEAM_WRR set ISALLOT='1' where FD_OBJECTID=? and is_del='0'";//20160920
- DbConnection dbConn = new DbConnection();//数据库连接
- Connection conn = null;
- PreparedStatement pstm = null;//sql语句的执行者
- int n = 0;
- try {
- conn = dbConn.getConnection();
- pstm = conn.prepareStatement(sql);
- pstm.setString(1, fdObjectid);
- n = pstm.executeUpdate();
- } catch (SQLException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }finally{
- try {
- if(pstm!=null)
- pstm.close();
- if(conn!=null)
- conn.close();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- /*String usersJson = JsonPluginsUtil.listToJson(userList);
- Log.info(usersJson);
- return usersJson;*/
- return "11";
-
- }
-
- /*@POST
- @ProduceMime("application/json")
- @Path("/updateTeamDemandStateToEnd/")
- public String updateTeamDemandStateToEnd(String param){*/
- public String updateTeamDemandStateToEnd(String fdObjectid){//设置队伍需求的状态为结束-----如果需求的调拨单位字段的长度(,)和UNITS_GETBACK的长度相等,再改
- //String fdObjectid = Utils.getParameter("FD_OBJECTID", param) == null ? "" : Utils.getParameter("FD_OBJECTID", param);
- String sql="update ECM_EM_TEAM_WRR set STATE='137' where FD_OBJECTID=? and is_del='0'";
- DbConnection dbConn = new DbConnection();//数据库连接
- Connection conn = null;
- PreparedStatement pstm = null;//sql语句的执行者
- int n = 0;
- try {
- conn = dbConn.getConnection();
- pstm = conn.prepareStatement(sql);
- pstm.setString(1, fdObjectid);
- n = pstm.executeUpdate();
- } catch (SQLException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }finally{
- try {
- if(pstm!=null)
- pstm.close();
- if(conn!=null)
- conn.close();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- /*String usersJson = JsonPluginsUtil.listToJson(userList);
- Log.info(usersJson);
- return usersJson;*/
- return "11";
- }
-
- @POST
- @ProduceMime("application/json")
- @Path("/addUnitIdToUNITS_GETBACK/")
- public String addUnitIdToUNITS_GETBACK(String param){
- String fdObjectid = Utils.getParameter("FD_OBJECTID", param) == null ? "" : Utils.getParameter("FD_OBJECTID", param);
- String unitId = Utils.getParameter("unitId", param) == null ? "" : Utils.getParameter("unitId", param);
-
- addUnitIdToUNITS_GETBACK1(param);//更新ECM_EM_TEAM_WRR.UNITS_GETBACK的值
-
- String allTwoTypeUnits = getAllTwoTypeUnits(fdObjectid);//获取调拨单位ID和已返回的单位ID
- int allotUnitsLen = allTwoTypeUnits.split("-")[0].split(",").length;//调拨单位ID的长度(单位个数)
- String unitsGetBack = allTwoTypeUnits.split("-")[1];
- int unitsGetBackLen = -1;//已返回的单位ID的长度(单位个数)
- if("kong".equals(unitsGetBack)){
- unitsGetBackLen = 0;
- }else{
- unitsGetBackLen = unitsGetBack.split(",").length;
- }
-
- if(allotUnitsLen == unitsGetBackLen){
- updateTeamDemandStateToEnd(fdObjectid);//设置队伍需求的状态为结束-----如果需求的调拨单位字段的长度(,)和UNITS_GETBACK的长度相等,再改
- }
-
- return "";
- }
- public String addUnitIdToUNITS_GETBACK1(String param){//更新ECM_EM_TEAM_WRR.UNITS_GETBACK的值
-
- String fdObjectid = Utils.getParameter("FD_OBJECTID", param) == null ? "" : Utils.getParameter("FD_OBJECTID", param);
- String unitId = Utils.getParameter("unitId", param) == null ? "" : Utils.getParameter("unitId", param);
-
- //判断ECM_EM_TEAM_WRR.UNITS_GETBACK是否包含unitId的值,如果包含就不添加,否则添加进去
- boolean isContainsUnit = false;
- isContainsUnit = isContainsTheUnit(fdObjectid,unitId);
- if(isContainsUnit){//如果包含,结束该方法
- return "";
- }else{//否则,添加单位ID到ECM_EM_TEAM_WRR.UNITS_GETBACK
-
- String units_getBack = getUnits_getBack(fdObjectid);
- if(units_getBack.equals(null) || "null".equals(units_getBack) || "".equals(units_getBack)){
- units_getBack = unitId;
- }else{
- units_getBack += ","+unitId;
- }
-
- String sql="update ECM_EM_TEAM_WRR set UNITS_GETBACK='"+units_getBack+"' where FD_OBJECTID=? and is_del='0'";
- DbConnection dbConn = new DbConnection();//数据库连接
- Connection conn = null;
- PreparedStatement pstm = null;//sql语句的执行者
- int n = 0;
- try {
- conn = dbConn.getConnection();
- pstm = conn.prepareStatement(sql);
- pstm.setString(1, fdObjectid);
- n = pstm.executeUpdate();
- } catch (SQLException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }finally{
- try {
- if(pstm!=null)
- pstm.close();
- if(conn!=null)
- conn.close();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- return "11";
- }
- }
- public String getUnits_getBack(String fdObjectid){//查询ECM_EM_TEAM_WRR.UNITS_GETBACK的值
- String sql = "select UNITS_GETBACK from ECM_EM_TEAM_WRR where FD_OBJECTID ='"+fdObjectid+"'";
- DbConnection dbConn = new DbConnection();//数据库连接
- Connection conn = null;
- PreparedStatement pstm = null;//sql语句的执行者
- ResultSet rs = null;//结果集
- StringBuffer sb = new StringBuffer();
- try {
- conn = dbConn.getConnection();
- pstm = conn.prepareStatement(sql);
- rs = pstm.executeQuery();
- while(rs.next()){
- sb.append(rs.getString("UNITS_GETBACK") == null ? "" : rs.getString("UNITS_GETBACK"));
- }
- } catch (SQLException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }finally{
- try {
- if(pstm!=null)
- pstm.close();
- if(conn!=null)
- conn.close();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- return sb.toString();
- }
- public boolean isContainsTheUnit(String fdObjectid,String unitId){//
-
- String allTwoTypeUnits = getAllTwoTypeUnits(fdObjectid);//获取调拨单位ID和已返回的单位ID
-
- //String allotUnits = allTwoTypeUnits.split("-")[0];//获取调拨单位ID
-
- String unitsGetBack = allTwoTypeUnits.split("-")[1];//获取已返回的单位ID
-
- boolean isContainsTheUnit = unitsGetBack.contains(unitId);
-
- return isContainsTheUnit;
- }
- public String getAllTwoTypeUnits(String fdObjectid){//获取调拨单位ID和已返回单位
- String sql = "select RANGE_UNITS_ID,UNITS_GETBACK from ECM_EM_TEAM_WRR where FD_OBJECTID ='"+fdObjectid+"'";
-
- DbConnection dbConn = new DbConnection();//数据库连接
- Connection conn = null;
- PreparedStatement pstm = null;//sql语句的执行者
- ResultSet rs = null;//结果集
-
- StringBuffer sb = new StringBuffer();
- try {
- conn = dbConn.getConnection();
- pstm = conn.prepareStatement(sql);
- rs = pstm.executeQuery();
- while(rs.next()){
- String allotUnits = rs.getString("RANGE_UNITS_ID") == null ? "" : rs.getString("RANGE_UNITS_ID");
- String unitsGetBack = rs.getString("UNITS_GETBACK") == null ? "kong" : rs.getString("UNITS_GETBACK");
- sb.append(allotUnits+"-"+unitsGetBack);
- }
- } catch (SQLException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }finally{
- try {
- if(pstm!=null)
- pstm.close();
- if(conn!=null)
- conn.close();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- return sb.toString();
- }
-
- @POST
- @ProduceMime("application/json")
- @Path("/getTeamMsgFromDailyTeam/")
- public String getTeamMsgFromDailyTeam(String params){
- String fdObjectid = Utils.getParameter("FD_OBJECTID", params) == null ? "" : Utils.getParameter("FD_OBJECTID", params);
- String sql = "select e.TEAM_TYPE,e.TEAM_LEVEL,e.TEAM_LEADER,e.TEAM_PHONE,e.TEAM_MEMBER_NUMBER from ECM_AM_EMERGENCY_TEAM e where FD_OBJECTID =?";
- //System.out.println("-------------------------------------------------"+sql);
- DbConnection dbConn = new DbConnection();//数据库连接
- Connection conn = null;
- PreparedStatement pstm = null;//sql语句的执行者
- ResultSet rs = null;//结果集
- StringBuffer sb = new StringBuffer();
- /*List userList = new ArrayList();*/
- sb.append("{\"result\":[");
-
- try {
- conn = dbConn.getConnection();
- pstm = conn.prepareStatement(sql);
- pstm.setString(1, fdObjectid);
- rs = pstm.executeQuery();
-
- while(rs.next()){
- sb.append("{\"TEAM_TYPE\":\""+rs.getString("TEAM_TYPE")+"\"},");
- sb.append("{\"TEAM_LEVEL\":\""+rs.getString("TEAM_LEVEL")+"\"},");
- sb.append("{\"TEAM_LEADER\":\""+rs.getString("TEAM_LEADER")+"\"},");
- sb.append("{\"TEAM_PHONE\":\""+rs.getString("TEAM_PHONE")+"\"},");
- sb.append("{\"TEAM_MEMBER_NUMBER\":\""+rs.getString("TEAM_MEMBER_NUMBER")+"\"}");
- }
- sb.append("]}");
- } catch (SQLException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }finally{
- try {
- if(pstm!=null)
- pstm.close();
- if(conn!=null)
- conn.close();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- /*String usersJson = JsonPluginsUtil.listToJson(userList);
- Log.info(usersJson);
- return usersJson;*/
- // System.out.println("-------------------------------------------------"+sb.toString());
- return sb.toString();
- }
-
- @POST
- @ProduceMime("application/json")
- @Path("/getTeamType/")
- public String getTeamType(String params){
- String fdCode = Utils.getParameter("FD_CODE", params) == null ? "" : Utils.getParameter("FD_CODE", params);
- String sql = "select FD_DESCRIPTION from BM_MAPVALUECANST where FD_TYPE='BM_TEAMTYPE' and FD_CODE=?";
- DbConnection dbConn = new DbConnection();//数据库连接
- Connection conn = null;
- PreparedStatement pstm = null;//sql语句的执行者
- ResultSet rs = null;//结果集
- StringBuffer sb = new StringBuffer();
- /*List userList = new ArrayList();*/
- sb.append("{\"result\":\"");
-
- try {
- conn = dbConn.getConnection();
- pstm = conn.prepareStatement(sql);
- pstm.setString(1, fdCode);
- rs = pstm.executeQuery();
- while(rs.next()){
- sb.append(rs.getString("FD_DESCRIPTION"));
- }
- sb.append("\"}");
- } catch (SQLException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }finally{
- try {
- if(pstm!=null)
- pstm.close();
- if(conn!=null)
- conn.close();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- /*String usersJson = JsonPluginsUtil.listToJson(userList);
- Log.info(usersJson);
- return usersJson;*/
-
- return sb.toString();
- }
-
-
- @POST
- @ProduceMime("application/json")
- @Path("/getTeamLevel/")
- public String getTeamLevel(String params){
- String fdCode = Utils.getParameter("FD_CODE", params) == null ? "" : Utils.getParameter("FD_CODE", params);
- String sql = "select FD_DESCRIPTION from BM_MAPVALUECANST where FD_TYPE='BM_DYDJ' and FD_CODE=?";
- DbConnection dbConn = new DbConnection();//数据库连接
- Connection conn = null;
- PreparedStatement pstm = null;//sql语句的执行者
- ResultSet rs = null;//结果集
- StringBuffer sb = new StringBuffer();
- /*List userList = new ArrayList();*/
- sb.append("{\"result\":\"");
-
- try {
- conn = dbConn.getConnection();
- pstm = conn.prepareStatement(sql);
- pstm.setString(1, fdCode);
- rs = pstm.executeQuery();
- while(rs.next()){
- sb.append(rs.getString("FD_DESCRIPTION"));
- }
- sb.append("\"}");
- } catch (SQLException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }finally{
- try {
- if(pstm!=null)
- pstm.close();
- if(conn!=null)
- conn.close();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
-
- return sb.toString();
- }
-
-
- @POST
- @ProduceMime("application/json")
- @Path("/getTeamName/")
- public String getTeamName(String params){
- String fdObjectid = Utils.getParameter("FD_OBJECTID", params) == null ? "" : Utils.getParameter("FD_OBJECTID", params);
- String sql = "select TEAM_NAME from ECM_AM_EMERGENCY_TEAM where FD_OBJECTID=?";
- DbConnection dbConn = new DbConnection();//数据库连接
- Connection conn = null;
- PreparedStatement pstm = null;//sql语句的执行者
- ResultSet rs = null;//结果集
- StringBuffer sb = new StringBuffer();
- /*List userList = new ArrayList();*/
- sb.append("{\"result\":\"");
-
- try {
- conn = dbConn.getConnection();
- pstm = conn.prepareStatement(sql);
- pstm.setString(1, fdObjectid);
- rs = pstm.executeQuery();
- while(rs.next()){
- sb.append(rs.getString("TEAM_NAME"));
- }
- sb.append("\"}");
- } catch (SQLException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }finally{
- try {
- if(pstm!=null)
- pstm.close();
- if(conn!=null)
- conn.close();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- return sb.toString();
- }
-
- @POST
- @ProduceMime("application/json")
- @Path("/getTeamCallerRealName/")
- public String getTeamCallerRealName(String params){
- String userId = Utils.getParameter("USER_ID", params) == null ? "" : Utils.getParameter("USER_ID", params);
- String sql = "select REAL_NAME from SYS_USER_INFO where USER_ID=?";
- DbConnection dbConn = new DbConnection();//数据库连接
- Connection conn = null;
- PreparedStatement pstm = null;//sql语句的执行者
- ResultSet rs = null;//结果集
- StringBuffer sb = new StringBuffer();
- /*List userList = new ArrayList();*/
- sb.append("{\"result\":\"");
-
- try {
- conn = dbConn.getConnection();
- pstm = conn.prepareStatement(sql);
- pstm.setString(1, userId);
- rs = pstm.executeQuery();
- while(rs.next()){
- sb.append(rs.getString("REAL_NAME"));
- }
- sb.append("\"}");
- } catch (SQLException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }finally{
- try {
- if(pstm!=null)
- pstm.close();
- if(conn!=null)
- conn.close();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- return sb.toString();
- }
-
- @POST
- @ProduceMime("application/json")
- @Path("/getLinkMenMsg/")
- public String getLinkMenMsg(String params){
- String fdObjectid = Utils.getParameter("objectId391", params) == null ? "" : Utils.getParameter("objectId391", params);
-
- String sql = "select ENTRY_UNIT_ATTN,ENTRY_UNIT_ATTN_TEL,ENTRY_ALTERNATIVE,ENTRY_ALTERNATIVE_TEL from ECM_EM_TEAM_WRR where FD_OBJECTID='"+fdObjectid+"'";
-
- DbConnection dbConn = new DbConnection();//数据库连接
- Connection conn = null;
- PreparedStatement pstm = null;//sql语句的执行者
- ResultSet rs = null;//结果集
-
- StringBuffer sb = new StringBuffer();
- sb.append("{\"result\":[");
-
- try {
- conn = dbConn.getConnection();
- pstm = conn.prepareStatement(sql);
- rs = pstm.executeQuery();
-
- while(rs.next()){
- String linkManId1 = rs.getString("ENTRY_UNIT_ATTN") == null ? "" : rs.getString("ENTRY_UNIT_ATTN");//联系人ID
- String linkPhone1 = rs.getString("ENTRY_UNIT_ATTN_TEL") == null ? "" : rs.getString("ENTRY_UNIT_ATTN_TEL");//联系人电话
- String linkManName1 = "";//联系人NAME
- String linkManId2 = rs.getString("ENTRY_ALTERNATIVE") == null ? "" : rs.getString("ENTRY_ALTERNATIVE");//联系人ID
- String linkPhone2 = rs.getString("ENTRY_ALTERNATIVE_TEL") == null ? "" : rs.getString("ENTRY_ALTERNATIVE_TEL");//联系人电话
- String linkManName2 = "";//联系人NAME
- if(!"".equals(linkManId1)){
- linkManName1 = getRealName(linkManId1);
- }
- if(!"".equals(linkManId2)){
- linkManName2 = getRealName(linkManId2);
- }
-
- sb.append("{\"linkManId1\":\""+linkManId1+"\"},{\"linkManName1\":\""+linkManName1+"\"},{\"linkPhone1\":\""+linkPhone1+"\"},"+
- "{\"linkManId2\":\""+linkManId2+"\"},{\"linkManName2\":\""+linkManName2+"\"},{\"linkPhone2\":\""+linkPhone2+"\"}");
- }
- sb.append("]}");
- } catch (SQLException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }finally{
- try {
- if(pstm!=null)
- pstm.close();
- if(conn!=null)
- conn.close();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- /*String usersJson = JsonPluginsUtil.listToJson(userList);
- Log.info(usersJson);
- return usersJson;*/
- // System.out.println("-------------------------------------------------"+sb.toString());
- return sb.toString();
- }
- public String getRealName(String userId){
-
- String sql = " select REAL_NAME from SYS_USER_INFO where USER_ID='"+userId+"' ";
-
- DbConnection dbConn = new DbConnection();//数据库连接
- Connection conn = null;
- PreparedStatement pstm = null;//sql语句的执行者
- ResultSet rs = null;//结果集
-
- String realName = "";
-
- try {
- conn = dbConn.getConnection();
- pstm = conn.prepareStatement(sql);
- rs = pstm.executeQuery();
-
- while(rs.next()){
- realName = rs.getString("REAL_NAME") == null ? "" : rs.getString("REAL_NAME");//联系人NAME
- }
- } catch (SQLException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }finally{
- try {
- if(pstm!=null)
- pstm.close();
- if(conn!=null)
- conn.close();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
-
- return realName;
- }
- }
|