/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  org.apache.log4j.Logger
 *  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.bo.LsbWebjkPublic;
import com.hst.common.domain.TaxCommonReturnDomain;
import com.hst.framework.common.HstSqlMapClientTemplate;
import com.hst.framework.constants.WebConstants;
import com.hst.framework.dao.BaseDao;
import com.hst.framework.util.HstEncodeUtil;
import com.hst.framework.util.HstToolsUtil;
import com.hst.taxService.domain.dd.DdinDbrwBdxmAppDomain;
import com.hst.taxService.domain.dd.DdinDbrwBdxmReturnDomain;
import com.hst.taxService.domain.dd.DdinDbrwBdxmXzxAppDomain;
import com.hst.taxService.domain.dd.DdinDbrwBdxmXzxReturnDomain;
import com.hst.taxService.domain.dd.DdinDbrwListAppDomain;
import com.hst.taxService.domain.dd.DdinDbrwListReturnDomain;
import com.hst.taxService.domain.dd.DdinDbrwNrAppDomain;
import com.hst.taxService.domain.dd.DdinDbrwNrReturnDomain;
import com.hst.taxService.domain.dd.DdinDbrwSaveAppDomain;
import com.hst.taxService.domain.dd.DdinDbrwSaveDomain;
import com.hst.taxService.domain.dd.DdinDbrwSaveReturnDomain;
import com.hst.taxService.domain.dd.DdinSaveCkbzAppDomain;
import com.hst.taxService.domain.dd.DdinSaveCkbzReturnDomain;
import com.hst.taxService.domain.dd.DdinSaveHfxxAppDomain;
import com.hst.taxService.domain.dd.DdinSaveHfxxReturnDomain;
import com.hst.taxService.domain.dd.DdinSaveRyJhxxAppDomain;
import com.hst.taxService.domain.dd.DdoutSendMessData;
import com.hst.taxService.domain.dd.DdoutSendMessDelAppDomain;
import com.hst.taxService.domain.dd.DdoutTbBsryDomain;
import com.hst.taxService.domain.dd.DdoutTbNsrDomain;
import com.hst.taxService.domain.dd.DdoutTbSwbmDataTmp;
import com.hst.taxService.domain.dd.DdoutTbSwryDataDomain;
import com.hst.taxService.domain.nsfw.NsfwSaveTicketReturnDomain;
import java.util.HashMap;
import java.util.List;
import org.apache.log4j.Logger;
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 TaxDdCommonDaoImp
implements BaseDao {
    @Autowired
    private HstSqlMapClientTemplate ssglSqlMapClientTemplate;
    private static Logger _log = Logger.getLogger(TaxDdCommonDaoImp.class);

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_Ssgl")
    public TaxCommonReturnDomain inSaveRyJhxx(DdinSaveRyJhxxAppDomain domain) throws Exception {
        NsfwSaveTicketReturnDomain returnDomain = new NsfwSaveTicketReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgdm", domain.getSwjgdm());
        map.put("sjhm", domain.getSjhm());
        map.put("ddid", domain.getDdid());
        map.put("xm", HstEncodeUtil.GBK2ISO(domain.getXm()));
        map.put("nick", HstEncodeUtil.GBK2ISO(domain.getNick()));
        map.put("sfzhm", domain.getSfzhm());
        map.put("jhsj", domain.getJhsj());
        this.ssglSqlMapClientTemplate.queryForObject("pWebjkDd15201SaveRyjhxx", map);
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_Ssgl")
    public TaxCommonReturnDomain inSaveCkbz(DdinSaveCkbzAppDomain domain) throws Exception {
        DdinSaveCkbzReturnDomain returnDomain = new DdinSaveCkbzReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgdm", domain.getSwjgdm());
        map.put("sjhm", domain.getSjhm());
        map.put("ddid", domain.getDdid());
        map.put("nrlb", domain.getNrlb());
        map.put("ywxh", domain.getYwxh());
        map.put("cksj", domain.getCksj());
        this.ssglSqlMapClientTemplate.queryForObject("pWebjkDd15202SaveCkbz", map);
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_Ssgl")
    public TaxCommonReturnDomain inSaveHfxx(DdinSaveHfxxAppDomain domain) throws Exception {
        DdinSaveHfxxReturnDomain returnDomain = new DdinSaveHfxxReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgdm", domain.getSwjgdm());
        map.put("sjhm", domain.getSjhm());
        map.put("ddid", domain.getDdid());
        map.put("nrlb", domain.getNrlb());
        map.put("ywxh", domain.getYwxh());
        map.put("hfsj", domain.getHfsj());
        map.put("hfnr", HstEncodeUtil.GBK2ISO(domain.getHfnr()));
        this.ssglSqlMapClientTemplate.queryForObject("pWebjkDd15203SaveHfxx", map);
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_Ssgl")
    public TaxCommonReturnDomain inDbrwList(DdinDbrwListAppDomain domain) throws Exception {
        DdinDbrwListReturnDomain returnDomain = new DdinDbrwListReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgdm", domain.getSwjgdm());
        map.put("sjhm", domain.getSjhm());
        map.put("ddid", domain.getDdid());
        if (HstToolsUtil.isNullOrEmpty(domain.getStr())) {
            map.put("str", "");
        } else {
            map.put("str", HstEncodeUtil.GBK2ISO(domain.getStr()));
        }
        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());
        }
        map.put("code", "");
        map.put("mess", "");
        map.put("dataList", null);
        this.ssglSqlMapClientTemplate.queryForObjectByCurr("pWebjkDd15204DbrwList", "dataList", map);
        List 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(propagation=Propagation.REQUIRED, value="myTransactionManager_Ssgl")
    public TaxCommonReturnDomain inDbrwNr(DdinDbrwNrAppDomain domain) throws Exception {
        DdinDbrwNrReturnDomain returnDomain = new DdinDbrwNrReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgdm", domain.getSwjgdm());
        map.put("ddid", domain.getDdid());
        map.put("sjhm", domain.getSjhm());
        map.put("dbrwXh", domain.getDbrwXh());
        map.put("djxh", domain.getDjxh());
        map.put("nsrmc", "");
        map.put("bt", "");
        map.put("ly", "");
        map.put("rq", "");
        map.put("bjqx", "");
        map.put("wcbz", "");
        map.put("bdlx", "");
        map.put("rwsm", "");
        map.put("wcrq", "");
        map.put("wcsm", "");
        map.put("wcrxm", "");
        map.put("bdmc", "");
        map.put("bddgmc", "");
        map.put("code", "");
        map.put("mess", "");
        this.ssglSqlMapClientTemplate.queryForObjectByCurr("pWebjkDd15205InDbrwnr", map, "dataList", "xffj");
        List dataList = (List)map.get("dataList");
        List xffj = (List)map.get("xffj");
        returnDomain.setDbrwXh((String)map.get("dbrwXh"));
        returnDomain.setNsrsbh((String)map.get("nsrsbh"));
        returnDomain.setNsrmc(HstToolsUtil.ISO2GBK((String)map.get("nsrmc")));
        returnDomain.setBt(HstToolsUtil.ISO2GBK((String)map.get("bt")));
        returnDomain.setLy(HstToolsUtil.ISO2GBK((String)map.get("ly")));
        returnDomain.setRq((String)map.get("rq"));
        returnDomain.setBjqx((String)map.get("bjqx"));
        returnDomain.setWcbz((String)map.get("wcbz"));
        returnDomain.setBdlx((String)map.get("bdlx"));
        returnDomain.setRwsm(HstToolsUtil.ISO2GBK((String)map.get("rwsm")));
        returnDomain.setWcrq((String)map.get("wcrq"));
        returnDomain.setWcsm(HstToolsUtil.ISO2GBK((String)map.get("wcsm")));
        returnDomain.setBdmc(HstToolsUtil.ISO2GBK((String)map.get("bdmc")));
        returnDomain.setBddgmc(HstToolsUtil.ISO2GBK((String)map.get("bddgmc")));
        returnDomain.setWcrxm(HstToolsUtil.ISO2GBK((String)map.get("wcrxm")));
        returnDomain.setXffj(xffj);
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        returnDomain.setDataList(dataList);
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED, value="myTransactionManager_Ssgl")
    public TaxCommonReturnDomain inDbrwBdxm(DdinDbrwBdxmAppDomain domain) throws Exception {
        DdinDbrwBdxmReturnDomain returnDomain = new DdinDbrwBdxmReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgdm", domain.getSwjgdm());
        map.put("ddid", domain.getDdid());
        map.put("dbrwXh", domain.getDbrwXh());
        map.put("djxh", domain.getDjxh());
        map.put("sjhm", domain.getSjhm());
        map.put("code", "");
        map.put("mess", "");
        this.ssglSqlMapClientTemplate.queryForObjectByCurr("pWebjkDdin15206Dbrwbdxm", "dataList", map);
        List 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(propagation=Propagation.REQUIRED, value="myTransactionManager_Ssgl")
    public TaxCommonReturnDomain inDbrwBdxmXzx(DdinDbrwBdxmXzxAppDomain domain) throws Exception {
        DdinDbrwBdxmXzxReturnDomain returnDomain = new DdinDbrwBdxmXzxReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgdm", domain.getSwjgdm());
        map.put("ddid", domain.getDdid());
        map.put("dbrwXh", domain.getDbrwXh());
        map.put("djxh", domain.getDjxh());
        map.put("sjhm", domain.getSjhm());
        map.put("code", "");
        map.put("mess", "");
        this.ssglSqlMapClientTemplate.queryForObjectByCurr("pWebjkDd15207InDbrwbdxmXz", "dataList", map);
        List 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(propagation=Propagation.REQUIRED, value="myTransactionManager_Ssgl")
    public TaxCommonReturnDomain inDbrwSave(DdinDbrwSaveAppDomain domain) throws Exception {
        DdinDbrwSaveReturnDomain returnDomain = new DdinDbrwSaveReturnDomain();
        String pclXh = "";
        LsbWebjkPublic lsb = null;
        for (DdinDbrwSaveDomain dom : domain.getDataList()) {
            lsb = new LsbWebjkPublic();
            if (HstToolsUtil.isNullOrEmpty(pclXh)) {
                lsb.setYwxhXh(dom.getHxmxh());
                lsb.setXh(dom.getLxmxh());
                lsb.setNr(dom.getSjxz().replaceAll("%", "%25"));
                this.ssglSqlMapClientTemplate.insert("saveLsbWebjkPublic", lsb);
                pclXh = lsb.getPclXh();
            } else {
                lsb.setPclXh(pclXh);
                lsb.setYwxhXh(dom.getHxmxh());
                lsb.setXh(dom.getLxmxh());
                lsb.setNr(dom.getSjxz().replaceAll("%", "%25"));
                this.ssglSqlMapClientTemplate.insert("saveLsbWebjkPublicByPclXh", lsb);
            }
            lsb = null;
        }
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgdm", domain.getSwjgdm());
        map.put("ddid", domain.getDdid());
        map.put("dbrwXh", domain.getDbrwXh());
        map.put("djxh", domain.getDjxh());
        map.put("sjhm", domain.getSjhm());
        map.put("wcbz", domain.getWcbz());
        if ("ISO".equalsIgnoreCase(WebConstants.DATABASE_ENCODE)) {
            map.put("wcsm", HstEncodeUtil.UTF82ISO(domain.getWcsm().replaceAll("%", "%25")));
        }
        if ("GBK".equalsIgnoreCase(WebConstants.DATABASE_ENCODE)) {
            map.put("wcsm", HstEncodeUtil.UTF82GBK(domain.getWcsm().replaceAll("%", "%25")));
        }
        map.put("pclXh", pclXh);
        map.put("code", "");
        map.put("mess", "");
        this.ssglSqlMapClientTemplate.queryForObject("pWebjkDd15208DbrwSave", map);
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        return returnDomain;
    }

    public List<DdoutTbSwbmDataTmp> querySwbmList() throws Exception {
        return this.ssglSqlMapClientTemplate.queryForList("queryAddSwbmList");
    }

    public List<DdoutTbSwryDataDomain> querySwryList() {
        return this.ssglSqlMapClientTemplate.queryForList("queryAddSwryList");
    }

    public List<DdoutTbNsrDomain> queryNsrAddList() {
        return this.ssglSqlMapClientTemplate.queryForList("queryNsrAddList");
    }

    public List<DdoutTbBsryDomain> queryBsryAddList() {
        return this.ssglSqlMapClientTemplate.queryForList("queryBsryAddList");
    }

    public List<DdoutSendMessData> querySednMessListSstx() {
        List list = this.ssglSqlMapClientTemplate.queryForList("querySednMessListSstx");
        return list;
    }

    public List<DdoutSendMessData> querySednMessListTzgg() {
        List list = this.ssglSqlMapClientTemplate.queryForList("querySednMessListTzgg");
        return list;
    }

    public List<DdoutSendMessDelAppDomain> queryMessDelListSsxs() {
        List list = this.ssglSqlMapClientTemplate.queryForList("queryMessDelListSsxs");
        return list;
    }
}
