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

import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;
import java.util.Map;

public class DocumentDataStr {

    private String manuscriptId;
    private String websiteId;
    private String title;
    private String shortTitle;
    private String memo;
    private String subTitle;
    private String KEYWORD;
    private String publishedTime;
    private String modifiedTime;
    private String CREATED_TIME;
    private String url;
    private String CMSTATUS;
    private String type;
    private String isAutorecall;
    private String hasImg;
    private String hasVideo;
    private String hasDoc;
    private String hasRadio;
    private String REDIRECT_URL;
    private String fsNamesId;
    private String currentFilePath;
    private String currentFilePathHtmlUrl;
    private String cwName;
    private String ChannelId;
    private String channelName;
    private String site_url;
    private String channel_url;
    private String channelParentId;
    private String IS_NAVIGATION;
    private String ccSTATUS;
    private String C_GKSX;
    private String C_FWRQ;
    private String C_FBJG;
    private String C_SYH;
    private String C_WJBH;
    private String C_ZTC;
    private String C_ZHUTI;
    private String CN_NAME;
    private String b_source;

    public DocumentDataStr() {
    }

    public DocumentDataStr(String manuscriptId, String websiteId, String title, String shortTitle, String memo, String subTitle, String KEYWORD, String publishedTime, String modifiedTime, String CREATED_TIME, String url, String CMSTATUS, String type, String isAutorecall, String hasImg, String hasVideo, String hasDoc, String hasRadio, String REDIRECT_URL, String fsNamesId, String currentFilePath, String currentFilePathHtmlUrl, String cwName, String channelId, String channelName, String site_url, String channel_url, String channelParentId, String IS_NAVIGATION, String ccSTATUS, String c_GKSX, String c_FWRQ, String c_FBJG, String c_SYH, String c_WJBH, String c_ZTC, String c_ZHUTI, String CN_NAME, String b_source) {
        this.manuscriptId = manuscriptId;
        this.websiteId = websiteId;
        this.title = title;
        this.shortTitle = shortTitle;
        this.memo = memo;
        this.subTitle = subTitle;
        this.KEYWORD = KEYWORD;
        this.publishedTime = publishedTime;
        this.modifiedTime = modifiedTime;
        this.CREATED_TIME = CREATED_TIME;
        this.url = url;
        this.CMSTATUS = CMSTATUS;
        this.type = type;
        this.isAutorecall = isAutorecall;
        this.hasImg = hasImg;
        this.hasVideo = hasVideo;
        this.hasDoc = hasDoc;
        this.hasRadio = hasRadio;
        this.REDIRECT_URL = REDIRECT_URL;
        this.fsNamesId = fsNamesId;
        this.currentFilePath = currentFilePath;
        this.currentFilePathHtmlUrl = currentFilePathHtmlUrl;
        this.cwName = cwName;
        this.ChannelId = channelId;
        this.channelName = channelName;
        this.site_url = site_url;
        this.channel_url = channel_url;
        this.channelParentId = channelParentId;
        this.IS_NAVIGATION = IS_NAVIGATION;
        this.ccSTATUS = ccSTATUS;
        this.C_GKSX = c_GKSX;
        this.C_FWRQ = c_FWRQ;
        this.C_FBJG = c_FBJG;
        this.C_SYH = c_SYH;
        this.C_WJBH = c_WJBH;
        this.C_ZTC = c_ZTC;
        this.C_ZHUTI = c_ZHUTI;
        this.CN_NAME = CN_NAME;
        this.b_source = b_source;
    }

