/*
 * 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.taxService.domain.SjqhBsdtListAppDomain;
import com.hst.taxService.domain.SjqhBsdtListDomain;
import com.hst.taxService.domain.SjqhBsdtListReturnDomain;
import com.hst.taxService.domain.SjqhGetDayQhtjAppDomain;
import com.hst.taxService.domain.SjqhGetDayQhtjReturnDomain;
import com.hst.taxService.domain.SjqhGetDryqhxxAllAppDomain;
import com.hst.taxService.domain.SjqhGetDryqhxxAllDomain;
import com.hst.taxService.domain.SjqhGetDryqhxxAllReturnDomain;
import com.hst.taxService.domain.SjqhGetDryqhxxAppDomain;
import com.hst.taxService.domain.SjqhGetDryqhxxReturnDomain;
import com.hst.taxService.domain.SjqhGetJhxtYwflAppDomain;
import com.hst.taxService.domain.SjqhGetJhxtYwflReturnDomain;
import com.hst.taxService.domain.SjqhGetSjqhhmAppDomain;
import com.hst.taxService.domain.SjqhGetSjqhhmReturnDomain;
import com.hst.taxService.domain.SjqhPutqhxxAppDomain;
import com.hst.taxService.domain.SjqhPutqhxxReturnDomain;
import com.hst.taxService.domain.SjqhZfSjqhAppDomain;
import com.hst.taxService.domain.SjqhZfSjqhReturnDomain;
import com.hst.taxService.domain.jhxtDomain.JhxtZfQhhmAppDomain;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
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 TaxWxSjqhAppDaoImp
implements BaseDao {
    @Autowired
    private HstSqlMapClientTemplate sqlMapClientTemplate;

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain querySjqhGetBsdtList(SjqhBsdtListAppDomain domain) throws Exception {
        SjqhBsdtListReturnDomain 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("sjqhBsdtList", null);
        this.sqlMapClientTemplate.queryForObjectByCurr("querySjqhGetBsdtList", "sjqhBsdtList", map);
        ArrayList<SjqhBsdtListDomain> dataList = new ArrayList();
        dataList = (List)map.get("sjqhBsdtList");
        returnDomain = new SjqhBsdtListReturnDomain();
        returnDomain.setDataList(dataList);
        returnDomain.setCode((String)map.get("code"));
        String mess = (String)map.get("mess");
        returnDomain.setMess(HstToolsUtil.ISO2GBK(mess));
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain querySjqhGetDryqhxx(SjqhGetDryqhxxAppDomain domain) throws Exception {
        SjqhGetDryqhxxReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("bsdtDjxh", domain.getBsdtDjxh());
        map.put("userID", domain.getUserID());
        map.put("code", null);
        map.put("mess", null);
        map.put("dryqhxxList", null);
        this.sqlMapClientTemplate.queryForObjectByCurr("querySjqhGetDryqhxxList", "dryqhxxList", map);
        List dataList = new ArrayList();
        dataList = (List)map.get("dryqhxxList");
        returnDomain = dataList == null || dataList.isEmpty() ? new SjqhGetDryqhxxReturnDomain() : (SjqhGetDryqhxxReturnDomain)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 Map<String, Object> querySjqhQhhmBefore(SjqhGetSjqhhmAppDomain domain) throws Exception {
        HashMap<String, Object> map = new HashMap<String, Object>();
        map.put("bsdtDjxh", domain.getBsdtDjxh());
        map.put("userId", domain.getUserID());
        map.put("lbDm", domain.getLbDm());
        if (StringUtils.isNotBlank((String)domain.getYwflbm())) {
            map.put("ywflBm", domain.getYwflbm());
        } else {
            map.put("ywflBm", "");
        }
        if (StringUtils.isNotBlank((String)domain.getYwflmc())) {
            map.put("ywflMc", HstEncodeUtil.GBK2ISO(domain.getYwflmc()));
        } else {
            map.put("ywflMc", "");
        }
        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", "");
        }
        map.put("code", null);
        map.put("mess", null);
        map.put("sjqhXh", null);
        map.put("hqyzm", null);
        map.put("hqjzsj", null);
        map.put("njDm", null);
        this.sqlMapClientTemplate.queryForObject("querySjqhQhhmBefore", map);
        return map;
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain querySjqhQhhm(Map<String, Object> parameter) throws Exception {
        SjqhGetSjqhhmReturnDomain returnDomain = null;
        HashMap<String, Object> map = new HashMap<String, Object>();
        map.put("bsdtDjxh", parameter.get("bsdtDjxh"));
        map.put("sjqhXh", parameter.get("sjqhXh"));
        map.put("userId", parameter.get("userId"));
        if (StringUtils.isNotBlank((String)((String)parameter.get("qhhm")))) {
            map.put("qhhm", parameter.get("qhhm"));
        } else {
            map.put("qhhm", "");
        }
        if (StringUtils.isNotBlank((String)((String)parameter.get("mess")))) {
            map.put("errMess", HstEncodeUtil.GBK2ISO((String)parameter.get("mess")));
        } else {
            map.put("errMess", "");
        }
        map.put("code", null);
        map.put("mess", null);
        map.put("sjqhGetSjqhhm", null);
        this.sqlMapClientTemplate.queryForObjectByCurr("querySjqhGetSjqhhm", "sjqhGetSjqhhm", map);
        List dataList = new ArrayList();
        dataList = (List)map.get("sjqhGetSjqhhm");
        returnDomain = dataList == null || dataList.isEmpty() ? new SjqhGetSjqhhmReturnDomain() : (SjqhGetSjqhhmReturnDomain)dataList.get(0);
        if ("00".equals((String)parameter.get("code"))) {
            returnDomain.setCode((String)map.get("code"));
            String mess = (String)map.get("mess");
            returnDomain.setMess(HstToolsUtil.ISO2GBK(mess));
        } else {
            returnDomain.setCode((String)parameter.get("code"));
            String mess = (String)parameter.get("mess");
            returnDomain.setMess(mess);
        }
        return returnDomain;
    }

    public Map<String, Object> querySjqhZfsjqhBefore(SjqhZfSjqhAppDomain domain) throws Exception {
        HashMap<String, String> map = new HashMap<String, String>();
        HashMap<String, Object> resMap = new HashMap<String, Object>();
        map.put("sjqhXh", domain.getSjqhXh());
        map.put("code", null);
        map.put("mess", null);
        map.put("sjqhZfsjqhBefore", null);
        this.sqlMapClientTemplate.queryForObjectByCurr("querySjqhZfsjqhBefore", "sjqhZfsjqhBefore", map);
        List dataList = new ArrayList();
        dataList = (List)map.get("sjqhZfsjqhBefore");
        JhxtZfQhhmAppDomain jhxtAppDomain = null;
        jhxtAppDomain = dataList == null || dataList.isEmpty() ? new JhxtZfQhhmAppDomain() : (JhxtZfQhhmAppDomain)dataList.get(0);
        resMap.put("code", (String)map.get("code"));
        String mess = (String)map.get("mess");
        resMap.put("mess", HstToolsUtil.ISO2GBK(mess));
        resMap.put("jhxtAppDomain", jhxtAppDomain);
        return resMap;
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain querySjqhZfsjqh(SjqhZfSjqhAppDomain domain) throws Exception {
        SjqhZfSjqhReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sjqhXh", domain.getSjqhXh());
        map.put("code", null);
        map.put("mess", null);
        this.sqlMapClientTemplate.queryForObject("querySjqhZfsjqh", map);
        returnDomain = new SjqhZfSjqhReturnDomain();
        returnDomain.setCode((String)map.get("code"));
        String mess = (String)map.get("mess");
        returnDomain.setMess(HstToolsUtil.ISO2GBK(mess));
        return returnDomain;
    }

    public TaxCommonReturnDomain doSjqhJhxtCheck(SjqhGetJhxtYwflAppDomain domain) throws Exception {
        SjqhGetJhxtYwflReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("bsdtDjxh", domain.getBsdtDjxh());
        map.put("code", null);
        map.put("mess", null);
        this.sqlMapClientTemplate.queryForObject("doSjqhJhxtCheck", map);
        returnDomain = new SjqhGetJhxtYwflReturnDomain();
        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 SjqhGetDryqhxxAll(SjqhGetDryqhxxAllAppDomain domain) throws Exception {
        SjqhGetDryqhxxAllReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("userId", domain.getUserID());
        map.put("code", null);
        map.put("mess", null);
        map.put("dataList", null);
        this.sqlMapClientTemplate.queryForObjectByCurr("querySjqhGetDryqhxxAll", "dataList", map);
        ArrayList<SjqhGetDryqhxxAllDomain> dataList = new ArrayList();
        dataList = (List)map.get("dataList");
        returnDomain = new SjqhGetDryqhxxAllReturnDomain();
        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 SjqhGetDayQhtj(SjqhGetDayQhtjAppDomain domain) throws Exception {
        SjqhGetDayQhtjReturnDomain returnDomain = new SjqhGetDayQhtjReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("rq", domain.getRq());
        this.sqlMapClientTemplate.queryForObjectByCurr("pWebjk258Sjqhgetdayqhtj", "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;
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain SjqhPutqhxx(SjqhPutqhxxAppDomain domain) {
        SjqhPutqhxxReturnDomain returnDomain = new SjqhPutqhxxReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgdm", domain.getSwjgdm());
        map.put("appid", domain.getAppid());
        map.put("openid", domain.getOpenid());
        map.put("bsdtdjxh", domain.getBsdtdjxh());
        map.put("ywflbm", domain.getYwflbm());
        map.put("rq", domain.getRq());
        map.put("qhhm", domain.getQhhm());
        this.sqlMapClientTemplate.queryForObjectByCurr("pWebjk259SjqhPutQhxx", "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;
    }
}
