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

import com.hst.common.bo.SmzBsySxsfzBdjl;
import com.hst.common.bo.TicketNsr;
import com.hst.common.domain.TaxCommonReturnDomain;
import com.hst.common.util.JdbcRowMapperUtil;
import com.hst.framework.common.HstSqlMapClientTemplate;
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.task.constants.ZhdtXxtsConstants;
import com.hst.task.domain.JhxxData;
import com.hst.taxService.domain.SjqhGetPhxxAppDomain;
import com.hst.taxService.domain.SjqhGetPhxxReturnDomain;
import com.hst.taxService.domain.SjqhPjAppDomain;
import com.hst.taxService.domain.gt3.Zjsmbs00009RequestDomain;
import com.hst.taxService.domain.smz.BsyglBsydelAppDomain;
import com.hst.taxService.domain.smz.BsyglBsydelReturnDomain;
import com.hst.taxService.domain.smz.BsyglBsydjAppDomain;
import com.hst.taxService.domain.smz.BsyglBsydjReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetBdNsrxxAppDomain;
import com.hst.taxService.domain.smz.JhxtGetBdNsrxxReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetBsyxxByqhhmAppDomain;
import com.hst.taxService.domain.smz.JhxtGetBsyxxByqhhmReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetDhrsAppDomain;
import com.hst.taxService.domain.smz.JhxtGetDhrsReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetGgjChxxAppDomain;
import com.hst.taxService.domain.smz.JhxtGetGgjChxxReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetGgjGetListAppDomain;
import com.hst.taxService.domain.smz.JhxtGetGgjGetListDomain;
import com.hst.taxService.domain.smz.JhxtGetGgjGetListReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetJhListAppDomain;
import com.hst.taxService.domain.smz.JhxtGetJhListReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetNsrxxBynsrsbhAppDomain;
import com.hst.taxService.domain.smz.JhxtGetNsrxxBynsrsbhReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetQhhmlistAppDomain;
import com.hst.taxService.domain.smz.JhxtGetQhhmlistReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetSjqhhmAppDomain;
import com.hst.taxService.domain.smz.JhxtGetSjqhhmReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetSssxdmAppDomain;
import com.hst.taxService.domain.smz.JhxtGetSssxdmReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetXtcsAppDomain;
import com.hst.taxService.domain.smz.JhxtGetXtcsReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetYwfl2AppDomain;
import com.hst.taxService.domain.smz.JhxtGetYwfl2Domain;
import com.hst.taxService.domain.smz.JhxtGetYwfl2ReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetYwflAppDomain;
import com.hst.taxService.domain.smz.JhxtGetYwflDomain;
import com.hst.taxService.domain.smz.JhxtGetYwflReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetYyqhlistAppDomain;
import com.hst.taxService.domain.smz.JhxtGetYyqhlistReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetYyxxAppDomain;
import com.hst.taxService.domain.smz.JhxtGetYyxxReturnDomain;
import com.hst.taxService.domain.smz.JhxtJhSjqhAppDomain;
import com.hst.taxService.domain.smz.JhxtJhYyqhAppDomain;
import com.hst.taxService.domain.smz.JhxtJhYyqhReturnDomain;
import com.hst.taxService.domain.smz.JhxtSaveBlnsrAppDomain;
import com.hst.taxService.domain.smz.JhxtSaveBlnsrDomain;
import com.hst.taxService.domain.smz.JhxtSaveBsydjAppDomain;
import com.hst.taxService.domain.smz.JhxtSaveSjhmAppDomain;
import com.hst.taxService.domain.smz.JhxtSaveYcxgzAppDomain;
import com.hst.taxService.domain.smz.JhxtSetSjhmAppDomain;
import com.hst.taxService.domain.smz.JhxtTycxSqlAppDomain;
import com.hst.taxService.domain.smz.JhxtTycxSqlReturnDomain;
import com.hst.taxService.domain.smz.JhxtXxtsAppDomain;
import com.hst.taxService.domain.smz.JhxtXxtsReturnDomain;
import com.hst.taxService.domain.smz.JhxtZfSjqhAppDomain;
import com.hst.taxService.domain.smz.JhxtZfYyqhAppDomain;
import com.hst.taxService.domain.smz.SmzGetsfzbdxxAppDomain;
import com.hst.taxService.domain.smz.SmzGetsfzbdxxReturnDomain;
import com.hst.taxService.domain.smz.SmzJhxtHzqhhmAppDomain;
import com.hst.taxService.domain.smz.SmzJhxtHzqhhmReturnDomain;
import com.hst.taxService.domain.smz.SmzRxsfzBdAppDomain;
import com.hst.taxService.domain.smz.SmzRxsfzBdReturnDomain;
import com.hst.taxService.domain.smz.SmzRxsfzGetBdxxByRxAppDomain;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import javax.sql.DataSource;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.orm.ibatis.SqlMapClientTemplate;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Repository
public class TaxSmzAppDaoImp
implements BaseDao {
    @Autowired
    private SqlMapClientTemplate smzbsSqlMapClientTemplate;
    @Autowired
    private HstSqlMapClientTemplate sqlMapClientTemplate;

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain rxsfzBd(SmzRxsfzBdAppDomain domain, SmzBsySxsfzBdjl bo) throws Exception {
        SmzRxsfzBdReturnDomain returnDomain = new SmzRxsfzBdReturnDomain();
        String databaseUsername = WebConstants.HST_PROP_MAP.get("hst.SCHEMA_TM");
        bo.setCjrDm("99999999999");
        bo.setDatabaseUsername(databaseUsername);
        bo.setBdrq(HstDateUtil.getCurrentDate());
        if ("\u957f\u671f".equals(domain.getYxq_z().trim())) {
            bo.setYxq_z("9999-01-01");
        }
        bo.setSfzzmPic(domain.getSfzzmPic().replaceAll("\r\n", "").replaceAll("\\s", "%2B").replaceAll("\\+", "%2B"));
        bo.setHeadPic(domain.getHeadPic().replaceAll("\r\n", "").replaceAll("\\s", "%2B").replaceAll("\\+", "%2B"));
        this.sqlMapClientTemplate.insert("insertSmzBsySxsfzBdjl", bo);
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sfzhm", domain.getSfzhm());
        map.put("rxsfzBdxh", bo.getRxsfzBdxh());
        this.sqlMapClientTemplate.queryForObject("pWebjkSmz9101Rysfzbd", map);
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        returnDomain.setNj(HstToolsUtil.ISO2GBK((String)map.get("nj")));
        returnDomain.setRxsfzBdxh(bo.getRxsfzBdxh());
        returnDomain.setBdjg(bo.getBdjg());
        returnDomain.setXsbl(bo.getXsbl());
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_smzbs")
    public TaxCommonReturnDomain rxsfzBd_sqlServer(SmzRxsfzBdAppDomain domain, SmzBsySxsfzBdjl bo) throws Exception {
        SmzRxsfzBdReturnDomain returnDomain = new SmzRxsfzBdReturnDomain();
        String databaseUsername = WebConstants.HST_PROP_MAP.get("hst.SCHEMA_TM");
        bo.setCjrDm("99999999999");
        bo.setDatabaseUsername(databaseUsername);
        bo.setBdrq(HstDateUtil.getCurrentDate());
        if (StringUtils.isNotBlank((String)domain.getYxq_z()) && "\u957f\u671f".startsWith(domain.getYxq_z().trim())) {
            bo.setYxq_z("9999-01-01");
        }
        if (StringUtils.isBlank((String)bo.getCjbz())) {
            bo.setCjbz("N");
        }
        this.smzbsSqlMapClientTemplate.insert("insertSmzBsySxsfzBdjl_sqlServer", (Object)bo);
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sfzhm", domain.getSfzhm());
        String sjhm = (String)this.smzbsSqlMapClientTemplate.queryForObject("querySjhmBySfzhm", map);
        if (StringUtils.isNotBlank((String)sjhm)) {
            returnDomain.setNj(sjhm);
        } else {
            returnDomain.setNj("");
        }
        returnDomain.setCode("00");
        returnDomain.setRxsfzBdxh(bo.getJkyzuuid());
        returnDomain.setBdjg(bo.getBdjg());
        returnDomain.setXsbl(bo.getXsbl());
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain rxsfzGetBdxxByRx(SmzRxsfzGetBdxxByRxAppDomain domain, SmzBsySxsfzBdjl bo) throws Exception {
        SmzRxsfzBdReturnDomain returnDomain = new SmzRxsfzBdReturnDomain();
        String databaseUsername = WebConstants.HST_PROP_MAP.get("hst.SCHEMA_TM");
        bo.setCjrDm("99999999999");
        bo.setDatabaseUsername(databaseUsername);
        this.sqlMapClientTemplate.insert("insertSmzBsySxsfzBdjl", bo);
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sfzhm", bo.getSfzhm());
        map.put("rxsfzBdxh", bo.getRxsfzBdxh());
        this.sqlMapClientTemplate.queryForObject("pWebjkSmz9103GetBdxx", map);
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        returnDomain.setNj(HstToolsUtil.ISO2GBK((String)map.get("nj")));
        returnDomain.setRxsfzBdxh(bo.getRxsfzBdxh());
        returnDomain.setBdjg(bo.getBdjg());
        returnDomain.setXsbl(bo.getXsbl());
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain jhxtHzqhhm(SmzJhxtHzqhhmAppDomain domain) throws Exception {
        SmzJhxtHzqhhmReturnDomain returnDomain = new SmzJhxtHzqhhmReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("rxsfzBdxh", domain.getRxsfzBdxh());
        map.put("qhhm", domain.getQhhm());
        this.sqlMapClientTemplate.queryForObject("pWebjkSmz9201JhxtHzQhhm", map);
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_smzbs")
    public TaxCommonReturnDomain jhxtHzqhhm_sqlserver(SmzJhxtHzqhhmAppDomain domain) throws Exception {
        SmzJhxtHzqhhmReturnDomain returnDomain = new SmzJhxtHzqhhmReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        if (domain.getRxsfzBdxh().length() > 10) {
            map.put("jkyzuuid", domain.getRxsfzBdxh());
        } else {
            map.put("rxsfzBdxh", domain.getRxsfzBdxh());
        }
        map.put("qhhm", domain.getQhhm());
        SmzBsySxsfzBdjl dom = (SmzBsySxsfzBdjl)this.smzbsSqlMapClientTemplate.queryForObject("queryNsrxxByJkuuidSqlServer", map);
        if (StringUtils.isBlank((String)dom.getQhhm())) {
            this.smzbsSqlMapClientTemplate.update("updateSmzBsyRxsfzBdjl", map);
        }
        returnDomain.setCode("00");
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_smzbs")
    public SmzBsySxsfzBdjl querySmzbdxxByRsxfzBdxh(String rxsfzBdxh) throws Exception {
        HashMap<String, String> map = new HashMap<String, String>();
        if (rxsfzBdxh.length() > 10) {
            map.put("jkyzuuid", rxsfzBdxh);
        } else {
            map.put("rxsfzBdxh", rxsfzBdxh);
        }
        SmzBsySxsfzBdjl dom = (SmzBsySxsfzBdjl)this.smzbsSqlMapClientTemplate.queryForObject("queryNsrxxByJkuuidSqlServer", map);
        return dom;
    }

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_smzbs")
    public SmzBsySxsfzBdjl querySmzbdxxBySfzhm(String sfzhm) throws Exception {
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sfzhm", sfzhm);
        SmzBsySxsfzBdjl dom = (SmzBsySxsfzBdjl)this.smzbsSqlMapClientTemplate.queryForObject("queryNsrxxBySfzhmSqlServer", map);
        return dom;
    }

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_smzbs")
    public String queryMzDmByMc(String mzmc) throws Exception {
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("mzmc", String.valueOf(mzmc) + "%");
        String mzdm = (String)this.smzbsSqlMapClientTemplate.queryForObject("queryMzDmByMc", map);
        return mzdm;
    }

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_smzbs")
    public Zjsmbs00009RequestDomain queryUpdateJhxxG3Cx(SmzJhxtHzqhhmAppDomain domain) throws Exception {
        HashMap<String, String> map = new HashMap<String, String>();
        if (domain.getRxsfzBdxh().length() > 10) {
            map.put("jkyzuuid", domain.getRxsfzBdxh());
        } else {
            map.put("rxsfzBdxh", domain.getRxsfzBdxh());
        }
        Zjsmbs00009RequestDomain resDomain = (Zjsmbs00009RequestDomain)this.smzbsSqlMapClientTemplate.queryForObject("selectSmzRxfszBdjl", map);
        return resDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain getsfzbdxx(SmzGetsfzbdxxAppDomain domain) {
        SmzGetsfzbdxxReturnDomain returnDomain = new SmzGetsfzbdxxReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sfzhm", domain.getSfzhm());
        this.sqlMapClientTemplate.queryForObject("pWebjkSmz9104GetSfzbdxx", map);
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        returnDomain.setNj(HstToolsUtil.ISO2GBK((String)map.get("nj")));
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain bsyglBsydj(BsyglBsydjAppDomain domain) {
        BsyglBsydjReturnDomain returnDomain = new BsyglBsydjReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("nsrsbh", domain.getNsrsbh());
        map.put("xm", HstEncodeUtil.GBK2ISO(domain.getXm()));
        map.put("xb", domain.getXb());
        map.put("sjhm", domain.getSjhm());
        map.put("sfzh", domain.getSfzh());
        map.put("bsySfbz", domain.getBsySfbz());
        this.sqlMapClientTemplate.queryForObject("pWebjkSmz9041Bsydj", map);
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        returnDomain.setNjdjXh((String)map.get("njdjXh"));
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain bsyglBsydel(BsyglBsydelAppDomain domain) {
        BsyglBsydelReturnDomain returnDomain = new BsyglBsydelReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("nsrsbh", domain.getNsrsbh());
        map.put("sfzh", domain.getSfzh());
        map.put("njdjXh", domain.getNjdjXh());
        this.sqlMapClientTemplate.queryForObject("pWebjkSmz9402BsyDel", map);
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        return returnDomain;
    }

    public TaxCommonReturnDomain jhxtGetBsyxxByqhhm(JhxtGetBsyxxByqhhmAppDomain domain) throws Exception {
        JhxtGetBsyxxByqhhmReturnDomain returnDomain = new JhxtGetBsyxxByqhhmReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("qhhm", domain.getQhhm());
        this.sqlMapClientTemplate.queryForObjectByCurr("pWebjkSmz9202GetBsyxxByQhhm", "dataList", map);
        String code = (String)map.get("code");
        String mess = HstToolsUtil.ISO2GBK((String)map.get("mess"));
        if ("00".equals(code)) {
            List dataList = (List)map.get("dataList");
            BeanUtils.copyProperties((Object)returnDomain, dataList.get(0));
        }
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    public TaxCommonReturnDomain jhxtGetBsyxxByqhhm_sqlServer(JhxtGetBsyxxByqhhmAppDomain domain) throws Exception {
        JhxtGetBsyxxByqhhmReturnDomain returnDomain = new JhxtGetBsyxxByqhhmReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        if (HstToolsUtil.isNumeric(domain.getQhhm())) {
            map.put("rxsfzBdxh", domain.getQhhm());
        } else {
            map.put("qhhm", domain.getQhhm());
        }
        List dataList = this.smzbsSqlMapClientTemplate.queryForList("queryNsrxxByQhhmSqlServer", map);
        List djxh = this.smzbsSqlMapClientTemplate.queryForList("queryNsrByQHhm", map);
        if (dataList == null || dataList.size() <= 0) {
            returnDomain.setCode("01");
            returnDomain.setMess("\u5f53\u5929\u6ca1\u6709\u8be5\u53d6\u53f7\u53f7\u7801\u76f8\u5173\u4fe1\u606f");
        } else {
            BeanUtils.copyProperties((Object)returnDomain, dataList.get(0));
            returnDomain.setCode("00");
            returnDomain.setMess("");
            returnDomain.setDatalist(djxh);
        }
        return returnDomain;
    }

    public TaxCommonReturnDomain jhxtGetBdNsrxx(JhxtGetBdNsrxxAppDomain domain) throws Exception {
        JhxtGetBdNsrxxReturnDomain returnDomain = new JhxtGetBdNsrxxReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sfzhm", domain.getSfzhm());
        this.sqlMapClientTemplate.queryForObjectByCurr("pWebjkSmz9203GetBdNsrxx", "dataList", map);
        String code = (String)map.get("code");
        String mess = HstToolsUtil.ISO2GBK((String)map.get("mess"));
        if ("00".equals(code)) {
            List dataList = (List)map.get("dataList");
            returnDomain.setDataList(dataList);
        }
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    public TaxCommonReturnDomain jhxtSaveYcxgz(JhxtSaveYcxgzAppDomain domain) throws Exception {
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("xm", HstEncodeUtil.GBK2ISO(domain.getXm()));
        map.put("sfzhm", domain.getSfzhm());
        map.put("sjhm", domain.getSjhm());
        map.put("gznr", HstEncodeUtil.GBK2ISO(domain.getGznr()));
        map.put("nsrsbh", domain.getNsrsbh());
        map.put("czyxm", HstEncodeUtil.GBK2ISO(domain.getCzyxm()));
        map.put("czydm", domain.getCzrdm());
        this.sqlMapClientTemplate.queryForObject("pWebjkSmz9204SaveYcxgz", map);
        String code = (String)map.get("code");
        String mess = HstToolsUtil.ISO2GBK((String)map.get("mess"));
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    public TaxCommonReturnDomain jhxtSaveBsydj(JhxtSaveBsydjAppDomain domain) throws Exception {
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sfzhm", domain.getSfzhm());
        map.put("nsrsbh", domain.getNsrsbh());
        map.put("sflbdm", domain.getSflbdm());
        this.sqlMapClientTemplate.queryForObject("pWebjkSmz9206AddBsydj", map);
        String code = (String)map.get("code");
        String mess = HstToolsUtil.ISO2GBK((String)map.get("mess"));
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    public TaxCommonReturnDomain jhxtGetXtcs(JhxtGetXtcsAppDomain domain) throws Exception {
        JhxtGetXtcsReturnDomain returnDomain = new JhxtGetXtcsReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgdm", domain.getSwjgdm());
        this.sqlMapClientTemplate.queryForObjectByCurr("pWebjkSmz9208GetXtcs", "dataList", map);
        String code = (String)map.get("code");
        String mess = HstToolsUtil.ISO2GBK((String)map.get("mess"));
        if ("00".equals(code)) {
            List dataList = (List)map.get("dataList");
            returnDomain.setDataList(dataList);
        }
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    public TaxCommonReturnDomain jhxtGetNsrxxBynsrsbh(JhxtGetNsrxxBynsrsbhAppDomain domain) throws Exception {
        JhxtGetNsrxxBynsrsbhReturnDomain returnDomain = new JhxtGetNsrxxBynsrsbhReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("nsrsbh", domain.getNsrsbh());
        this.sqlMapClientTemplate.queryForObjectByCurr("pWebjkSmz9207GetNsrxxByNsrsbh", "dataList", map);
        String code = (String)map.get("code");
        String mess = HstToolsUtil.ISO2GBK((String)map.get("mess"));
        if ("00".equals(code)) {
            List dataList = (List)map.get("dataList");
            BeanUtils.copyProperties((Object)returnDomain, dataList.get(0));
        }
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    public TaxCommonReturnDomain jhxtGetYyxx(JhxtGetYyxxAppDomain domain) throws Exception {
        JhxtGetYyxxReturnDomain returnDomain = new JhxtGetYyxxReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("bsdt_djxh", domain.getBsdt_djxh());
        map.put("rq_q", domain.getRq_q());
        map.put("rq_z", domain.getRq_z());
        this.sqlMapClientTemplate.queryForObjectByCurr("pWebjkSmz9209GetYyxx", "dataList", map);
        String code = (String)map.get("code");
        String mess = HstToolsUtil.ISO2GBK((String)map.get("mess"));
        if ("00".equals(code)) {
            List dataList = (List)map.get("dataList");
            returnDomain.setDataList(dataList);
        }
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    public TaxCommonReturnDomain jhxtXxts(JhxtXxtsAppDomain domain) throws Exception {
        JhxtXxtsReturnDomain returnDomain = new JhxtXxtsReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("ckbm", HstEncodeUtil.GBK2ISO(domain.getCkbm()));
        map.put("czyxm", HstEncodeUtil.GBK2ISO(domain.getCzyxm()));
        map.put("czydm", domain.getCzydm());
        map.put("nsrsbh", domain.getNsrsbh());
        map.put("nsrmc", HstEncodeUtil.GBK2ISO(domain.getNsrmc()));
        map.put("xxnr", HstEncodeUtil.GBK2ISO(domain.getXxnr()));
        this.sqlMapClientTemplate.queryForObjectByCurr("pWebjkSmz9210Xxts", "dataList", map);
        String code = (String)map.get("code");
        String mess = HstToolsUtil.ISO2GBK((String)map.get("mess"));
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    public String queryBsdtDjxh() throws Exception {
        return (String)this.smzbsSqlMapClientTemplate.queryForObject("queryBsdtDjxhJhj");
    }

    public String queryParmValueByKey(String key) throws Exception {
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("key", key);
        return (String)this.smzbsSqlMapClientTemplate.queryForObject("selectParmValueByKey", map);
    }

    public TaxCommonReturnDomain jhxtGetSssxdm(JhxtGetSssxdmAppDomain domain) throws Exception {
        JhxtGetSssxdmReturnDomain returnDomain = new JhxtGetSssxdmReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("bsdt_djxh", domain.getBsdt_djxh());
        this.sqlMapClientTemplate.queryForObjectByCurr("pWebjkSmz9213GetSssxDm", "dataList", map);
        String mess = "";
        String code = (String)map.get("code");
        mess = "ISO".equals(WebConstants.DATABASE_ENCODE) ? HstEncodeUtil.ISO2GBK((String)map.get("mess")) : (String)map.get("mess");
        if ("00".equals(code)) {
            List dataList = (List)map.get("dataList");
            returnDomain.setDataList(dataList);
        }
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_smzbs")
    public TaxCommonReturnDomain jhxtGetGgjChxx(JhxtGetGgjChxxAppDomain domain) throws Exception {
        JhxtGetGgjChxxReturnDomain returnDomain = new JhxtGetGgjChxxReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        returnDomain.setCode("00");
        map.put("bsdt_djxh", domain.getBsdt_djxh());
        map.put("group", domain.getGroup());
        map.put("zdbh", domain.getZdbh());
        this.smzbsSqlMapClientTemplate.queryForObject("jhxtGetGgjChxxProc", map, (Object)returnDomain);
        return returnDomain;
    }

    public TaxCommonReturnDomain jhxtGetGgjGetList(JhxtGetGgjGetListAppDomain domain) throws Exception {
        JhxtGetGgjGetListReturnDomain returnDomain = new JhxtGetGgjGetListReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        ArrayList<JhxtGetGgjGetListDomain> dataList = new ArrayList();
        returnDomain.setCode("00");
        map.put("bsdt_djxh", domain.getBsdt_djxh());
        map.put("group", domain.getGroup());
        map.put("zdbh", domain.getZdbh());
        dataList = this.smzbsSqlMapClientTemplate.queryForList("jhxtGetGgjGetListProc", map);
        returnDomain.setDataList(dataList);
        return returnDomain;
    }

    public TaxCommonReturnDomain jhxtGetJhList(JhxtGetJhListAppDomain domain) throws Exception {
        JhxtGetJhListReturnDomain returnDomain = new JhxtGetJhListReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        ArrayList<JhxxData> dataList = new ArrayList();
        returnDomain.setCode("00");
        map.put("bsdt_djxh", domain.getBsdt_djxh());
        map.put("rows", StringUtils.isBlank((String)domain.getRows()) ? "9999" : domain.getRows());
        map.put("page", StringUtils.isBlank((String)domain.getPage()) ? "1" : domain.getPage());
        dataList = this.smzbsSqlMapClientTemplate.queryForList("jhxtGetJhxxList", map);
        returnDomain.setDataList(dataList);
        return returnDomain;
    }

    public TaxCommonReturnDomain JhxtGetYwfl(JhxtGetYwflAppDomain domain) throws Exception {
        JhxtGetYwflReturnDomain returnDomain = new JhxtGetYwflReturnDomain();
        HashMap map = new HashMap();
        ArrayList<JhxtGetYwflDomain> dataList = new ArrayList();
        returnDomain.setCode("00");
        dataList = this.smzbsSqlMapClientTemplate.queryForList("jhxtGetYwfl", map);
        returnDomain.setDataList(dataList);
        return returnDomain;
    }

    public TaxCommonReturnDomain JhxtGetYwfl2(JhxtGetYwfl2AppDomain domain) throws Exception {
        JhxtGetYwfl2ReturnDomain returnDomain = new JhxtGetYwfl2ReturnDomain();
        HashMap map = new HashMap();
        ArrayList<JhxtGetYwfl2Domain> dataList = new ArrayList();
        returnDomain.setCode("00");
        dataList = this.smzbsSqlMapClientTemplate.queryForList("jhxtGetYwfl2", map);
        returnDomain.setDataList(dataList);
        return returnDomain;
    }

    public TaxCommonReturnDomain JhxtGetDhrs(JhxtGetDhrsAppDomain domain) throws Exception {
        JhxtGetDhrsReturnDomain returnDomain = new JhxtGetDhrsReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("ywflbm", domain.getYwflbm());
        map.put("qhhm", domain.getQhhm());
        map.put("code", null);
        map.put("mess", null);
        this.smzbsSqlMapClientTemplate.queryForObject("jhxtGetDhrs", map);
        String code = (String)map.get("code");
        String mess = (String)map.get("mess");
        if (Integer.valueOf(code) >= 0) {
            returnDomain.setCode("00");
            returnDomain.setDhrs(code);
        } else {
            returnDomain.setCode(code);
            returnDomain.setMess(mess);
        }
        return returnDomain;
    }

    public TaxCommonReturnDomain JhxtZfSjqh(JhxtZfSjqhAppDomain domain) throws Exception {
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("ywflbm", domain.getYwflbm());
        map.put("qhhm", domain.getQhhm());
        map.put("code", null);
        map.put("mess", null);
        this.smzbsSqlMapClientTemplate.queryForObject("jhxtZfqhhm", map);
        String code = (String)map.get("code");
        String mess = (String)map.get("mess");
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    public TaxCommonReturnDomain JhxtGetSjqhhm(JhxtGetSjqhhmAppDomain domain) throws Exception {
        JhxtGetSjqhhmReturnDomain returnDomain = new JhxtGetSjqhhmReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("ywflbm", domain.getYwflbm());
        map.put("lbDm", domain.getLbDm());
        map.put("nsrsbh", domain.getNsrsbh());
        map.put("sfzhm", domain.getSfzhm());
        map.put("yzm", domain.getHqyzm());
        map.put("jzsj", domain.getHqjzsj());
        map.put("nj", StringUtils.isBlank((String)domain.getNjDm()) ? "0" : domain.getNjDm());
        map.put("sjhm", domain.getSjhm());
        map.put("code", null);
        map.put("mess", null);
        this.smzbsSqlMapClientTemplate.queryForObject("jhxtGetQhhm", map);
        String code = (String)map.get("code");
        String mess = (String)map.get("mess");
        returnDomain.setCode(code);
        if ("00".equals(code)) {
            returnDomain.setQhhm(mess);
        } else {
            returnDomain.setMess(mess);
        }
        return returnDomain;
    }

    public TaxCommonReturnDomain jhxtGetDqphxx(SjqhGetPhxxAppDomain domain) throws Exception {
        SjqhGetPhxxReturnDomain returnDomain = new SjqhGetPhxxReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("qhhm", domain.getQhhm());
        map.put("code", null);
        map.put("mess", null);
        List datas = this.smzbsSqlMapClientTemplate.queryForList("pJhxtGetPhxx", map);
        if (datas != null && datas.size() > 0) {
            BeanUtils.copyProperties((Object)returnDomain, datas.get(0));
        }
        String code = (String)map.get("code");
        String mess = (String)map.get("mess");
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    public TaxCommonReturnDomain jhxtPjDqph(SjqhPjAppDomain domain) throws Exception {
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("pjjg", domain.getPjdm());
        map.put("qhhm", domain.getQhhm());
        map.put("code", null);
        map.put("mess", null);
        this.smzbsSqlMapClientTemplate.queryForObject("pJhxtPutPjjg", map);
        String code = (String)map.get("code");
        String mess = (String)map.get("mess");
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    public TaxCommonReturnDomain JhxtJhSjqh(JhxtJhSjqhAppDomain domain, HashMap<String, String> map) throws Exception {
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        this.smzbsSqlMapClientTemplate.queryForObject("pJhxtJhSjqh", map);
        String code = map.get("code");
        String mess = map.get("mess");
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    public TaxCommonReturnDomain jhxtGetQhhmlist(JhxtGetQhhmlistAppDomain domain) throws Exception {
        JhxtGetQhhmlistReturnDomain returnDomain = new JhxtGetQhhmlistReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sfzhm", domain.getSfzhm());
        List datas = this.smzbsSqlMapClientTemplate.queryForList("pjhxtGetQhhmlist", map);
        returnDomain.setDataList(datas);
        String code = (String)map.get("code");
        String mess = (String)map.get("mess");
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    public TaxCommonReturnDomain JhxtJhYyqh(JhxtJhYyqhAppDomain domain) throws Exception {
        JhxtJhYyqhReturnDomain returnDomain = new JhxtJhYyqhReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sfzhm", domain.getSfzhm());
        map.put("hqyzm", domain.getHqyzm());
        this.smzbsSqlMapClientTemplate.queryForObject("JhxtJhYyqh", map);
        String code = (String)map.get("code");
        String mess = (String)map.get("mess");
        String qhhm = (String)map.get("qhhm");
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        returnDomain.setQhhm(qhhm);
        return returnDomain;
    }

    public TaxCommonReturnDomain jhxtGetYyqhlist(JhxtGetYyqhlistAppDomain domain) throws Exception {
        JhxtGetYyqhlistReturnDomain returnDomain = new JhxtGetYyqhlistReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sfzhm", domain.getSfzhm());
        List datas = this.smzbsSqlMapClientTemplate.queryForList("jhxtGetYyqhlist", map);
        returnDomain.setDataList(datas);
        String code = (String)map.get("code");
        String mess = (String)map.get("mess");
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    public TaxCommonReturnDomain JhxtZfYyqh(JhxtZfYyqhAppDomain domain) throws Exception {
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sfzhm", domain.getSfzhm());
        map.put("hqyzm", domain.getHqyzm());
        this.smzbsSqlMapClientTemplate.queryForObject("JhxtZfYyqh", map);
        String code = (String)map.get("code");
        String mess = (String)map.get("mess");
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_smzbs")
    public Zjsmbs00009RequestDomain queryUpdateGt3QhhmReqByqhhm(String qhhm) throws Exception {
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("qhhm", qhhm);
        Zjsmbs00009RequestDomain resDomain = (Zjsmbs00009RequestDomain)this.smzbsSqlMapClientTemplate.queryForObject("queryUpdateGt3QhhmReqByqhhm", map);
        return resDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_smzbs")
    public SmzBsySxsfzBdjl queryBdjlByDrqhhm(String qhhm) throws Exception {
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("qhhm", qhhm);
        SmzBsySxsfzBdjl dom = (SmzBsySxsfzBdjl)this.smzbsSqlMapClientTemplate.queryForObject("queryBdjlByDrqhhm", map);
        return dom;
    }

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_smzbs")
    public void updateSmzBsyRxsfzBdjlJkyzUuidByqhhm(String qhhm, String jkyzuuid, String rtnMsg) throws Exception {
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("qhhm", qhhm);
        map.put("jkyzuuid", jkyzuuid);
        map.put("rtnMsg", rtnMsg);
        this.smzbsSqlMapClientTemplate.update("updateSmzBsyRxsfzBdjlJkyzUuidByqhhm", map);
    }

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_smzbs")
    public TaxCommonReturnDomain JhxtSetSjhm(JhxtSetSjhmAppDomain domain) throws Exception {
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("qhhm", domain.getQhhm());
        map.put("sjhm", domain.getSjhm());
        map.put("ywflbm", domain.getYwflbm());
        this.smzbsSqlMapClientTemplate.queryForObject("JhxtSetSjhm", map);
        try {
            String rq = HstDateUtil.format(new Date(), "yyyyMMdd");
            ZhdtXxtsConstants.ZHDT_XXTS_DATA.remove("JSHH_" + rq + "_" + domain.getQhhm());
            ZhdtXxtsConstants.ZHDT_XXTS_DATA.remove("JJHH_" + rq + "_" + domain.getQhhm());
            ZhdtXxtsConstants.ZHDT_XXTS_DATA.remove("MYDPJ_" + rq + "_" + domain.getQhhm());
        }
        catch (Exception exception) {}
        String code = (String)map.get("code");
        String mess = (String)map.get("mess");
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_smzbs")
    public TaxCommonReturnDomain jhxtSaveSjhm(JhxtSaveSjhmAppDomain domain) throws Exception {
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("tkt_uid", domain.getTkt_uid());
        map.put("sjhm", domain.getSjhm());
        this.smzbsSqlMapClientTemplate.queryForObject("pJhxtSaveSjhm", map);
        String code = (String)map.get("code");
        String mess = (String)map.get("mess");
        returnDomain.setCode(code);
        returnDomain.setMess(mess);
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_smzbs")
    public TaxCommonReturnDomain jhxtSaveBlnsr(JhxtSaveBlnsrAppDomain domain) throws Exception {
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("tkt_uid", domain.getTkt_uid());
        this.smzbsSqlMapClientTemplate.update("deleteTicketNsr", map);
        for (JhxtSaveBlnsrDomain dom : domain.getDatalist()) {
            TicketNsr bo = new TicketNsr();
            bo.setTkt_uid(domain.getTkt_uid());
            bo.setDjxh(dom.getDjxh());
            bo.setNsrsbh(dom.getNsrsbh());
            bo.setNsrmc(dom.getNsrmc());
            bo.setYxbz("Y");
            this.smzbsSqlMapClientTemplate.update("insertTicketNsr", (Object)bo);
        }
        returnDomain.setCode("00");
        return returnDomain;
    }

    public TaxCommonReturnDomain JhxtTycxSql(JhxtTycxSqlAppDomain appDomain) throws Exception {
        JhxtTycxSqlReturnDomain returnDomain = new JhxtTycxSqlReturnDomain();
        DataSource dataSource = this.smzbsSqlMapClientTemplate.getDataSource();
        JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
        List datalist = jdbcTemplate.query(appDomain.getCxSql(), (RowMapper)new JdbcRowMapperUtil());
        returnDomain.setCode("00");
        returnDomain.setDataList(datalist);
        return returnDomain;
    }
}