    public DocumentDataStr(Map<String,String> map) {
        if(map != null){
            if(map.get("manuscriptId") != null){
                this.manuscriptId = map.get("manuscriptId").toString();
            }
            if(map.get("websiteId") != null){
                this.websiteId = map.get("websiteId").toString();
            }
            if(map.get("title") != null){
                this.title = map.get("title").toString();
            }
            if(map.get("shortTitle") != null){
                this.shortTitle = map.get("shortTitle").toString();
            }
            if(map.get("KEYWORD") != null){
                this.KEYWORD = map.get("KEYWORD").toString();
            }
            if(map.get("memo") != null){
                this.memo = map.get("memo").toString();
            }
            if(map.get("subTitle") != null){
                this.subTitle = map.get("subTitle").toString();
            }
            if(map.get("publishedTime") != null){
                SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                long pubtime = Long.parseLong(map.get("publishedTime").toString());
                Date date1 = new Date(pubtime);
                try {
                    LocalDateTime localDateTime = date1.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
                    LocalDateTime after8Hours = localDateTime.plusHours(8);
                    date1 = Date.from(after8Hours.atZone(ZoneId.systemDefault()).toInstant());
                }catch (Exception e){
                }
                String pubtimeStr = simpleDateFormat.format(date1);
                this.publishedTime = pubtimeStr;
            }
            if(map.get("modifiedTime") != null){
                SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                long crtime = Long.parseLong(map.get("modifiedTime").toString());
                Date date1 = new Date(crtime);
                String crtimeStr = simpleDateFormat.format(date1);
                this.modifiedTime = crtimeStr;
            }
            if(map.get("CREATED_TIME") != null){
                SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                long crtime = Long.parseLong(map.get("CREATED_TIME").toString());
                Date date1 = new Date(crtime);
                String crtimeStr = simpleDateFormat.format(date1);
                this.CREATED_TIME = crtimeStr;
            }
            if(map.get("url") != null){
                this.url = map.get("url").toString();
            }
            if(map.get("CMSTATUS") != null){
                this.CMSTATUS = map.get("CMSTATUS").toString();
            }
            if(map.get("type") != null){
                this.type = map.get("type").toString();
            }
            if(map.get("isAutorecall") != null){
                this.isAutorecall = map.get("isAutorecall").toString();
            }
            if(map.get("hasImg") != null){
                this.hasImg = map.get("hasImg").toString();
            }
            if(map.get("hasVideo") != null){
                this.hasVideo = map.get("hasVideo").toString();
            }
            if(map.get("hasDoc") != null){
                this.hasDoc = map.get("hasDoc").toString();
            }
            if(map.get("hasRadio") != null){
                this.hasRadio = map.get("hasRadio").toString();
            }
            if(map.get("REDIRECT_URL") != null){
                this.REDIRECT_URL = map.get("REDIRECT_URL").toString();
            }
            if(map.get("fsNamesId") != null){
                this.fsNamesId = map.get("fsNamesId").toString();
            }
            if(map.get("currentFilePath") != null){
                this.currentFilePath = map.get("currentFilePath").toString();
            }
            if(map.get("currentFilePathHtmlUrl") != null){
                this.currentFilePathHtmlUrl = map.get("currentFilePathHtmlUrl").toString();
            }
            if(map.get("cwName") != null){
                this.cwName = map.get("cwName").toString();
            }
            if(map.get("channelId") != null){
                this.ChannelId = map.get("channelId").toString();
            }
            if(map.get("channelName") != null){
                this.channelName = map.get("channelName").toString();
            }
            if(map.get("site_url") != null){
                this.site_url = map.get("site_url").toString();
            }
            if(map.get("channel_url") != null){
                this.channel_url = map.get("channel_url").toString();
            }
            if(map.get("channelParentId") != null){
                this.channelParentId = map.get("channelParentId").toString();
            }
            if(map.get("IS_NAVIGATION") != null){
                this.IS_NAVIGATION = map.get("IS_NAVIGATION").toString();
            }
            if(map.get("ccSTATUS") != null){
                this.ccSTATUS = map.get("ccSTATUS").toString();
            }
            if(map.get("C_GKSX") != null){
                this.C_GKSX = map.get("C_GKSX").toString();
            }
            if(map.get("C_FWRQ") != null){
                this.C_FWRQ = map.get("C_FWRQ").toString();
            }
            if(map.get("C_FBJG") != null){
                this.C_FBJG = map.get("C_FBJG").toString();
            }
            if(map.get("C_SYH") != null){
                this.C_SYH = map.get("C_SYH").toString();
            }
            if(map.get("C_WJBH") != null){
                this.C_WJBH = map.get("C_WJBH").toString();
            }
            if(map.get("C_ZTC") != null){
                this.C_ZTC = map.get("C_ZTC").toString();
            }
            if(map.get("C_ZHUTI") != null){
                this.C_ZHUTI = map.get("C_ZHUTI").toString();
            }
            if(map.get("CN_NAME") != null){
                this.CN_NAME = map.get("CN_NAME").toString();
            }
            if(map.get("b_source") != null){
                this.b_source = map.get("b_source").toString();
            }
        }

    }
    public String getManuscriptId() {
        return manuscriptId;
    }

