package com.trs.web2frame.tool.tyjyh.ggzyzheng;

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.read.listener.PageReadListener;
import com.alibaba.fastjson.JSON;
import com.trs.cms.CMSConstants;
import com.trs.web2frame.WCMServiceCaller;
import com.trs.web2frame.dispatch.Dispatch;
import com.trs.web2frame.tool.tyjyh.Log_Exception;
import com.trs.web2frame.tool.tyjyh.tongliao.*;
import net.sf.json.JSONObject;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;
import org.springframework.util.ObjectUtils;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.*;

/**
 */
public class ViewMoveGgzy {

    public static void main(String[] args) {
        ViewMoveGgzy viewMove = new ViewMoveGgzy();

       //  viewMove.DataZhiXunByChannelByTime("2023-09-27","政务公开/通知公告","1257","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
         //viewMove.DataZhiXunByChannelByTime("2023-09-15","政务动态/工作动态","1258","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);

        //viewMove.DataZhiXunByChannelByTime("2023-09-27","党建工作/党建动态","1566","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        //viewMove.DataZhiXunByChannelByTime("2023-09-28","政务公开/主题教育","1759","xamnmgggzy",JsoupUtilsView.filePathXAM);
        //viewMove.DataZhiXunByChannelByTime("2023-08-23","重要通知","1838","whsnmgggzy",JsoupUtilsView.filePathWHS);
        //viewMove.DataZhiXunByChannelByTime( "2023-09-22","党建工作/工作动态","1945","cfsnmgggzy",JsoupUtilsView.filePathCFS);
        //viewMove.DataZhiXunByChannelByTime( "2023-10-09","党建动态/党建动态","2039","wlcbnmgggzy",JsoupUtilsView.filePathWLCB);
        // viewMove.DataZhiXunByChannel("旗市区级","2120","tlsnmgggzy",JsoupUtilsView.filePathTLS);
       // viewMove.DataZhiXunByChannelByTime("2023-11-07","中心动态","2119","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        //viewMove.DataZhiXunByChannelByTime("2023-10-07","政务公开/党建工作","2132","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        viewMove.DataZhiXunByChannelByTime( "2023-10-11","中心动态","2213","bynrnmgggzy",JsoupUtilsView.filePathBynr);
    }

