/*
 * 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.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.taxService.domain.nsfw.JhxtGetYyxxZwAppDomain;
import com.hst.taxService.domain.nsfw.JhxtGetYyxxZwReturnDomain;
import com.hst.taxService.domain.nsfw.NsfwSaveAccAppDomain;
import com.hst.taxService.domain.nsfw.NsfwSaveAccReturnDomain;
import com.hst.taxService.domain.nsfw.NsfwSaveBizAppDomain;
import com.hst.taxService.domain.nsfw.NsfwSaveBizReturnDomain;
import com.hst.taxService.domain.nsfw.NsfwSaveEvaAppDomain;
import com.hst.taxService.domain.nsfw.NsfwSaveEvaReturnDomain;
import com.hst.taxService.domain.nsfw.NsfwSaveGovhallAppDomain;
import com.hst.taxService.domain.nsfw.NsfwSaveGovhallReturnDomain;
import com.hst.taxService.domain.nsfw.NsfwSaveTicketAppDomain;
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 TaxNsfwCommonDaoImp
implements BaseDao {
    @Autowired
    private HstSqlMapClientTemplate sqlMapClientTemplate;
    private static Logger _log = Logger.getLogger(TaxNsfwCommonDaoImp.class);

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain saveticket(NsfwSaveTicketAppDomain domain) throws Exception {
        NsfwSaveTicketReturnDomain returnDomain = new NsfwSaveTicketReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("ID", domain.getID());
        map.put("govhallid", domain.getGovhallid());
        map.put("bizid", domain.getBizid());
        map.put("Ticket", domain.getTicket());
        map.put("Idcard", domain.getIdcard());
        map.put("Createtime", domain.getCreatetime());
        map.put("Calltime", domain.getCalltime());
        map.put("Acccode", domain.getAcccode());
        map.put("Counterid", domain.getCounterid());
        map.put("Evaid", domain.getEvaid());
        map.put("Evatime", domain.getEvatime());
        map.put("Finishtime", domain.getFinishtime());
        map.put("State", domain.getState());
        this.sqlMapClientTemplate.queryForObject("pWebjkNsfw1401SaveQhxx", map);
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain saveacc(NsfwSaveAccAppDomain domain) throws Exception {
        NsfwSaveAccReturnDomain returnDomain = new NsfwSaveAccReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("ID", domain.getID());
        map.put("govhallid", domain.getGovhallid());
        map.put("Acccode", domain.getAcccode());
        map.put("Accname", HstEncodeUtil.GBK2ISO(domain.getAccname()));
        this.sqlMapClientTemplate.queryForObject("pWebjkNsfw1402SaveYgxx", map);
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain saveeva(NsfwSaveEvaAppDomain domain) throws Exception {
        NsfwSaveEvaReturnDomain returnDomain = new NsfwSaveEvaReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("Evaid", domain.getEvaid());
        map.put("govhallid", domain.getGovhallid());
        map.put("evaname", HstEncodeUtil.GBK2ISO(domain.getEvaname()));
        this.sqlMapClientTemplate.queryForObject("pWebjkNsfw1403SavePjlxxx", map);
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain savegovhall(NsfwSaveGovhallAppDomain domain) throws Exception {
        NsfwSaveGovhallReturnDomain returnDomain = new NsfwSaveGovhallReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("govhallid", domain.getGovhallid());
        map.put("govhallname", HstEncodeUtil.GBK2ISO(domain.getGovhallname()));
        this.sqlMapClientTemplate.queryForObject("pWebjkNsfw1404SaveBsdtXx", map);
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain savebiz(NsfwSaveBizAppDomain domain) throws Exception {
        NsfwSaveBizReturnDomain returnDomain = new NsfwSaveBizReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("bizid", domain.getBizid());
        map.put("govhallid", domain.getGovhallid());
        map.put("Bizname", HstEncodeUtil.GBK2ISO(domain.getBizname()));
        this.sqlMapClientTemplate.queryForObject("pWebjkNsfw1405SaveYwlxxx", map);
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        return returnDomain;
    }

    public TaxCommonReturnDomain jhxtGetYyxxZw(JhxtGetYyxxZwAppDomain domain) throws Exception {
        JhxtGetYyxxZwReturnDomain returnDomain = new JhxtGetYyxxZwReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("govhallid", domain.getGovhallid());
        map.put("rq_q", domain.getRq_q());
        map.put("rq_z", domain.getRq_z());
        this.sqlMapClientTemplate.queryForObjectByCurr("pWebjkNsfw14106GetYyxxZw", "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;
    }
}
