/*
 * 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.HstToolsUtil;
import com.hst.taxService.domain.BsznSssxLbAppDomain;
import com.hst.taxService.domain.BsznSssxLbDomain;
import com.hst.taxService.domain.BsznSssxLbReturnDomain;
import com.hst.taxService.domain.BsznSssxSmAppDomain;
import com.hst.taxService.domain.BsznSssxSmDomain;
import com.hst.taxService.domain.BsznSssxSmReturnDomain;
import com.hst.taxService.domain.BsznSxflAppDomain;
import com.hst.taxService.domain.BsznSxflDomain;
import com.hst.taxService.domain.BsznSxflReturnDomain;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
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 TaxWxBsznAppDaoImp
implements BaseDao {
    @Autowired
    private HstSqlMapClientTemplate sqlMapClientTemplate;

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain queryBsznGetSxfl(BsznSxflAppDomain domain) throws Exception {
        BsznSxflReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgDm", domain.getSwjgDm());
        map.put("bsznSxfl", null);
        this.sqlMapClientTemplate.queryForObjectByCurr("queryBsznGetSxfl", "bsznSxfl", map);
        List<BsznSxflDomain> dataList = new ArrayList();
        dataList = (List)map.get("bsznSxfl");
        returnDomain = new BsznSxflReturnDomain();
        returnDomain.setCode("00");
        if (dataList == null || dataList.isEmpty()) {
            return returnDomain;
        }
        returnDomain.setDataList(dataList);
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain queryBsznGetSssxList(BsznSssxLbAppDomain domain) throws Exception {
        BsznSssxLbReturnDomain returnDomain = null;
        HashMap<String, Object> map = new HashMap<String, Object>();
        map.put("swjgDm", domain.getSwjgDm());
        if (StringUtils.isNotBlank((String)domain.getSssxdlDM())) {
            map.put("sssxdlDm", domain.getSssxdlDM());
        } else {
            map.put("sssxdlDm", "");
        }
        if (StringUtils.isBlank((String)domain.getPage())) {
            map.put("index", 1);
        } else {
            map.put("index", Integer.valueOf(domain.getPage()));
        }
        if (StringUtils.isBlank((String)domain.getRows())) {
            map.put("size", 10);
        } else {
            map.put("size", Integer.valueOf(domain.getRows()));
        }
        map.put("count", 0);
        map.put("bsznSssxList", null);
        this.sqlMapClientTemplate.queryForObjectByCurr("queryBsznGetSssxList", "bsznSssxList", map);
        returnDomain = new BsznSssxLbReturnDomain();
        List<BsznSssxLbDomain> dataList = new ArrayList();
        dataList = (List)map.get("bsznSssxList");
        returnDomain.setCode("00");
        if (dataList == null || dataList.isEmpty()) {
            return returnDomain;
        }
        returnDomain.setDataList(dataList);
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain queryBsznGetSssxSm(BsznSssxSmAppDomain domain) throws Exception {
        BsznSssxSmReturnDomain returnDomain = null;
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("swjgDm", domain.getSwjgDm());
        if (StringUtils.isNotBlank((String)domain.getSssxDm())) {
            map.put("sssxDm", domain.getSssxDm());
        } else {
            map.put("sssxDm", "");
        }
        if (StringUtils.isNotBlank((String)domain.getNrbz())) {
            map.put("nrbz", domain.getNrbz());
        } else {
            map.put("nrbz", "");
        }
        map.put("code", null);
        map.put("mess", null);
        map.put("bsznGetSssxSm", null);
        this.sqlMapClientTemplate.queryForObjectByCurr("queryBsznGetSssxSm", "bsznGetSssxSm", map);
        returnDomain = new BsznSssxSmReturnDomain();
        List<BsznSssxSmDomain> dataList = new ArrayList();
        dataList = (List)map.get("bsznGetSssxSm");
        returnDomain.setCode((String)map.get("code"));
        returnDomain.setMess(HstToolsUtil.ISO2GBK((String)map.get("mess")));
        if (dataList == null || dataList.isEmpty()) {
            return returnDomain;
        }
        returnDomain.setDataList(dataList);
        return returnDomain;
    }
}
