liusheng
2024-03-20 d91dfa2b823f6644f1e58dd4770f57e0d0cef08f
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFunddetailServiceImpl.java
@@ -16,6 +16,7 @@
import com.ruoyi.project.domain.*;
import com.ruoyi.project.domain.vo.*;
import com.ruoyi.project.mapper.ServiceFundMapper;
import com.ruoyi.project.mapper.SpStatBonusMapper;
import lombok.extern.flogger.Flogger;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
@@ -46,6 +47,9 @@
    @Autowired
    ServiceFundMapper serviceFundMapper;
    @Autowired
    SpStatBonusMapper spStatBonusMapper;
    /**
@@ -282,6 +286,7 @@
        List<ServiceFunddetail> temporarySave = new ArrayList<>();
        //保存总税前金额(用于更新fund表里的)
        BigDecimal pretaxcost = BigDecimal.valueOf(0.00);
        BigDecimal taxedcost = BigDecimal.valueOf(0.00);
        for (ServiceFunddetail serviceFunddetail : serviceFunddetails) {
            if (StringUtils.isEmpty(serviceFunddetail.getIdcardno())) {
                logger.info("serviceFunddetail数据入参 : {}", serviceFunddetail);
@@ -293,6 +298,7 @@
                }
                //公司的申请金额也要加进去
                pretaxcost = pretaxcost.add(BigDecimal.valueOf(serviceFunddetail.getAmount()));
                taxedcost = taxedcost.add(BigDecimal.valueOf(serviceFunddetail.getTaxedamount()));
                serviceFunddetail.setTaxamount(0.0);
                logger.info("serviceFunddetail更新后的数据 : {}", serviceFunddetail);
@@ -369,6 +375,7 @@
                // 将该条数据更新
                boolean b = this.updateById(serviceFunddetail3);
                pretaxcost = pretaxcost.add(BigDecimal.valueOf(serviceFunddetail.getAmount()));
                taxedcost = taxedcost.add(BigDecimal.valueOf(serviceFunddetail.getTaxedamount()));
                // 把该数据,放到临时的集合中
                temporarySave.add(serviceFunddetail3);
            } else if (serviceFunddetail.getServicesscopename().contains("税后")) {
@@ -399,12 +406,14 @@
                // 将该条数据更新
                updateById(serviceFunddetail3);
                pretaxcost = pretaxcost.add(BigDecimal.valueOf(serviceFunddetail3.getAmount()));
                taxedcost = taxedcost.add(BigDecimal.valueOf(serviceFunddetail3.getTaxedamount()));
                // 把该数据,放到临时的集合中
                temporarySave.add(serviceFunddetail3);
            }
        }
        ServiceFund serviceFund = new ServiceFund();
        serviceFund.setPretaxcost(pretaxcost.doubleValue());
        serviceFund.setTaxedcost(taxedcost.doubleValue());
        serviceFund.setId(serviceFunddetails.get(0).getFundid());
        if (ObjectUtils.isEmpty(serviceFund1.getFundtaxtime())) {
            serviceFund.setFundtaxtime(new Date());
@@ -476,6 +485,6 @@
    @Override
    public List<SpStatBonus> getListBySpStatBonus(SpStatBonusReq spStatBonusReq) {
        return serviceFunddetailMapper.getListBySpStatBonus(spStatBonusReq.getPabegtime(), spStatBonusReq.getPaendtime(), spStatBonusReq.getPadeptno(), spStatBonusReq.getPauserno(), spStatBonusReq.getPabonustype());
        return spStatBonusMapper.getListBySpStatBonus(spStatBonusReq.getPabegtime(), spStatBonusReq.getPaendtime(), spStatBonusReq.getPadeptno(), spStatBonusReq.getPausername(), spStatBonusReq.getPabonustype());
    }
}