    public void mm(){
        // viewMove.DataZhiXunByChannel( "政府采购指南","1873","whsnmgggzy",JsoupUtilsView.filePathWHS);
        // viewMove.DataZhiXunByChannel( "建设交易指南","1874","whsnmgggzy",JsoupUtilsView.filePathWHS);
        //viewMove.DataZhiXunByChannel( "综合交易指南","1885","whsnmgggzy",JsoupUtilsView.filePathWHS);
        //viewMove.DataZhiXunByChannel( "国土交易指南","1875","whsnmgggzy",JsoupUtilsView.filePathWHS);
        // viewMove.DataZhiXunByChannel( "优化营商环境专栏","2781","whsnmgggzy",JsoupUtilsView.filePathWHS);

        //viewMove.DataZhiXunByChannel("重要信息","1077","nmgggzy",JsoupUtilsView.filePath);
        //viewMove.DataZhiXunByChannel("工作动态","1078","nmgggzy",JsoupUtilsView.filePath);
        // viewMove.DataZhiXunByChannel("盟市动态","1079","nmgggzy",JsoupUtilsView.filePath);
        // viewMove.DataZhiXunByChannel("政务公开/管理制度","1094","nmgggzy",JsoupUtilsView.filePath);
        // viewMove.DataZhiXunByChannel("政务公开/人事任免","1096","nmgggzy",JsoupUtilsView.filePath);
        // viewMove.DataZhiXunByChannel("财务公开","1092","nmgggzy",JsoupUtilsView.filePath);
        //  viewMove.DataZhiXunByChannel("服务指南/服务清单","1162","nmgggzy",JsoupUtilsView.filePath);
        // viewMove.DataZhiXunByChannel("服务指南/交易流程","1161","nmgggzy",JsoupUtilsView.filePath);
        //  viewMove.DataZhiXunByChannel("服务指南/交易目录","1163","nmgggzy",JsoupUtilsView.filePath);
        // viewMove.DataZhiXunByChannel("服务指南/常见问题","2597","nmgggzy",JsoupUtilsView.filePath);
        // viewMove.DataZhiXunByChannel("服务指南/投标指南","1164","nmgggzy",JsoupUtilsView.filePath);
        // viewMove.DataZWGKByChannel("政策法规/公共资源交易/国家级","1220","nmgggzy",JsoupUtilsView.filePath);
        //  viewMove.DataZWGKByChannel("政策法规/公共资源交易/自治区级","1226","nmgggzy",JsoupUtilsView.filePath,"14");
        // viewMove.DataZWGKByChannel("政策法规/政府采购/国家级","1226","nmgggzy",JsoupUtilsView.filePath,"14");
        // viewMove.DataZWGKByChannel("政策法规/政府采购/自治区级","1228","nmgggzy",JsoupUtilsView.filePath,"14");
        // viewMove.DataZWGKByChannel("政策法规/工程建设/国家级","1232","nmgggzy",JsoupUtilsView.filePath,"13");
        // viewMove.DataZWGKByChannel("政策法规/土地矿权交易/国家级","1238","nmgggzy",JsoupUtilsView.filePath,"15");
        // viewMove.DataZWGKByChannel("政策法规/土地矿权交易/自治区级","1240","nmgggzy",JsoupUtilsView.filePath,"15");
        // viewMove.DataZWGKByChannel("政策法规/产权交易/国家级","1243","nmgggzy",JsoupUtilsView.filePath,"16");
        // viewMove.DataZWGKByChannel("政策法规/产权交易/自治区级","1244","nmgggzy",JsoupUtilsView.filePath,"16");
        // viewMove.DataZWGKByChannel("政策法规/盟市级/国家级","1245","nmgggzy",JsoupUtilsView.filePath,"16");
        // viewMove.DataZWGKAllByChannel("1216","nmgggzy",JsoupUtilsView.filePath);
        //  viewMove.DataZhiXunByChannel("廉政建设","1108","nmgggzy",JsoupUtilsView.filePath);
        //         
        // viewMove.DataZhiXunByChannel("政务公开/通知公告","1257","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        // viewMove.DataZhiXunByChannelTitleTitle("政务公开/通知公告","2725","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        //  viewMove.DataZhiXunByChannel("政务动态/工作动态","1258","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        //  viewMove.DataZhiXunByChannel("政务动态/头条","2665","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        // viewMove.DataZhiXunByChannel("政务公开/通知公告","2668","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        // viewMove.DataZhiXunByChannel("政务公开/单位简介","1261","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        // viewMove.DataZhiXunByChannel("政务公开/管理制度","1275","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        // viewMove.DataZhiXunByChannel("政务公开/政务公开","2670","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        //  viewMove.DataZhiXunByChannel("政务公开/政策文件","2672","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        // viewMove.DataZhiXunByChannel("政务公开/政策解读","2674","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        // viewMove.DataZhiXunByChannel("政务公开/政府网站年报","2675","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        // viewMove.DataZhiXunByChannel("政务公开/建议提案","2676","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        //  viewMove.DataZhiXunByChannel("政务公开/重点领域信息公开","2677","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        // viewMove.DataZhiXunByChannel("政务公开/重点领域信息公开","2677","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        //  viewMove.DataZhiXunByChannel("党务公开","1279","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        //  viewMove.DataZhiXunByChannel("监管信息","1405","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        //  viewMove.DataZhiXunByChannel("交易指南","1412","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        // viewMove.DataZhiXunByChannel("操作手册","1414","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        // viewMove.DataZhiXunByChannel("操作手册","1414","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        // viewMove.DataZWGKByChannelHtt("政务公开/政策文件","1333","hhhtsnmgggzy",JsoupUtilsView.filePath);
        // viewMove.DataZWGKByChannelHtt("政务公开/政策解读","1333","hhhtsnmgggzy",JsoupUtilsView.filePath);
        //   viewMove.DataZhiXunByChannel("通知公告","1360","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        //  viewMove.DataZhiXunByChannel("工作动态","1361","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("专题学习","2678","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        //viewMove.DataZhiXunByChannel("党建要闻","2680","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("党风廉政建设","2681","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("中华文化符号和形象","2682","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        //  viewMove.DataZhiXunByChannel("铸牢中华民族共同体意识","2683","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("政务公开/中心简介","1364","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        //  viewMove.DataZhiXunByChannel("政务公开/中心简介","1364","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("政务公开/政府信息公开指南","2684","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("政务公开/组织架构","2685","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("政务公开/联系方式","2686","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        //viewMove.DataZhiXunByChannel("政务公开/职能清单","2687","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("政务公开/预决算公开","2688","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        //  viewMove.DataZhiXunByChannel("政务公开/领导成员","1365","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("办事指南/下载中心","1415","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        //  viewMove.DataZhiXunByChannel("办事指南/建设工程","2689","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("办事指南/政府采购","2691","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        //  viewMove.DataZhiXunByChannel("办事指南/自然资源","2693","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        //  viewMove.DataZhiXunByChannel("办事指南/产权交易","2695","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("办事指南/CA在线办理","2696","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("工作动态","1361","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("办事指南/投诉渠道","2697","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("政策法规/公共资源","1431","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("政策法规/建设工程","1437","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("政策法规/自然资源","1440","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        //   viewMove.DataZhiXunByChannel("政策法规/产权交易","1443","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("政策法规/政府采购","1434","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        // viewMove.DataZhiXunByChannel("通知公告","1552","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        // viewMove.DataZhiXunByChannel("动态新闻","1553","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        // viewMove.DataZhiXunByChannel("党建工作/党建动态","1566","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        // viewMove.DataZhiXunByChannel("党建工作/党史教育","1567","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        // viewMove.DataZhiXunByChannel("党建工作/三会一课","1568","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        // viewMove.DataZhiXunByChannel("党建工作/意识形态","2698","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        // viewMove.DataZhiXunByChannel("党建工作/党风廉政建设","1569","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        // viewMove.DataZhiXunByChannel("党建工作/其他工作","2699","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        // viewMove.DataZhiXunByChannel("政务公开/信息公开制度","1562","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        // viewMove.DataZhiXunByChannel("服务指南/业务指南","1599","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        // viewMove.DataZhiXunByChannel("下载中心/常用表单","1600","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        // viewMove.DataZhiXunByChannel("下载中心/下载中心","1601","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        //viewMove.DataZhiXunByChannel("下载中心/下载中心","1602","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        // viewMove.DataZhiXunByChannel("政策法规/政策法规","1625","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        //   viewMove.DataZhiXunByChannel("旗市区级","2120","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        //  viewMove.DataZhiXunByChannel("政务公开/中心简介","2122","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        //   viewMove.DataZhiXunByChannel("政务公开/内设机构","2126","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        // viewMove.DataZhiXunByChannel("政务公开/财务公开","2127","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        // viewMove.DataZhiXunByChannel("政务公开/中心职能","2128","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        // viewMove.DataZhiXunByChannel("政务公开/党建工作","2132","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        // viewMove.DataZhiXunByChannel("政务公开/廉政专栏","2135","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        //  viewMove.DataZhiXunByChannel("政务公开/交易监管","2160","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        //  viewMove.DataZhiXunByChannel("办事指南/交易课堂","2169","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        //  viewMove.DataZhiXunByChannel("下载中心","2170","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        //  viewMove.DataZhiXunByChannel("政策法规/综合类","2126","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        // viewMove.DataZWGKAllByChannel("1216","nmgggzy",JsoupUtilsView.filePath);
        // viewMove.DataZhiXunByChannel("通知公告","2118","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        // viewMove.DataZhiXunByChannel("中心动态","2119","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        //  viewMove.DataZWGKTLSAllByChannel( "2185","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        // viewMove.DataZhiXunByChannel( "政务公开/工作动态","1746","xamnmgggzy",JsoupUtilsView.filePathXAM);
        // viewMove.DataZhiXunByChannel( "政务公开/预决算公开","1754","xamnmgggzy",JsoupUtilsView.filePathXAM);
        // viewMove.DataZhiXunByChannel( "政务公开/制度建设","1755","xamnmgggzy",JsoupUtilsView.filePathXAM);
        // viewMove.DataZhiXunByChannel( "政务公开/主题教育","1759","xamnmgggzy",JsoupUtilsView.filePathXAM);
        //  viewMove.DataZhiXunByChannel( "政务公开/党史学习教育","1760","xamnmgggzy",JsoupUtilsView.filePathXAM);
        //  viewMove.DataZhiXunByChannel( "政务公开/主题党日专栏","1761","xamnmgggzy",JsoupUtilsView.filePathXAM);
        // viewMove.DataZhiXunByChannel( "信用信息/不规范行为","1786","xamnmgggzy",JsoupUtilsView.filePathXAM);
        // viewMove.DataZhiXunByChannel( "办事指南/交易流程","1792","xamnmgggzy",JsoupUtilsView.filePathXAM);
        // viewMove.DataZhiXunByChannel( "办事指南/操作手册","1795","xamnmgggzy",JsoupUtilsView.filePathXAM);
        // viewMove.DataZhiXunByChannel( "政策法规","1811","xamnmgggzy",JsoupUtilsView.filePathXAM);
        // viewMove.DataZhiXunByChannel( "政务公开/通知公告","1745","xamnmgggzy",JsoupUtilsView.filePathXAM);
        // viewMove.DataZhiXunByChannel( "通知公告","2025","wlcbnmgggzy",JsoupUtilsView.filePathWLCB);
        // viewMove.DataZhiXunByChannel( "动态要闻","2026","wlcbnmgggzy",JsoupUtilsView.filePathWLCB);
        // viewMove.DataZhiXunByChannel( "旗县市区动态","2027","wlcbnmgggzy",JsoupUtilsView.filePathWLCB);
        // viewMove.DataZhiXunByChannel( "党建动态/党建动态","2039","wlcbnmgggzy",JsoupUtilsView.filePathWLCB);
        // viewMove.DataZhiXunByChannel( "党建动态/廉政建设","2042","wlcbnmgggzy",JsoupUtilsView.filePathWLCB);
        // viewMove.DataZhiXunByChannel( "党建动态/廉政建设","2042","wlcbnmgggzy",JsoupUtilsView.filePathWLCB);
        // viewMove.DataZhiXunByChannel( "政务公开/机构职能","2033","wlcbnmgggzy",JsoupUtilsView.filePathWLCB);
        // viewMove.DataZhiXunByChannel( "政务公开/管理制度","2035","wlcbnmgggzy",JsoupUtilsView.filePathWLCB);
        // viewMove.DataZhiXunByChannel( "政务公开/管理制度","2035","wlcbnmgggzy",JsoupUtilsView.filePathWLCB);
        // viewMove.DataZhiXunByChannel( "政务公开/工作流程","2072","wlcbnmgggzy",JsoupUtilsView.filePathWLCB);
        // viewMove.DataZhiXunByChannel( "下载中心","2076","wlcbnmgggzy",JsoupUtilsView.filePathWLCB);
        // viewMove.DataZWGKWLCBAllByChannel(  "2091","wlcbnmgggzy",JsoupUtilsView.filePathWLCB);
        // viewMove.DataZhiXunByChannel( "决算公开","2034","wlcbnmgggzy",JsoupUtilsView.filePathWLCB);
        // viewMove.DataZhiXunByChannel( "国务院信息","2702","wlcbnmgggzy",JsoupUtilsView.filePathWLCB);
        /*
        {"ISSUCCESS":false,"MSG":"系统错误，请和管理员联系！","DATA":""},a5e02612798c03e8b037e7b4309b137e,228,
{"ISSUCCESS":false,"MSG":"系统错误，请和管理员联系！","DATA":""},2d71f80db2025ee20051d521341b0fa3,237,
{"ISSUCCESS":false,"MSG":"系统错误，请和管理员联系！","DATA":""},d99c979453a2969a12af8139b2bf0a62,238,
         */
        // viewMove.DataZhiXunByChannel( "通知公告","1931","cfsnmgggzy",JsoupUtilsView.filePathCFS);
        //  {"ISSUCCESS":false,"MSG":"系统错误，请和管理员联系！","DATA":""},5e9832bb2af2876097a40374e8f48d77,98,
        //viewMove.DataZhiXunByChannel( "政务公开/政务动态","1932","cfsnmgggzy",JsoupUtilsView.filePathCFS);
        //viewMove.DataZhiXunByChannel( "党建工作/工作动态","1945","cfsnmgggzy",JsoupUtilsView.filePathCFS);
        //viewMove.DataZhiXunByChannel( "党建工作/工作动态","1945","cfsnmgggzy",JsoupUtilsView.filePathCFS);
        // viewMove.DataZhiXunByChannel( "党建工作/教育学习","1946","cfsnmgggzy",JsoupUtilsView.filePathCFS);
        //viewMove.DataZhiXunByChannel( "党建工作/教育学习","1946","cfsnmgggzy",JsoupUtilsView.filePathCFS);
        //viewMove.DataZhiXunByChannel( "党建工作/制度建设","1948","cfsnmgggzy",JsoupUtilsView.filePathCFS);
        // viewMove.DataZhiXunByChannel( "党建工作/制度建设","1948","cfsnmgggzy",JsoupUtilsView.filePathCFS);
        // viewMove.DataZhiXunByChannel( "党建工作/工作流程","1978","cfsnmgggzy",JsoupUtilsView.filePathCFS);
        //viewMove.DataZhiXunByChannel( "党建工作/工作流程","1978","cfsnmgggzy",JsoupUtilsView.filePathCFS);
        //viewMove.DataZhiXunByChannel( "党建工作/工作流程","1978","cfsnmgggzy",JsoupUtilsView.filePathCFS);
        //select * from  cfsnmgggzy where channle = "常用工具/培训视频下载"
        // viewMove.DataZhiXunByChannel( "常用工具/培训视频下载","1981","cfsnmgggzy",JsoupUtilsView.filePathCFS);
        // viewMove.DataZhiXunByChannel( "常用工具/常用工具下载","1982","cfsnmgggzy",JsoupUtilsView.filePathCFS);
        // viewMove.DataZWGKCFSAllByChannel( "1998","cfsnmgggzy",JsoupUtilsView.filePathCFS);
        //viewMove.DataZhiXunByChannel( "重要通知","1838","whsnmgggzy",JsoupUtilsView.filePathWHS);
        //viewMove.DataZhiXunByChannel( "工作动态","1839","whsnmgggzy",JsoupUtilsView.filePathWHS);
        // viewMove.DataZhiXunByChannel( "会员须知","1839","whsnmgggzy",JsoupUtilsView.filePathWHS);
        // viewMove.DataZhiXunByChannel( "中心简介","1842","whsnmgggzy",JsoupUtilsView.filePathWHS);
        //viewMove.DataZhiXunByChannel( "机构设置","1846","whsnmgggzy",JsoupUtilsView.filePathWHS);
        // viewMove.DataZhiXunByChannel( "预算/决算","1847","whsnmgggzy",JsoupUtilsView.filePathWHS);
        // viewMove.DataZhiXunByChannel( "管理制度","1848","whsnmgggzy",JsoupUtilsView.filePathWHS);
        // viewMove.DataZhiXunByChannel( "人事任免","1849","whsnmgggzy",JsoupUtilsView.filePathWHS);
        // viewMove.DataZhiXunByChannel( "市场主体","1850","whsnmgggzy",JsoupUtilsView.filePathWHS);
        //viewMove.DataZhiXunByChannel( "市场主体","1850","whsnmgggzy",JsoupUtilsView.filePathWHS);
        //viewMove.DataZhiXunByChannel( "党建专栏/党建专栏","1852","whsnmgggzy",JsoupUtilsView.filePathWHS);
        //市公共资源交易中心开展民族团结主题宣传活动d3f98544651a4a5405f9552625ab7420.3gp
        //viewMove.DataZhiXunByChannel( "党建专栏/党建专栏","1852","whsnmgggzy",JsoupUtilsView.filePathWHS);
        //viewMove.DataZhiXunByChannel( "曝光台","1879","whsnmgggzy",JsoupUtilsView.filePathWHS);
        //viewMove.DataZhiXunByChannel( "使用手册","1888","whsnmgggzy",JsoupUtilsView.filePathWHS);
        //viewMove.DataZhiXunByChannel( "投标工具","1889","whsnmgggzy",JsoupUtilsView.filePathWHS);

        //viewMove.DataZhiXunByChannel( "工作动态","1653","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);
        //viewMove.DataZhiXunByChannel( "党建动态","1666","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);
        //viewMove.DataZhiXunByChannel( "我要招标","1702","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);
        //viewMove.DataZhiXunByChannel( "我要投标","1702","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);
        //viewMove.DataZhiXunByChannel( "CA服务","1700","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);
        //viewMove.DataZhiXunByChannel( "权责清单","1700","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);
        //viewMove.DataZhiXunByChannel( "权责清单","1700","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);
        //viewMove.DataZhiXunByChannel( "学习贯彻党的二十大精神专栏","2703","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);
        //viewMove.DataZhiXunByChannel( "学党史 悟思想 办实事 开新局","2704","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);
        //viewMove.DataZhiXunByChannel( "铸牢中华民族共同体意识促进民族团结进步专栏","2705","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);
        //viewMove.DataZhiXunByChannel( "优化营商环境服务专栏","2706","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);
        //viewMove.DataZhiXunByChannel( "万众一心 共同抗疫 守护我们的城市","2706","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);
        // viewMove.DataZhiXunByChannel( "学习贯彻习近平新时代中国特色社会主义思想主题教育","2707","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);
        // viewMove.DataZhiXunByChannel( "通知公告","1652","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);
        // viewMove.DataZhiXunByChannel( "通知公告","2212","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        // viewMove.DataZhiXunByChannel( "中心动态","2213","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        //viewMove.DataZhiXunByChannel( "中心动态","2213","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        //viewMove.DataZhiXunByChannel( "政务公开/单位简介","2216","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        //viewMove.DataZhiXunByChannel( "政务公开/机构设置","2220","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        //viewMove.DataZhiXunByChannel( "政务公开/政务公开","2215","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        // viewMove.DataZhiXunByChannel( "政务公开/财务公开","2221","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        // viewMove.DataZhiXunByChannel( "政务公开/财务公开","2221","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        // viewMove.DataZhiXunByChannel( "交易公开","2221","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        // viewMove.DataZhiXunByChannel( "营商环境","2716","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        //viewMove.DataZhiXunByChannel( "党建专栏","2226","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        //viewMove.DataZhiXunByChannel( "党建专栏","2226","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        //viewMove.DataZhiXunByChannel( "监管信息","2253","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        //viewMove.DataZhiXunByChannel( "下载中心","2263","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        //viewMove.DataZhiXunByChannel( "下载中心","2263","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        //viewMove.DataZhiXunByChannel( "办事指南","2264","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        //viewMove.DataZhiXunByChannel( "办事指南","2264","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        //viewMove.DataZhiXunByChannel( "政策法规","2278","bynrnmgggzy",JsoupUtilsView.filePathBynr);
        //viewMove.DataZhiXunByChannel( "领导之窗","1262","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        //viewMove.DataZhiXunByChannel( "党务公开","1279","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        // viewMove.DataZhiXunByChannel( "监管信息","1308","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        //viewMove.DataZhiXunByChannel( "交易指南","1315","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        // viewMove.DataZhiXunByChannel( "操作手册","1317","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        // viewMove.DataZhiXunByChannel( "下载中心","1318","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        // viewMove.DataZhiXunByChannel( "下载中心","1318","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);

        // viewMove.DataZhiXunByChannel( "优化营商环境","2787","xamnmgggzy",JsoupUtilsView.filePathXAM);
        //viewMove.DataZhiXunByChannel("主题教育","2788","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        // viewMove.DataZhiXunByChannel("政策法规小讲堂","2789","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        // viewMove.DataZhiXunByChannel("民族团结进步","2790","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        // viewMove.DataZhiXunByChannel("网络安全","2791","tlsnmgggzy",JsoupUtilsView.filePathTLS);
        // viewMove.DataZhiXunByChannel("交易发起方","1576","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        // viewMove.DataZhiXunByChannel("交易响应方","1574","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        // viewMove.DataZhiXunByChannel("代理机构信用评价","1575","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        //viewMove.DataZhiXunByChannel("行政处罚","1593","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        //viewMove.DataZhiXunByChannel("不规范行为披露","1593","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        //viewMove.DataZhiXunByChannel("双随机一公开","1593","hlbenmgggzy",JsoupUtilsView.filePathHLBE);
        //viewMove.DataZhiXunByChannel("代理机构信用评价","1593","hlbenmgggzy",JsoupUtilsView.filePathHLBE);

        // viewMove.DataZhiXunByChannel( "办事指南","2258","bynrnmgggzy",JsoupUtilsView.filePathBynr);

        // viewMove.DataZhiXunByChannel( "规章制度","1662","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);

        //viewMove.DataZWGKByChannelBaoTou("政策法规/公共资源","1430","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        //viewMove.DataZWGKByChannelBaoTou("政策法规/建设工程","1430","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        //viewMove.DataZWGKByChannelBaoTou("政策法规/自然资源","1430","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        //viewMove.DataZWGKByChannelBaoTou("政策法规/产权交易","1430","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        //viewMove.DataZWGKByChannelBaoTou("政策法规/政府采购","1430","btsnmgggzy",JsoupUtilsView.filePathBaotou);

        //viewMove.DataZWGKByChannelXlglm( "政策法规/国家级","1718","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);
        //viewMove.DataZWGKByChannelXlglm( "政策法规/自治区级","1718","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);
        //viewMove.DataZWGKByChannelXlglm( "政策法规/盟本级","1718","xlglmnmgggzy",JsoupUtilsView.filePathXLGLM);
        // viewMove.DataZWGKByChannelXAM( "政策法规","1811","xamnmgggzy",JsoupUtilsView.filePathXAM);
        //viewMove.DataZWGKByChannelXAM( "政策法规","1811","xamnmgggzy",JsoupUtilsView.filePathXAM);
        //viewMove.DataZWGKByChannelWHS( "政府采购","1904","whsnmgggzy",JsoupUtilsView.filePathXAM);
        //viewMove.DataZWGKByChannelWHS( "招投标和工程建设","1904","whsnmgggzy",JsoupUtilsView.filePathXAM);
        // viewMove.DataZWGKByChannelWHS( "土地矿权交易","1904","whsnmgggzy",JsoupUtilsView.filePathXAM);
        // viewMove.DataZWGKByChannelWHS( "产权交易","1904","whsnmgggzy",JsoupUtilsView.filePathXAM);
        // viewMove.DataZWGKByChannelWHS( "公共资源交易","1904","whsnmgggzy",JsoupUtilsView.filePathXAM);
        // viewMove.DataZWGKByChannelWHS( "公共资源交易","1904","whsnmgggzy",JsoupUtilsView.filePathXAM);
        // viewMove.DataZWGKByChannelXAM( "政策法规","2278","bynrnmgggzy",JsoupUtilsView.filePathBynr);

        //viewMove.DataZhiXunByChannel("利企惠民","2796","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        // viewMove.DataZhiXunByChannel("优化营商环境","2796","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        //viewMove.DataZhiXunByChannel("优化营商环境","2798","hhhtsnmgggzy",JsoupUtilsView.filePathHHHT);
        //viewMove.DataZhiXunByChannel("优化营商环境","2785","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        //viewMove.DataZhiXunByChannel("政策法规","2800","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        //viewMove.DataZhiXunByChannel("营商动态","2801","btsnmgggzy",JsoupUtilsView.filePathBaotou);
        //viewMove.DataZhiXunByChannel("他山之石","2802","btsnmgggzy",JsoupUtilsView.filePathBaotou);
    }


