/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  org.apache.commons.beanutils.BeanUtils
 *  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.wxfwh.WycxNsrxydjcxAppDomain;
import com.hst.taxService.domain.wxfwh.WycxNsrxydjcxDomain;
import com.hst.taxService.domain.wxfwh.WycxNsrxydjcxReturnDomain;
import com.hst.taxService.domain.wxfwh.WycxZxzcZcjdListAppDomain;
import com.hst.taxService.domain.wxfwh.WycxZxzcZcjdListDomain;
import com.hst.taxService.domain.wxfwh.WycxZxzcZcjdListReturnDomain;
import com.hst.taxService.domain.wxfwh.WycxZxzcZcjdMxAppDomain;
import com.hst.taxService.domain.wxfwh.WycxZxzcZcjdMxReturnDomain;
import com.hst.taxService.domain.wxfwh.WycxZxzcZxwjListAppDomain;
import com.hst.taxService.domain.wxfwh.WycxZxzcZxwjListDomain;
import com.hst.taxService.domain.wxfwh.WycxZxzcZxwjListReturnDomain;
import com.hst.taxService.domain.wxfwh.WycxZxzcZxwjMxAppDomain;
import com.hst.taxService.domain.wxfwh.WycxZxzcZxwjMxReturnDomain;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import org.apache.commons.beanutils.BeanUtils;
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 TaxWxfwhWycxAppDaoImp
implements BaseDao {
    @Autowired
    private HstSqlMapClientTemplate sqlMapClientTemplate;
    private static Logger _log = Logger.getLogger(TaxWxfwhWycxAppDaoImp.class);

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain wycxZxzcZcjdList(WycxZxzcZcjdListAppDomain domain) throws Exception {
        WycxZxzcZcjdListReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgDm", domain.getSwjgDm());
        map.put("openId", domain.getOpenId());
        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("wycxZxzcZcjdList", null);
        this.sqlMapClientTemplate.queryForObjectByCurr("wycxZxzcZcjdListCurr", "wycxZxzcZcjdList", map);
        ArrayList<WycxZxzcZcjdListDomain> dataList = new ArrayList();
        dataList = (List)map.get("wycxZxzcZcjdList");
        returnDomain = new WycxZxzcZcjdListReturnDomain();
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        returnDomain.setDataList(dataList);
        return returnDomain;
    }

    public TaxCommonReturnDomain wycxZxzcZcjdMx(WycxZxzcZcjdMxAppDomain domain) throws Exception {
        WycxZxzcZcjdMxReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgDm", domain.getSwjgDm());
        map.put("openId", domain.getOpenId());
        map.put("zcwjDjxh", domain.getZcwjDjxh());
        map.put("code", "");
        map.put("mess", "");
        map.put("wycxZxzcZcjdMxList", null);
        this.sqlMapClientTemplate.queryForObjectByCurr("wycxZxzcZcjdMxCurr", "wycxZxzcZcjdMxList", map);
        List dataList = new ArrayList();
        dataList = (List)map.get("wycxZxzcZcjdMxList");
        returnDomain = new WycxZxzcZcjdMxReturnDomain();
        BeanUtils.copyProperties((Object)returnDomain, dataList.get(0));
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        return returnDomain;
    }

    public TaxCommonReturnDomain wycxZxzcZxwjList(WycxZxzcZxwjListAppDomain domain) throws Exception {
        WycxZxzcZxwjListReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgDm", domain.getSwjgDm());
        map.put("openId", domain.getOpenId());
        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());
        }
        this.sqlMapClientTemplate.queryForObjectByCurr("WycxZxzcZxwjListCurr", "dataList", map);
        ArrayList<WycxZxzcZxwjListDomain> dataList = new ArrayList();
        dataList = (List)map.get("dataList");
        returnDomain = new WycxZxzcZxwjListReturnDomain();
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        returnDomain.setDataList(dataList);
        return returnDomain;
    }

    public TaxCommonReturnDomain wycxZxzcZxwjMx(WycxZxzcZxwjMxAppDomain domain) throws Exception {
        WycxZxzcZxwjMxReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgDm", domain.getSwjgDm());
        map.put("openId", domain.getOpenId());
        map.put("zcwjDjxh", domain.getZcwjDjxh());
        this.sqlMapClientTemplate.queryForObjectByCurr("WycxZxzcZxwjMxCurr", "dataList", map);
        List dataList = new ArrayList();
        dataList = (List)map.get("dataList");
        returnDomain = new WycxZxzcZxwjMxReturnDomain();
        BeanUtils.copyProperties((Object)returnDomain, dataList.get(0));
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        return returnDomain;
    }

    public TaxCommonReturnDomain wycxNsrxydjcx(WycxNsrxydjcxAppDomain domain) throws Exception {
        WycxNsrxydjcxReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgDm", domain.getSwjgDm());
        map.put("openId", domain.getOpenId());
        map.put("nsrsbh", domain.getNsrsbh());
        this.sqlMapClientTemplate.queryForObjectByCurr("WycxNsrxydjcxCurr", "dataList", map);
        ArrayList<WycxNsrxydjcxDomain> dataList = new ArrayList();
        dataList = (List)map.get("dataList");
        returnDomain = new WycxNsrxydjcxReturnDomain();
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        returnDomain.setDataList(dataList);
        return returnDomain;
    }
}
