/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.google.common.reflect.TypeToken
 *  com.google.gson.Gson
 *  org.apache.commons.beanutils.BeanUtils
 *  org.apache.commons.lang.StringUtils
 *  org.apache.http.HttpEntity
 *  org.apache.http.client.ClientProtocolException
 *  org.apache.http.client.entity.UrlEncodedFormEntity
 *  org.apache.http.client.methods.CloseableHttpResponse
 *  org.apache.http.client.methods.HttpPost
 *  org.apache.http.client.methods.HttpUriRequest
 *  org.apache.http.impl.client.CloseableHttpClient
 *  org.apache.http.impl.client.HttpClients
 *  org.apache.http.message.BasicNameValuePair
 *  org.apache.http.util.EntityUtils
 *  org.springframework.stereotype.Service
 *  org.springframework.transaction.annotation.Propagation
 *  org.springframework.transaction.annotation.Transactional
 */
package com.hst.taxService.service.imp;

import com.google.common.reflect.TypeToken;
import com.google.gson.Gson;
import com.hst.common.domain.BaseAppServiceDomain;
import com.hst.common.domain.TaxCommonAppServiceDomain;
import com.hst.common.domain.TaxCommonReturnDomain;
import com.hst.common.service.imp.BaseBusinessServiceImp;
import com.hst.common.util.HstJsonUtil;
import com.hst.common.util.HstWxServiceUtil;
import com.hst.common.util.JhxtInitUtil;
import com.hst.framework.constants.WebConstants;
import com.hst.framework.dao.BaseDao;
import com.hst.framework.util.HstDateUtil;
import com.hst.framework.util.HstEncodeUtil;
import com.hst.framework.util.HstToolsUtil;
import com.hst.taxService.dao.imp.TaxFpcyAppDaoImp;
import com.hst.taxService.dao.imp.TaxWxBswdAppDaoImp;
import com.hst.taxService.dao.imp.TaxWxBsznAppDaoImp;
import com.hst.taxService.dao.imp.TaxWxGzhAppDaoImp;
import com.hst.taxService.dao.imp.TaxWxSjcxAppDaoImp;
import com.hst.taxService.dao.imp.TaxWxSjqhAppDaoImp;
import com.hst.taxService.dao.imp.TaxWxWsxtAppDaoImp;
import com.hst.taxService.dao.imp.TaxWxZxrdAppDaoImp;
import com.hst.taxService.dao.imp.TaxYybsAppDaoImp;
import com.hst.taxService.domain.BswdBsdtListAppDomain;
import com.hst.taxService.domain.BswdBsdtLsDhxxAppDomain;
import com.hst.taxService.domain.BswdBsdtMessAppDomain;
import com.hst.taxService.domain.BswdShhwdListAppDomain;
import com.hst.taxService.domain.BswdShhwdMessAppDomain;
import com.hst.taxService.domain.BsznSssxLbAppDomain;
import com.hst.taxService.domain.BsznSssxSmAppDomain;
import com.hst.taxService.domain.BsznSxflAppDomain;
import com.hst.taxService.domain.FpcyAppDomain;
import com.hst.taxService.domain.SjcxNsrxxAppDomain;
import com.hst.taxService.domain.SjcxSbqxAppDomain;
import com.hst.taxService.domain.SjcxYgzZxdCxAppDomain;
import com.hst.taxService.domain.SjqhBsdtListAppDomain;
import com.hst.taxService.domain.SjqhGetDayQhtjAppDomain;
import com.hst.taxService.domain.SjqhGetDhrsAppDomain;
import com.hst.taxService.domain.SjqhGetDhrsReturnDomain;
import com.hst.taxService.domain.SjqhGetDryqhxxAllAppDomain;
import com.hst.taxService.domain.SjqhGetDryqhxxAppDomain;
import com.hst.taxService.domain.SjqhGetJhListAppDomain;
import com.hst.taxService.domain.SjqhGetJhListReturnDomain;
import com.hst.taxService.domain.SjqhGetJhxtYwflAppDomain;
import com.hst.taxService.domain.SjqhGetJhxtYwflReturnDomain;
import com.hst.taxService.domain.SjqhGetPhxxAppDomain;
import com.hst.taxService.domain.SjqhGetPhxxReturnDomain;
import com.hst.taxService.domain.SjqhGetSjqhhmAppDomain;
import com.hst.taxService.domain.SjqhPjAppDomain;
import com.hst.taxService.domain.SjqhPutqhxxAppDomain;
import com.hst.taxService.domain.SjqhZfSjqhAppDomain;
import com.hst.taxService.domain.SjqhZfSjqhReturnDomain;
import com.hst.taxService.domain.WsxtjsnrAppDomain;
import com.hst.taxService.domain.WsxtkclbAppDomain;
import com.hst.taxService.domain.WsxtkcmxAppDomain;
import com.hst.taxService.domain.WsxtspxzrzAppDomain;
import com.hst.taxService.domain.WxSjcxYgzPxdjAppDomain;
import com.hst.taxService.domain.WxSjcxYgzZxdAppDomain;
import com.hst.taxService.domain.YybsCxlsyyqhxxRequestDomain;
import com.hst.taxService.domain.YybsCxlsyyqhxxResponseDomain;
import com.hst.taxService.domain.YybsDayYyqhtjAppDomain;
import com.hst.taxService.domain.YybsDxyzmxyDomain;
import com.hst.taxService.domain.YybsFsdxyzmDomain;
import com.hst.taxService.domain.YybsFsdxyzmResDomain;
import com.hst.taxService.domain.YybsGetJhxtYwfl2AppDomain;
import com.hst.taxService.domain.YybsGetJhxtYwfl2Domain;
import com.hst.taxService.domain.YybsGetJhxtYwfl2ReturnDomain;
import com.hst.taxService.domain.YybsGetYyGzrAppDomain;
import com.hst.taxService.domain.YybsGetYysj2AppDomain;
import com.hst.taxService.domain.YybsGetYysj2ReturnDomain;
import com.hst.taxService.domain.YybsGetYyyxxAllAppDomain;
import com.hst.taxService.domain.YybsGetYyyxxAppDomain;
import com.hst.taxService.domain.YybsQxYyqhhmAppDomain;
import com.hst.taxService.domain.YybsSfyzAppDomain;
import com.hst.taxService.domain.YybsSfyzReturnDomain;
import com.hst.taxService.domain.YybsYyqhAppDomain;
import com.hst.taxService.domain.YybsYyqhReturnDomain;
import com.hst.taxService.domain.YybsYyqhhm2AppDomain;
import com.hst.taxService.domain.YybsYyqhhm2ReturnDomain;
import com.hst.taxService.domain.YybsYysj2Domain;
import com.hst.taxService.domain.YybsYysjAppDomain;
import com.hst.taxService.domain.YybsYysjReturnDomain;
import com.hst.taxService.domain.YyqhGetBsdtListAppDomain;
import com.hst.taxService.domain.ZxrdwtAppDomain;
import com.hst.taxService.domain.ZxrdwtTimeAppDomain;
import com.hst.taxService.domain.ZxrdwtmxAppDomain;
import com.hst.taxService.domain.dsyyqh.BookScheduleDto;
import com.hst.taxService.domain.dsyyqh.BookTicketDto;
import com.hst.taxService.domain.dsyyqh.BookTimeSlicesDto;
import com.hst.taxService.domain.dsyyqh.BookableItemsDto;
import com.hst.taxService.domain.dsyyqh.DsYyqhBaseResponse;
import com.hst.taxService.domain.jhxtDomain.JhxtDhrsAppDomain;
import com.hst.taxService.domain.jhxtDomain.JhxtDhrsReturnDomain;
import com.hst.taxService.domain.jhxtDomain.JhxtGxBsdtJhyxgzAppDomain;
import com.hst.taxService.domain.jhxtDomain.JhxtGxBsdtJhyxgzReturnDomain;
import com.hst.taxService.domain.jhxtDomain.JhxtGxBsdtYhflAppDomain;
import com.hst.taxService.domain.jhxtDomain.JhxtGxBsdtYhflReturnDomain;
import com.hst.taxService.domain.jhxtDomain.JhxtQhhmAppDomain;
import com.hst.taxService.domain.jhxtDomain.JhxtQhhmReturnDomain;
import com.hst.taxService.domain.jhxtDomain.JhxtSfyzAppDomain;
import com.hst.taxService.domain.jhxtDomain.JhxtSfyzReturnDomain;
import com.hst.taxService.domain.jhxtDomain.JhxtYwflAppDomain;
import com.hst.taxService.domain.jhxtDomain.JhxtYwflReturnDomain;
import com.hst.taxService.domain.jhxtDomain.JhxtYyqhAppDomain;
import com.hst.taxService.domain.jhxtDomain.JhxtYyqhReturnDomain;
import com.hst.taxService.domain.jhxtDomain.JhxtYyxxAppDomain;
import com.hst.taxService.domain.jhxtDomain.JhxtYyxxReturnDomain;
import com.hst.taxService.domain.jhxtDomain.JhxtZfQhhmAppDomain;
import com.hst.taxService.domain.wxfwh.GzhSytzggListAppDomain;
import com.hst.taxService.domain.wxfwh.GzhTzggListAppDomain;
import com.hst.taxService.domain.wxfwh.GzhTzggNrAppDomain;
import com.hst.taxService.domain.zjzk.ZjzkDxSendRequestDomain;
import com.hst.taxService.service.TaxWxCommonAppService;
import com.hst.taxService.service.ZjzkCommonService;
import java.io.IOException;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
public class TaxWxCommonAppServiceImp
extends BaseBusinessServiceImp
implements TaxWxCommonAppService {
    private BaseDao dao;
    static Map<String, String> JHXT_YWID_NEW_MAP = new HashMap<String, String>();

    static {
        JHXT_YWID_NEW_MAP.put("getJhxtYwfl", "smz.JhxtGetYwfl");
        JHXT_YWID_NEW_MAP.put("getJhxtQhhm", "smz.JhxtGetSjqhhm");
        JHXT_YWID_NEW_MAP.put("jhxtZfqhhm", "smz.JhxtZfSjqh");
        JHXT_YWID_NEW_MAP.put("getJhxtDhrs", "smz.JhxtGetDhrs");
    }

    @Override
    public TaxCommonReturnDomain queryZxrdGetList(BaseAppServiceDomain appDomain) throws Exception {
        ZxrdwtAppDomain domain = (ZxrdwtAppDomain)appDomain;
        return ((TaxWxZxrdAppDaoImp)this.getDao("taxWxZxrdAppDaoImp")).queryZxrdGetList(domain);
    }

    @Override
    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain queryZxrdGetMess(BaseAppServiceDomain appDomain) throws Exception {
        ZxrdwtmxAppDomain domain = (ZxrdwtmxAppDomain)appDomain;
        return ((TaxWxZxrdAppDaoImp)this.getDao("taxWxZxrdAppDaoImp")).queryZxrdGetMess(domain);
    }

    @Override
    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain zxrdPutViewTime(BaseAppServiceDomain appDomain) throws Exception {
        ZxrdwtTimeAppDomain domain = (ZxrdwtTimeAppDomain)appDomain;
        return ((TaxWxZxrdAppDaoImp)this.getDao("taxWxZxrdAppDaoImp")).zxrdPutViewTime(domain);
    }

    @Override
    public TaxCommonReturnDomain queryWsxtGetList(BaseAppServiceDomain appDomain) throws Exception {
        WsxtkclbAppDomain domain = (WsxtkclbAppDomain)appDomain;
        return ((TaxWxWsxtAppDaoImp)this.getDao("taxWxWsxtAppDaoImp")).queryWsxtGetList(domain);
    }

    @Override
    public TaxCommonReturnDomain queryWsxtGetMess(BaseAppServiceDomain appDomain) throws Exception {
        WsxtkcmxAppDomain domain = (WsxtkcmxAppDomain)appDomain;
        return ((TaxWxWsxtAppDaoImp)this.getDao("taxWxWsxtAppDaoImp")).queryWsxtGetMess(domain);
    }

    @Override
    public TaxCommonReturnDomain WsxtPutDownLog(BaseAppServiceDomain appDomain) throws Exception {
        WsxtspxzrzAppDomain domain = (WsxtspxzrzAppDomain)appDomain;
        return ((TaxWxWsxtAppDaoImp)this.getDao("taxWxWsxtAppDaoImp")).queryWsxtPutDownLog(domain);
    }

    @Override
    public TaxCommonReturnDomain queryWsxtGetJsnr(BaseAppServiceDomain appDomain) throws Exception {
        WsxtjsnrAppDomain domain = (WsxtjsnrAppDomain)appDomain;
        return ((TaxWxWsxtAppDaoImp)this.getDao("taxWxWsxtAppDaoImp")).queryWsxtGetJsnr(domain);
    }

    @Override
    public TaxCommonReturnDomain queryBsznGetSxfl(BaseAppServiceDomain appDomain) throws Exception {
        BsznSxflAppDomain domain = (BsznSxflAppDomain)appDomain;
        return ((TaxWxBsznAppDaoImp)this.getDao("taxWxBsznAppDaoImp")).queryBsznGetSxfl(domain);
    }

    @Override
    public TaxCommonReturnDomain queryBsznGetSssxList(BaseAppServiceDomain appDomain) throws Exception {
        BsznSssxLbAppDomain domain = (BsznSssxLbAppDomain)appDomain;
        return ((TaxWxBsznAppDaoImp)this.getDao("taxWxBsznAppDaoImp")).queryBsznGetSssxList(domain);
    }

    @Override
    public TaxCommonReturnDomain queryBsznGetSssxSm(BaseAppServiceDomain appDomain) throws Exception {
        BsznSssxSmAppDomain domain = (BsznSssxSmAppDomain)appDomain;
        return ((TaxWxBsznAppDaoImp)this.getDao("taxWxBsznAppDaoImp")).queryBsznGetSssxSm(domain);
    }

    @Override
    public TaxCommonReturnDomain queryBswdGetBsdtList(BaseAppServiceDomain appDomain) throws Exception {
        BswdBsdtListAppDomain domain = (BswdBsdtListAppDomain)appDomain;
        return ((TaxWxBswdAppDaoImp)this.getDao("taxWxBswdAppDaoImp")).queryBswdGetBsdtList(domain);
    }

    @Override
    public TaxCommonReturnDomain queryBswdGetBsdtMess(BaseAppServiceDomain appDomain) throws Exception {
        BswdBsdtMessAppDomain domain = (BswdBsdtMessAppDomain)appDomain;
        return ((TaxWxBswdAppDaoImp)this.getDao("taxWxBswdAppDaoImp")).queryBswdGetBsdtMess(domain);
    }

    @Override
    public TaxCommonReturnDomain queryBswdGetBsdtLsDhxx(BaseAppServiceDomain appDomain) throws Exception {
        BswdBsdtLsDhxxAppDomain domain = (BswdBsdtLsDhxxAppDomain)appDomain;
        return ((TaxWxBswdAppDaoImp)this.getDao("taxWxBswdAppDaoImp")).queryBswdGetBsdtLsDhxx(domain);
    }

    @Override
    public TaxCommonReturnDomain queryBswdGetShhwdList(BaseAppServiceDomain appDomain) throws Exception {
        BswdShhwdListAppDomain domain = (BswdShhwdListAppDomain)appDomain;
        return ((TaxWxBswdAppDaoImp)this.getDao("taxWxBswdAppDaoImp")).queryBswdGetShhwdList(domain);
    }

    @Override
    public TaxCommonReturnDomain queryBswdGetShhwdMess(BaseAppServiceDomain appDomain) throws Exception {
        BswdShhwdMessAppDomain domain = (BswdShhwdMessAppDomain)appDomain;
        return ((TaxWxBswdAppDaoImp)this.getDao("taxWxBswdAppDaoImp")).queryBswdGetShhwdMess(domain);
    }

    @Override
    public TaxCommonReturnDomain querySjqhGetBsdtList(BaseAppServiceDomain appDomain) throws Exception {
        SjqhBsdtListAppDomain domain = (SjqhBsdtListAppDomain)appDomain;
        return ((TaxWxSjqhAppDaoImp)this.getDao("taxWxSjqhAppDaoImp")).querySjqhGetBsdtList(domain);
    }

    @Override
    public TaxCommonReturnDomain querySjqhGetDryqhxx(BaseAppServiceDomain appDomain) throws Exception {
        SjqhGetDryqhxxAppDomain domain = (SjqhGetDryqhxxAppDomain)appDomain;
        return ((TaxWxSjqhAppDaoImp)this.getDao("taxWxSjqhAppDaoImp")).querySjqhGetDryqhxx(domain);
    }

    @Override
    public TaxCommonReturnDomain querySjqhGetDhrs(BaseAppServiceDomain baseAppDomain, TaxCommonAppServiceDomain domain) throws Exception {
        SjqhGetDhrsAppDomain appDomain = (SjqhGetDhrsAppDomain)baseAppDomain;
        SjqhGetDhrsReturnDomain returnDomain = new SjqhGetDhrsReturnDomain();
        JhxtDhrsAppDomain jhxtAppDomain = new JhxtDhrsAppDomain();
        BeanUtils.copyProperties((Object)jhxtAppDomain, (Object)appDomain);
        jhxtAppDomain.setBsdtdjXh(appDomain.getBsdtDjxh());
        jhxtAppDomain.setYwflbm(appDomain.getYwflbm());
        jhxtAppDomain.setQhhm(appDomain.getQhhm());
        Map<String, String> sendResMap = this.sendMess(jhxtAppDomain, "getJhxtDhrs");
        if ("00".equals(sendResMap.get("code"))) {
            String sendResStr = sendResMap.get("mess").replace("getJhxtDhrs", domain.getYwId());
            JhxtDhrsReturnDomain jhxtReturnDomain = HstJsonUtil.jsonToRetrunBean(sendResStr, JhxtDhrsReturnDomain.class);
            BeanUtils.copyProperties((Object)returnDomain, (Object)jhxtReturnDomain);
            returnDomain.setDhrs(jhxtReturnDomain.getDhrs());
        } else {
            String errStr = sendResMap.get("mess");
            if (errStr.length() > 1000) {
                errStr = errStr.substring(0, 999);
            }
            returnDomain.setCode("01");
            returnDomain.setMess(errStr);
        }
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain querySjqhGetJhxtYwfl(BaseAppServiceDomain baseAppDomain, TaxCommonAppServiceDomain domain) throws Exception {
        SjqhGetJhxtYwflAppDomain appDomain = (SjqhGetJhxtYwflAppDomain)baseAppDomain;
        SjqhGetJhxtYwflReturnDomain returnDomain = new SjqhGetJhxtYwflReturnDomain();
        returnDomain = (SjqhGetJhxtYwflReturnDomain)((TaxWxSjqhAppDaoImp)this.getDao("taxWxSjqhAppDaoImp")).doSjqhJhxtCheck(appDomain);
        if (!"00".equals(returnDomain.getCode())) {
            return returnDomain;
        }
        JhxtYwflAppDomain jhxtAppDomain = new JhxtYwflAppDomain();
        BeanUtils.copyProperties((Object)jhxtAppDomain, (Object)appDomain);
        jhxtAppDomain.setBsdtdjXh(appDomain.getBsdtDjxh());
        Map<String, String> sendResMap = this.sendMess(jhxtAppDomain, "getJhxtYwfl");
        if ("00".equals(sendResMap.get("code"))) {
            String sendResStr = sendResMap.get("mess").replace("getJhxtYwfl", domain.getYwId());
            JhxtYwflReturnDomain jhxtReturnDomain = HstJsonUtil.jsonToRetrunBean(sendResStr, JhxtYwflReturnDomain.class);
            BeanUtils.copyProperties((Object)returnDomain, (Object)jhxtReturnDomain);
        } else {
            String errStr = sendResMap.get("mess");
            if (errStr.length() > 1000) {
                errStr = errStr.substring(0, 999);
            }
            returnDomain.setCode("01");
            returnDomain.setMess(errStr);
        }
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain querySjqhGetSjqhhm(BaseAppServiceDomain baseAppDomain, TaxCommonAppServiceDomain domain) throws Exception {
        SjqhGetSjqhhmAppDomain appDomain = (SjqhGetSjqhhmAppDomain)baseAppDomain;
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        System.out.println(appDomain.getYwflmc());
        Map<String, Object> resMap = ((TaxWxSjqhAppDaoImp)this.getDao("taxWxSjqhAppDaoImp")).querySjqhQhhmBefore(appDomain);
        if (resMap.get("code").equals("00")) {
            JhxtQhhmAppDomain jhhxtAppDom = new JhxtQhhmAppDomain();
            BeanUtils.copyProperties((Object)jhhxtAppDom, (Object)appDomain);
            jhhxtAppDom.setBsdtdjXh((String)resMap.get("bsdtDjxh"));
            jhhxtAppDom.setYwflbm((String)resMap.get("ywflBm"));
            jhhxtAppDom.setLbDm((String)resMap.get("lbDm"));
            jhhxtAppDom.setNsrsbh((String)resMap.get("nsrsbh"));
            jhhxtAppDom.setSfzhm((String)resMap.get("sfzhm"));
            jhhxtAppDom.setHqyzm((String)resMap.get("hqyzm"));
            jhhxtAppDom.setHqjzsj((String)resMap.get("hqjzsj"));
            jhhxtAppDom.setNjDm((String)resMap.get("njDm"));
            Map<String, String> sendResMap = this.sendMess(jhhxtAppDom, "getJhxtQhhm");
            if ("00".equals(sendResMap.get("code"))) {
                String sendResStr = sendResMap.get("mess").replace("getJhxtQhhm", domain.getYwId());
                JhxtQhhmReturnDomain jhReturnDomain = HstJsonUtil.jsonToRetrunBean(sendResStr, JhxtQhhmReturnDomain.class);
                resMap.put("qhhm", jhReturnDomain.getQhhm());
                resMap.put("mess", jhReturnDomain.getMess());
                resMap.put("code", jhReturnDomain.getCode());
                BeanUtils.copyProperties((Object)returnDomain, (Object)jhReturnDomain);
            } else {
                String errStr = sendResMap.get("mess");
                if (errStr.length() > 1000) {
                    errStr = errStr.substring(0, 999);
                }
                returnDomain.setCode("01");
                returnDomain.setMess(errStr);
            }
            returnDomain = ((TaxWxSjqhAppDaoImp)this.getDao("taxWxSjqhAppDaoImp")).querySjqhQhhm(resMap);
        } else if (resMap.get("code").equals("99")) {
            SjqhGetDryqhxxAppDomain yqhmDomain = new SjqhGetDryqhxxAppDomain();
            BeanUtils.copyProperties((Object)yqhmDomain, (Object)appDomain);
            returnDomain = ((TaxWxSjqhAppDaoImp)this.getDao("taxWxSjqhAppDaoImp")).querySjqhGetDryqhxx(yqhmDomain);
        } else {
            returnDomain.setCode(HstEncodeUtil.ISO2GBK((String)resMap.get("code")));
            returnDomain.setMess(HstEncodeUtil.ISO2GBK((String)resMap.get("mess")));
        }
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain querySjqhZfSjqh(BaseAppServiceDomain baseAppDomain, TaxCommonAppServiceDomain domain) throws Exception {
        SjqhZfSjqhAppDomain appDomain = (SjqhZfSjqhAppDomain)baseAppDomain;
        Map<String, Object> resMap = ((TaxWxSjqhAppDaoImp)this.getDao("taxWxSjqhAppDaoImp")).querySjqhZfsjqhBefore(appDomain);
        SjqhZfSjqhReturnDomain returnDomain = new SjqhZfSjqhReturnDomain();
        if (resMap.get("code").equals("00")) {
            JhxtZfQhhmAppDomain jhxtDomain = new JhxtZfQhhmAppDomain();
            JhxtZfQhhmAppDomain dom = (JhxtZfQhhmAppDomain)resMap.get("jhxtAppDomain");
            BeanUtils.copyProperties((Object)jhxtDomain, (Object)appDomain);
            jhxtDomain.setBsdtdjXh(dom.getBsdtdjXh());
            jhxtDomain.setYwflbm(dom.getYwflbm());
            jhxtDomain.setQhhm(dom.getQhhm());
            Map<String, String> sendResMap = this.sendMess(jhxtDomain, "jhxtZfqhhm");
            if ("00".equals(sendResMap.get("code"))) {
                String sendResStr = sendResMap.get("mess").replace("jhxtZfqhhm", domain.getYwId());
                TaxCommonReturnDomain jhxtReturnDomain = HstJsonUtil.jsonToRetrunBean(sendResStr, TaxCommonReturnDomain.class);
                if (jhxtReturnDomain.getCode().equals("00")) {
                    return ((TaxWxSjqhAppDaoImp)this.getDao("taxWxSjqhAppDaoImp")).querySjqhZfsjqh(appDomain);
                }
                returnDomain.setCode(jhxtReturnDomain.getCode());
                returnDomain.setMess(jhxtReturnDomain.getMess());
            } else {
                returnDomain.setCode((String)resMap.get("code"));
                returnDomain.setMess((String)resMap.get("mess"));
            }
        } else {
            returnDomain.setCode((String)resMap.get("code"));
            returnDomain.setMess((String)resMap.get("mess"));
        }
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain querySjcxGetNsrxx(BaseAppServiceDomain appDomain) throws Exception {
        SjcxNsrxxAppDomain domain = (SjcxNsrxxAppDomain)appDomain;
        return ((TaxWxSjcxAppDaoImp)this.getDao("taxWxSjcxAppDaoImp")).queryNsrxx(domain);
    }

    @Override
    public TaxCommonReturnDomain querySjcxGetSbqx(BaseAppServiceDomain appDomain) throws Exception {
        SjcxSbqxAppDomain domain = (SjcxSbqxAppDomain)appDomain;
        return ((TaxWxSjcxAppDaoImp)this.getDao("taxWxSjcxAppDaoImp")).querySbqx(domain);
    }

    @Override
    public TaxCommonReturnDomain queryFpcy(BaseAppServiceDomain baseAppDomain, TaxCommonAppServiceDomain domain) throws Exception {
        FpcyAppDomain appDomain = (FpcyAppDomain)baseAppDomain;
        return ((TaxFpcyAppDaoImp)this.getDao("taxFpcyAppDaoImp")).queryFpcy(appDomain);
    }

    @Override
    public TaxCommonReturnDomain queryYybsYysj(BaseAppServiceDomain baseAppDomain, TaxCommonAppServiceDomain domain) throws Exception {
        YybsYysjAppDomain appDomain = (YybsYysjAppDomain)baseAppDomain;
        YybsYysjReturnDomain returnDomain = new YybsYysjReturnDomain();
        JhxtYyxxAppDomain jhxtAppDomain = new JhxtYyxxAppDomain();
        BeanUtils.copyProperties((Object)jhxtAppDomain, (Object)appDomain);
        jhxtAppDomain.setBsdtdjXh(appDomain.getBsdtdjXh());
        Map<String, String> sendResMap = this.sendMess(jhxtAppDomain, "getJhxtYyxx");
        if ("00".equals(sendResMap.get("code"))) {
            String sendResStr = sendResMap.get("mess").replace("getJhxtYyxx", domain.getYwId());
            JhxtYyxxReturnDomain jhxtReturnDomain = HstJsonUtil.jsonToRetrunBean(sendResStr, JhxtYyxxReturnDomain.class);
            BeanUtils.copyProperties((Object)returnDomain, (Object)jhxtReturnDomain);
        } else {
            String errStr = sendResMap.get("mess");
            if (errStr.length() > 1000) {
                errStr = errStr.substring(0, 999);
            }
            returnDomain.setCode("01");
            returnDomain.setMess(errStr);
        }
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain queryYybsGetYyqhhm2(BaseAppServiceDomain baseAppDomain) throws Exception {
        YybsYyqhhm2AppDomain appDomain = (YybsYyqhhm2AppDomain)baseAppDomain;
        String hqyzm = "";
        YybsYyqhhm2ReturnDomain returnDomain = new YybsYyqhhm2ReturnDomain();
        if (WebConstants.YYQH_DS_BSDT.containsKey(appDomain.getBsdtdjXh())) {
            Type objectType;
            if (StringUtils.isBlank((String)appDomain.getSchDateIdx())) {
                returnDomain.setCode("01");
                returnDomain.setMess("\u539f\u5730\u7a0e\u5927\u5385\u9700\u8981\u4f20schDateId");
                return returnDomain;
            }
            if (StringUtils.isBlank((String)appDomain.getTimeSliceId())) {
                returnDomain.setCode("01");
                returnDomain.setMess("\u539f\u5730\u7a0e\u5927\u5385\u9700\u8981\u4f20timeSliceId");
                return returnDomain;
            }
            String yysjPath = "/openintf/booking/add.json";
            HashMap<String, String> params = new HashMap<String, String>();
            params.put("areaId", WebConstants.YYQH_DS_BSDT.get(appDomain.getBsdtdjXh()));
            params.put("ticketItemId", appDomain.getYwflbm());
            params.put("schDateIdx", appDomain.getSchDateIdx());
            params.put("timeSliceId", appDomain.getTimeSliceId());
            params.put("nsrbm", appDomain.getSfzhm());
            Map<String, String> res = HstWxServiceUtil.sendMessForBasicAuth(String.valueOf(WebConstants.DS_YYQH_URL) + yysjPath, params, "utf-8", WebConstants.DS_YYQH_USERNAME, WebConstants.DS_YYQH_PASSWORD);
            if (!"00".equals(res.get("code"))) {
                returnDomain.setCode("01");
                returnDomain.setMess(res.get("mess"));
                return returnDomain;
            }
            Gson gson = new Gson();
            String json = res.get("mess");
            DsYyqhBaseResponse response = (DsYyqhBaseResponse)gson.fromJson(json, objectType = new TypeToken<DsYyqhBaseResponse<BookTicketDto>>(){}.getType());
            if (!"0".equals(response.getCode())) {
                returnDomain.setCode("01");
                returnDomain.setMess(response.getMessage());
                return returnDomain;
            }
            hqyzm = ((BookTicketDto)response.getData()).getBookPwd();
            returnDomain = (YybsYyqhhm2ReturnDomain)((TaxYybsAppDaoImp)this.getDao("taxYybsAppDaoImp")).queryYybsGetYyqhhm2Ds(appDomain, hqyzm, ((BookTicketDto)response.getData()).getSessionId());
        } else {
            returnDomain = (YybsYyqhhm2ReturnDomain)((TaxYybsAppDaoImp)this.getDao("taxYybsAppDaoImp")).queryYybsGetYyqhhm2(appDomain);
            if (!"00".equals(returnDomain.getCode())) {
                return returnDomain;
            }
            hqyzm = returnDomain.getHqyzm().substring(returnDomain.getHqyzm().length() - 6, returnDomain.getHqyzm().length());
        }
        String kz = WebConstants.HST_PROP_MAP.get("hst.ZJZK_DX_KZ");
        if ("Y".equals(kz) || HstToolsUtil.isNullOrEmpty(kz)) {
            try {
                ZjzkCommonService zjzkService = this.getZjzkService();
                ZjzkDxSendRequestDomain request = new ZjzkDxSendRequestDomain();
                request.setSjhm(appDomain.getSjhm());
                StringBuffer nr = new StringBuffer();
                nr.append("\u60a8\u5df2\u9884\u7ea6\u3010").append(returnDomain.getBsdtMc()).append("\u3011");
                nr.append("\u3010").append(returnDomain.getYysj_q()).append("\u81f3").append(HstDateUtil.format(HstDateUtil.parse(returnDomain.getYysj_z(), "yyyy-MM-dd HH:mm:ss"), "HH:mm:ss")).append("\u3011");
                nr.append("\u529e\u7406\u3010").append(returnDomain.getYwflmc()).append("\u3011\u4e1a\u52a1");
                nr.append("\uff0c\u6362\u9886\u9a8c\u8bc1\u7801\uff1a").append(hqyzm).append("\uff0c\u8bf7\u5728\u3010").append(returnDomain.getHqjzsj()).append("\u3011\u524d\u6362\u53d6\u53f7\u7801\u3002\u903e\u671f\u9884\u7ea6\u65e0\u6548\uff0c\u5e76\u5c06\u8bb0\u5165\u5931\u7ea6\u8bb0\u5f55\u3002");
                request.setTsnr(nr.toString());
                _logger.debug((Object)("\u53d1\u9001\u77ed\u4fe1\u77ed\u4fe1\uff1a" + nr.toString()));
                zjzkService.dxsend(request);
            }
            catch (Exception e) {
                e.getStackTrace();
                _logger.error((Object)("\u53d1\u9001\u77ed\u4fe1\u9a8c\u8bc1\u7801\u9519\u8bef\uff1a" + e.toString()));
            }
        }
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain doQxyyqhhm(BaseAppServiceDomain baseAppDomain) throws Exception {
        YybsQxYyqhhmAppDomain appDomain = (YybsQxYyqhhmAppDomain)baseAppDomain;
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        HashMap<String, String> res = ((TaxYybsAppDaoImp)this.getDao("taxYybsAppDaoImp")).yybsQxYyqhhm(appDomain);
        if (res.containsKey("dsYyqhId") && StringUtils.isNotBlank((String)res.get("dsYyqhId"))) {
            String path = "/openintf/booking/cancelBooking.json";
            HashMap<String, String> params = new HashMap<String, String>();
            params.put("bookSessionId", res.get("dsYyqhId"));
            params.put("nsrbm", appDomain.getSfzhm());
            HstWxServiceUtil.sendMessForBasicAuth(String.valueOf(WebConstants.DS_YYQH_URL) + path, params, "utf-8", WebConstants.DS_YYQH_USERNAME, WebConstants.DS_YYQH_PASSWORD);
        }
        returnDomain.setCode(res.get("code"));
        returnDomain.setMess(res.get("mess"));
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain doGxBsdtJhyxgz(BaseAppServiceDomain baseAppDomain, TaxCommonAppServiceDomain domain) throws Exception {
        JhxtGxBsdtJhyxgzAppDomain appDomain = (JhxtGxBsdtJhyxgzAppDomain)baseAppDomain;
        JhxtGxBsdtJhyxgzReturnDomain returnDomain = new JhxtGxBsdtJhyxgzReturnDomain();
        JhxtYyxxAppDomain jhxtAppDomain = new JhxtYyxxAppDomain();
        BeanUtils.copyProperties((Object)jhxtAppDomain, (Object)appDomain);
        jhxtAppDomain.setBsdtdjXh(appDomain.getBsdtdjXh());
        Map<String, String> sendResMap = this.sendMess(jhxtAppDomain, "jhxtGxBsdtJhyxgz");
        if ("00".equals(sendResMap.get("code"))) {
            String sendResStr = sendResMap.get("mess").replace("jhxtGxBsdtJhyxgz", domain.getYwId());
            returnDomain = HstJsonUtil.jsonToRetrunBean(sendResStr, JhxtGxBsdtJhyxgzReturnDomain.class);
        } else {
            String errStr = sendResMap.get("mess");
            if (errStr.length() > 1000) {
                errStr = errStr.substring(0, 999);
            }
            returnDomain.setCode("01");
            returnDomain.setMess(errStr);
        }
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain doGxBsdtYhfl(BaseAppServiceDomain baseAppDomain, TaxCommonAppServiceDomain domain) throws Exception {
        JhxtGxBsdtYhflAppDomain appDomain = (JhxtGxBsdtYhflAppDomain)baseAppDomain;
        JhxtGxBsdtYhflReturnDomain returnDomain = new JhxtGxBsdtYhflReturnDomain();
        Map<String, String> sendResMap = this.sendMess(appDomain, "jhxtGxBsdtYhfl");
        if ("00".equals(sendResMap.get("code"))) {
            String sendResStr = sendResMap.get("mess").replace("jhxtGxBsdtYhfl", domain.getYwId());
            JhxtGxBsdtYhflReturnDomain jhxtReturnDomain = HstJsonUtil.jsonToRetrunBean(sendResStr, JhxtGxBsdtYhflReturnDomain.class);
            BeanUtils.copyProperties((Object)returnDomain, (Object)jhxtReturnDomain);
        } else {
            String errStr = sendResMap.get("mess");
            if (errStr.length() > 1000) {
                errStr = errStr.substring(0, 999);
            }
            returnDomain.setCode("01");
            returnDomain.setMess(errStr);
        }
        return returnDomain;
    }

    public Map<String, String> sendMess(BaseAppServiceDomain domain, String ywId) {
        HashMap<String, String> sendResMap = new HashMap<String, String>();
        String url = WebConstants.JHXT_URL;
        HttpPost httppost = new HttpPost(url);
        String strResult = "";
        CloseableHttpClient httpClient = HttpClients.createDefault();
        try {
            httppost.addHeader("Content-type", "application/x-www-form-urlencoded;charset=gbk");
            ArrayList<BasicNameValuePair> par = new ArrayList<BasicNameValuePair>();
            par.add(new BasicNameValuePair("dsyyqh.ywId", ywId));
            par.add(new BasicNameValuePair("dsyyqh.parmJson", HstJsonUtil.beanCtreatJson(domain).replace(domain.getBid(), ywId)));
            httppost.setEntity((HttpEntity)new UrlEncodedFormEntity(par, "gbk"));
            CloseableHttpResponse response = httpClient.execute((HttpUriRequest)httppost);
            if (response.getStatusLine().getStatusCode() == 200) {
                strResult = EntityUtils.toString((HttpEntity)response.getEntity());
                sendResMap.put("code", "00");
                sendResMap.put("mess", strResult);
            } else {
                String err = String.valueOf(response.getStatusLine().getStatusCode());
                strResult = String.valueOf(strResult) + "\u8bf7\u6c42\u5931\u8d25\uff0c\u9519\u8bef\u4ee3\u7801\uff1a" + err;
                sendResMap.put("code", "01");
                sendResMap.put("mess", strResult);
            }
        }
        catch (ClientProtocolException e) {
            sendResMap.put("code", "01");
            sendResMap.put("mess", e.toString());
            _logger.error((Object)e.toString());
        }
        catch (IOException e) {
            sendResMap.put("code", "01");
            sendResMap.put("mess", e.toString());
            _logger.error((Object)e.toString());
        }
        return sendResMap;
    }

    @Override
    public TaxCommonReturnDomain doYgzPxdj(BaseAppServiceDomain appDomain) throws Exception {
        WxSjcxYgzPxdjAppDomain domain = (WxSjcxYgzPxdjAppDomain)appDomain;
        return ((TaxWxSjcxAppDaoImp)this.getDao("taxWxSjcxAppDaoImp")).doYgzPxdj(domain);
    }

    @Override
    public TaxCommonReturnDomain queryYybsGetYysj2(BaseAppServiceDomain baseAppDomain) throws Exception {
        YybsGetYysj2AppDomain appDomain = (YybsGetYysj2AppDomain)baseAppDomain;
        if (WebConstants.YYQH_DS_BSDT.containsKey(appDomain.getBsdtdjXh())) {
            YybsGetYysj2ReturnDomain returnDomain = new YybsGetYysj2ReturnDomain();
            String yysjPath = "/openintf/booking/getBookTimeSlicesByArea.json";
            HashMap<String, String> params = new HashMap<String, String>();
            params.put("areaId", WebConstants.YYQH_DS_BSDT.get(appDomain.getBsdtdjXh()));
            Map<String, String> res = HstWxServiceUtil.sendMessForBasicAuth(String.valueOf(WebConstants.DS_YYQH_URL) + yysjPath, params, "utf-8", WebConstants.DS_YYQH_USERNAME, WebConstants.DS_YYQH_PASSWORD);
            if ("00".equals(res.get("code"))) {
                ArrayList<YybsYysj2Domain> dataList;
                Type objectType;
                Gson gson = new Gson();
                String json = res.get("mess");
                DsYyqhBaseResponse response = (DsYyqhBaseResponse)gson.fromJson(json, objectType = new TypeToken<DsYyqhBaseResponse<List<BookTimeSlicesDto>>>(){}.getType());
                if ("0".equals(response.getCode())) {
                    dataList = new ArrayList<YybsYysj2Domain>();
                    for (BookTimeSlicesDto dto : (List)response.getData()) {
                        if (!"0".equals(dto.getDisabled())) continue;
                        YybsYysj2Domain data = new YybsYysj2Domain();
                        data.setYysj_q(String.valueOf(appDomain.getRq()) + " " + dto.getStartTime().substring(11, 19));
                        data.setYysj_z(String.valueOf(appDomain.getRq()) + " " + dto.getEndTime().substring(11, 19));
                        data.setTimeSliceId(dto.getId());
                        dataList.add(data);
                    }
                    String yyjhPath = "/openintf/booking/getBookScheduleByAreaAndTicketItem.json";
                    if (StringUtils.isBlank((String)appDomain.getYwflbm())) {
                        returnDomain.setCode("01");
                        returnDomain.setMess("\u539f\u5730\u7a0e\u5927\u5385\u9700\u8981\u4f20ywflbm");
                        return returnDomain;
                    }
                    params.put("ticketItemId", appDomain.getYwflbm());
                    params.put("beginDate", String.valueOf(appDomain.getRq()) + " 00:00:00");
                    params.put("endDate", String.valueOf(appDomain.getRq()) + " 23:59:00");
                    Map<String, String> yyjhRes = HstWxServiceUtil.sendMessForBasicAuth(String.valueOf(WebConstants.DS_YYQH_URL) + yyjhPath, params, "utf-8", WebConstants.DS_YYQH_USERNAME, WebConstants.DS_YYQH_PASSWORD);
                    if ("00".equals(yyjhRes.get("code"))) {
                        Type yyjhType;
                        String yyjhJson = yyjhRes.get("mess");
                        DsYyqhBaseResponse yyjhResponse = (DsYyqhBaseResponse)gson.fromJson(yyjhJson, yyjhType = new TypeToken<DsYyqhBaseResponse<List<BookScheduleDto>>>(){}.getType());
                        if (!"0".equals(yyjhResponse.getCode())) {
                            returnDomain.setCode("01");
                            returnDomain.setMess(yyjhResponse.getMessage());
                            return returnDomain;
                        }
                        for (YybsYysj2Domain data : dataList) {
                            if (yyjhResponse.getData() == null) {
                                data.setKyysl("0");
                                continue;
                            }
                            for (BookScheduleDto jhDto : (List)yyjhResponse.getData()) {
                                if (!data.getTimeSliceId().equals(jhDto.getTimeSliceId())) continue;
                                data.setSchDateIdx(jhDto.getSchDateIdx());
                                data.setKyysl(jhDto.getAmount());
                            }
                        }
                    }
                } else {
                    returnDomain.setCode("01");
                    returnDomain.setMess(response.getMessage());
                    return returnDomain;
                }
                returnDomain.setDataList(dataList);
                returnDomain.setCode("00");
                return returnDomain;
            }
            returnDomain.setCode("01");
            returnDomain.setMess(res.get("mess"));
            return returnDomain;
        }
        return ((TaxYybsAppDaoImp)this.getDao("taxYybsAppDaoImp")).queryYybsGetYysj2List(appDomain);
    }

    @Override
    public TaxCommonReturnDomain queryYybsGetYyGzr(BaseAppServiceDomain baseAppDomain) throws Exception {
        YybsGetYyGzrAppDomain appDomain = (YybsGetYyGzrAppDomain)baseAppDomain;
        return ((TaxYybsAppDaoImp)this.getDao("taxYybsAppDaoImp")).queryYybsGetYygzr(appDomain);
    }

    @Override
    public TaxCommonReturnDomain queryYybsGetJhxtYwfl2(BaseAppServiceDomain baseAppDomain) throws Exception {
        YybsGetJhxtYwfl2AppDomain appDomain = (YybsGetJhxtYwfl2AppDomain)baseAppDomain;
        if (WebConstants.YYQH_DS_BSDT.containsKey(appDomain.getBsdtDjxh())) {
            YybsGetJhxtYwfl2ReturnDomain returnDomain = new YybsGetJhxtYwfl2ReturnDomain();
            String path = "/openintf/booking/getBookableItemsByArea.json";
            HashMap<String, String> params = new HashMap<String, String>();
            params.put("areaId", WebConstants.YYQH_DS_BSDT.get(appDomain.getBsdtDjxh()));
            Map<String, String> res = HstWxServiceUtil.sendMessForBasicAuth(String.valueOf(WebConstants.DS_YYQH_URL) + path, params, "utf-8", WebConstants.DS_YYQH_USERNAME, WebConstants.DS_YYQH_PASSWORD);
            if ("00".equals(res.get("code"))) {
                ArrayList<YybsGetJhxtYwfl2Domain> dataList;
                Type objectType;
                Gson gson = new Gson();
                String json = res.get("mess");
                DsYyqhBaseResponse response = (DsYyqhBaseResponse)gson.fromJson(json, objectType = new TypeToken<DsYyqhBaseResponse<List<BookableItemsDto>>>(){}.getType());
                if ("0".equals(response.getCode())) {
                    dataList = new ArrayList<YybsGetJhxtYwfl2Domain>();
                    for (BookableItemsDto dto : (List)response.getData()) {
                        YybsGetJhxtYwfl2Domain data = new YybsGetJhxtYwfl2Domain();
                        data.setYwflbm(dto.getTicketItemId());
                        data.setYwflmc(dto.getTicketItemName());
                        dataList.add(data);
                    }
                } else {
                    returnDomain.setCode("01");
                    returnDomain.setMess(response.getMessage());
                    return returnDomain;
                }
                returnDomain.setDataList(dataList);
                returnDomain.setCode("00");
                return returnDomain;
            }
            returnDomain.setCode("01");
            returnDomain.setMess(res.get("mess"));
            return returnDomain;
        }
        return ((TaxYybsAppDaoImp)this.getDao("taxYybsAppDaoImp")).queryYybsGetJhxtYwfl2(appDomain);
    }

    @Override
    public TaxCommonReturnDomain saveYgzZxd(BaseAppServiceDomain appDomain) throws Exception {
        WxSjcxYgzZxdAppDomain domain = (WxSjcxYgzZxdAppDomain)appDomain;
        return ((TaxWxSjcxAppDaoImp)this.getDao("taxWxSjcxAppDaoImp")).saveYgzZxd(domain);
    }

    @Override
    public TaxCommonReturnDomain queryYgzZxd(BaseAppServiceDomain appDomain) throws Exception {
        SjcxYgzZxdCxAppDomain domain = (SjcxYgzZxdCxAppDomain)appDomain;
        return ((TaxWxSjcxAppDaoImp)this.getDao("taxWxSjcxAppDaoImp")).queryYgzZxd(domain);
    }

    public BaseDao getDao(String daoName) {
        this.dao = (BaseDao)WebConstants.WEB_APP_CONTEXT.getBean(daoName);
        return this.dao;
    }

    @Override
    public TaxCommonReturnDomain queryYybsYyqh(BaseAppServiceDomain baseAppDomain, TaxCommonAppServiceDomain domain) throws Exception {
        YybsYyqhAppDomain appDomain = (YybsYyqhAppDomain)baseAppDomain;
        YybsYyqhReturnDomain returnDomain = new YybsYyqhReturnDomain();
        JhxtYyqhAppDomain jhxtAppDomain = new JhxtYyqhAppDomain();
        BeanUtils.copyProperties((Object)jhxtAppDomain, (Object)appDomain);
        jhxtAppDomain.setBsdtdjXh(appDomain.getBsdtdjXh());
        Map<String, String> sendResMap = this.sendMess(jhxtAppDomain, "getJhxtYyqh");
        if ("00".equals(sendResMap.get("code"))) {
            String sendResStr = sendResMap.get("mess").replace("getJhxtYyqh", domain.getYwId());
            JhxtYyqhReturnDomain jhxtReturnDomain = HstJsonUtil.jsonToRetrunBean(sendResStr, JhxtYyqhReturnDomain.class);
            BeanUtils.copyProperties((Object)returnDomain, (Object)jhxtReturnDomain);
        } else {
            String errStr = sendResMap.get("mess");
            if (errStr.length() > 1000) {
                errStr = errStr.substring(0, 999);
            }
            returnDomain.setCode("01");
            returnDomain.setMess(errStr);
        }
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain queryYybsSfyz(BaseAppServiceDomain baseAppDomain, TaxCommonAppServiceDomain domain) throws Exception {
        YybsSfyzAppDomain appDomain = (YybsSfyzAppDomain)baseAppDomain;
        YybsSfyzReturnDomain returnDomain = new YybsSfyzReturnDomain();
        JhxtSfyzAppDomain jhxtAppDomain = new JhxtSfyzAppDomain();
        BeanUtils.copyProperties((Object)jhxtAppDomain, (Object)appDomain);
        jhxtAppDomain.setBsdtdjXh(appDomain.getBsdtdjXh());
        Map<String, String> sendResMap = this.sendMess(jhxtAppDomain, "getJhxtSfyz");
        if ("00".equals(sendResMap.get("code"))) {
            String sendResStr = sendResMap.get("mess").replace("getJhxtSfyz", domain.getYwId());
            JhxtSfyzReturnDomain jhxtReturnDomain = HstJsonUtil.jsonToRetrunBean(sendResStr, JhxtSfyzReturnDomain.class);
            BeanUtils.copyProperties((Object)returnDomain, (Object)jhxtReturnDomain);
        } else {
            String errStr = sendResMap.get("mess");
            if (errStr.length() > 1000) {
                errStr = errStr.substring(0, 999);
            }
            returnDomain.setCode("01");
            returnDomain.setMess(errStr);
        }
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain queryYybsGetJhxtYwflYy(BaseAppServiceDomain baseAppDomain, TaxCommonAppServiceDomain domain) throws Exception {
        SjqhGetJhxtYwflAppDomain appDomain = (SjqhGetJhxtYwflAppDomain)baseAppDomain;
        SjqhGetJhxtYwflReturnDomain returnDomain = new SjqhGetJhxtYwflReturnDomain();
        JhxtYwflAppDomain jhxtAppDomain = new JhxtYwflAppDomain();
        BeanUtils.copyProperties((Object)jhxtAppDomain, (Object)appDomain);
        jhxtAppDomain.setBsdtdjXh(appDomain.getBsdtDjxh());
        Map<String, String> sendResMap = this.sendMess(jhxtAppDomain, "getJhxtYwflYy");
        if ("00".equals(sendResMap.get("code"))) {
            String sendResStr = sendResMap.get("mess").replace("getJhxtYwflYy", domain.getYwId());
            JhxtYwflReturnDomain jhxtReturnDomain = HstJsonUtil.jsonToRetrunBean(sendResStr, JhxtYwflReturnDomain.class);
            BeanUtils.copyProperties((Object)returnDomain, (Object)jhxtReturnDomain);
        } else {
            String errStr = sendResMap.get("mess");
            if (errStr.length() > 1000) {
                errStr = errStr.substring(0, 999);
            }
            returnDomain.setCode("01");
            returnDomain.setMess(errStr);
        }
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain yyqhGetBsdtList(BaseAppServiceDomain baseAppDomain) throws Exception {
        YyqhGetBsdtListAppDomain appDomain = (YyqhGetBsdtListAppDomain)baseAppDomain;
        return ((TaxYybsAppDaoImp)this.getDao("taxYybsAppDaoImp")).yyqhGetBsdtList(appDomain);
    }

    @Override
    public TaxCommonReturnDomain yybsGetYyyxx(BaseAppServiceDomain baseAppDomain) throws Exception {
        YybsGetYyyxxAppDomain appDomain = (YybsGetYyyxxAppDomain)baseAppDomain;
        return ((TaxYybsAppDaoImp)this.getDao("taxYybsAppDaoImp")).yybsGetYyyxx(appDomain);
    }

    @Override
    public TaxCommonReturnDomain gzhTzggList(BaseAppServiceDomain appDomain) throws Exception {
        GzhTzggListAppDomain domain = (GzhTzggListAppDomain)appDomain;
        return ((TaxWxGzhAppDaoImp)this.getDao("taxWxGzhAppDaoImp")).gzhTzggList(domain);
    }

    @Override
    public TaxCommonReturnDomain gzhTzggNr(BaseAppServiceDomain appDomain) throws Exception {
        GzhTzggNrAppDomain domain = (GzhTzggNrAppDomain)appDomain;
        return ((TaxWxGzhAppDaoImp)this.getDao("taxWxGzhAppDaoImp")).gzhTzggNr(domain);
    }

    @Override
    public TaxCommonReturnDomain gzhSytzggList(BaseAppServiceDomain baseAppDomain) throws Exception {
        GzhSytzggListAppDomain appDomain = (GzhSytzggListAppDomain)baseAppDomain;
        return ((TaxWxGzhAppDaoImp)this.getDao("taxWxGzhAppDaoImp")).gzhSytzggList(appDomain);
    }

    @Override
    public TaxCommonReturnDomain SjqhGetDryqhxxAll(BaseAppServiceDomain baseAppDomain) throws Exception {
        SjqhGetDryqhxxAllAppDomain appDomain = (SjqhGetDryqhxxAllAppDomain)baseAppDomain;
        return ((TaxWxSjqhAppDaoImp)this.getDao("taxWxSjqhAppDaoImp")).SjqhGetDryqhxxAll(appDomain);
    }

    @Override
    public TaxCommonReturnDomain YybsGetYyyxxAll(BaseAppServiceDomain baseAppDomain) throws Exception {
        YybsGetYyyxxAllAppDomain appDomain = (YybsGetYyyxxAllAppDomain)baseAppDomain;
        return ((TaxYybsAppDaoImp)this.getDao("taxYybsAppDaoImp")).YybsGetYyyxxAll(appDomain);
    }

    @Override
    public TaxCommonReturnDomain yybsFsdxyzm(BaseAppServiceDomain appDomain) throws Exception {
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        try {
            YybsFsdxyzmDomain domain = (YybsFsdxyzmDomain)appDomain;
            YybsFsdxyzmResDomain resDomain = ((TaxYybsAppDaoImp)this.getDao("taxYybsAppDaoImp")).yybsFsdxyzm(domain);
            if ("00".equals(resDomain.getCode())) {
                returnDomain.setCode("00");
                ZjzkCommonService zjzkService = this.getZjzkService();
                ZjzkDxSendRequestDomain request = new ZjzkDxSendRequestDomain();
                request.setSjhm(domain.getSjhm());
                StringBuffer nr = new StringBuffer();
                nr.append("\u9a8c\u8bc1\u7801").append(resDomain.getYzm());
                request.setTsnr(nr.toString());
                TaxCommonReturnDomain retDomain = zjzkService.dxsend(request);
                if (!"00".equals(retDomain.getCode())) {
                    returnDomain = retDomain;
                }
            } else {
                returnDomain.setCode(resDomain.getCode());
                returnDomain.setMess(resDomain.getMess());
            }
        }
        catch (Exception e) {
            e.getStackTrace();
            _logger.error((Object)("\u53d1\u9001\u77ed\u4fe1\u9a8c\u8bc1\u7801\u9519\u8bef\uff1a" + e.toString()));
            returnDomain.setCode("01");
            returnDomain.setMess("\u53d1\u9001\u77ed\u4fe1\u9a8c\u8bc1\u7801\u5f02\u5e38");
        }
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain yybsDxyzmxy(BaseAppServiceDomain appDomain) throws Exception {
        YybsDxyzmxyDomain domain = (YybsDxyzmxyDomain)appDomain;
        return ((TaxYybsAppDaoImp)this.getDao("taxYybsAppDaoImp")).yybsDxyzmxy(domain);
    }

    @Override
    public TaxCommonReturnDomain yybsCxlsyyqhxx(BaseAppServiceDomain appDomain) throws Exception {
        YybsCxlsyyqhxxRequestDomain domain = (YybsCxlsyyqhxxRequestDomain)appDomain;
        YybsCxlsyyqhxxResponseDomain returnDomain = new YybsCxlsyyqhxxResponseDomain();
        returnDomain = (YybsCxlsyyqhxxResponseDomain)((TaxYybsAppDaoImp)this.getDao("taxYybsAppDaoImp")).yybsCxlsyyqhxx(domain);
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain YybsDayYyqhtj(BaseAppServiceDomain appDomain) throws Exception {
        YybsDayYyqhtjAppDomain domain = (YybsDayYyqhtjAppDomain)appDomain;
        return ((TaxYybsAppDaoImp)this.getDao("taxYybsAppDaoImp")).YybsDayYyqhtj(domain);
    }

    @Override
    public TaxCommonReturnDomain SjqhGetDayQhtj(BaseAppServiceDomain appDomain) throws Exception {
        SjqhGetDayQhtjAppDomain domain = (SjqhGetDayQhtjAppDomain)appDomain;
        return ((TaxWxSjqhAppDaoImp)this.getDao("taxWxSjqhAppDaoImp")).SjqhGetDayQhtj(domain);
    }

    @Override
    public TaxCommonReturnDomain SjqhPutqhxx(BaseAppServiceDomain appDomain) throws Exception {
        SjqhPutqhxxAppDomain domain = (SjqhPutqhxxAppDomain)appDomain;
        return ((TaxWxSjqhAppDaoImp)this.getDao("taxWxSjqhAppDaoImp")).SjqhPutqhxx(domain);
    }

    @Override
    public TaxCommonReturnDomain SjqhGetPhxx(BaseAppServiceDomain appDomain) throws Exception {
        SjqhGetPhxxAppDomain domain = (SjqhGetPhxxAppDomain)appDomain;
        String url = JhxtInitUtil.doGetJhxtUrl(domain.getBsdtDjxh());
        if (StringUtils.isBlank((String)url)) {
            TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
            returnDomain.setCode("01");
            returnDomain.setMess("\u6ca1\u6709\u83b7\u53d6\u5230\u8be5\u529e\u7a0e\u5927\u5385\u63a5\u53e3\u5730\u5740\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458");
            return returnDomain;
        }
        url = String.valueOf(url) + "/service/taxSmzCommonApp!doSmzService";
        return HstWxServiceUtil.sendMess(url, domain, "smz.jhxtGetDqphxx", SjqhGetPhxxReturnDomain.class);
    }

    @Override
    public TaxCommonReturnDomain SjqhGetJhList(BaseAppServiceDomain appDomain) throws Exception {
        SjqhGetJhListAppDomain domain = (SjqhGetJhListAppDomain)appDomain;
        String url = JhxtInitUtil.doGetJhxtUrl(domain.getBsdt_djxh());
        if (StringUtils.isBlank((String)url)) {
            TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
            returnDomain.setCode("01");
            returnDomain.setMess("\u6ca1\u6709\u83b7\u53d6\u5230\u8be5\u529e\u7a0e\u5927\u5385\u63a5\u53e3\u5730\u5740\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458");
            return returnDomain;
        }
        url = String.valueOf(url) + "/service/taxSmzCommonApp!doSmzService";
        return HstWxServiceUtil.sendMess(url, domain, "smz.jhxtGetJhListWx", SjqhGetJhListReturnDomain.class);
    }

    @Override
    public TaxCommonReturnDomain SjqhPj(BaseAppServiceDomain appDomain) throws Exception {
        SjqhPjAppDomain domain = (SjqhPjAppDomain)appDomain;
        String url = JhxtInitUtil.doGetJhxtUrl(domain.getBsdtDjxh());
        if (StringUtils.isBlank((String)url)) {
            TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
            returnDomain.setCode("01");
            returnDomain.setMess("\u6ca1\u6709\u83b7\u53d6\u5230\u8be5\u529e\u7a0e\u5927\u5385\u63a5\u53e3\u5730\u5740\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458");
            return returnDomain;
        }
        url = String.valueOf(url) + "/service/taxSmzCommonApp!doSmzService";
        return HstWxServiceUtil.sendMess(url, domain, "smz.jhxtPjDqph", TaxCommonReturnDomain.class);
    }

    public ZjzkCommonService getZjzkService() {
        return (ZjzkCommonService)WebConstants.WEB_APP_CONTEXT.getBean("zjzkCommonServiceImp");
    }
}