    public void setManuscriptId(String manuscriptId) {
        this.manuscriptId = manuscriptId;
    }

    public String getWebsiteId() {
        return websiteId;
    }

    public void setWebsiteId(String websiteId) {
        this.websiteId = websiteId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getShortTitle() {
        return shortTitle;
    }

    public void setShortTitle(String shortTitle) {
        this.shortTitle = shortTitle;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public String getSubTitle() {
        return subTitle;
    }

    public void setSubTitle(String subTitle) {
        this.subTitle = subTitle;
    }

    public String getKEYWORD() {
        return KEYWORD;
    }

    public void setKEYWORD(String KEYWORD) {
        this.KEYWORD = KEYWORD;
    }

    public String getPublishedTime() {
        return publishedTime;
    }

    public void setPublishedTime(String publishedTime) {
        this.publishedTime = publishedTime;
    }

    public String getModifiedTime() {
        return modifiedTime;
    }

    public void setModifiedTime(String modifiedTime) {
        this.modifiedTime = modifiedTime;
    }

    public String getCREATED_TIME() {
        return CREATED_TIME;
    }

    public void setCREATED_TIME(String CREATED_TIME) {
        this.CREATED_TIME = CREATED_TIME;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getCMSTATUS() {
        return CMSTATUS;
    }

    public void setCMSTATUS(String CMSTATUS) {
        this.CMSTATUS = CMSTATUS;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getIsAutorecall() {
        return isAutorecall;
    }

    public void setIsAutorecall(String isAutorecall) {
        this.isAutorecall = isAutorecall;
    }

    public String getHasImg() {
        return hasImg;
    }

    public void setHasImg(String hasImg) {
        this.hasImg = hasImg;
    }

    public String getHasVideo() {
        return hasVideo;
    }

    public void setHasVideo(String hasVideo) {
        this.hasVideo = hasVideo;
    }

    public String getHasDoc() {
        return hasDoc;
    }

    public void setHasDoc(String hasDoc) {
        this.hasDoc = hasDoc;
    }

    public String getHasRadio() {
        return hasRadio;
    }

    public void setHasRadio(String hasRadio) {
        this.hasRadio = hasRadio;
    }

    public String getREDIRECT_URL() {
        return REDIRECT_URL;
    }

    public void setREDIRECT_URL(String REDIRECT_URL) {
        this.REDIRECT_URL = REDIRECT_URL;
    }

    public String getFsNamesId() {
        return fsNamesId;
    }

    public void setFsNamesId(String fsNamesId) {
        this.fsNamesId = fsNamesId;
    }

    public String getCurrentFilePath() {
        return currentFilePath;
    }

    public void setCurrentFilePath(String currentFilePath) {
        this.currentFilePath = currentFilePath;
    }

    public String getCurrentFilePathHtmlUrl() {
        return currentFilePathHtmlUrl;
    }

    public void setCurrentFilePathHtmlUrl(String currentFilePathHtmlUrl) {
        this.currentFilePathHtmlUrl = currentFilePathHtmlUrl;
    }

    public String getCwName() {
        return cwName;
    }

    public void setCwName(String cwName) {
        this.cwName = cwName;
    }

    public String getChannelId() {
        return ChannelId;
    }

    public void setChannelId(String channelId) {
        ChannelId = channelId;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public String getSite_url() {
        return site_url;
    }

    public void setSite_url(String site_url) {
        this.site_url = site_url;
    }

    public String getChannel_url() {
        return channel_url;
    }

    public void setChannel_url(String channel_url) {
        this.channel_url = channel_url;
    }

    public String getChannelParentId() {
        return channelParentId;
    }

    public void setChannelParentId(String channelParentId) {
        this.channelParentId = channelParentId;
    }

    public String getIS_NAVIGATION() {
        return IS_NAVIGATION;
    }

    public void setIS_NAVIGATION(String IS_NAVIGATION) {
        this.IS_NAVIGATION = IS_NAVIGATION;
    }

    public String getCcSTATUS() {
        return ccSTATUS;
    }

    public void setCcSTATUS(String ccSTATUS) {
        this.ccSTATUS = ccSTATUS;
    }

    public String getC_GKSX() {
        return C_GKSX;
    }

    public void setC_GKSX(String c_GKSX) {
        C_GKSX = c_GKSX;
    }

    public String getC_FWRQ() {
        return C_FWRQ;
    }

    public void setC_FWRQ(String c_FWRQ) {
        C_FWRQ = c_FWRQ;
    }

    public String getC_FBJG() {
        return C_FBJG;
    }

    public void setC_FBJG(String c_FBJG) {
        C_FBJG = c_FBJG;
    }

    public String getC_SYH() {
        return C_SYH;
    }

    public void setC_SYH(String c_SYH) {
        C_SYH = c_SYH;
    }

    public String getC_WJBH() {
        return C_WJBH;
    }

    public void setC_WJBH(String c_WJBH) {
        C_WJBH = c_WJBH;
    }

    public String getC_ZTC() {
        return C_ZTC;
    }

    public void setC_ZTC(String c_ZTC) {
        C_ZTC = c_ZTC;
    }

    public String getC_ZHUTI() {
        return C_ZHUTI;
    }

    public void setC_ZHUTI(String c_ZHUTI) {
        C_ZHUTI = c_ZHUTI;
    }

    public String getCN_NAME() {
        return CN_NAME;
    }

    public void setCN_NAME(String CN_NAME) {
        this.CN_NAME = CN_NAME;
    }

    public String getB_source() {
        return b_source;
    }

    public void setB_source(String b_source) {
        this.b_source = b_source;
    }

    @Override
    public String toString() {
        return "DocumentData{" +
                "manuscriptId='" + manuscriptId + '\'' +
                ", websiteId='" + websiteId + '\'' +
                ", title='" + title + '\'' +
                ", shortTitle='" + shortTitle + '\'' +
                ", memo='" + memo + '\'' +
                ", subTitle='" + subTitle + '\'' +
                ", KEYWORD='" + KEYWORD + '\'' +
                ", publishedTime='" + publishedTime + '\'' +
                ", modifiedTime='" + modifiedTime + '\'' +
                ", CREATED_TIME='" + CREATED_TIME + '\'' +
                ", url='" + url + '\'' +
                ", CMSTATUS='" + CMSTATUS + '\'' +
                ", type='" + type + '\'' +
                ", isAutorecall='" + isAutorecall + '\'' +
                ", hasImg='" + hasImg + '\'' +
                ", hasVideo='" + hasVideo + '\'' +
                ", hasDoc='" + hasDoc + '\'' +
                ", hasRadio='" + hasRadio + '\'' +
                ", REDIRECT_URL='" + REDIRECT_URL + '\'' +
                ", fsNamesId='" + fsNamesId + '\'' +
                ", currentFilePath='" + currentFilePath + '\'' +
                ", currentFilePathHtmlUrl='" + currentFilePathHtmlUrl + '\'' +
                ", cwName='" + cwName + '\'' +
                ", ChannelId='" + ChannelId + '\'' +
                ", channelName='" + channelName + '\'' +
                ", site_url='" + site_url + '\'' +
                ", channel_url='" + channel_url + '\'' +
                ", channelParentId='" + channelParentId + '\'' +
                ", IS_NAVIGATION='" + IS_NAVIGATION + '\'' +
                ", ccSTATUS='" + ccSTATUS + '\'' +
                ", C_GKSX='" + C_GKSX + '\'' +
                ", C_FWRQ='" + C_FWRQ + '\'' +
                ", C_FBJG='" + C_FBJG + '\'' +
                ", C_SYH='" + C_SYH + '\'' +
                ", C_WJBH='" + C_WJBH + '\'' +
                ", C_ZTC='" + C_ZTC + '\'' +
                ", C_ZHUTI='" + C_ZHUTI + '\'' +
                ", CN_NAME='" + CN_NAME + '\'' +
                ", b_source='" + b_source + '\'' +
                '}';
    }
}
