/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.google.gson.Gson
 *  org.springframework.beans.factory.annotation.Autowired
 *  org.springframework.stereotype.Service
 */
package com.hst.task.service;

import com.google.gson.Gson;
import com.hst.common.util.HstWxServiceUtil;
import com.hst.framework.constants.WebConstants;
import com.hst.framework.service.BaseService;
import com.hst.framework.util.HstDateUtil;
import com.hst.task.constants.ZhdtXxtsConstants;
import com.hst.task.dao.ZhdtXxtsDaoImp;
import com.hst.task.domain.zhdtxxts.ZhdtTsJjhhAppDomain;
import com.hst.task.domain.zhdtxxts.ZhdtTsJjhhDomain;
import com.hst.task.domain.zhdtxxts.ZhdtTsJshhAppDomain;
import com.hst.task.domain.zhdtxxts.ZhdtTsJshhDomain;
import com.hst.task.domain.zhdtxxts.ZhdtTsMydpjAppDomain;
import com.hst.task.domain.zhdtxxts.ZhdtTsMydpjDomain;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ZhdtXxtsService
implements BaseService {
    @Autowired
    private ZhdtXxtsDaoImp dao;

    public void doXxtsJshhxx() throws Exception {
        List<ZhdtTsJshhDomain> dataList = this.dao.queryXxtsJshhxx();
        ArrayList<ZhdtTsJshhDomain> tsList = new ArrayList<ZhdtTsJshhDomain>();
        if (dataList != null && dataList.size() > 0) {
            for (ZhdtTsJshhDomain data : dataList) {
                String rq = HstDateUtil.format(new Date(), "yyyyMMdd");
                if (!ZhdtXxtsConstants.ZHDT_XXTS_DATA.containsKey("RQ")) {
                    ZhdtXxtsConstants.ZHDT_XXTS_DATA.put("RQ", rq);
                } else if (!rq.equals(ZhdtXxtsConstants.ZHDT_XXTS_DATA.get("RQ"))) {
                    ZhdtXxtsConstants.ZHDT_XXTS_DATA.clear();
                }
                if (ZhdtXxtsConstants.ZHDT_XXTS_DATA.containsKey("JSHH_" + rq + "_" + data.getQhhm())) continue;
                tsList.add(data);
                ZhdtXxtsConstants.ZHDT_XXTS_DATA.put("JSHH_" + rq + "_" + data.getQhhm(), data.getQhhm());
            }
        }
        if (tsList != null && tsList.size() > 0) {
            _logger.debug((Object)("\u8f6c\u53d1\u670d\u52a1\u63a8\u9001\u63a5\u53e3\u5927\u5c0f3:" + tsList.size()));
            ZhdtTsJshhAppDomain appDomain = new ZhdtTsJshhAppDomain();
            appDomain.setDataList(tsList);
            HashMap<String, String> map = new HashMap<String, String>();
            map.put("ywId", "zhdt.tsJshh");
            map.put("parJson", new Gson().toJson((Object)appDomain));
            map.put("zfurl", String.valueOf(WebConstants.ZHDT_SERVICE_URL) + "/zhdt");
            Map<String, String> res = HstWxServiceUtil.sendMess(WebConstants.TRANSFER_URL, map, "utf-8");
            _logger.debug((Object)("\u8f6c\u53d1\u670d\u52a1\u8fd4\u56de" + WebConstants.TRANSFER_URL + res));
        }
    }

    public void doXxtsMydpj() throws Exception {
        List<ZhdtTsMydpjDomain> dataList = this.dao.queryXxtsMydpj();
        ArrayList<ZhdtTsMydpjDomain> tsList = new ArrayList<ZhdtTsMydpjDomain>();
        if (dataList != null && dataList.size() > 0) {
            for (ZhdtTsMydpjDomain data : dataList) {
                String rq = HstDateUtil.format(new Date(), "yyyyMMdd");
                if (!ZhdtXxtsConstants.ZHDT_XXTS_DATA.containsKey("RQ")) {
                    ZhdtXxtsConstants.ZHDT_XXTS_DATA.put("RQ", rq);
                } else if (!rq.equals(ZhdtXxtsConstants.ZHDT_XXTS_DATA.get("RQ"))) {
                    ZhdtXxtsConstants.ZHDT_XXTS_DATA.clear();
                }
                if (ZhdtXxtsConstants.ZHDT_XXTS_DATA.containsKey("MYDPJ_" + rq + "_" + data.getQhhm())) continue;
                tsList.add(data);
                ZhdtXxtsConstants.ZHDT_XXTS_DATA.put("MYDPJ_" + rq + "_" + data.getQhhm(), data.getQhhm());
            }
        }
        if (tsList != null && tsList.size() > 0) {
            ZhdtTsMydpjAppDomain appDomain = new ZhdtTsMydpjAppDomain();
            appDomain.setDataList(tsList);
            HashMap<String, String> map = new HashMap<String, String>();
            map.put("ywId", "zhdt.tsMydpj");
            map.put("parJson", new Gson().toJson((Object)appDomain));
            map.put("zfurl", String.valueOf(WebConstants.ZHDT_SERVICE_URL) + "/zhdt");
            Map<String, String> res = HstWxServiceUtil.sendMess(WebConstants.TRANSFER_URL, map, "utf-8");
            _logger.debug((Object)("\u8f6c\u53d1\u670d\u52a1\u8fd4\u56de" + res));
        }
    }

    public void doXxtsJjhhxx() throws Exception {
        List<ZhdtTsJjhhDomain> dataList = this.dao.queryXxtsJjhhxx();
        ArrayList<ZhdtTsJjhhDomain> tsList = new ArrayList<ZhdtTsJjhhDomain>();
        if (dataList != null && dataList.size() > 0) {
            for (ZhdtTsJjhhDomain data : dataList) {
                String rq = HstDateUtil.format(new Date(), "yyyyMMdd");
                if (!ZhdtXxtsConstants.ZHDT_XXTS_DATA.containsKey("RQ")) {
                    ZhdtXxtsConstants.ZHDT_XXTS_DATA.put("RQ", rq);
                } else if (!rq.equals(ZhdtXxtsConstants.ZHDT_XXTS_DATA.get("RQ"))) {
                    ZhdtXxtsConstants.ZHDT_XXTS_DATA.clear();
                }
                if (ZhdtXxtsConstants.ZHDT_XXTS_DATA.containsKey("JJHH_" + rq + "_" + data.getQhhm())) continue;
                tsList.add(data);
                ZhdtXxtsConstants.ZHDT_XXTS_DATA.put("JJHH_" + rq + "_" + data.getQhhm(), data.getQhhm());
            }
        }
        if (tsList != null && tsList.size() > 0) {
            ZhdtTsJjhhAppDomain appDomain = new ZhdtTsJjhhAppDomain();
            appDomain.setDataList(tsList);
            HashMap<String, String> map = new HashMap<String, String>();
            map.put("ywId", "zhdt.tsJjhh");
            map.put("parJson", new Gson().toJson((Object)appDomain));
            map.put("zfurl", String.valueOf(WebConstants.ZHDT_SERVICE_URL) + "/zhdt");
            Map<String, String> res = HstWxServiceUtil.sendMess(WebConstants.TRANSFER_URL, map, "utf-8");
            _logger.debug((Object)("\u8f6c\u53d1\u670d\u52a1\u8fd4\u56de" + res));
        }
    }
}
