| | |
| | | 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; |
| | |
| | | * @author ruoyi |
| | | * @date 2024-03-13 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ServiceFundtaxServiceImpl extends ServiceImpl<ServiceFundtaxMapper, ServiceFundtax> implements IServiceFundtaxService { |
| | | |
| | |
| | | } |
| | | if (serviceFundtax.getTaxamount() != null) { |
| | | wrappers.eq(ServiceFundtax::getTaxamount, serviceFundtax.getTaxamount()); |
| | | } |
| | | if (serviceFundtax.getIstax() != null) { |
| | | wrappers.eq(ServiceFundtax::getIstax, serviceFundtax.getIstax()); |
| | | } |
| | | if (serviceFundtax.getMedicalcost() != null) { |
| | | wrappers.eq(ServiceFundtax::getMedicalcost, serviceFundtax.getMedicalcost()); |
| | |
| | | @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("该批数据不能算税"); |
| | | } |