liusheng
2024-03-15 4c42cd3d556ea72d70ea43a734cc38acd6b81e74
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;
    /**
@@ -98,6 +102,12 @@
        }
        if (serviceFunddetail.getDel_flag() != null) {
            wrappers.eq(ServiceFunddetail::getDel_flag, serviceFunddetail.getDel_flag());
        }
        if (serviceFunddetail.getDeptId() != null) {
            wrappers.eq(ServiceFunddetail::getDeptId, serviceFunddetail.getDeptId());
        }
        if (serviceFunddetail.getDeptName() != null) {
            wrappers.eq(ServiceFunddetail::getDeptName, serviceFunddetail.getDeptName());
        }
        return this.list(wrappers);
    }
@@ -274,7 +284,6 @@
        //用于临时保存已经算好的"费用详情数据"
        List<ServiceFunddetail> temporarySave = new ArrayList<>();
        //保存总税前金额(用于更新fund表里的)
        BigDecimal pretaxcost = BigDecimal.valueOf(0.00);
        for (ServiceFunddetail serviceFunddetail : serviceFunddetails) {
@@ -286,6 +295,9 @@
                } else {
                    serviceFunddetail.setAmount(serviceFunddetail.getTaxedamount());
                }
                //公司的申请金额也要加进去
                pretaxcost = pretaxcost.add(BigDecimal.valueOf(serviceFunddetail.getAmount()));
                serviceFunddetail.setTaxamount(0.0);
                logger.info("serviceFunddetail更新后的数据 : {}", serviceFunddetail);
                boolean b = this.updateById(serviceFunddetail);
@@ -465,4 +477,9 @@
        return map;
    }
    @Override
    public List<SpStatBonus> getListBySpStatBonus(SpStatBonusReq spStatBonusReq) {
        return spStatBonusMapper.getListBySpStatBonus(spStatBonusReq.getPabegtime(), spStatBonusReq.getPaendtime(), spStatBonusReq.getPadeptno(), spStatBonusReq.getPausername(), spStatBonusReq.getPabonustype());
    }
}