/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  org.apache.commons.lang.StringUtils
 *  org.springframework.beans.factory.annotation.Autowired
 *  org.springframework.stereotype.Repository
 *  org.springframework.transaction.annotation.Propagation
 *  org.springframework.transaction.annotation.Transactional
 */
package com.hst.taxService.dao.imp;

import com.hst.common.domain.TaxCommonReturnDomain;
import com.hst.framework.common.HstSqlMapClientTemplate;
import com.hst.framework.dao.BaseDao;
import com.hst.framework.util.HstEncodeUtil;
import com.hst.framework.util.HstToolsUtil;
import com.hst.task.domain.zhdtmq.YyqhSaveAppDomain;
import com.hst.task.domain.zhdtmq.YyqhSaveReturnDomain;
import com.hst.task.domain.zhdtmq.YyqhZfAppDomain;
import com.hst.taxService.domain.YybsCxlsyyqhxxRequestDomain;
import com.hst.taxService.domain.YybsCxlsyyqhxxResponseDomain;
import com.hst.taxService.domain.YybsDayYyqhtjAppDomain;
import com.hst.taxService.domain.YybsDayYyqhtjReturnDomain;
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.YybsGetJhxtYwfl2ReturnDomain;
import com.hst.taxService.domain.YybsGetYyGzrAppDomain;
import com.hst.taxService.domain.YybsGetYyGzrReturnDomain;
import com.hst.taxService.domain.YybsGetYysj2AppDomain;
import com.hst.taxService.domain.YybsGetYysj2ReturnDomain;
import com.hst.taxService.domain.YybsGetYyyxxAllAppDomain;
import com.hst.taxService.domain.YybsGetYyyxxAllDomain;
import com.hst.taxService.domain.YybsGetYyyxxAllReturnDomain;
import com.hst.taxService.domain.YybsGetYyyxxAppDomain;
import com.hst.taxService.domain.YybsGetYyyxxDomain;
import com.hst.taxService.domain.YybsGetYyyxxReturnDomain;
import com.hst.taxService.domain.YybsQxYyqhhmAppDomain;
import com.hst.taxService.domain.YybsYyGzrDomain;
import com.hst.taxService.domain.YybsYyqhhm2AppDomain;
import com.hst.taxService.domain.YybsYyqhhm2ReturnDomain;
import com.hst.taxService.domain.YybsYysj2Domain;
import com.hst.taxService.domain.YyqhGetBsdtListAppDomain;
import com.hst.taxService.domain.YyqhGetBsdtListDomain;
import com.hst.taxService.domain.YyqhGetBsdtListReturnDomain;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Repository
public class TaxYybsAppDaoImp
implements BaseDao {
    @Autowired
    private HstSqlMapClientTemplate sqlMapClientTemplate;

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain queryYybsGetYysj2List(YybsGetYysj2AppDomain domain) throws Exception {
        YybsGetYysj2ReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("bsdtDjxh", domain.getBsdtdjXh());
        map.put("rq", domain.getRq());
        map.put("code", null);
        map.put("mess", null);
        map.put("yybsGetYysj2List", null);
        this.sqlMapClientTemplate.queryForObjectByCurr("queryYybsGetYysj2List", "yybsGetYysj2List", map);
        ArrayList<YybsYysj2Domain> dataList = new ArrayList();
        dataList = (List)map.get("yybsGetYysj2List");
        returnDomain = new YybsGetYysj2ReturnDomain();
        returnDomain.setDataList(dataList);
        returnDomain.setCode((String)map.get("code"));
        String mess = (String)map.get("mess");
        returnDomain.setMess(HstToolsUtil.ISO2GBK(mess));
        return returnDomain;
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain queryYybsGetYyqhhm2(YybsYyqhhm2AppDomain domain) throws Exception {
        YybsYyqhhm2ReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("bsdtdjXh", domain.getBsdtdjXh());
        map.put("yysjQ", domain.getYysj_q());
        map.put("yysjZ", domain.getYysj_z());
        if (StringUtils.isNotBlank((String)domain.getYwflbm())) {
            map.put("ywflbm", domain.getYwflbm());
        } else {
            map.put("ywflbm", "");
        }
        if (StringUtils.isNotBlank((String)domain.getYyly())) {
            map.put("yyly", HstEncodeUtil.GBK2ISO(domain.getYyly()));
        } else {
            map.put("yyly", "");
        }
        if (StringUtils.isNotBlank((String)domain.getBsylb())) {
            map.put("bsylb", domain.getBsylb());
        } else {
            map.put("bsylb", "");
        }
        if (StringUtils.isNotBlank((String)domain.getXm())) {
            map.put("xm", HstEncodeUtil.GBK2ISO(domain.getXm()));
        } else {
            map.put("xm", "");
        }
        if (StringUtils.isNotBlank((String)domain.getNsrsbh())) {
            map.put("nsrsbh", domain.getNsrsbh());
        } else {
            map.put("nsrsbh", "");
        }
        if (StringUtils.isNotBlank((String)domain.getSfzhm())) {
            map.put("sfzhm", domain.getSfzhm());
        } else {
            map.put("sfzhm", "");
        }
        if (StringUtils.isNotBlank((String)domain.getSjhm())) {
            map.put("sjhm", domain.getSjhm());
        } else {
            map.put("sjhm", "");
        }
        if (StringUtils.isNotBlank((String)domain.getBz())) {
            map.put("bz", HstEncodeUtil.GBK2ISO(domain.getBz()));
        } else {
            map.put("bz", "");
        }
        if (StringUtils.isNotBlank((String)domain.getOpenid())) {
            map.put("openid", HstEncodeUtil.GBK2ISO(domain.getOpenid()));
        } else {
            map.put("openid", "");
        }
        map.put("code", null);
        map.put("mess", null);
        map.put("yybsGetYyqhhm2", null);
        this.sqlMapClientTemplate.queryForObjectByCurr("queryYybsGetYyqhhm2", "yybsGetYyqhhm2", map);
        List dataList = new ArrayList();
        dataList = (List)map.get("yybsGetYyqhhm2");
        returnDomain = dataList == null || dataList.isEmpty() ? new YybsYyqhhm2ReturnDomain() : (YybsYyqhhm2ReturnDomain)dataList.get(0);
        returnDomain.setCode((String)map.get("code"));
        String mess = (String)map.get("mess");
        returnDomain.setMess(HstToolsUtil.ISO2GBK(mess));
        return returnDomain;
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain queryYybsGetYyqhhm2Ds(YybsYyqhhm2AppDomain domain, String hqyzm, String dsYyId) throws Exception {
        YybsYyqhhm2ReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("bsdtdjXh", domain.getBsdtdjXh());
        map.put("yysjQ", domain.getYysj_q());
        map.put("yysjZ", domain.getYysj_z());
        if (StringUtils.isNotBlank((String)domain.getYwflbm())) {
            map.put("ywflbm", domain.getYwflbm());
        } else {
            map.put("ywflbm", "");
        }
        if (StringUtils.isNotBlank((String)domain.getYyly())) {
            map.put("yyly", HstEncodeUtil.GBK2ISO(domain.getYyly()));
        } else {
            map.put("yyly", "");
        }
        if (StringUtils.isNotBlank((String)domain.getBsylb())) {
            map.put("bsylb", domain.getBsylb());
        } else {
            map.put("bsylb", "");
        }
        if (StringUtils.isNotBlank((String)domain.getXm())) {
            map.put("xm", HstEncodeUtil.GBK2ISO(domain.getXm()));
        } else {
            map.put("xm", "");
        }
        if (StringUtils.isNotBlank((String)domain.getNsrsbh())) {
            map.put("nsrsbh", domain.getNsrsbh());
        } else {
            map.put("nsrsbh", "");
        }
        if (StringUtils.isNotBlank((String)domain.getSfzhm())) {
            map.put("sfzhm", domain.getSfzhm());
        } else {
            map.put("sfzhm", "");
        }
        if (StringUtils.isNotBlank((String)domain.getSjhm())) {
            map.put("sjhm", domain.getSjhm());
        } else {
            map.put("sjhm", "");
        }
        if (StringUtils.isNotBlank((String)domain.getBz())) {
            map.put("bz", HstEncodeUtil.GBK2ISO(domain.getBz()));
        } else {
            map.put("bz", "");
        }
        if (StringUtils.isNotBlank((String)domain.getOpenid())) {
            map.put("openid", HstEncodeUtil.GBK2ISO(domain.getOpenid()));
        } else {
            map.put("openid", "");
        }
        map.put("dsYyId", dsYyId);
        map.put("hqyzm", hqyzm);
        map.put("code", null);
        map.put("mess", null);
        map.put("yybsGetYyqhhm2Ds", null);
        this.sqlMapClientTemplate.queryForObjectByCurr("yybsGetYyqhhm2Ds", "dataList", map);
        List dataList = new ArrayList();
        dataList = (List)map.get("dataList");
        returnDomain = dataList == null || dataList.isEmpty() ? new YybsYyqhhm2ReturnDomain() : (YybsYyqhhm2ReturnDomain)dataList.get(0);
        returnDomain.setCode((String)map.get("code"));
        String mess = (String)map.get("mess");
        returnDomain.setMess(HstToolsUtil.ISO2GBK(mess));
        return returnDomain;
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain yyqhSaveDs(YyqhSaveAppDomain domain, String hqyzm, String dsYyId) throws Exception {
        YyqhSaveReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("bsdtdjXh", domain.getBsdtdjXh());
        map.put("yysjQ", domain.getYysj_q());
        map.put("yysjZ", domain.getYysj_z());
        if (StringUtils.isNotBlank((String)domain.getYwflbm())) {
            map.put("ywflbm", domain.getYwflbm());
        } else {
            map.put("ywflbm", "");
        }
        if (StringUtils.isNotBlank((String)domain.getYyly())) {
            map.put("yyly", HstEncodeUtil.GBK2ISO(domain.getYyly()));
        } else {
            map.put("yyly", "");
        }
        if (StringUtils.isNotBlank((String)domain.getBsylb())) {
            map.put("bsylb", domain.getBsylb());
        } else {
            map.put("bsylb", "");
        }
        if (StringUtils.isNotBlank((String)domain.getXm())) {
            map.put("xm", HstEncodeUtil.GBK2ISO(domain.getXm()));
        } else {
            map.put("xm", "");
        }
        if (StringUtils.isNotBlank((String)domain.getNsrsbh())) {
            map.put("nsrsbh", domain.getNsrsbh());
        } else {
            map.put("nsrsbh", "");
        }
        if (StringUtils.isNotBlank((String)domain.getSfzhm())) {
            map.put("sfzhm", domain.getSfzhm());
        } else {
            map.put("sfzhm", "");
        }
        if (StringUtils.isNotBlank((String)domain.getSjhm())) {
            map.put("sjhm", domain.getSjhm());
        } else {
            map.put("sjhm", "");
        }
        if (StringUtils.isNotBlank((String)domain.getBz())) {
            map.put("bz", HstEncodeUtil.GBK2ISO(domain.getBz()));
        } else {
            map.put("bz", "");
        }
        if (StringUtils.isNotBlank((String)domain.getOpenid())) {
            map.put("openid", HstEncodeUtil.GBK2ISO(domain.getOpenid()));
        } else {
            map.put("openid", "");
        }
        map.put("dy_swjg_dm", domain.getDy_swjg_dm());
        map.put("dy_openid", domain.getDy_openid());
        map.put("dsYyId", dsYyId);
        map.put("hqyzm", hqyzm);
        map.put("code", null);
        map.put("mess", null);
        map.put("dataList", null);
        this.sqlMapClientTemplate.queryForObjectByCurr("zhdtYyqhSaveDs", "dataList", map);
        List dataList = new ArrayList();
        dataList = (List)map.get("dataList");
        returnDomain = dataList == null || dataList.isEmpty() ? new YyqhSaveReturnDomain() : (YyqhSaveReturnDomain)dataList.get(0);
        returnDomain.setCode((String)map.get("code"));
        String mess = (String)map.get("mess");
        returnDomain.setMess(HstToolsUtil.ISO2GBK(mess));
        return returnDomain;
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public HashMap<String, String> yybsQxYyqhhm(YybsQxYyqhhmAppDomain domain) throws Exception {
        HashMap<String, String> returnDomain = new HashMap<String, String>();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sfzhm", domain.getSfzhm());
        map.put("hqyzm", domain.getHqyzm());
        map.put("yyrq", domain.getYyrq());
        map.put("code", null);
        map.put("mess", null);
        this.sqlMapClientTemplate.queryForObject("yybsQxYyqhhm", map);
        returnDomain.put("code", (String)map.get("code"));
        returnDomain.put("dsYyqhId", (String)map.get("dsYyqhId"));
        String mess = (String)map.get("mess");
        returnDomain.put("mess", HstToolsUtil.ISO2GBK(mess));
        return returnDomain;
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public HashMap<String, String> yyqhDelDs(YyqhZfAppDomain domain) throws Exception {
        HashMap<String, String> returnDomain = new HashMap<String, String>();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sfzhm", domain.getSfzhm());
        map.put("hqyzm", domain.getHqyzm());
        map.put("yyrq", domain.getYyrq());
        map.put("bsdtdjxh", domain.getBsdtdjxh());
        map.put("code", null);
        map.put("mess", null);
        this.sqlMapClientTemplate.queryForObject("zhdtYYqhDelDs", map);
        returnDomain.put("code", (String)map.get("code"));
        returnDomain.put("dsYyqhId", (String)map.get("dsYyqhId"));
        String mess = (String)map.get("mess");
        returnDomain.put("mess", HstToolsUtil.ISO2GBK(mess));
        return returnDomain;
    }

    public TaxCommonReturnDomain queryYybsGetYygzr(YybsGetYyGzrAppDomain domain) throws Exception {
        YybsGetYyGzrReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("bsdtDjxh", domain.getBsdtDjxh());
        map.put("code", null);
        map.put("mess", null);
        map.put("yybsGetYyGzrList", null);
        this.sqlMapClientTemplate.queryForObjectByCurr("queryYybsGetYyGzrList", "yybsGetYyGzrList", map);
        ArrayList<YybsYyGzrDomain> dataList = new ArrayList();
        dataList = (List)map.get("yybsGetYyGzrList");
        returnDomain = new YybsGetYyGzrReturnDomain();
        returnDomain.setDataList(dataList);
        returnDomain.setCode((String)map.get("code"));
        String mess = (String)map.get("mess");
        returnDomain.setMess(HstToolsUtil.ISO2GBK(mess));
        return returnDomain;
    }

    public TaxCommonReturnDomain queryYybsGetJhxtYwfl2(YybsGetJhxtYwfl2AppDomain domain) throws Exception {
        YybsGetJhxtYwfl2ReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("bsdtDjxh", domain.getBsdtDjxh());
        List dataList = this.sqlMapClientTemplate.queryForList("queryYybsGetJhxtYwfl2List", map);
        returnDomain = new YybsGetJhxtYwfl2ReturnDomain();
        returnDomain.setDataList(dataList);
        returnDomain.setCode("00");
        return returnDomain;
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain yyqhGetBsdtList(YyqhGetBsdtListAppDomain domain) throws Exception {
        YyqhGetBsdtListReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgDm", domain.getSwjgDm());
        map.put("code", null);
        map.put("mess", null);
        map.put("dataList", null);
        this.sqlMapClientTemplate.queryForObjectByCurr("yyqhGetBsdtList", "dataList", map);
        ArrayList<YyqhGetBsdtListDomain> dataList = new ArrayList();
        dataList = (List)map.get("dataList");
        returnDomain = new YyqhGetBsdtListReturnDomain();
        returnDomain.setDataList(dataList);
        returnDomain.setCode((String)map.get("code"));
        String mess = (String)map.get("mess");
        returnDomain.setMess(HstToolsUtil.ISO2GBK(mess));
        return returnDomain;
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain yybsGetYyyxx(YybsGetYyyxxAppDomain domain) throws Exception {
        YybsGetYyyxxReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("bsdtdjXh", domain.getBsdtdjXh());
        map.put("openId", domain.getOpenid());
        map.put("sfzhm", domain.getSfzhm());
        if (HstToolsUtil.isNullOrEmpty(domain.getRows())) {
            map.put("rows", "10");
        } else {
            map.put("rows", domain.getRows());
        }
        if (HstToolsUtil.isNullOrEmpty(domain.getPage())) {
            map.put("page", "1");
        } else {
            map.put("page", domain.getPage());
        }
        this.sqlMapClientTemplate.queryForObjectByCurr("yybsGetYyyxx", "dataList", map);
        ArrayList<YybsGetYyyxxDomain> dataList = new ArrayList();
        dataList = (List)map.get("dataList");
        returnDomain = new YybsGetYyyxxReturnDomain();
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        returnDomain.setDataList(dataList);
        return returnDomain;
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain YybsGetYyyxxAll(YybsGetYyyxxAllAppDomain domain) throws Exception {
        YybsGetYyyxxAllReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("openId", domain.getOpenid());
        map.put("sfzhm", domain.getSfzhm());
        if (HstToolsUtil.isNullOrEmpty(domain.getRows())) {
            map.put("rows", "10");
        } else {
            map.put("rows", domain.getRows());
        }
        if (HstToolsUtil.isNullOrEmpty(domain.getPage())) {
            map.put("page", "1");
        } else {
            map.put("page", domain.getPage());
        }
        this.sqlMapClientTemplate.queryForObjectByCurr("YybsGetYyyxxAll", "dataList", map);
        ArrayList<YybsGetYyyxxAllDomain> dataList = new ArrayList();
        dataList = (List)map.get("dataList");
        returnDomain = new YybsGetYyyxxAllReturnDomain();
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        returnDomain.setDataList(dataList);
        return returnDomain;
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public YybsFsdxyzmResDomain yybsFsdxyzm(YybsFsdxyzmDomain domain) throws Exception {
        YybsFsdxyzmResDomain returnDomain = new YybsFsdxyzmResDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        try {
            returnDomain.setCode("00");
            map.put("sjhm", domain.getSjhm());
            map.put("openid", domain.getOpenid());
            this.sqlMapClientTemplate.queryForObject("yybsFsdxyzmPro", map);
            returnDomain.setYzm((String)map.get("yzm"));
        }
        catch (Exception e) {
            e.getStackTrace();
            _logger.error((Object)("\u83b7\u53d6\u77ed\u4fe1\u9a8c\u8bc1\u7801\u9519\u8bef\uff1a" + e.toString()));
            returnDomain.setCode("01");
            returnDomain.setMess(e.getMessage());
        }
        return returnDomain;
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain yybsDxyzmxy(YybsDxyzmxyDomain domain) throws Exception {
        TaxCommonReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sjhm", domain.getSjhm());
        map.put("openid", domain.getOpenid());
        map.put("yzm", domain.getYzm());
        this.sqlMapClientTemplate.queryForObject("yybsDxyzmxyPro", map);
        returnDomain = new TaxCommonReturnDomain();
        returnDomain.setCode((String)map.get("code"));
        String mess = (String)map.get("mess");
        returnDomain.setMess(HstToolsUtil.ISO2GBK(mess));
        return returnDomain;
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain yybsCxlsyyqhxx(YybsCxlsyyqhxxRequestDomain domain) throws Exception {
        YybsCxlsyyqhxxResponseDomain returnDomain = new YybsCxlsyyqhxxResponseDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sfzhm", domain.getSfzhm());
        map.put("openid", domain.getOpenid());
        map.put("sjhm", domain.getSjhm());
        map.put("rq_q", domain.getRq_q());
        map.put("rq_z", domain.getRq_z());
        if (HstToolsUtil.isNullOrEmpty(domain.getRows())) {
            map.put("rows", "10");
        } else {
            map.put("rows", domain.getRows());
        }
        if (HstToolsUtil.isNullOrEmpty(domain.getPage())) {
            map.put("page", "1");
        } else {
            map.put("page", domain.getPage());
        }
        this.sqlMapClientTemplate.queryForObjectByCurr("yybsCxlsyyqhxxPro", "dataList", map);
        ArrayList<YybsCxlsyyqhxxResponseDomain> dataList = new ArrayList();
        dataList = (List)map.get("dataList");
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        returnDomain.setDataList(dataList);
        return returnDomain;
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain YybsDayYyqhtj(YybsDayYyqhtjAppDomain domain) throws Exception {
        YybsDayYyqhtjReturnDomain returnDomain = new YybsDayYyqhtjReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("rq", domain.getRq());
        this.sqlMapClientTemplate.queryForObjectByCurr("pWebjk2816yYybsDayYyqhtj", "dataList", map);
        List dataList = (List)map.get("dataList");
        returnDomain.setDataList(dataList);
        returnDomain.setCode((String)map.get("code"));
        String mess = (String)map.get("mess");
        returnDomain.setMess(HstToolsUtil.ISO2GBK(mess));
        return returnDomain;
    }
}
