liusheng
2024-07-29 fbf5402f03820ebc702871fc4c4933c024ff3087
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundtaxServiceImpl.java
@@ -14,6 +14,7 @@
import com.ruoyi.project.service.IServiceFundService;
import com.ruoyi.project.service.IServiceFunddetailService;
import com.ruoyi.project.service.IServiceFundtaxService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -26,6 +27,7 @@
 * @author ruoyi
 * @date 2024-03-13
 */
@Slf4j
@Service
public class ServiceFundtaxServiceImpl extends ServiceImpl<ServiceFundtaxMapper, ServiceFundtax> implements IServiceFundtaxService {
@@ -158,11 +160,13 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public Boolean batchFundTax(FundTaxVO fundTaxVO) {
        log.info("批量算税的fundTaxVO入参为:{}", fundTaxVO);
        if (fundTaxVO.getFundTaxId() == null) {
            throw new BaseException("分批算税出问题了,请检查后再进行计算");
        }
        if (fundTaxVO.getAddOrupdate() == 1) {
            Integer maxFundTaxId = serviceFundtaxMapper.getMaxFundTaxId();
            log.info("批量算税的maxFundTaxId为:{}", maxFundTaxId);
            if (fundTaxVO.getFundTaxId() != maxFundTaxId.longValue()) {
                throw new BaseException("该批数据不能算税");
            }