总体计划成本接口修改

This commit is contained in:
2025-12-12 11:15:52 +08:00
parent 29cdd7b3e7
commit e3b6c3d8d6

View File

@ -226,18 +226,21 @@ public class XzdCbysZjhcbServiceImpl extends ServiceImpl<XzdCbysZjhcbMapper, Xzd
totalTaxAmount = totalTaxAmount.add(taxAmount); totalTaxAmount = totalTaxAmount.add(taxAmount);
totalTaxExclAmount = totalTaxExclAmount.add(taxExclAmount); totalTaxExclAmount = totalTaxExclAmount.add(taxExclAmount);
} }
if (totalTaxInclAmount.compareTo(update.getTotalTaxInclAmount()) != 0){ BigDecimal totalTaxInclAmount1 = totalTaxInclAmount.setScale(4, RoundingMode.HALF_UP);
BigDecimal totalTaxAmount1 = totalTaxAmount.setScale(4, RoundingMode.HALF_UP);
BigDecimal totalTaxExclAmount1 = totalTaxExclAmount.setScale(4, RoundingMode.HALF_UP);
if (totalTaxInclAmount1.compareTo(update.getTotalTaxInclAmount()) != 0){
throw new ServiceException("含税金额不一致"); throw new ServiceException("含税金额不一致");
} }
if (totalTaxAmount.compareTo(update.getTotalTaxAmount()) != 0){ if (totalTaxAmount1.compareTo(update.getTotalTaxAmount()) != 0){
throw new ServiceException("税额不一致"); throw new ServiceException("税额不一致");
} }
if (totalTaxExclAmount.compareTo(update.getTotalTaxExclAmount()) != 0){ if (totalTaxExclAmount1.compareTo(update.getTotalTaxExclAmount()) != 0){
throw new ServiceException("不含税金额不一致"); throw new ServiceException("不含税金额不一致");
} }
update.setTotalTaxInclAmount(totalTaxInclAmount.setScale(4, RoundingMode.HALF_UP)); update.setTotalTaxInclAmount(totalTaxInclAmount1);
update.setTotalTaxAmount(totalTaxAmount.setScale(4, RoundingMode.HALF_UP)); update.setTotalTaxAmount(totalTaxAmount1);
update.setTotalTaxExclAmount(totalTaxExclAmount.setScale(4, RoundingMode.HALF_UP)); update.setTotalTaxExclAmount(totalTaxExclAmount1);
Boolean b = limitListService.updateByBo(bo.getBos()); Boolean b = limitListService.updateByBo(bo.getBos());
} }
return baseMapper.updateById(update) > 0; return baseMapper.updateById(update) > 0;