//package com.trs.web2frame;
//
//import java.sql.Connection;
//import java.sql.ResultSet;
//import java.sql.SQLException;
//import java.sql.Statement;
//import java.text.SimpleDateFormat;
//import java.util.ArrayList;
//import java.util.Date;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//
//import com.trs.web2frame.tool.ConnectionUtil;
//import com.trs.web2frame.util.Log_Exception;
//
//public class ServiceImplWcmTest {
//    private String sqlType = "oracle";
//
//    /**
//     * 插入结果
//     * 
//     * @throws SQLException
//     */
//    public Boolean InsertResult(Integer wcmrecid, Integer hyrecid, Integer zwrecid) throws SQLException {
//        Connection connection=null;
//        Statement statement =null;
//        try {
//            if (wcmrecid == null) {
//                return false;
//            }
//            StringBuilder sb = new StringBuilder(
//                    "INSERT INTO NW_RESULT VALUES(" + wcmrecid + "," + hyrecid + "," + zwrecid + ")");
//            connection = ConnectionUtil.getConnection(sqlType);
//            statement = connection.createStatement();
//            int count = statement.executeUpdate(sb.toString());
//            // ResultSet rs = statement.getResultSet();
//            // ConnectionUtil.closeConnection(rs, statement, connection);
//            
//            if (count != 1) {
//                return false;
//            } else {
//                return true;
//            }
//        } catch (Exception e) {
//            // TODO: handle exception
//            Log_Exception.Error_txt("InsertResult 方法异常！" + e.getMessage());
//            return false;
//        }
//        finally{
//            if (statement != null) {
//                statement.close();
//            }
//            if (connection != null) {
//                connection.close();
//            }
//        }
//
//    }
//
//    /**
//     * 更新结果
//     * 
//     * @param wcmrecid
//     * @param hyrecid
//     * @param zwrecid
//     * @return
//     * @throws SQLException
//     */
//    public Boolean UpdateResult(Integer wcmrecid, Integer hyrecid, Integer zwrecid) throws SQLException {
//        Connection connection=null;
//        Statement statement =null;
//        try {
//            if(wcmrecid==null){
//                return false;
//            }
//            StringBuilder sb=new StringBuilder("UPDATE NW_RESULT SET HYRECID="+hyrecid+",ZWRECID="+zwrecid+" WHERE WCMRECID="+wcmrecid);
//            connection = ConnectionUtil.getConnection(sqlType);
//            statement = connection.createStatement();
//            int count = statement.executeUpdate(sb.toString());
//           
//            if(count!=1){
//                return false;
//            }else{
//                return true;
//            }
//        } catch (Exception e) {
//            //TODO: handle exception
//            Log_Exception.Error_txt("UpdateResult 方法异常！"+e.getMessage());
//            return false;
//        }
//        finally{
//            if(statement!=null){
//                statement.close();
//            }
//            if(connection!=null){
//                connection.close();
//            }
//        }
//        
//    }
//    public Boolean Updatehyrecid(Integer wcmrecid,Integer hyrecid) throws SQLException {
//        Connection connection=null;
//        Statement statement =null;
//        try {
//            if(wcmrecid==null){
//                return false;
//            }
//            StringBuilder sb=new StringBuilder("UPDATE NW_RESULT SET HYRECID="+hyrecid+" WHERE WCMRECID="+wcmrecid);
//            connection = ConnectionUtil.getConnection(sqlType);
//            statement = connection.createStatement();
//            int count = statement.executeUpdate(sb.toString());
//           
//            if(count!=1){
//                return false;
//            }else{
//                return true;
//            }
//        } catch (Exception e) {
//            //TODO: handle exception
//            Log_Exception.Error_txt("Updatehyrecid 方法异常！"+e.getMessage());
//            return false;
//        }
//        finally{
//            if(statement!=null){
//                statement.close();
//            }
//            if(connection!=null){
//                connection.close();
//            }
//        }
//        
//    }
//    /**
//     * 获取结果信息
//     * @param wcmrecid
//     * @return
//     */
//    public Map<String,Object> GetResultInfo(Integer wcmrecid){
//        Map<String,Object> map=new HashMap<>();
//        try {
//            if(wcmrecid!=null){
//                StringBuilder sb=new StringBuilder("SELECT * FROM NW_RESULT WHERE WCMRECID="+wcmrecid);
//                Connection connection = ConnectionUtil.getConnection(sqlType);
//                Statement statement = connection.createStatement();
//                ResultSet set = statement.executeQuery(sb.toString());
//                while (set.next()){
//                    map.put("wcmrecid", set.getString("WCMRECID"));//文档记录ID
//                    map.put("hyrecid", set.getString("HYRECID"));//文档记录ID
//                    map.put("zwrecid", set.getString("ZWRECID"));//文档记录ID
//                }
//                ConnectionUtil.closeConnection(set, statement, connection);
//                return map;
//            }else{
//                return null;
//            }
//        } catch (Exception e) {
//            //TODO: handle exception
//            Log_Exception.Error_txt("GetResultInfo方法异常！"+e.getMessage());
//            return null;
//        }
//        
//    }
//    /**
//     * 插入错误信息
//     * 
//     * @throws SQLException
//     */
//    public Boolean InsertLogMessageInfo(Integer wcmrecid, String docTitle, String logMessage) throws SQLException {
//        Connection connection=null;
//        Statement statement =null;
//        try {
//            if (wcmrecid == null) {
//                return false;
//            }
//            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 设置日期格式
//            String timeNow = df.format(new Date()).toString();
//            StringBuilder sb = new StringBuilder(
//                    "INSERT INTO LOGMESSAGEINFO(WCMRECID,DOCTITLEINFO,MESSAGEINFO,RETIME) VALUES(" + wcmrecid + ",'" + docTitle + "','" + logMessage + "','"+timeNow+"')");
//            connection = ConnectionUtil.getConnection(sqlType);
//            statement = connection.createStatement();
//            int count = statement.executeUpdate(sb.toString());
//            // ResultSet rs = statement.getResultSet();
//            // ConnectionUtil.closeConnection(rs, statement, connection);
//            
//            if (count != 1) {
//                return false;
//            } else {
//                return true;
//            }
//        } catch (Exception e) {
//            // TODO: handle exception
//            Log_Exception.Error_txt("InsertLogMessageInfo 方法异常！" + e.getMessage());
//            return false;
//        }
//        finally{
//            if (statement != null) {
//                statement.close();
//            }
//            if (connection != null) {
//                connection.close();
//            }
//        }
//
//    }
//
//    /**
//     * 更新错误信息
//     * 
//     */
//    public Boolean UpdateLogMessageInfo(Integer wcmrecid, String logMessage) throws SQLException {
//        Connection connection=null;
//        Statement statement =null;
//        try {
//            if(wcmrecid==null){
//                return false;
//            }
//            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 设置日期格式
//            String timeNow = df.format(new Date()).toString();
//            StringBuilder sb=new StringBuilder("UPDATE LOGMESSAGEINFO SET MESSAGEINFO='"+logMessage+"',RETIME='"+timeNow+"' WHERE WCMRECID="+wcmrecid);
//            connection = ConnectionUtil.getConnection(sqlType);
//            statement = connection.createStatement();
//            int count = statement.executeUpdate(sb.toString());
//           
//            if(count!=1){
//                return false;
//            }else{
//                return true;
//            }
//        } catch (Exception e) {
//            //TODO: handle exception
//            Log_Exception.Error_txt("UpdateLogMessageInfo 方法异常！"+e.getMessage());
//            return false;
//        }
//        finally{
//            if(statement!=null){
//                statement.close();
//            }
//            if(connection!=null){
//                connection.close();
//            }
//        }
//        
//    }
//
//    /**
//     * 根据原文档记录id获取迁移错误信息
//     * @param wcmrecid
//     * @return
//     */
//    public Map<String,Object> GetLogMessageInfo(Integer wcmrecid){
//        Map<String,Object> map=new HashMap<>();
//        try {
//            if(wcmrecid!=null){
//                StringBuilder sb=new StringBuilder("SELECT WCMRECID,DOCTITLEINFO,MESSAGEINFO,RETIME from LOGMESSAGEINFO WHERE WCMRECID="+wcmrecid);
//                Connection connection = ConnectionUtil.getConnection(sqlType);
//                Statement statement = connection.createStatement();
//                ResultSet set = statement.executeQuery(sb.toString());
//                while (set.next()){
//                    map.put("wcmrecid", set.getString("WCMRECID"));//文档记录ID
//                    //map.put("DOCTITLEINFO", set.getString("DOCTITLEINFO"));//
//                    //map.put("MESSAGEINFO", set.getString("MESSAGEINFO"));//
//                    //map.put("RETIME", set.getString("RETIME"));
//                }
//                ConnectionUtil.closeConnection(set, statement, connection);
//                return map;
//            }else{
//                return null;
//            }
//        } catch (Exception e) {
//            //TODO: handle exception
//            Log_Exception.Error_txt("GetLogMessageInfo方法异常！"+e.getMessage());
//            return null;
//        }
//        
//    }
//
//    /**
//     * 从老库查出该栏目下所有信息
//     * @param channelId 
//     * @return
//     */
//    public List<Map<String,Object>> GetAllDocInfoFromOldDB(String channelId){
//        List<Map<String, Object>> oldMaps = new ArrayList<>();
//        String conditions=" ";
//        //String conditions=" AND wcd.RECID IN(SELECT WCMRECID FROM LOGMESSAGEINFO WHERE MESSAGEINFO LIKE'%字段人物超长!%') ";
//        //conditions=" AND wcd.RECID IN(639596) ";
//        try {
//            StringBuilder sb=new StringBuilder("SELECT wcd.RECID,wcd.CHNLID,wcd.DOCCHANNEL,wcd.POSCHNLID,wcd.DOCID,wd.DOCTITLE,wd.DOCRELTIME,wcd.DOCORDER,wcd.MODAL "
//            +",wd.CRTIME,wd.CRUSER,wd.DOCABSTRACT,wd.DOCAUDITOR,wd.DOCAUTHOR,wd.DOCCONTENT,wd.DOCEDITOR,wd.DOCHTMLCON,wd.DOCKEYWORDS,wd.DOCFIRSTPUBTIME,wd.DOCFLAG "
//            +",wd.DOCFORM,wd.DOCFROMVERSION,wd.DOCKIND,wd.DOCLEVEL,wd.DOCLINK,wd.DOCLINKTO,wd.DOCPEOPLE,wd.DOCPLACE,wd.DOCSOURCENAME,wd.DOCTYPE "
//            +",wd.SUBDOCTITLE,wd.TITLECOLOR,wd.DOCSTATUS,wd.HITSCOUNT,wd.DOCFILENAME "
//            +",wd.ISCOMMENT, ISINDEXCONTENTTYPE, ISBOLD, ISINDEXTITLE, GKML_GKFW, GKML_GKSX, ISPOLL, ISOPENURL, WEATHER_PIC,"
//		    +"REPLY_OK, ISUPTITLE, ISDOWNTITLE, ISTITLECOLOR,ISLINKED, YUEFEN, ZHIBIAO, BAIFENBI, UNIQUEID, SOURCE, DOCTYPES,"
//		    +"STARTTIME, ENDTIME, JJSJ, SZGJ, CS, FENSHU, ZHUANGTAI, JGCK, DCZJ, ZHIBIAOS, ZJZT, KZZD, OLDURL, SFCS, HFSJ, HFBM,"
//		    +"TWSJ, FBR, ZIDINGYI, BDJS, FTJB, ZJBT, XXGK "
//            +" FROM wcmchnldoc wcd LEFT JOIN wcmdocument wd ON wcd.DOCID=wd.DOCID WHERE wcd.DOCSTATUS=10 AND wcd.SITEID=8 AND wcd.CHNLID="+channelId + conditions+" ORDER BY wcd.DOCORDER");
//            //,wd.TOPLINE,wd.ZCFGHY,wd.ZCFGJB,wd.JZSJ,wd.DDBS,wd.YT,wd.VIDEO_FILE AND wcd.SITEID=4
//            Connection connection = ConnectionUtil.getConnection(sqlType);
//            Statement statement = connection.createStatement();
//            ResultSet set = statement.executeQuery(sb.toString());
//            while (set.next()){
//                Map<String, Object> map = new HashMap<>();
//                map.put("RECID", set.getString("RECID"));//文档记录ID
//                map.put("MODAL", set.getString("MODAL"));//引用类型
//
//                map.put("DOCID", set.getString("DOCID"));
//                map.put("DOCTYPE",set.getString("DOCTYPE"));
//                map.put("DOCTITLE",set.getString("DOCTITLE"));
//                map.put("DOCCONTENT",set.getString("DOCCONTENT"));
//                map.put("DOCHTMLCON",set.getString("DOCHTMLCON"));
//                map.put("DOCABSTRACT",set.getString("DOCABSTRACT"));
//                map.put("DOCAUDITOR",set.getString("DOCAUDITOR"));
//                map.put("DOCKEYWORDS",set.getString("DOCKEYWORDS"));
//                map.put("DOCPEOPLE",set.getString("DOCPEOPLE"));
//                map.put("DOCPLACE",set.getString("DOCPLACE"));
//                map.put("DOCAUTHOR",set.getString("DOCAUTHOR"));
//                map.put("DOCRELTIME",set.getString("DOCRELTIME"));
//                map.put("CRTIME",set.getString("CRTIME"));
//                map.put("SUBDOCTITLE",set.getString("SUBDOCTITLE"));
//                map.put("DOCSOURCENAME",set.getString("DOCSOURCENAME"));
//                map.put("DOCFILENAME",set.getString("DOCFILENAME"));
//                map.put("DOCLINK",set.getString("DOCLINK"));
//                map.put("DOCLINKTO",set.getString("DOCLINKTO"));
//               // map.put("EDITOR",set.getString("EDITOR"));
//                map.put("TITLECOLOR",set.getString("TITLECOLOR"));
//                
//                // map.put("VIDEO_FILE", set.getString("VIDEO_FILE"));
//                // map.put("TOPLINE",set.getString("TOPLINE"));
//                // map.put("ZCFGHY", set.getString("ZCFGHY"));
//                // map.put("ZCFGJB", set.getString("ZCFGJB"));
//                // map.put("JZSJ", set.getString("JZSJ"));
//                // map.put("DDBS", set.getString("DDBS"));
//                // map.put("YT", set.getString("YT"));
//                
//                map.put("ISCOMMENT",set.getInt("ISCOMMENT"));
//			map.put("ISINDEXCONTENTTYPE",set.getString("ISINDEXCONTENTTYPE"));
//			map.put("ISBOLD",set.getString("ISBOLD"));
//			map.put("ISINDEXTITLE",set.getString("ISINDEXTITLE"));
//			map.put("GKML_GKFW",set.getString("GKML_GKFW"));
//			map.put("GKML_GKSX",set.getString("GKML_GKSX"));
//			map.put("ISPOLL",set.getString("ISPOLL"));
//			map.put("ISOPENURL",set.getString("ISOPENURL"));
//			map.put("WEATHER_PIC",set.getString("WEATHER_PIC"));
//			map.put("REPLY_OK",set.getString("REPLY_OK"));
//			map.put("ISUPTITLE",set.getString("ISUPTITLE"));
//			map.put("ISDOWNTITLE",set.getString("ISDOWNTITLE"));
//			map.put("ISTITLECOLOR",set.getString("ISTITLECOLOR"));
//			map.put("ISLINKED",set.getString("ISLINKED"));
//			map.put("YUEFEN",set.getString("YUEFEN"));
//			map.put("ZHIBIAO",set.getString("ZHIBIAO"));
//			map.put("BAIFENBI",set.getString("BAIFENBI"));
//			map.put("UNIQUEID",set.getString("UNIQUEID"));
//			map.put("SOURCE",set.getString("SOURCE"));
//			map.put("DOCTYPES",set.getString("DOCTYPES"));
//			map.put("STARTTIME",set.getString("STARTTIME"));
//			map.put("ENDTIME",set.getString("ENDTIME"));
//			map.put("JJSJ",set.getString("JJSJ"));
//			map.put("SZGJ",set.getString("SZGJ"));
//			map.put("CS",set.getString("CS"));
//			map.put("FENSHU",set.getString("FENSHU"));
//			map.put("ZHUANGTAI",set.getString("ZHUANGTAI"));
//			map.put("JGCK",set.getString("JGCK"));
//			map.put("DCZJ",set.getString("DCZJ"));
//			map.put("ZHIBIAOS",set.getString("ZHIBIAOS"));
//			map.put("ZJZT",set.getString("ZJZT"));
//			map.put("KZZD",set.getString("KZZD"));
//			map.put("OLDURL",set.getString("OLDURL"));
//			map.put("SFCS",set.getString("SFCS"));
//			map.put("HFSJ",set.getString("HFSJ"));
//			map.put("HFBM",set.getString("HFBM"));
//			map.put("TWSJ",set.getString("TWSJ"));
//			map.put("FBR",set.getString("FBR"));
//			map.put("ZIDINGYI",set.getString("ZIDINGYI"));
//			map.put("BDJS",set.getString("BDJS"));
//			map.put("FTJB",set.getString("FTJB"));
//			map.put("ZJBT",set.getString("ZJBT"));
//			map.put("XXGK",set.getString("XXGK"));
//
//                oldMaps.add(map);
//
//            }
//            ConnectionUtil.closeConnection(set, statement, connection);
//            return oldMaps;
//        } catch (Exception e) {
//            //TODO: handle exception
//            Log_Exception.Error_txt("GetAllDocInfoFromOldDB()方法异常"+e.getMessage());
//            return null;
//        }
//    }
//
//    /**
//     * 找出当前栏目下所有需要被引用的文档信息
//     * @param channelId
//     * @return
//     */
//    public List<Map<String,Object>> GetAllDocNeedQueto(String channelId){
//        List<Map<String,Object>> listMap=new ArrayList<>();
//        String conditions=" ";
//        //conditions=" AND wcd.DOCORDER>100240 ";
//        try {
//            StringBuilder sb=new StringBuilder("SELECT wcd.RECID,wcd.DOCID,W.DOCTITLE,wcd.MODAL,nc.NEWCHANELID FROM wcmchnldoc wcd LEFT JOIN WCMDOCUMENT W ON W.DOCID=WCD.DOCID "+
//            " LEFT JOIN CHANELRELATION_TEST nc ON wcd.CHNLID=nc.OLDCHANELID WHERE MODAL!=1 AND wcd.DOCSTATUS=10 AND wcd.SITEID=8 AND wcd.CHNLID="+channelId+conditions+" ORDER BY wcd.DOCORDER");
//            Connection connection = ConnectionUtil.getConnection(sqlType);
//            Statement statement = connection.createStatement();
//            ResultSet set = statement.executeQuery(sb.toString());
//            while (set.next()){
//                Map<String,Object> map=new HashMap<>();
//                map.put("WCM_RECID", set.getString("RECID"));
//                map.put("WCM_DOCID", set.getString("DOCID"));
//                map.put("HY_newchanelid", set.getString("NEWCHANELID"));
//                map.put("WCM_MODAL", set.getString("MODAL"));
//                map.put("WCM_DOCTITLE", set.getString("DOCTITLE"));
//                listMap.add(map);
//            }
//            ConnectionUtil.closeConnection(set, statement, connection);
//            return listMap;
//        } catch (Exception e) {
//            //TODO: handle exception
//            Log_Exception.Error_txt("GetAllNeedQueto()方法异常"+e.getMessage());
//            return null;
//        }
//       
//    }
//    /**
//     * 根据文档DocID获取最新的海云中的recID
//     * @param wcmDocId
//     * @return
//     */
//    public String GetHyRecId(String wcmDocId){
//        String HyRecId="";
//        try {
//            StringBuilder sb=new StringBuilder("SELECT nr.HYRECID FROM NW_RESULT nr LEFT JOIN wcmchnldoc wcd ON nr.WCMRECID=wcd.RECID WHERE wcd.MODAL=1 AND wcd.DOCID="+wcmDocId);
//            Connection connection = ConnectionUtil.getConnection(sqlType);
//            Statement statement = connection.createStatement();
//            ResultSet set = statement.executeQuery(sb.toString());
//            while (set.next()){
//                HyRecId=set.getString("HYRECID");
//            }
//            ConnectionUtil.closeConnection(set, statement, connection);
//            return HyRecId;
//        } catch (Exception e) {
//            //TODO: handle exception
//            Log_Exception.Error_txt("GetAllNeedQueto()方法异常"+e.getMessage());
//            return null;
//        }
//    }
//
//    /**
//     * 获取该栏目下所有需要重新排序的引用文档
//     * @param channelId
//     * @return
//     */
//    public List<Map<String,Object>> GetDocsNeedChangeOrder(String channelId){
//        List<Map<String,Object>> listMap=new ArrayList<>();
//        try {
//            StringBuilder sb=new StringBuilder("SELECT wcd.RECID,wcd.DOCID,nc.NEWCHANELID,nr.HYRECID,nr.ZWRECID FROM wcmchnldoc wcd  LEFT JOIN CHANELRELATION_TEST nc "
//            +" ON wcd.CHNLID=nc.OLDCHANELID LEFT JOIN NW_RESULT nr ON wcd.RECID=nr.WCMRECID WHERE  wcd.MODAL!=1 AND wcd.DOCSTATUS=10 AND wcd.SITEID=8 AND wcd.CHNLID="+channelId+" ORDER BY wcd.DOCORDER");
//            Connection connection = ConnectionUtil.getConnection(sqlType);
//            Statement statement = connection.createStatement();
//            ResultSet set = statement.executeQuery(sb.toString());
//            while (set.next()){
//                Map<String,Object> map=new HashMap<>();
//                map.put("WCM_RECID", set.getString("RECID"));
//                map.put("WCM_DOCID", set.getString("DOCID"));
//                map.put("HY_newchanelid", set.getString("NEWCHANELID"));
//                map.put("hyrecid", set.getString("HYRECID"));
//                map.put("zwrecid", set.getString("ZWRECID"));
//                listMap.add(map);
//            }
//            ConnectionUtil.closeConnection(set, statement, connection);
//            return listMap;
//        } catch (Exception e) {
//            //TODO: handle exception
//            Log_Exception.Error_txt("GetNeedChangeOrder()方法异常"+e.getMessage());
//            return null;
//        }
//
//        
//    }
//    	/**
//	 * 根据文档获取附件信息集合
//	 * @param docId
//	 * @return
//	 * @throws Exception
//	 */
//	public List<Map<String,Object>> GetFilesInfoByDocId (String docId) throws Exception{
//		StringBuilder sb = new StringBuilder("SELECT w.SRCFILE,w.APPFILE,w.APPDESC,w.APPFLAG FROM wcmappendix w where w.APPDOCID="+docId+" and w.appflag!=30 order by w.APPSERN");
//		List<Map<String,Object>> list = new ArrayList();
//		Connection connection = ConnectionUtil.getConnection("sqlserver");
//		//Connection connection = ConnectionUtil.getConnection("mysql");
//		Statement statement = connection.createStatement();
//		ResultSet set = statement.executeQuery(sb.toString());
//		
//		while (set.next()) {
//			Map<String,Object> map=new HashMap<>();
//			map.put("SRCFILE", set.getString("SRCFILE"));
//			map.put("APPFILE", set.getString("APPFILE"));
//			map.put("APPDESC", set.getString("APPDESC"));
//			map.put("APPFLAG", set.getString("APPFLAG"));
//			list.add(map);
//		}
//		ConnectionUtil.closeConnection(set, statement, connection);
//		return list;
//    }
//    
//    /**
//	 * 根据文档id获取关联文档信息
//	 * @param docId
//	 * @return
//	 * @throws Exception
//	 */
//	public List<Map<String,Object>> queryRelations(String docId) throws Exception{
//		List<Map<String,Object>> list=new ArrayList<>();
//		StringBuilder sb = new StringBuilder("SELECT WR.CHANNELID,WR.RELDOCID,(SELECT CR.NEWCHANELID FROM CHANELRELATION_TEST cr WHERE CR.OLDCHANELID=WR.CHANNELID ) AS NEWCHANNELID,w.DOCTITLE,w.DOCRELTIME FROM WCMRELATION WR LEFT JOIN WCMDOCUMENT w ON WR.RELDOCID=w.DOCID WHERE 1=1 AND WR.DOCID="+docId+" ORDER BY w.CRTIME DESC");
//		Connection connection = ConnectionUtil.getConnection(sqlType);
//		//Connection connection = ConnectionUtil.getConnection("mysql");
//		Statement statement = connection.createStatement();
//		ResultSet set = statement.executeQuery(sb.toString());
//		while (set.next()) {
//			Map<String,Object> map=new HashMap<>();
//			map.put("RELDOCID",set.getString("RELDOCID"));
//			map.put("DOCTITLE", set.getString("DOCTITLE"));
//			map.put("CHANNELID", set.getString("CHANNELID"));
//			map.put("NEWCHANNELID", set.getString("NEWCHANNELID"));
//			map.put("DOCRELTIME", set.getString("DOCRELTIME"));
//
//			list.add(map);
//		}
//		ConnectionUtil.closeConnection(set, statement, connection);
//		return list;
//	}
//
//
//
//    	/**
//	 * 获取新旧栏目关系
//	 */
//	public List<Map<String,Object>> queryChanelRelation() throws Exception{
//		List<Map<String,Object>> list = new ArrayList();
//        StringBuilder sb = new StringBuilder("select * from CHANELRELATION_TEST where ISHAD ='0' order by ID");
//		Connection connection = ConnectionUtil.getConnection(sqlType);
//		//Connection connection = ConnectionUtil.getConnection("mysql");
//		Statement statement = connection.createStatement();
//		ResultSet set = statement.executeQuery(sb.toString());
//		while (set.next()) {
//			Map<String,Object> map=new HashMap<>();
//			map.put("oldchanelid", set.getString("OLDCHANELID"));
//			map.put("newchanelid", set.getString("NEWCHANELID"));
//			list.add(map);
//		}
//		ConnectionUtil.closeConnection(set, statement, connection);
//		return list;
//    }
//    /**
//     * 获取栏目关系
//     * @param channelId
//     * @return
//     * @throws Exception
//     */
//    public String GetNewChannelId(String channelId)throws Exception{
//        String NEWCHANNELID="";
//        StringBuilder sb = new StringBuilder("SELECT NEWCHANNELID FROM OLDNEWCHANNEL WHERE OLDCHANNELID="+channelId);
//		Connection connection = ConnectionUtil.getConnection(sqlType);
//		//Connection connection = ConnectionUtil.getConnection("mysql");
//		Statement statement = connection.createStatement();
//		ResultSet set = statement.executeQuery(sb.toString());
//		while (set.next()) {
//			NEWCHANNELID=set.getString("NEWCHANNELID");
//		}
//		ConnectionUtil.closeConnection(set, statement, connection);
//		return NEWCHANNELID;
//    }
//
//    public List<Map<String,Object>> GetZhengCeAndJieDuRelation() throws Exception{
//        List<Map<String,Object>> list = new ArrayList();
//        StringBuilder sb = new StringBuilder("SELECT WA.APPDOCID AS 文章id,"
//    +"  (SELECT NR.HYRECID FROM NW_RESULT nr LEFT JOIN WCMCHNLDOC wcl ON NR.WCMRECID=WCL.RECID WHERE WCL.DOCID=WA.APPDOCID AND WCL.MODAL=1) HYRECID,"
//    +"  WA.APPFILE AS 关联地址,"
//    +"  WA.APPDESC AS 政务公开站点标题,"
//    +"  w.DOCTITLE AS 政务网下标题,"
//    +"  wcc.CHNLDESC AS 栏目描述"
//    +"  ,govwd.DOCID AS 公开文档ID"
//    +" ,(SELECT NR.HYRECID FROM GOVINFO.NW_RESULT nr LEFT JOIN GOVINFO.WCMCHNLDOC wcl ON NR.WCMRECID=WCL.RECID WHERE WCL.DOCID=govwd.DOCID AND WCL.MODAL=1)GovOpenHyRecID"
//    +"  FROM WCMAPPENDIX wa"
//    +"  LEFT JOIN WCMDOCUMENT w ON WA.APPDOCID = w.DOCID"
//    +"  LEFT JOIN WCMCHANNEL wcc ON wcc.CHANNELID = w.DOCCHANNEL"
//    +"  LEFT JOIN GOVINFO.WCMDOCUMENT govwd ON govwd.DOCPUBURL=WA.APPFILE"
//    +"  WHERE APPFILE LIKE '%http://gk.tj.gov.cn%html%'");
//		Connection connection = ConnectionUtil.getConnection(sqlType);
//		//Connection connection = ConnectionUtil.getConnection("mysql");
//		Statement statement = connection.createStatement();
//		ResultSet set = statement.executeQuery(sb.toString());
//		while (set.next()) {
//			Map<String,Object> map=new HashMap<>();
//			map.put("HYRECID", set.getString("HYRECID"));
//			map.put("GovOpenHyRecID", set.getString("GovOpenHyRecID"));
//			list.add(map);
//		}
//		ConnectionUtil.closeConnection(set, statement, connection);
//		return list;
//    }
//}