/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  org.springframework.beans.factory.annotation.Autowired
 *  org.springframework.stereotype.Service
 */
package com.hst.taxService.service.imp;

import com.hst.common.domain.TaxCommonReturnDomain;
import com.hst.common.service.imp.BaseBusinessServiceImp;
import com.hst.framework.constants.AppServiceConstants;
import com.hst.framework.constants.WebConstants;
import com.hst.taxService.dao.TaxCtais2AppDao;
import com.hst.taxService.dao.TaxFpyjAppDao;
import com.hst.taxService.dao.imp.TaxCtais2FpyjAppDaoImp;
import com.hst.taxService.domain.TaxFpyjDomain;
import com.hst.taxService.domain.ctais2.FpyjAppDomain;
import com.hst.taxService.domain.ctais2.FpyjDomain;
import com.hst.taxService.service.TaxFpyjAppService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TaxFpyjAppServiceImp
extends BaseBusinessServiceImp
implements TaxFpyjAppService {
    @Autowired
    private TaxFpyjAppDao dao;
    private TaxCtais2AppDao yjdao;

    @Override
    public TaxCommonReturnDomain doFpyj() throws Exception {
        List<TaxFpyjDomain> nsrList = this.dao.selectFpyjNsrsbhList();
        for (TaxFpyjDomain dom : nsrList) {
            List<FpyjDomain> dataList = this.dao.queryFpyjsqList(dom.getWsDjhzXh());
            FpyjAppDomain domain = new FpyjAppDomain();
            domain.setNsrsbh(dom.getNsrsbh());
            domain.setCllx("01");
            domain.setDataList(dataList);
            TaxCommonReturnDomain returnDomain = ((TaxCtais2FpyjAppDaoImp)this.getDao("ctais2.Fpyj")).queryEjb(domain);
            this.dao.updateFpyjMess(dom.getWsDjhzXh(), returnDomain.getMess());
        }
        return null;
    }

    public TaxCtais2AppDao getDao(String ywId) {
        this.yjdao = (TaxCtais2AppDao)WebConstants.WEB_APP_CONTEXT.getBean(AppServiceConstants.HST_DAO_MAP.get(ywId));
        return this.yjdao;
    }
}
