/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  org.apache.commons.beanutils.BeanUtils
 *  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.common.util.HstWxServiceUtil;
import com.hst.framework.common.HstSqlMapClientTemplate;
import com.hst.framework.constants.WebConstants;
import com.hst.framework.dao.BaseDao;
import com.hst.framework.util.HstDateUtil;
import com.hst.framework.util.HstEncodeUtil;
import com.hst.taxService.domain.arm.ArmDkfpGetDsSpjcAppDomain;
import com.hst.taxService.domain.arm.ArmDkfpGetDsSpjcReturnDomain;
import com.hst.taxService.domain.arm.ArmDkfpGetDsdzSfzxxAppDomain;
import com.hst.taxService.domain.arm.ArmDkfpGetDsdzSfzxxReturnDomain;
import com.hst.taxService.domain.arm.ArmDkfpGetSqxxAppDomain;
import com.hst.taxService.domain.arm.ArmDkfpGetSqxxReturnDomain;
import com.hst.taxService.domain.arm.ArmDkfpPrintDsspAppDomain;
import com.hst.taxService.domain.arm.ArmDkfpPrintDsspReturnDomain;
import com.hst.taxService.domain.arm.ArmDkfpSaveKjxxAppDomain;
import com.hst.taxService.domain.arm.ArmDkfpSaveKjxxReturnDomain;
import com.hst.taxService.domain.arm.DkfpGetNsrBsyxxAppDomain;
import com.hst.taxService.domain.arm.DkfpGetNsrBsyxxReturnDomain;
import com.hst.taxService.domain.arm.DkfpJksImportAppDomain;
import com.hst.taxService.domain.arm.DkfpJksImportReturnDomain;
import com.hst.taxService.domain.arm.DkfpJksSaveAppDomain;
import com.hst.taxService.domain.gt3.HxzgZsCxNsrdkfpyjxxRequestDomain;
import com.hst.taxService.domain.gt3.HxzgZsCxNsrdkfpyjxxResponseDomain;
import java.util.HashMap;
import java.util.List;
import org.apache.commons.beanutils.BeanUtils;
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 TaxArmAppDaoImp
implements BaseDao {
    @Autowired
    private HstSqlMapClientTemplate sqlMapClientTemplate;

    public TaxCommonReturnDomain DkfpGetSqxx(ArmDkfpGetSqxxAppDomain domain) throws Exception {
        ArmDkfpGetSqxxReturnDomain returnDomain = new ArmDkfpGetSqxxReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sqdbh", domain.getSQDBH());
        this.sqlMapClientTemplate.queryForObjectByCurr("pWebjkArm1101GetSqxx", "dataList", map);
        List dataList = (List)map.get("dataList");
        if (!dataList.isEmpty()) {
            BeanUtils.copyProperties((Object)returnDomain, dataList.get(0));
        }
        String code = (String)map.get("code");
        returnDomain.setCode(code);
        if ("ISO".equalsIgnoreCase(WebConstants.DATABASE_ENCODE)) {
            returnDomain.setMess(HstEncodeUtil.ISO2GBK((String)map.get("mess")));
        } else {
            returnDomain.setMess((String)map.get("mess"));
        }
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain DkfpGetDsdzSfzxx(ArmDkfpGetDsdzSfzxxAppDomain domain) throws Exception {
        ArmDkfpGetDsdzSfzxxReturnDomain returnDomain = new ArmDkfpGetDsdzSfzxxReturnDomain();
        HxzgZsCxNsrdkfpyjxxRequestDomain request1 = new HxzgZsCxNsrdkfpyjxxRequestDomain();
        request1.setDjxh(domain.getDJXH());
        request1.setBid("GT3.HxzgZsCxNsrdkfpyjxx");
        request1.setSssqq(HstDateUtil.getFirstDayMonth());
        request1.setSssqz(HstDateUtil.getLastDayOfMonth(HstDateUtil.getFirstDayMonth()));
        HxzgZsCxNsrdkfpyjxxResponseDomain response1 = HstWxServiceUtil.sendMess(WebConstants.GT3JK_SJ_URL, request1, "GT3.HxzgZsCxNsrdkfpyjxx", HxzgZsCxNsrdkfpyjxxResponseDomain.class);
        if (!"00".equals(response1.getCode())) {
            returnDomain.setCode(response1.getCode());
            returnDomain.setMess(response1.getMess());
            return returnDomain;
        }
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sqdbh", domain.getSQDBH());
        map.put("kprDm", domain.getKPR_DM());
        map.put("dzfs", domain.getDZFS());
        map.put("swjgDm", domain.getSWJG_DM());
        map.put("dwDm", domain.getDW_DM());
        map.put("wtdzXh", domain.getWTDZ_XH());
        map.put("ljkpjeHwlw", response1.getKpjeDkfpHwlw());
        map.put("ljkpjeYsfw", response1.getKpjeDkfpYsfw());
        this.sqlMapClientTemplate.queryForObjectByCurr("pWebjkArm1102GetSdzfzxx", "dataList", map);
        String code = (String)map.get("code");
        returnDomain.setCode(code);
        if ("ISO".equalsIgnoreCase(WebConstants.DATABASE_ENCODE)) {
            returnDomain.setMess(HstEncodeUtil.ISO2GBK((String)map.get("mess")));
        } else {
            returnDomain.setMess((String)map.get("mess"));
        }
        List dataList = (List)map.get("dataList");
        returnDomain.setDataList(dataList);
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain DkfpPrintDssp(ArmDkfpPrintDsspAppDomain domain) throws Exception {
        ArmDkfpPrintDsspReturnDomain returnDomain = new ArmDkfpPrintDsspReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sqdbh", domain.getSQDBH());
        map.put("kprDm", domain.getKPR_DM());
        map.put("dzfs", domain.getDZFS());
        map.put("swjgDm", domain.getSWJG_DM());
        map.put("dwDm", domain.getDW_DM());
        map.put("wtdzXh", domain.getWTDZ_XH());
        map.put("sphm", domain.getSPHM());
        map.put("se", domain.getSE());
        this.sqlMapClientTemplate.queryForObjectByCurr("pWebjkArm1103PrintDssp", "dataList", map);
        List dataList = (List)map.get("dataList");
        if (!dataList.isEmpty()) {
            BeanUtils.copyProperties((Object)returnDomain, dataList.get(0));
        }
        String code = (String)map.get("code");
        returnDomain.setCode(code);
        if ("ISO".equalsIgnoreCase(WebConstants.DATABASE_ENCODE)) {
            returnDomain.setMess(HstEncodeUtil.ISO2GBK((String)map.get("mess")));
        } else {
            returnDomain.setMess((String)map.get("mess"));
        }
        return returnDomain;
    }

    public TaxCommonReturnDomain DkfpSaveKjxx(ArmDkfpSaveKjxxAppDomain domain) throws Exception {
        ArmDkfpSaveKjxxReturnDomain returnDomain = new ArmDkfpSaveKjxxReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("sqdbh", domain.getSQDBH());
        map.put("kjFpdm", domain.getKJ_FPDM());
        map.put("kjFphnm", domain.getKJ_FPHM());
        map.put("kjFprq", domain.getKJ_FPRQ());
        map.put("kjGsSphm", domain.getKJ_GS_SPHM());
        map.put("kjGsSprq", domain.getKJ_GS_SPRQ());
        map.put("kjDsSphm", domain.getKJ_DS_SPHM());
        map.put("kjDsSprq", domain.getKJ_DS_SPRQ());
        map.put("slrDm", domain.getSLRDM());
        map.put("dzfs", domain.getDZFS());
        map.put("swjgDm", domain.getSWJG_DM());
        map.put("dwDM", domain.getDW_DM());
        map.put("wtdzXh", domain.getWTDZ_XH());
        map.put("kjfDm", domain.getKJFDM());
        map.put("kjfip", domain.getKJFIP());
        map.put("dkSwjgNsrsbh", domain.getDK_SWJG_NSRSBH());
        this.sqlMapClientTemplate.queryForObject("pWebjkArm1104SaveKjxx", map);
        String code = (String)map.get("code");
        returnDomain.setCode(code);
        if ("ISO".equalsIgnoreCase(WebConstants.DATABASE_ENCODE)) {
            returnDomain.setMess(HstEncodeUtil.ISO2GBK((String)map.get("mess")));
        } else {
            returnDomain.setMess((String)map.get("mess"));
        }
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain DkfpGetNsrBsyxx(DkfpGetNsrBsyxxAppDomain domain) throws Exception {
        DkfpGetNsrBsyxxReturnDomain returnDomain = new DkfpGetNsrBsyxxReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("nsrsbh", domain.getNSRSBH());
        this.sqlMapClientTemplate.queryForObjectByCurr("pWebjkArm1105GteNsrBsyxx", "dataList", map);
        String code = (String)map.get("code");
        returnDomain.setCode(code);
        if ("ISO".equalsIgnoreCase(WebConstants.DATABASE_ENCODE)) {
            returnDomain.setMess(HstEncodeUtil.ISO2GBK((String)map.get("mess")));
        } else {
            returnDomain.setMess((String)map.get("mess"));
        }
        List dataList = (List)map.get("dataList");
        returnDomain.setDataList(dataList);
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain DkfpJksSave(DkfpJksSaveAppDomain domain) throws Exception {
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("SQDBH", domain.getSQDBH());
        map.put("SLR_DM", domain.getSLR_DM());
        this.sqlMapClientTemplate.queryForObject("pWebjkArm1106DkfpJksave", map);
        String code = (String)map.get("code");
        returnDomain.setCode(code);
        if ("ISO".equalsIgnoreCase(WebConstants.DATABASE_ENCODE)) {
            returnDomain.setMess(HstEncodeUtil.ISO2GBK((String)map.get("mess")));
        } else {
            returnDomain.setMess((String)map.get("mess"));
        }
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain DkfpJksImport(DkfpJksImportAppDomain domain) throws Exception {
        DkfpJksImportReturnDomain returnDomain = new DkfpJksImportReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("SQDBH", domain.getSQDBH());
        map.put("SPZL_DM", domain.getSPZL_DM());
        map.put("PZZG_DM", domain.getPZZG_DM());
        map.put("SPHM", domain.getSPHM());
        map.put("SE", domain.getSE());
        map.put("SLR_DM", domain.getSLR_DM());
        map.put("SLR_PWD", domain.getSLR_PWD());
        this.sqlMapClientTemplate.queryForObjectByCurr("pWebjkArm1107DkfpJkSimport", "dataList", map);
        String code = (String)map.get("code");
        returnDomain.setCode(code);
        if ("ISO".equalsIgnoreCase(WebConstants.DATABASE_ENCODE)) {
            returnDomain.setMess(HstEncodeUtil.ISO2GBK((String)map.get("mess")));
        } else {
            returnDomain.setMess((String)map.get("mess"));
        }
        List dataList = (List)map.get("dataList");
        returnDomain.setDataList(dataList);
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain DkfpJksImportHxcl(String SQDBH, String DZSPHM, String BZ) throws Exception {
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("SQDBH", SQDBH);
        map.put("DZSPHM", DZSPHM);
        map.put("BZ", BZ);
        this.sqlMapClientTemplate.queryForObject("pWebjkArm1107DkfpJkSHxcl", map);
        String code = (String)map.get("code");
        returnDomain.setCode(code);
        if ("ISO".equalsIgnoreCase(WebConstants.DATABASE_ENCODE)) {
            returnDomain.setMess(HstEncodeUtil.ISO2GBK((String)map.get("mess")));
        } else {
            returnDomain.setMess((String)map.get("mess"));
        }
        return returnDomain;
    }

    @Transactional(propagation=Propagation.REQUIRED)
    public TaxCommonReturnDomain DkfpGetDsSpjc(ArmDkfpGetDsSpjcAppDomain domain) throws Exception {
        ArmDkfpGetDsSpjcReturnDomain returnDomain = new ArmDkfpGetDsSpjcReturnDomain();
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("KPR_DM", domain.getKPR_DM());
        map.put("DZFS", domain.getDZFS());
        map.put("SWJG_DM", domain.getSWJG_DM());
        map.put("DW_DM", domain.getDW_DM());
        map.put("WTDZ_XH", domain.getWTDZ_XH());
        this.sqlMapClientTemplate.queryForObjectByCurr("pWebjkArm1109GetDsspjc", "dataList", map);
        String code = (String)map.get("code");
        returnDomain.setCode(code);
        if ("ISO".equalsIgnoreCase(WebConstants.DATABASE_ENCODE)) {
            returnDomain.setMess(HstEncodeUtil.ISO2GBK((String)map.get("mess")));
        } else {
            returnDomain.setMess((String)map.get("mess"));
        }
        List dataList = (List)map.get("dataList");
        returnDomain.setDataList(dataList);
        return returnDomain;
    }
}