    public void DataZWGKByChannelBaoTou(String channelName,String hyChannelId,String tableName,String filePath){
        Log_Exception.Logger_txt("-------Start-------kpChannelId:" + channelName + "--hyChannelId:" + hyChannelId + "---------Start--------");
        String sServiceId = "gov_webdocument";
        String sMethodName = "saveDocumentInWeb";//自定义视图
        ServiceImplGgzy serviceImplKp=new ServiceImplGgzy();
        Annex annex = new Annex();
        try {
            List<Map<String,String>> allDocInfoFromKPDBdMaps = serviceImplKp.getNmgGgzy(channelName,tableName);
            if(allDocInfoFromKPDBdMaps!=null){
                int count=0;
                for (Map<String,String> map : allDocInfoFromKPDBdMaps) {
                    System.out.println("------------------------------------------------------------");
                    Map<String,Object> oPostData=new HashMap<>();
                    oPostData.put("ObjectId", 0);
                    oPostData.put("ChannelId", Integer.parseInt(hyChannelId));// Ŀ����Ŀid
                    oPostData.put("CurrUserName", "dev");
                    oPostData.put("isShenhe", "1");
                    oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_HTML);
                    DocumentDataBenJi documentData = new DocumentDataBenJi(map);
                    System.out.println(documentData);
                    if (documentData.getTitle() != null && documentData.getTitle() != "null") {
                        oPostData.put("DOCTITLE", Jsoup.parse(documentData.getTitle()).text()  );
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("scrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("fbrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("efectdat", documentData.getTime());
                    }
                    if (documentData.getChannle().equals("政策法规/公共资源")) {
                        oPostData.put("SUBCAT","14");
                    }
                    if (documentData.getChannle().equals("政策法规/建设工程")) {
                        oPostData.put("SUBCAT","13");
                    }
                    if (documentData.getChannle().equals("政策法规/自然资源")) {
                        oPostData.put("SUBCAT","14");
                    }
                    if (documentData.getChannle().equals("政策法规/产权交易")) {
                        oPostData.put("SUBCAT","14");
                    }
                    if (documentData.getChannle().equals("政策法规/政府采购")) {
                        oPostData.put("SUBCAT","14");
                    }

                 /*   if (documentData.getB_source() != null && documentData.getB_source() != "") {
                        oPostData.put("DOCSOURCENAME",documentData.getB_source());
                    }*/
                    if (documentData.getId() != null) {
                        oPostData.put("oldDocid", documentData.getId());
                    }
                    try {
                        if (documentData.getId() != null) {
                            Map<String, Object> getRelFileInfoByDocId = annex.getZWGKFileInfoByDocId(filePath,documentData.getId());
                            if( getRelFileInfoByDocId.get("docRelFile") != null){
                                oPostData.put("DOCATTACHFILEFIELD", getRelFileInfoByDocId.get("docRelFile"));
                            }
                            if( getRelFileInfoByDocId.get("docRelPic") != null){
                                oPostData.put("DOCATTACHPICFIELD", getRelFileInfoByDocId.get("docRelPic"));
                            }
                        }
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    try {
                        if (documentData.getContent()  != null) {
                            String  currentFilePathHtmlUrl = documentData.getContent();
                            System.out.println("===================start=======================");
                            System.out.println(currentFilePathHtmlUrl);
                            JsoupUtilsView jsoupUtils = new JsoupUtilsView();
                            String html = jsoupUtils.rexStringHtml(currentFilePathHtmlUrl,filePath);
                            System.out.println("==============================================");
                            html = html.replace(" ", "&nbsp;");
                            html = html.replace("TRS_UEDITOR", "");
                            html = html.replace("trs_paper_default", "");
                            html = html.replace("trs_web", "");
                            html = html.replace("trs_word", "");
                            System.out.println(html);
                            System.out.println("===================end========================");
                            oPostData.put("DOCHTMLCON", html);
                        } else {
                            oPostData.put("DocHtmlCon", "&nbsp;");
                            oPostData.put("DOCCONTENT", "&nbsp;");
                        }
                    }catch (Exception e){
                        oPostData.put("DocHtmlCon", "&nbsp;");
                        oPostData.put("DOCCONTENT", "&nbsp;");
                        e.printStackTrace();
                    }
                    try {
                        System.out.println(oPostData);
                        Dispatch result = WCMServiceCaller.Call(sServiceId, sMethodName, oPostData, true);
                        count++;
                        if(result!=null){
                            JSONObject rObject = JSONObject.fromObject(result.getResponseText().toString());
                            if (rObject.get("ISSUCCESS").toString().equals("true")){
                                System.out.println("DOCTITLE:"+documentData.getTitle());
                                System.out.println("count:"+count);
                                System.out.println("oldDocid:"+documentData.getId());
                            }else{
                                String serror = JSON.toJSONString(rObject);
                                System.out.println(serror);
                                outPrint(serror,documentData.getId(),count);
                            }
                        }
                    }catch(Exception e) {
                        outPrint("",documentData.getId(),count);
                        e.printStackTrace();
                    }
                    System.out.println("------------------------------------------------------------");
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            Log_Exception.Error_txt("DataZhiXunByChannel error"+e.getMessage());
        } finally {
        }
    }



    public void DataZWGKByChannelXlglm(String channelName,String hyChannelId,String tableName,String filePath){
        Log_Exception.Logger_txt("-------Start-------kpChannelId:" + channelName + "--hyChannelId:" + hyChannelId + "---------Start--------");
        String sServiceId = "gov_webdocument";
        String sMethodName = "saveDocumentInWeb";//自定义视图
        ServiceImplGgzy serviceImplKp=new ServiceImplGgzy();
        Annex annex = new Annex();
        try {
            List<Map<String,String>> allDocInfoFromKPDBdMaps = serviceImplKp.getNmgGgzy(channelName,tableName);
            if(allDocInfoFromKPDBdMaps!=null){
                int count=0;
                for (Map<String,String> map : allDocInfoFromKPDBdMaps) {
                    System.out.println("------------------------------------------------------------");
                    Map<String,Object> oPostData=new HashMap<>();
                    oPostData.put("ObjectId", 0);
                    oPostData.put("ChannelId", Integer.parseInt(hyChannelId));// Ŀ����Ŀid
                    oPostData.put("CurrUserName", "dev");
                    oPostData.put("isShenhe", "1");
                    oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_HTML);
                    DocumentDataBenJi documentData = new DocumentDataBenJi(map);
                    System.out.println(documentData);
                    if (documentData.getTitle() != null && documentData.getTitle() != "null") {
                        oPostData.put("DOCTITLE", Jsoup.parse(documentData.getTitle()).text()  );
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("scrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("fbrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("efectdat", documentData.getTime());
                    }
                    if (documentData.getChannle().equals("政策法规/国家级")) {
                        oPostData.put("CUSTCAT","9");
                        oPostData.put("THEMECAT","4");
                    }
                    if (documentData.getChannle().equals("政策法规/自治区级")) {
                        oPostData.put("CUSTCAT","9");
                        oPostData.put("THEMECAT","10");
                    }
                    if (documentData.getChannle().equals("政策法规/盟本级")) {
                        oPostData.put("CUSTCAT","9");
                        oPostData.put("THEMECAT","11");
                    }


                 /*   if (documentData.getB_source() != null && documentData.getB_source() != "") {
                        oPostData.put("DOCSOURCENAME",documentData.getB_source());
                    }*/
                    if (documentData.getId() != null) {
                        oPostData.put("oldDocid", documentData.getId());
                    }
                    try {
                        if (documentData.getId() != null) {
                            Map<String, Object> getRelFileInfoByDocId = annex.getZWGKFileInfoByDocId(filePath,documentData.getId());
                            if( getRelFileInfoByDocId.get("docRelFile") != null){
                                oPostData.put("DOCATTACHFILEFIELD", getRelFileInfoByDocId.get("docRelFile"));
                            }
                            if( getRelFileInfoByDocId.get("docRelPic") != null){
                                oPostData.put("DOCATTACHPICFIELD", getRelFileInfoByDocId.get("docRelPic"));
                            }
                        }
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    try {
                        if (documentData.getContent()  != null) {
                            String  currentFilePathHtmlUrl = documentData.getContent();
                            System.out.println("===================start=======================");
                            System.out.println(currentFilePathHtmlUrl);
                            JsoupUtilsView jsoupUtils = new JsoupUtilsView();
                            String html = jsoupUtils.rexStringHtml(currentFilePathHtmlUrl,filePath);
                            System.out.println("==============================================");
                            html = html.replace(" ", "&nbsp;");
                            html = html.replace("TRS_UEDITOR", "");
                            html = html.replace("trs_paper_default", "");
                            html = html.replace("trs_web", "");
                            html = html.replace("trs_word", "");
                            System.out.println(html);
                            System.out.println("===================end========================");
                            oPostData.put("DOCHTMLCON", html);
                        } else {
                            oPostData.put("DocHtmlCon", "&nbsp;");
                            oPostData.put("DOCCONTENT", "&nbsp;");
                        }
                    }catch (Exception e){
                        oPostData.put("DocHtmlCon", "&nbsp;");
                        oPostData.put("DOCCONTENT", "&nbsp;");
                        e.printStackTrace();
                    }
                    try {
                        System.out.println(oPostData);
                        Dispatch result = WCMServiceCaller.Call(sServiceId, sMethodName, oPostData, true);
                        count++;
                        if(result!=null){
                            JSONObject rObject = JSONObject.fromObject(result.getResponseText().toString());
                            if (rObject.get("ISSUCCESS").toString().equals("true")){
                                System.out.println("DOCTITLE:"+documentData.getTitle());
                                System.out.println("count:"+count);
                                System.out.println("oldDocid:"+documentData.getId());
                            }else{
                                String serror = JSON.toJSONString(rObject);
                                System.out.println(serror);
                                outPrint(serror,documentData.getId(),count);
                            }
                        }
                    }catch(Exception e) {
                        outPrint("",documentData.getId(),count);
                        e.printStackTrace();
                    }
                    System.out.println("------------------------------------------------------------");
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            Log_Exception.Error_txt("DataZhiXunByChannel error"+e.getMessage());
        } finally {
        }
    }

    public void DataZWGKByChannelWHS(String channelName,String hyChannelId,String tableName,String filePath){
        Log_Exception.Logger_txt("-------Start-------kpChannelId:" + channelName + "--hyChannelId:" + hyChannelId + "---------Start--------");
        String sServiceId = "gov_webdocument";
        String sMethodName = "saveDocumentInWeb";//自定义视图
        ServiceImplGgzy serviceImplKp=new ServiceImplGgzy();
        Annex annex = new Annex();
        try {
            List<Map<String,String>> allDocInfoFromKPDBdMaps = serviceImplKp.getNmgGgzy(channelName,tableName);
            if(allDocInfoFromKPDBdMaps!=null){
                int count=0;
                for (Map<String,String> map : allDocInfoFromKPDBdMaps) {
                    System.out.println("------------------------------------------------------------");
                    Map<String,Object> oPostData=new HashMap<>();
                    oPostData.put("ObjectId", 0);
                    oPostData.put("ChannelId", Integer.parseInt(hyChannelId));// Ŀ����Ŀid
                    oPostData.put("CurrUserName", "dev");
                    oPostData.put("isShenhe", "1");
                    oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_HTML);
                    DocumentDataBenJi documentData = new DocumentDataBenJi(map);
                    System.out.println(documentData);
                    if (documentData.getTitle() != null && documentData.getTitle() != "null") {
                        oPostData.put("DOCTITLE", Jsoup.parse(documentData.getTitle()).text()  );
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("scrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("fbrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("efectdat", documentData.getTime());
                    }
                    if (documentData.getChannle().equals("政府采购")) {
                        oPostData.put("SUBCAT","14");
                    }
                    if (documentData.getChannle().equals("招投标和工程建设")) {
                        oPostData.put("SUBCAT","13");
                    }
                    if (documentData.getChannle().equals("土地矿权交易")) {
                        oPostData.put("SUBCAT","15");
                    }
                    if (documentData.getChannle().equals("产权交易")) {
                        oPostData.put("SUBCAT","18");
                    }
                    if (documentData.getChannle().equals("公共资源交易")) {
                        oPostData.put("SUBCAT","18");
                    }


                 /*   if (documentData.getB_source() != null && documentData.getB_source() != "") {
                        oPostData.put("DOCSOURCENAME",documentData.getB_source());
                    }*/
                    if (documentData.getId() != null) {
                        oPostData.put("oldDocid", documentData.getId());
                    }
                    try {
                        if (documentData.getId() != null) {
                            Map<String, Object> getRelFileInfoByDocId = annex.getZWGKFileInfoByDocId(filePath,documentData.getId());
                            if( getRelFileInfoByDocId.get("docRelFile") != null){
                                oPostData.put("DOCATTACHFILEFIELD", getRelFileInfoByDocId.get("docRelFile"));
                            }
                            if( getRelFileInfoByDocId.get("docRelPic") != null){
                                oPostData.put("DOCATTACHPICFIELD", getRelFileInfoByDocId.get("docRelPic"));
                            }
                        }
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    try {
                        if (documentData.getContent()  != null) {
                            String  currentFilePathHtmlUrl = documentData.getContent();
                            System.out.println("===================start=======================");
                            System.out.println(currentFilePathHtmlUrl);
                            JsoupUtilsView jsoupUtils = new JsoupUtilsView();
                            String html = jsoupUtils.rexStringHtml(currentFilePathHtmlUrl,filePath);
                            System.out.println("==============================================");
                            html = html.replace(" ", "&nbsp;");
                            html = html.replace("TRS_UEDITOR", "");
                            html = html.replace("trs_paper_default", "");
                            html = html.replace("trs_web", "");
                            html = html.replace("trs_word", "");
                            System.out.println(html);
                            System.out.println("===================end========================");
                            oPostData.put("DOCHTMLCON", html);
                        } else {
                            oPostData.put("DocHtmlCon", "&nbsp;");
                            oPostData.put("DOCCONTENT", "&nbsp;");
                        }
                    }catch (Exception e){
                        oPostData.put("DocHtmlCon", "&nbsp;");
                        oPostData.put("DOCCONTENT", "&nbsp;");
                        e.printStackTrace();
                    }
                    try {
                        System.out.println(oPostData);
                        Dispatch result = WCMServiceCaller.Call(sServiceId, sMethodName, oPostData, true);
                        count++;
                        if(result!=null){
                            JSONObject rObject = JSONObject.fromObject(result.getResponseText().toString());
                            if (rObject.get("ISSUCCESS").toString().equals("true")){
                                System.out.println("DOCTITLE:"+documentData.getTitle());
                                System.out.println("count:"+count);
                                System.out.println("oldDocid:"+documentData.getId());
                            }else{
                                String serror = JSON.toJSONString(rObject);
                                System.out.println(serror);
                                outPrint(serror,documentData.getId(),count);
                            }
                        }
                    }catch(Exception e) {
                        outPrint("",documentData.getId(),count);
                        e.printStackTrace();
                    }
                    System.out.println("------------------------------------------------------------");
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            Log_Exception.Error_txt("DataZhiXunByChannel error"+e.getMessage());
        } finally {
        }
    }



    public void DataZWGKByChannelXAM(String channelName,String hyChannelId,String tableName,String filePath){
        Log_Exception.Logger_txt("-------Start-------kpChannelId:" + channelName + "--hyChannelId:" + hyChannelId + "---------Start--------");
        String sServiceId = "gov_webdocument";
        String sMethodName = "saveDocumentInWeb";//自定义视图
        ServiceImplGgzy serviceImplKp=new ServiceImplGgzy();
        Annex annex = new Annex();
        try {
            List<Map<String,String>> allDocInfoFromKPDBdMaps = serviceImplKp.getNmgGgzy(channelName,tableName);
            if(allDocInfoFromKPDBdMaps!=null){
                int count=0;
                for (Map<String,String> map : allDocInfoFromKPDBdMaps) {
                    System.out.println("------------------------------------------------------------");
                    Map<String,Object> oPostData=new HashMap<>();
                    oPostData.put("ObjectId", 0);
                    oPostData.put("ChannelId", Integer.parseInt(hyChannelId));// Ŀ����Ŀid
                    oPostData.put("CurrUserName", "dev");
                    oPostData.put("isShenhe", "1");
                    oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_HTML);
                    DocumentDataBenJi documentData = new DocumentDataBenJi(map);
                    System.out.println(documentData);
                    if (documentData.getTitle() != null && documentData.getTitle() != "null") {
                        oPostData.put("DOCTITLE", Jsoup.parse(documentData.getTitle()).text()  );
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("scrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("fbrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("efectdat", documentData.getTime());
                    }

                 /*   if (documentData.getB_source() != null && documentData.getB_source() != "") {
                        oPostData.put("DOCSOURCENAME",documentData.getB_source());
                    }*/
                    if (documentData.getId() != null) {
                        oPostData.put("oldDocid", documentData.getId());
                    }
                    try {
                        if (documentData.getId() != null) {
                            Map<String, Object> getRelFileInfoByDocId = annex.getZWGKFileInfoByDocId(filePath,documentData.getId());
                            if( getRelFileInfoByDocId.get("docRelFile") != null){
                                oPostData.put("DOCATTACHFILEFIELD", getRelFileInfoByDocId.get("docRelFile"));
                            }
                            if( getRelFileInfoByDocId.get("docRelPic") != null){
                                oPostData.put("DOCATTACHPICFIELD", getRelFileInfoByDocId.get("docRelPic"));
                            }
                        }
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    try {
                        if (documentData.getContent()  != null) {
                            String  currentFilePathHtmlUrl = documentData.getContent();
                            System.out.println("===================start=======================");
                            System.out.println(currentFilePathHtmlUrl);
                            JsoupUtilsView jsoupUtils = new JsoupUtilsView();
                            String html = jsoupUtils.rexStringHtml(currentFilePathHtmlUrl,filePath);
                            System.out.println("==============================================");
                            html = html.replace(" ", "&nbsp;");
                            html = html.replace("TRS_UEDITOR", "");
                            html = html.replace("trs_paper_default", "");
                            html = html.replace("trs_web", "");
                            html = html.replace("trs_word", "");
                            System.out.println(html);
                            System.out.println("===================end========================");
                            oPostData.put("DOCHTMLCON", html);
                        } else {
                            oPostData.put("DocHtmlCon", "&nbsp;");
                            oPostData.put("DOCCONTENT", "&nbsp;");
                        }
                    }catch (Exception e){
                        oPostData.put("DocHtmlCon", "&nbsp;");
                        oPostData.put("DOCCONTENT", "&nbsp;");
                        e.printStackTrace();
                    }
                    try {
                        System.out.println(oPostData);
                        Dispatch result = WCMServiceCaller.Call(sServiceId, sMethodName, oPostData, true);
                        count++;
                        if(result!=null){
                            JSONObject rObject = JSONObject.fromObject(result.getResponseText().toString());
                            if (rObject.get("ISSUCCESS").toString().equals("true")){
                                System.out.println("DOCTITLE:"+documentData.getTitle());
                                System.out.println("count:"+count);
                                System.out.println("oldDocid:"+documentData.getId());
                            }else{
                                String serror = JSON.toJSONString(rObject);
                                System.out.println(serror);
                                outPrint(serror,documentData.getId(),count);
                            }
                        }
                    }catch(Exception e) {
                        outPrint("",documentData.getId(),count);
                        e.printStackTrace();
                    }
                    System.out.println("------------------------------------------------------------");
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            Log_Exception.Error_txt("DataZhiXunByChannel error"+e.getMessage());
        } finally {
        }
    }




    /**
     * ��Ѷ��ͼ
     * @param channelName
     * @param hyChannelId
     */
    public void DataZhiXunByChannel(String channelName,String hyChannelId,String tableName,String filePath){
        Log_Exception.Logger_txt("-------Start-------kpChannelId:" + channelName + "--hyChannelId:" + hyChannelId + "---------Start--------");
        String sServiceId = "gov_webdocument";
        String sMethodName = "saveDocumentInWeb";//
        ServiceImplGgzy serviceImplKp=new ServiceImplGgzy();
        Annex annex = new Annex();
        try {
            List<Map<String,String>> allDocInfoFromKPDBdMaps = serviceImplKp.getNmgGgzy(channelName,tableName);
            if(allDocInfoFromKPDBdMaps!=null){
                int count=0;
                for (Map<String,String> map : allDocInfoFromKPDBdMaps) {
                    System.out.println("------------------------------------------------------------");
                    Map<String,Object> oPostData=new HashMap<>();
                    oPostData.put("ObjectId", 0);
                    oPostData.put("ChannelId", Integer.parseInt(hyChannelId));// Ŀ����Ŀid
                    oPostData.put("CurrUserName", "dev");
                    oPostData.put("isShenhe", "1");
                    oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_HTML);
                    DocumentDataBenJi documentData = new DocumentDataBenJi(map);
                    System.out.println(documentData);
                    if (documentData.getTitle() != null && documentData.getTitle() != "null") {
                        oPostData.put("DOCTITLE", Jsoup.parse(documentData.getTitle()).text()  );
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("DOCRELTIME", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("CRTIME", documentData.getTime());
                    }
                 /*   if (documentData.getB_source() != null && documentData.getB_source() != "") {
                        oPostData.put("DOCSOURCENAME",documentData.getB_source());
                    }*/
                    if (documentData.getId() != null) {
                        if(documentData.getId().equals("b9a57de4c02202c6e52cb9abdc74fee7")){
                            System.out.println(documentData.getId());
                        }
                        oPostData.put("oldDocid", documentData.getId());
                    }
                    try {
                        if (documentData.getId() != null) {
                            Map<String, Object> getRelFileInfoByDocId = annex.getZhiXunFileInfoByDocId(filePath,documentData.getId());
                            if( getRelFileInfoByDocId.get("docRelFile") != null){
                                oPostData.put("docRelFile", getRelFileInfoByDocId.get("docRelFile"));
                            }
                            if( getRelFileInfoByDocId.get("docRelPic") != null){
                                oPostData.put("docRelPic", getRelFileInfoByDocId.get("docRelPic"));
                            }
                        }
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    try {
                        if (documentData.getContent()  != null) {
                            String  currentFilePathHtmlUrl = documentData.getContent();
                            System.out.println("===================start=======================");
                            System.out.println(currentFilePathHtmlUrl);
                            JsoupUtilsView jsoupUtils = new JsoupUtilsView();
                            String html = jsoupUtils.rexStringHtml(currentFilePathHtmlUrl,filePath);
                            System.out.println("==============================================");
                            System.out.println(html);
                            html = html.replace(" ", "&nbsp;");
                            html = html.replace("TRS_UEDITOR", "");
                            html = html.replace("trs_paper_default", "");
                            html = html.replace("trs_web", "");
                            html = html.replace("trs_word", "");
                            System.out.println("===================end========================");
                            oPostData.put("DOCHTMLCON", html);
                        } else {
                            oPostData.put("DocHtmlCon", "&nbsp;");
                            oPostData.put("DOCCONTENT", "&nbsp;");
                        }
                    }catch (Exception e){
                        oPostData.put("DocHtmlCon", "&nbsp;");
                        oPostData.put("DOCCONTENT", "&nbsp;");
                        e.printStackTrace();
                    }
                    String content = documentData.getContent();
                    if(content != "" && content != null){
                        if(content.equals("链接文章")){
                            if (documentData.getContent() != null && documentData.getContent() != "") {
                                oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_LINK);
                                oPostData.put("DOCLINK", documentData.getUrl());
                            }
                        }
                        if(content.equals("文件文章")){
                            String url = filePath+ documentData.getUrl();
                            String filename = documentData.getUrl();
                            String docTitle = documentData.getTitle();
                            if (documentData.getContent() != null && documentData.getContent() != "") {
                                Dispatch oDispatch = WCMServiceCaller.UploadFile(url);
                                if (oDispatch != null) {
                                    String docfilename = oDispatch.getUploadShowName();
                                    String DOCFILE = "[";
                                    DOCFILE += "{\"AppFile\": \"" + docfilename + "\",\"AppDesc\":\"" + docTitle
                                            + "\",\"AppendixId\":\"0\", \"SrcFile\":\"" + filename
                                            + "\",\"OTHEROPERATION\":0 }";
                                    DOCFILE += "]";
                                    oPostData.put("DocFileName", docfilename);
                                    oPostData.put("DOCFILE", DOCFILE);
                                    oPostData.put("DOCTYPE", "40");
                                    // oPostData.put("DOCPUBURL",oDispatch);
                                }
                            }
                        }
                    }
                    try {
                        System.out.println(oPostData);
                        Dispatch result = WCMServiceCaller.Call(sServiceId, sMethodName, oPostData, true);
                        count++;
                        if(result!=null){
                            JSONObject rObject = JSONObject.fromObject(result.getResponseText().toString());
                            if (rObject.get("ISSUCCESS").toString().equals("true")){
                                System.out.println("DOCTITLE:"+documentData.getTitle());
                                System.out.println("count:"+count);
                                System.out.println("oldDocid:"+documentData.getId());
                            }else{
                                String serror = JSON.toJSONString(rObject);
                                System.out.println(serror);
                                outPrint(serror,documentData.getId(),count);
                            }
                        }
                    }catch(Exception e) {
                        outPrint("",documentData.getId(),count);
                        e.printStackTrace();
                    }
                    System.out.println("------------------------------------------------------------");
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            Log_Exception.Error_txt("DataZhiXunByChannel error"+e.getMessage());
        } finally {
        }
    }

    public void DataZhiXunByChannelByTime(String time,String channelName,String hyChannelId,String tableName,String filePath){
        Log_Exception.Logger_txt("-------Start-------kpChannelId:" + channelName + "--hyChannelId:" + hyChannelId + "---------Start--------");
        String sServiceId = "gov_webdocument";
        String sMethodName = "saveDocumentInWeb";//
        ServiceImplGgzy serviceImplKp=new ServiceImplGgzy();
        Annex annex = new Annex();
        try {
            List<Map<String,String>> allDocInfoFromKPDBdMaps = serviceImplKp.getNmgGgzyByTime(time,channelName,tableName);
            if(allDocInfoFromKPDBdMaps!=null){
                int count=0;
                for (Map<String,String> map : allDocInfoFromKPDBdMaps) {
                    System.out.println("------------------------------------------------------------");
                    Map<String,Object> oPostData=new HashMap<>();
                    oPostData.put("ObjectId", 0);
                    oPostData.put("ChannelId", Integer.parseInt(hyChannelId));// Ŀ����Ŀid
                    oPostData.put("CurrUserName", "dev");
                    oPostData.put("isShenhe", "1");
                    oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_HTML);
                    DocumentDataBenJi documentData = new DocumentDataBenJi(map);
                    System.out.println(documentData);
                    if (documentData.getTitle() != null && documentData.getTitle() != "null") {
                        oPostData.put("DOCTITLE", Jsoup.parse(documentData.getTitle()).text()  );
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("DOCRELTIME", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("CRTIME", documentData.getTime());
                    }
                 /*   if (documentData.getB_source() != null && documentData.getB_source() != "") {
                        oPostData.put("DOCSOURCENAME",documentData.getB_source());
                    }*/
                    if (documentData.getId() != null) {
                        if(documentData.getId().equals("b9a57de4c02202c6e52cb9abdc74fee7")){
                            System.out.println(documentData.getId());
                        }
                        oPostData.put("oldDocid", documentData.getId());
                    }
                    try {
                        if (documentData.getId() != null) {
                            Map<String, Object> getRelFileInfoByDocId = annex.getZhiXunFileInfoByDocId(filePath,documentData.getId());
                            if( getRelFileInfoByDocId.get("docRelFile") != null){
                                oPostData.put("docRelFile", getRelFileInfoByDocId.get("docRelFile"));
                            }
                            if( getRelFileInfoByDocId.get("docRelPic") != null){
                                oPostData.put("docRelPic", getRelFileInfoByDocId.get("docRelPic"));
                            }
                        }
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    try {
                        if (documentData.getContent()  != null) {
                            String  currentFilePathHtmlUrl = documentData.getContent();
                            System.out.println("===================start=======================");
                            System.out.println(currentFilePathHtmlUrl);
                            JsoupUtilsView jsoupUtils = new JsoupUtilsView();
                            String html = jsoupUtils.rexStringHtml(currentFilePathHtmlUrl,filePath);
                            System.out.println("==============================================");
                            System.out.println(html);
                            html = html.replace(" ", "&nbsp;");
                            html = html.replace("TRS_UEDITOR", "");
                            html = html.replace("trs_paper_default", "");
                            html = html.replace("trs_web", "");
                            html = html.replace("trs_word", "");
                            System.out.println("===================end========================");
                            oPostData.put("DOCHTMLCON", html);
                        } else {
                            oPostData.put("DocHtmlCon", "&nbsp;");
                            oPostData.put("DOCCONTENT", "&nbsp;");
                        }
                    }catch (Exception e){
                        oPostData.put("DocHtmlCon", "&nbsp;");
                        oPostData.put("DOCCONTENT", "&nbsp;");
                        e.printStackTrace();
                    }
                    String content = documentData.getContent();
                    if(content != "" && content != null){
                        if(content.equals("链接文章")){
                            if (documentData.getContent() != null && documentData.getContent() != "") {
                                oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_LINK);
                                oPostData.put("DOCLINK", documentData.getUrl());
                            }
                        }
                        if(content.equals("文件文章")){
                            String url = filePath+ documentData.getUrl();
                            String filename = documentData.getUrl();
                            String docTitle = documentData.getTitle();
                            if (documentData.getContent() != null && documentData.getContent() != "") {
                                Dispatch oDispatch = WCMServiceCaller.UploadFile(url);
                                if (oDispatch != null) {
                                    String docfilename = oDispatch.getUploadShowName();
                                    String DOCFILE = "[";
                                    DOCFILE += "{\"AppFile\": \"" + docfilename + "\",\"AppDesc\":\"" + docTitle
                                            + "\",\"AppendixId\":\"0\", \"SrcFile\":\"" + filename
                                            + "\",\"OTHEROPERATION\":0 }";
                                    DOCFILE += "]";
                                    oPostData.put("DocFileName", docfilename);
                                    oPostData.put("DOCFILE", DOCFILE);
                                    oPostData.put("DOCTYPE", "40");
                                    // oPostData.put("DOCPUBURL",oDispatch);
                                }
                            }
                        }
                    }
                    try {
                        System.out.println(oPostData);
                        Dispatch result = WCMServiceCaller.Call(sServiceId, sMethodName, oPostData, true);
                        count++;
                        if(result!=null){
                            JSONObject rObject = JSONObject.fromObject(result.getResponseText().toString());
                            if (rObject.get("ISSUCCESS").toString().equals("true")){
                                System.out.println("DOCTITLE:"+documentData.getTitle());
                                System.out.println("count:"+count);
                                System.out.println("oldDocid:"+documentData.getId());
                            }else{
                                String serror = JSON.toJSONString(rObject);
                                System.out.println(serror);
                                outPrint(serror,documentData.getId(),count);
                            }
                        }
                    }catch(Exception e) {
                        outPrint("",documentData.getId(),count);
                        e.printStackTrace();
                    }
                    System.out.println("------------------------------------------------------------");
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            Log_Exception.Error_txt("DataZhiXunByChannel error"+e.getMessage());
        } finally {
        }
    }


    public void DataZhiXunByChannelTitleTitle(String channelName,String hyChannelId,String tableName,String filePath){
        Log_Exception.Logger_txt("-------Start-------kpChannelId:" + channelName + "--hyChannelId:" + hyChannelId + "---------Start--------");
        String sServiceId = "gov_webdocument";
        String sMethodName = "saveDocumentInWeb";//
        ServiceImplGgzy serviceImplKp=new ServiceImplGgzy();
        Annex annex = new Annex();
        try {
            List<Map<String,String>> allDocInfoFromKPDBdMaps = serviceImplKp.getNmgGgzy(channelName,tableName);
            if(allDocInfoFromKPDBdMaps!=null){
                int count=0;
                for (Map<String,String> map : allDocInfoFromKPDBdMaps) {
                    System.out.println("------------------------------------------------------------");
                    Map<String,Object> oPostData=new HashMap<>();
                    oPostData.put("ObjectId", 0);
                    oPostData.put("ChannelId", Integer.parseInt(hyChannelId));// Ŀ����Ŀid
                    oPostData.put("CurrUserName", "dev");
                    oPostData.put("isShenhe", "1");
                    oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_HTML);
                    DocumentDataBenJi documentData = new DocumentDataBenJi(map);
                    System.out.println(documentData);
                    if (documentData.getTitle() != null && documentData.getTitle() != "null") {
                        oPostData.put("DOCTITLE", Jsoup.parse(documentData.getTitle()).text()  );
                        if(!documentData.getTitle().equals("呼和浩特市公共资源交易监督管理局关于开展履约保函和中标贷服务的通知")){
                            continue;
                        }
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("DOCRELTIME", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("CRTIME", documentData.getTime());
                    }
                 /*   if (documentData.getB_source() != null && documentData.getB_source() != "") {
                        oPostData.put("DOCSOURCENAME",documentData.getB_source());
                    }*/
                    if (documentData.getId() != null) {
                        if(documentData.getId().equals("b9a57de4c02202c6e52cb9abdc74fee7")){
                            System.out.println(documentData.getId());
                        }
                        oPostData.put("oldDocid", documentData.getId());
                    }
                    try {
                        if (documentData.getId() != null) {
                            Map<String, Object> getRelFileInfoByDocId = annex.getZhiXunFileInfoByDocId(filePath,documentData.getId());
                            if( getRelFileInfoByDocId.get("docRelFile") != null){
                                oPostData.put("docRelFile", getRelFileInfoByDocId.get("docRelFile"));
                            }
                            if( getRelFileInfoByDocId.get("docRelPic") != null){
                                oPostData.put("docRelPic", getRelFileInfoByDocId.get("docRelPic"));
                            }
                        }
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    try {
                        if (documentData.getContent()  != null) {
                            String  currentFilePathHtmlUrl = documentData.getContent();
                            System.out.println("===================start=======================");
                            System.out.println(currentFilePathHtmlUrl);
                            JsoupUtilsView jsoupUtils = new JsoupUtilsView();
                            String html = jsoupUtils.rexStringHtml(currentFilePathHtmlUrl,filePath);
                            System.out.println("=====================aaaaaaaaa=========================");
                            html = html.replace(" ", "&nbsp;");
                            html = html.replace("TRS_UEDITOR", "");
                            html = html.replace("trs_paper_default", "");
                            html = html.replace("trs_web", "");
                            html = html.replace("trs_word", "");
                            System.out.println(html);
                            System.out.println("===================end========================");
                            oPostData.put("DOCHTMLCON",html);
                        } else {
                            oPostData.put("DocHtmlCon", "&nbsp;");
                            oPostData.put("DOCCONTENT", "&nbsp;");
                        }
                    }catch (Exception e){
                        oPostData.put("DocHtmlCon", "&nbsp;");
                        oPostData.put("DOCCONTENT", "&nbsp;");
                        e.printStackTrace();
                    }
                    String content = documentData.getContent();
                    if(content != "" && content != null){
                        if(content.equals("链接文章")){
                            if (documentData.getContent() != null && documentData.getContent() != "") {
                                oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_LINK);
                                oPostData.put("DOCLINK", documentData.getUrl());
                            }
                        }
                        if(content.equals("文件文章")){
                            String url = filePath+ documentData.getUrl();
                            String filename = documentData.getUrl();
                            String docTitle = documentData.getTitle();
                            if (documentData.getContent() != null && documentData.getContent() != "") {
                                Dispatch oDispatch = WCMServiceCaller.UploadFile(url);
                                if (oDispatch != null) {
                                    String docfilename = oDispatch.getUploadShowName();
                                    String DOCFILE = "[";
                                    DOCFILE += "{\"AppFile\": \"" + docfilename + "\",\"AppDesc\":\"" + docTitle
                                            + "\",\"AppendixId\":\"0\", \"SrcFile\":\"" + filename
                                            + "\",\"OTHEROPERATION\":0 }";
                                    DOCFILE += "]";
                                    oPostData.put("DocFileName", docfilename);
                                    oPostData.put("DOCFILE", DOCFILE);
                                    oPostData.put("DOCTYPE", "40");
                                    // oPostData.put("DOCPUBURL",oDispatch);
                                }
                            }
                        }
                    }
                    try {
                        System.out.println(oPostData);
                        Dispatch result = WCMServiceCaller.Call(sServiceId, sMethodName, oPostData, true);
                        count++;
                        if(result!=null){
                            JSONObject rObject = JSONObject.fromObject(result.getResponseText().toString());
                            if (rObject.get("ISSUCCESS").toString().equals("true")){
                                System.out.println("DOCTITLE:"+documentData.getTitle());
                                System.out.println("count:"+count);
                                System.out.println("oldDocid:"+documentData.getId());
                            }else{
                                String serror = JSON.toJSONString(rObject);
                                System.out.println(serror);
                                outPrint(serror,documentData.getId(),count);
                            }
                        }
                    }catch(Exception e) {
                        outPrint("",documentData.getId(),count);
                        e.printStackTrace();
                    }
                    System.out.println("------------------------------------------------------------");
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            Log_Exception.Error_txt("DataZhiXunByChannel error"+e.getMessage());
        } finally {
        }
    }


    public void DataZWGKByChannelHtt(String channelName,String hyChannelId,String tableName,String filePath){
        Log_Exception.Logger_txt("-------Start-------kpChannelId:" + channelName + "--hyChannelId:" + hyChannelId + "---------Start--------");
        String sServiceId = "gov_webdocument";
        String sMethodName = "saveDocumentInWeb";//自定义视图
        ServiceImplGgzy serviceImplKp=new ServiceImplGgzy();
        Annex annex = new Annex();
        try {
            List<Map<String,String>> allDocInfoFromKPDBdMaps = serviceImplKp.getNmgGgzy(channelName,tableName);
            if(allDocInfoFromKPDBdMaps!=null){
                int count=0;
                for (Map<String,String> map : allDocInfoFromKPDBdMaps) {
                    System.out.println("------------------------------------------------------------");
                    Map<String,Object> oPostData=new HashMap<>();
                    oPostData.put("ObjectId", 0);
                    oPostData.put("ChannelId", Integer.parseInt(hyChannelId));// Ŀ����Ŀid
                    oPostData.put("CurrUserName", "dev");
                    oPostData.put("isShenhe", "1");
                    oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_HTML);
                    DocumentDataBenJi documentData = new DocumentDataBenJi(map);
                    System.out.println(documentData);
                    if (documentData.getTitle() != null && documentData.getTitle() != "null") {
                        oPostData.put("DOCTITLE", Jsoup.parse(documentData.getTitle()).text()  );
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("scrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("fbrq", documentData.getTime());
                    }


                    if (documentData.getTime() != null) {
                        oPostData.put("efectdat", documentData.getTime());
                    }

                 /*   if (documentData.getB_source() != null && documentData.getB_source() != "") {
                        oPostData.put("DOCSOURCENAME",documentData.getB_source());
                    }*/
                    if (documentData.getId() != null) {
                        oPostData.put("oldDocid", documentData.getId());
                    }
                    try {
                        if (documentData.getId() != null) {
                            Map<String, Object> getRelFileInfoByDocId = annex.getZWGKFileInfoByDocId(filePath,documentData.getId());
                            if( getRelFileInfoByDocId.get("docRelFile") != null){
                                oPostData.put("DOCATTACHFILEFIELD", getRelFileInfoByDocId.get("docRelFile"));
                            }
                            if( getRelFileInfoByDocId.get("docRelPic") != null){
                                oPostData.put("DOCATTACHPICFIELD", getRelFileInfoByDocId.get("docRelPic"));
                            }
                        }
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    try {
                        if (documentData.getContent()  != null) {
                            String  currentFilePathHtmlUrl = documentData.getContent();
                            System.out.println("===================start=======================");
                            System.out.println(currentFilePathHtmlUrl);
                            JsoupUtilsView jsoupUtils = new JsoupUtilsView();
                            String html = jsoupUtils.rexStringHtml(currentFilePathHtmlUrl,filePath);
                            System.out.println("==============================================");
                            html = html.replace(" ", "&nbsp;");
                            html = html.replace("TRS_UEDITOR", "");
                            html = html.replace("trs_paper_default", "");
                            html = html.replace("trs_web", "");
                            html = html.replace("trs_word", "");
                            System.out.println(html);
                            System.out.println("===================end========================");
                            oPostData.put("DOCHTMLCON", html);
                        } else {
                            oPostData.put("DocHtmlCon", "&nbsp;");
                            oPostData.put("DOCCONTENT", "&nbsp;");
                        }
                    }catch (Exception e){
                        oPostData.put("DocHtmlCon", "&nbsp;");
                        oPostData.put("DOCCONTENT", "&nbsp;");
                        e.printStackTrace();
                    }
                    try {
                        System.out.println(oPostData);
                        Dispatch result = WCMServiceCaller.Call(sServiceId, sMethodName, oPostData, true);
                        count++;
                        if(result!=null){
                            JSONObject rObject = JSONObject.fromObject(result.getResponseText().toString());
                            if (rObject.get("ISSUCCESS").toString().equals("true")){
                                System.out.println("DOCTITLE:"+documentData.getTitle());
                                System.out.println("count:"+count);
                                System.out.println("oldDocid:"+documentData.getId());
                            }else{
                                String serror = JSON.toJSONString(rObject);
                                System.out.println(serror);
                                outPrint(serror,documentData.getId(),count);
                            }
                        }
                    }catch(Exception e) {
                        outPrint("",documentData.getId(),count);
                        e.printStackTrace();
                    }
                    System.out.println("------------------------------------------------------------");
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            Log_Exception.Error_txt("DataZhiXunByChannel error"+e.getMessage());
        } finally {
        }
    }



    public void DataZWGKByChannel(String channelName,String hyChannelId,String tableName,String filePath,String flid){
        Log_Exception.Logger_txt("-------Start-------kpChannelId:" + channelName + "--hyChannelId:" + hyChannelId + "---------Start--------");
        String sServiceId = "gov_webdocument";
        String sMethodName = "saveDocumentInWeb";//自定义视图
        ServiceImplGgzy serviceImplKp=new ServiceImplGgzy();
        Annex annex = new Annex();
        try {
            List<Map<String,String>> allDocInfoFromKPDBdMaps = serviceImplKp.getNmgGgzy(channelName,tableName);
            if(allDocInfoFromKPDBdMaps!=null){
                int count=0;
                for (Map<String,String> map : allDocInfoFromKPDBdMaps) {
                    System.out.println("------------------------------------------------------------");
                    Map<String,Object> oPostData=new HashMap<>();
                    oPostData.put("ObjectId", 0);
                    oPostData.put("ChannelId", Integer.parseInt(hyChannelId));// Ŀ����Ŀid
                    oPostData.put("CurrUserName", "dev");
                    oPostData.put("isShenhe", "1");
                    oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_HTML);
                    DocumentDataBenJi documentData = new DocumentDataBenJi(map);
                    System.out.println(documentData);
                    if (documentData.getTitle() != null && documentData.getTitle() != "null") {
                        oPostData.put("DOCTITLE", Jsoup.parse(documentData.getTitle()).text()  );
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("scrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("fbrq", documentData.getTime());
                    }


                    if (documentData.getTime() != null) {
                        oPostData.put("efectdat", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("SUBCAT",flid);
                    }
                 /*   if (documentData.getB_source() != null && documentData.getB_source() != "") {
                        oPostData.put("DOCSOURCENAME",documentData.getB_source());
                    }*/
                    if (documentData.getId() != null) {
                        oPostData.put("oldDocid", documentData.getId());
                    }
                    try {
                        if (documentData.getId() != null) {
                            Map<String, Object> getRelFileInfoByDocId = annex.getZWGKFileInfoByDocId(filePath,documentData.getId());
                            if( getRelFileInfoByDocId.get("docRelFile") != null){
                                oPostData.put("DOCATTACHFILEFIELD", getRelFileInfoByDocId.get("docRelFile"));
                            }
                            if( getRelFileInfoByDocId.get("docRelPic") != null){
                                oPostData.put("DOCATTACHPICFIELD", getRelFileInfoByDocId.get("docRelPic"));
                            }
                        }
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    try {
                        if (documentData.getContent()  != null) {
                            String  currentFilePathHtmlUrl = documentData.getContent();
                            System.out.println("===================start=======================");
                            System.out.println(currentFilePathHtmlUrl);
                            JsoupUtilsView jsoupUtils = new JsoupUtilsView();
                            String html = jsoupUtils.rexStringHtml(currentFilePathHtmlUrl,filePath);
                            System.out.println("==============================================");
                            System.out.println(html);
                            System.out.println("===================end========================");
                            oPostData.put("DOCHTMLCON", html);
                        } else {
                            oPostData.put("DocHtmlCon", "&nbsp;");
                            oPostData.put("DOCCONTENT", "&nbsp;");
                        }
                    }catch (Exception e){
                        oPostData.put("DocHtmlCon", "&nbsp;");
                        oPostData.put("DOCCONTENT", "&nbsp;");
                        e.printStackTrace();
                    }
                    try {
                        System.out.println(oPostData);
                        Dispatch result = WCMServiceCaller.Call(sServiceId, sMethodName, oPostData, true);
                        count++;
                        if(result!=null){
                            JSONObject rObject = JSONObject.fromObject(result.getResponseText().toString());
                            if (rObject.get("ISSUCCESS").toString().equals("true")){
                                System.out.println("DOCTITLE:"+documentData.getTitle());
                                System.out.println("count:"+count);
                                System.out.println("oldDocid:"+documentData.getId());
                            }else{
                                String serror = JSON.toJSONString(rObject);
                                System.out.println(serror);
                                outPrint(serror,documentData.getId(),count);
                            }
                        }
                    }catch(Exception e) {
                        outPrint("",documentData.getId(),count);
                        e.printStackTrace();
                    }
                    System.out.println("------------------------------------------------------------");
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            Log_Exception.Error_txt("DataZhiXunByChannel error"+e.getMessage());
        } finally {
        }
    }

    public void DataZWGKAllByChannel(String hyChannelId,String tableName,String filePath){
        String sServiceId = "gov_webdocument";
        String sMethodName = "saveDocumentInWeb";//自定义视图
        ServiceImplGgzy serviceImplKp=new ServiceImplGgzy();
        Annex annex = new Annex();
        try {
            List<Map<String,String>> allDocInfoFromKPDBdMaps = serviceImplKp.getNmgZWGGGgzy(tableName);
            if(allDocInfoFromKPDBdMaps!=null){
                int count=0;
                for (Map<String,String> map : allDocInfoFromKPDBdMaps) {
                    System.out.println("------------------------------------------------------------");
                    Map<String,Object> oPostData=new HashMap<>();
                    oPostData.put("ObjectId", 0);
                    oPostData.put("ChannelId", Integer.parseInt(hyChannelId));// Ŀ����Ŀid
                    oPostData.put("CurrUserName", "dev");
                    oPostData.put("isShenhe", "1");
                    oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_HTML);
                    DocumentDataBenJi documentData = new DocumentDataBenJi(map);
                    System.out.println(documentData);
                    if (documentData.getTitle() != null && documentData.getTitle() != "null") {
                        oPostData.put("DOCTITLE", Jsoup.parse(documentData.getTitle()).text()  );
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("scrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("fbrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("efectdat", documentData.getTime());
                    }
                    if (documentData.getChannle() != null) {
                        if (documentData.getChannle().equals("政策法规/公共资源交易/国家级")) {
                            oPostData.put("SUBCAT","14");
                            oPostData.put("CUSTCAT","9");
                        }
                        if (documentData.getChannle().equals("政策法规/公共资源交易/自治区级")) {
                            oPostData.put("SUBCAT","14");
                            oPostData.put("CUSTCAT","10");
                        }
                        if (documentData.getChannle().equals("政策法规/政府采购/国家级")) {
                            oPostData.put("SUBCAT","14");
                            oPostData.put("CUSTCAT","9");
                        }
                        if (documentData.getChannle().equals("政策法规/政府采购/自治区级")) {
                            oPostData.put("SUBCAT","14");
                            oPostData.put("CUSTCAT","10");
                        }
                        if (documentData.getChannle().equals("政策法规/工程建设/国家级")) {
                            oPostData.put("SUBCAT","13");
                            oPostData.put("CUSTCAT","9");
                        }
                        if (documentData.getChannle().equals("政策法规/工程建设/自治区级")) {
                            oPostData.put("SUBCAT","13");
                            oPostData.put("CUSTCAT","10");
                        }
                        if (documentData.getChannle().equals("政策法规/土地矿权交易/国家级")) {
                            oPostData.put("SUBCAT","15");
                            oPostData.put("CUSTCAT","9");
                        }
                        if (documentData.getChannle().equals("政策法规/土地矿权交易/自治区级")) {
                            oPostData.put("SUBCAT","15");
                            oPostData.put("CUSTCAT","10");
                        }
                        if (documentData.getChannle().equals("政策法规/产权交易/国家级")) {
                            oPostData.put("SUBCAT","16");
                            oPostData.put("CUSTCAT","9");
                        }
                        if (documentData.getChannle().equals("政策法规/产权交易/自治区级")) {
                            oPostData.put("SUBCAT","16");
                            oPostData.put("CUSTCAT","10");
                        }
                        if (documentData.getChannle().equals("政策法规/盟市级/国家级")) {
                            oPostData.put("SUBCAT","14");
                            oPostData.put("CUSTCAT","11");
                        }

                    }
                 /*   if (documentData.getB_source() != null && documentData.getB_source() != "") {
                        oPostData.put("DOCSOURCENAME",documentData.getB_source());
                    }*/
                    if (documentData.getId() != null) {
                        oPostData.put("oldDocid", documentData.getId());
                    }
                    try {
                        if (documentData.getId() != null) {
                            Map<String, Object> getRelFileInfoByDocId = annex.getZWGKFileInfoByDocId(filePath,documentData.getId());
                            if( getRelFileInfoByDocId.get("docRelFile") != null){
                                oPostData.put("DOCATTACHFILEFIELD", getRelFileInfoByDocId.get("docRelFile"));
                            }
                            if( getRelFileInfoByDocId.get("docRelPic") != null){
                                oPostData.put("DOCATTACHPICFIELD", getRelFileInfoByDocId.get("docRelPic"));
                            }
                        }
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    try {
                        if (documentData.getContent()  != null) {
                            String  currentFilePathHtmlUrl = documentData.getContent();
                            System.out.println("===================start=======================");
                            System.out.println(currentFilePathHtmlUrl);
                            JsoupUtilsView jsoupUtils = new JsoupUtilsView();
                            String html = jsoupUtils.rexStringHtml(currentFilePathHtmlUrl,filePath);
                            System.out.println("==============================================");
                            System.out.println(html);
                            System.out.println("===================end========================");
                            oPostData.put("DOCHTMLCON", html);
                        } else {
                            oPostData.put("DocHtmlCon", "&nbsp;");
                            oPostData.put("DOCCONTENT", "&nbsp;");
                        }
                    }catch (Exception e){
                        oPostData.put("DocHtmlCon", "&nbsp;");
                        oPostData.put("DOCCONTENT", "&nbsp;");
                        e.printStackTrace();
                    }
                    try {
                        System.out.println(oPostData);
                        Dispatch result = WCMServiceCaller.Call(sServiceId, sMethodName, oPostData, true);
                        count++;
                        if(result!=null){
                            JSONObject rObject = JSONObject.fromObject(result.getResponseText().toString());
                            if (rObject.get("ISSUCCESS").toString().equals("true")){
                                System.out.println("DOCTITLE:"+documentData.getTitle());
                                System.out.println("count:"+count);
                                System.out.println("oldDocid:"+documentData.getId());
                            }else{
                                String serror = JSON.toJSONString(rObject);
                                System.out.println(serror);
                                outPrint(serror,documentData.getId(),count);
                            }
                        }
                    }catch(Exception e) {
                        outPrint("",documentData.getId(),count);
                        e.printStackTrace();
                    }
                    System.out.println("------------------------------------------------------------");
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            Log_Exception.Error_txt("DataZhiXunByChannel error"+e.getMessage());
        } finally {
        }
    }

    public void DataZWGKTLSAllByChannel(String hyChannelId,String tableName,String filePath){
        String sServiceId = "gov_webdocument";
        String sMethodName = "saveDocumentInWeb";//自定义视图
        ServiceImplGgzy serviceImplKp=new ServiceImplGgzy();
        Annex annex = new Annex();
        try {
            List<Map<String,String>> allDocInfoFromKPDBdMaps = serviceImplKp.getNmgZWGGGgzyTLS(tableName);
            if(allDocInfoFromKPDBdMaps!=null){
                int count=0;
                for (Map<String,String> map : allDocInfoFromKPDBdMaps) {
                    System.out.println("------------------------------------------------------------");
                    Map<String,Object> oPostData=new HashMap<>();
                    oPostData.put("ObjectId", 0);
                    oPostData.put("ChannelId", Integer.parseInt(hyChannelId));// Ŀ����Ŀid
                    oPostData.put("CurrUserName", "dev");
                    oPostData.put("isShenhe", "1");
                    oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_HTML);
                    DocumentDataBenJi documentData = new DocumentDataBenJi(map);
                    System.out.println(documentData);
                    if (documentData.getTitle() != null && documentData.getTitle() != "null") {
                        oPostData.put("DOCTITLE", Jsoup.parse(documentData.getTitle()).text()  );
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("scrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("fbrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("efectdat", documentData.getTime());
                    }
                    if (documentData.getChannle() != null) {
                        if (documentData.getChannle().equals("政策法规/综合类/法律法规")) {
                            oPostData.put("SUBCAT","18");
                        }
                        if (documentData.getChannle().equals("政策法规/综合类/政策文件")) {
                            oPostData.put("SUBCAT","18");
                        }
                        if (documentData.getChannle().equals("政策法规/综合类/中心制度")) {
                            oPostData.put("SUBCAT","18");
                        }
                        if (documentData.getChannle().equals("政策法规/工程建设/法律法规")) {
                            oPostData.put("SUBCAT","13");
                        }
                        if (documentData.getChannle().equals("政策法规/工程建设/政策文件")) {
                            oPostData.put("SUBCAT","13");
                        }
                        if (documentData.getChannle().equals("政策法规/工程建设/中心制度")) {
                            oPostData.put("SUBCAT","13");
                        }

                        if (documentData.getChannle().equals("政策法规/政府采购/法律法规")) {
                            oPostData.put("SUBCAT","14");
                        }
                        if (documentData.getChannle().equals("政策法规/政府采购/政策文件")) {
                            oPostData.put("SUBCAT","14");
                        }
                        if (documentData.getChannle().equals("政策法规/政府采购/中心制度")) {
                            oPostData.put("SUBCAT","14");
                        }


                        if (documentData.getChannle().equals("政策法规/土地矿业权/法律法规")) {
                            oPostData.put("SUBCAT","15");
                        }
                        if (documentData.getChannle().equals("政策法规/土地矿业权/政策文件")) {
                            oPostData.put("SUBCAT","15");
                        }

                        if (documentData.getChannle().equals("政策法规/国有产权/法律法规")) {
                            oPostData.put("SUBCAT","16");
                        }
                        if (documentData.getChannle().equals("政策法规/国有产权/政策文件")) {
                            oPostData.put("SUBCAT","16");
                        }

                        if (documentData.getChannle().equals("政策法规/惠企政策/法律法规")) {
                            oPostData.put("SUBCAT","18");
                        }
                        if (documentData.getChannle().equals("政策法规/惠企政策/政策文件")) {
                            oPostData.put("SUBCAT","18");
                        }

                    }
                 /*   if (documentData.getB_source() != null && documentData.getB_source() != "") {
                        oPostData.put("DOCSOURCENAME",documentData.getB_source());
                    }*/
                    if (documentData.getId() != null) {
                        oPostData.put("oldDocid", documentData.getId());
                    }
                    try {
                        if (documentData.getId() != null) {
                            Map<String, Object> getRelFileInfoByDocId = annex.getZWGKFileInfoByDocId(filePath,documentData.getId());
                            if( getRelFileInfoByDocId.get("docRelFile") != null){
                                oPostData.put("DOCATTACHFILEFIELD", getRelFileInfoByDocId.get("docRelFile"));
                            }
                            if( getRelFileInfoByDocId.get("docRelPic") != null){
                                oPostData.put("DOCATTACHPICFIELD", getRelFileInfoByDocId.get("docRelPic"));
                            }
                        }
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    try {
                        if (documentData.getContent()  != null) {
                            String  currentFilePathHtmlUrl = documentData.getContent();
                            System.out.println("===================start=======================");
                            System.out.println(currentFilePathHtmlUrl);
                            JsoupUtilsView jsoupUtils = new JsoupUtilsView();
                            String html = jsoupUtils.rexStringHtml(currentFilePathHtmlUrl,filePath);
                            System.out.println("==============================================");
                            System.out.println(html);
                            System.out.println("===================end========================");
                            oPostData.put("DOCHTMLCON", html);
                        } else {
                            oPostData.put("DocHtmlCon", "&nbsp;");
                            oPostData.put("DOCCONTENT", "&nbsp;");
                        }
                    }catch (Exception e){
                        oPostData.put("DocHtmlCon", "&nbsp;");
                        oPostData.put("DOCCONTENT", "&nbsp;");
                        e.printStackTrace();
                    }
                    try {
                        System.out.println(oPostData);
                        Dispatch result = WCMServiceCaller.Call(sServiceId, sMethodName, oPostData, true);
                        count++;
                        if(result!=null){
                            JSONObject rObject = JSONObject.fromObject(result.getResponseText().toString());
                            if (rObject.get("ISSUCCESS").toString().equals("true")){
                                System.out.println("DOCTITLE:"+documentData.getTitle());
                                System.out.println("count:"+count);
                                System.out.println("oldDocid:"+documentData.getId());
                            }else{
                                String serror = JSON.toJSONString(rObject);
                                System.out.println(serror);
                                outPrint(serror,documentData.getId(),count);
                            }
                        }
                    }catch(Exception e) {
                        outPrint("",documentData.getId(),count);
                        e.printStackTrace();
                    }
                    System.out.println("------------------------------------------------------------");
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            Log_Exception.Error_txt("DataZhiXunByChannel error"+e.getMessage());
        } finally {
        }
    }
    public void DataZWGKWLCBAllByChannel(String hyChannelId,String tableName,String filePath){
        String sServiceId = "gov_webdocument";
        String sMethodName = "saveDocumentInWeb";//自定义视图
        ServiceImplGgzy serviceImplKp=new ServiceImplGgzy();
        Annex annex = new Annex();
        try {
            List<Map<String,String>> allDocInfoFromKPDBdMaps = serviceImplKp.getNmgZWGGGgzyWLCB(tableName);
            if(allDocInfoFromKPDBdMaps!=null){
                int count=0;
                for (Map<String,String> map : allDocInfoFromKPDBdMaps) {
                    System.out.println("------------------------------------------------------------");
                    Map<String,Object> oPostData=new HashMap<>();
                    oPostData.put("ObjectId", 0);
                    oPostData.put("ChannelId", Integer.parseInt(hyChannelId));// Ŀ����Ŀid
                    oPostData.put("CurrUserName", "dev");
                    oPostData.put("isShenhe", "1");
                    oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_HTML);
                    DocumentDataBenJi documentData = new DocumentDataBenJi(map);
                    System.out.println(documentData);
                    if (documentData.getTitle() != null && documentData.getTitle() != "null") {
                        oPostData.put("DOCTITLE", Jsoup.parse(documentData.getTitle()).text()  );
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("scrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("fbrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("efectdat", documentData.getTime());
                    }
                    if (documentData.getChannle() != null) {
                        if (documentData.getChannle().equals("政策法规/综合")) {
                            oPostData.put("SUBCAT","18");
                        }
                        if (documentData.getChannle().equals("政策法规/政策解读")) {
                            oPostData.put("SUBCAT","18");
                        }
                        if (documentData.getChannle().equals("政策法规/工程建设")) {
                            oPostData.put("SUBCAT","13");
                        }
                        if (documentData.getChannle().equals("政策法规/政府采购")) {
                            oPostData.put("SUBCAT","14");
                        }
                        if (documentData.getChannle().equals("政策法规/土地/矿业权")) {
                            oPostData.put("SUBCAT","15");
                        }
                        if (documentData.getChannle().equals("政策法规/国有产权")) {
                            oPostData.put("SUBCAT","16");
                        }
                    }
                 /*   if (documentData.getB_source() != null && documentData.getB_source() != "") {
                        oPostData.put("DOCSOURCENAME",documentData.getB_source());
                    }*/
                    if (documentData.getId() != null) {
                        oPostData.put("oldDocid", documentData.getId());
                    }
                    try {
                        if (documentData.getId() != null) {
                            Map<String, Object> getRelFileInfoByDocId = annex.getZWGKFileInfoByDocId(filePath,documentData.getId());
                            if( getRelFileInfoByDocId.get("docRelFile") != null){
                                oPostData.put("DOCATTACHFILEFIELD", getRelFileInfoByDocId.get("docRelFile"));
                            }
                            if( getRelFileInfoByDocId.get("docRelPic") != null){
                                oPostData.put("DOCATTACHPICFIELD", getRelFileInfoByDocId.get("docRelPic"));
                            }
                        }
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    try {
                        if (documentData.getContent()  != null) {
                            String  currentFilePathHtmlUrl = documentData.getContent();
                            System.out.println("===================start=======================");
                            System.out.println(currentFilePathHtmlUrl);
                            JsoupUtilsView jsoupUtils = new JsoupUtilsView();
                            String html = jsoupUtils.rexStringHtml(currentFilePathHtmlUrl,filePath);
                            System.out.println("==============================================");
                            System.out.println(html);
                            System.out.println("===================end========================");
                            oPostData.put("DOCHTMLCON", html);
                        } else {
                            oPostData.put("DocHtmlCon", "&nbsp;");
                            oPostData.put("DOCCONTENT", "&nbsp;");
                        }
                    }catch (Exception e){
                        oPostData.put("DocHtmlCon", "&nbsp;");
                        oPostData.put("DOCCONTENT", "&nbsp;");
                        e.printStackTrace();
                    }
                    try {
                        System.out.println(oPostData);
                        Dispatch result = WCMServiceCaller.Call(sServiceId, sMethodName, oPostData, true);
                        count++;
                        if(result!=null){
                            JSONObject rObject = JSONObject.fromObject(result.getResponseText().toString());
                            if (rObject.get("ISSUCCESS").toString().equals("true")){
                                System.out.println("DOCTITLE:"+documentData.getTitle());
                                System.out.println("count:"+count);
                                System.out.println("oldDocid:"+documentData.getId());
                            }else{
                                String serror = JSON.toJSONString(rObject);
                                System.out.println(serror);
                                outPrint(serror,documentData.getId(),count);
                            }
                        }
                    }catch(Exception e) {
                        outPrint("",documentData.getId(),count);
                        e.printStackTrace();
                    }
                    System.out.println("------------------------------------------------------------");
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            Log_Exception.Error_txt("DataZhiXunByChannel error"+e.getMessage());
        } finally {
        }
    }
    public void DataZWGKCFSAllByChannel(String hyChannelId,String tableName,String filePath){
        String sServiceId = "gov_webdocument";
        String sMethodName = "saveDocumentInWeb";//自定义视图
        ServiceImplGgzy serviceImplKp=new ServiceImplGgzy();
        Annex annex = new Annex();
        try {
            List<Map<String,String>> allDocInfoFromKPDBdMaps = serviceImplKp.getNmgCFSGgzyWLCB(tableName);
            if(allDocInfoFromKPDBdMaps!=null){
                int count=0;
                for (Map<String,String> map : allDocInfoFromKPDBdMaps) {
                    System.out.println("------------------------------------------------------------");
                    Map<String,Object> oPostData=new HashMap<>();
                    oPostData.put("ObjectId", 0);
                    oPostData.put("ChannelId", Integer.parseInt(hyChannelId));// Ŀ����Ŀid
                    oPostData.put("CurrUserName", "dev");
                    oPostData.put("isShenhe", "1");
                    oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_HTML);
                    DocumentDataBenJi documentData = new DocumentDataBenJi(map);
                    System.out.println(documentData);
                    if (documentData.getTitle() != null && documentData.getTitle() != "null") {
                        oPostData.put("DOCTITLE", Jsoup.parse(documentData.getTitle()).text()  );
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("scrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("fbrq", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("efectdat", documentData.getTime());
                    }
                    if (documentData.getChannle() != null) {
                        if (documentData.getChannle().equals("法律法规/公共资源交易相关法律和政策")) {
                            oPostData.put("THEMECAT","3");
                        }
                        if (documentData.getChannle().equals("法律法规/法律")) {
                            oPostData.put("THEMECAT","3");
                        }
                        if (documentData.getChannle().equals("法律法规/法规")) {
                            oPostData.put("THEMECAT","4");
                        }
                        if (documentData.getChannle().equals("法律法规/规范性文件")) {
                            oPostData.put("THEMECAT","4");
                        }

                    }
                 /*   if (documentData.getB_source() != null && documentData.getB_source() != "") {
                        oPostData.put("DOCSOURCENAME",documentData.getB_source());
                    }*/
                    if (documentData.getId() != null) {
                        oPostData.put("oldDocid", documentData.getId());
                    }
                    try {
                        if (documentData.getId() != null) {
                            Map<String, Object> getRelFileInfoByDocId = annex.getZWGKFileInfoByDocId(filePath,documentData.getId());
                            if( getRelFileInfoByDocId.get("docRelFile") != null){
                                oPostData.put("DOCATTACHFILEFIELD", getRelFileInfoByDocId.get("docRelFile"));
                            }
                            if( getRelFileInfoByDocId.get("docRelPic") != null){
                                oPostData.put("DOCATTACHPICFIELD", getRelFileInfoByDocId.get("docRelPic"));
                            }
                        }
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    try {
                        if (documentData.getContent()  != null) {
                            String  currentFilePathHtmlUrl = documentData.getContent();
                            System.out.println("===================start=======================");
                            System.out.println(currentFilePathHtmlUrl);
                            JsoupUtilsView jsoupUtils = new JsoupUtilsView();
                            String html = jsoupUtils.rexStringHtml(currentFilePathHtmlUrl,filePath);
                            System.out.println("==============================================");
                            System.out.println(html);
                            System.out.println("===================end========================");
                            oPostData.put("DOCHTMLCON", html);
                        } else {
                            oPostData.put("DocHtmlCon", "&nbsp;");
                            oPostData.put("DOCCONTENT", "&nbsp;");
                        }
                    }catch (Exception e){
                        oPostData.put("DocHtmlCon", "&nbsp;");
                        oPostData.put("DOCCONTENT", "&nbsp;");
                        e.printStackTrace();
                    }
                    try {
                        System.out.println(oPostData);
                        Dispatch result = WCMServiceCaller.Call(sServiceId, sMethodName, oPostData, true);
                        count++;
                        if(result!=null){
                            JSONObject rObject = JSONObject.fromObject(result.getResponseText().toString());
                            if (rObject.get("ISSUCCESS").toString().equals("true")){
                                System.out.println("DOCTITLE:"+documentData.getTitle());
                                System.out.println("count:"+count);
                                System.out.println("oldDocid:"+documentData.getId());
                            }else{
                                String serror = JSON.toJSONString(rObject);
                                System.out.println(serror);
                                outPrint(serror,documentData.getId(),count);
                            }
                        }
                    }catch(Exception e) {
                        outPrint("",documentData.getId(),count);
                        e.printStackTrace();
                    }
                    System.out.println("------------------------------------------------------------");
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            Log_Exception.Error_txt("DataZhiXunByChannel error"+e.getMessage());
        } finally {
        }
    }

    public void DataJiGouZhiNenByChannel(String channelName,String hyChannelId,String tableName,String filePath){
        Log_Exception.Logger_txt("-------Start-------kpChannelId:" + channelName + "--hyChannelId:" + hyChannelId + "---------Start--------");
        String sServiceId = "gov_webdocument";
        String sMethodName = "saveDocumentInWeb";//
        ServiceImplGgzy serviceImplKp=new ServiceImplGgzy();
        Annex annex = new Annex();
        try {
            List<Map<String,String>> allDocInfoFromKPDBdMaps = serviceImplKp.getNmgGgzy(channelName,tableName);
            if(allDocInfoFromKPDBdMaps!=null){
                int count=0;
                for (Map<String,String> map : allDocInfoFromKPDBdMaps) {
                    System.out.println("------------------------------------------------------------");
                    Map<String,Object> oPostData=new HashMap<>();
                    oPostData.put("ObjectId", 0);
                    oPostData.put("ChannelId", Integer.parseInt(hyChannelId));// Ŀ����Ŀid
                    oPostData.put("CurrUserName", "dev");
                    oPostData.put("isShenhe", "1");
                    oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_HTML);
                    DocumentDataBenJi documentData = new DocumentDataBenJi(map);
                    if (documentData.getTitle() != null && documentData.getTitle() != "null") {
                        oPostData.put("DOCTITLE", Jsoup.parse(documentData.getTitle()).text()  );
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("DOCRELTIME", documentData.getTime());
                    }
                    if (documentData.getTime() != null) {
                        oPostData.put("CRTIME", documentData.getTime());
                    }
                 /*   if (documentData.getB_source() != null && documentData.getB_source() != "") {
                        oPostData.put("DOCSOURCENAME",documentData.getB_source());
                    }*/
                    if (documentData.getId() != null) {
                        oPostData.put("oldDocid", documentData.getId());
                    }
                    try {
                        if (documentData.getId() != null) {
                            Map<String, Object> getRelFileInfoByDocId = annex.getZhiXunFileInfoByDocId(filePath,documentData.getId());
                            if( getRelFileInfoByDocId.get("docRelFile") != null){
                                oPostData.put("docRelFile", getRelFileInfoByDocId.get("docRelFile"));
                            }
                            if( getRelFileInfoByDocId.get("docRelPic") != null){
                                oPostData.put("docRelPic", getRelFileInfoByDocId.get("docRelPic"));
                            }
                        }
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    try {
                        if (documentData.getContent()  != null) {
                            String  currentFilePathHtmlUrl = documentData.getContent();
                            System.out.println("===================start=======================");
                            System.out.println(currentFilePathHtmlUrl);
                            JsoupUtilsView jsoupUtils = new JsoupUtilsView();
                            String html = jsoupUtils.rexStringHtml(currentFilePathHtmlUrl,filePath);
                            System.out.println("==============================================");
                            System.out.println(html);
                            System.out.println("===================end========================");
                            oPostData.put("DOCHTMLCON", html);
                        } else {
                            oPostData.put("DocHtmlCon", "&nbsp;");
                            oPostData.put("DOCCONTENT", "&nbsp;");
                        }
                    }catch (Exception e){
                        oPostData.put("DocHtmlCon", "&nbsp;");
                        oPostData.put("DOCCONTENT", "&nbsp;");
                        e.printStackTrace();
                    }
                    String content = documentData.getContent();
                    if(content != "" && content != null){
                        if(content.equals("链接文章")){
                            if (documentData.getContent() != null && documentData.getContent() != "") {
                                oPostData.put("DOCTYPE", CMSConstants.CONTENT_BODY_LINK);
                                oPostData.put("DOCLINK", documentData.getContent());
                            }
                        }
                        if(content.equals("文件文章")){
                            String url = filePath+ documentData.getUrl();
                            String filename = documentData.getUrl();
                            String docTitle = documentData.getTitle();
                            if (documentData.getContent() != null && documentData.getContent() != "") {
                                Dispatch oDispatch = WCMServiceCaller.UploadFile(url);
                                if (oDispatch != null) {
                                    String docfilename = oDispatch.getUploadShowName();
                                    String DOCFILE = "[";
                                    DOCFILE += "{\"AppFile\": \"" + docfilename + "\",\"AppDesc\":\"" + docTitle
                                            + "\",\"AppendixId\":\"0\", \"SrcFile\":\"" + filename
                                            + "\",\"OTHEROPERATION\":0 }";
                                    DOCFILE += "]";
                                    oPostData.put("DocFileName", docfilename);
                                    oPostData.put("DOCFILE", DOCFILE);
                                    // oPostData.put("DOCPUBURL",oDispatch);
                                }
                            }
                        }
                    }
                    try {
                        System.out.println(oPostData);
                        Dispatch result = WCMServiceCaller.Call(sServiceId, sMethodName, oPostData, true);
                        count++;
                        if(result!=null){
                            JSONObject rObject = JSONObject.fromObject(result.getResponseText().toString());
                            if (rObject.get("ISSUCCESS").toString().equals("true")){
                                System.out.println("DOCTITLE:"+documentData.getTitle());
                                System.out.println("count:"+count);
                                System.out.println("oldDocid:"+documentData.getId());
                            }else{
                                String serror = JSON.toJSONString(rObject);
                                System.out.println(serror);
                                outPrint(serror,documentData.getId(),count);
                            }
                        }
                    }catch(Exception e) {
                        outPrint("",documentData.getId(),count);
                        e.printStackTrace();
                    }
                    System.out.println("------------------------------------------------------------");
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            Log_Exception.Error_txt("DataZhiXunByChannel error"+e.getMessage());
        } finally {
        }
    }

    public String updateFile(String url) throws Exception {
        System.out.println("==============");
        String fileNameRe = null;
        try {
            if(url != null && url != ""){
                System.out.println(url);
                Dispatch dispatch = WCMServiceCaller.UploadFile(url);
                System.out.println("-----------"+dispatch.getUploadShowName());
                fileNameRe = dispatch.getUploadShowName();
            }
        }catch (Exception e){
            e.printStackTrace();
        }
        return fileNameRe;
    }

    public void outPrint(String serror,String ManuscriptId,int count){
        try (
                BufferedWriter writer = new BufferedWriter(new FileWriter(ColumnConfig.outPrintFile,true))
        )
        {
            writer.write(serror+","+ManuscriptId+","+count+",");
            writer.newLine(); // ����
        } catch (IOException e1) {
            e1.printStackTrace();
        }
    }

    public String getJg(String jgmc)
    {
        String code = null;
        List<DemoDataJiGou> list = new ArrayList<>();
        EasyExcel.read(ColumnConfig.fileName, DemoDataJiGou.class, new PageReadListener<DemoDataJiGou>(dataList -> {
            for (DemoDataJiGou demoDataJiGou : dataList) {
                String jgName = demoDataJiGou.getJgName();
                if(jgName != null && jgName != ""){
                    list.add(demoDataJiGou);
                }
            }
        })).sheet().doRead();
        for (DemoDataJiGou demoDataJiGou : list) {
            if(demoDataJiGou.getJgName().equals(jgmc)){
                code = demoDataJiGou.getCode();
            }
        }
        return code;
    }
}
