From c534dd9a5d0eb45b0c451d4ad6966be8c7fb1f44 Mon Sep 17 00:00:00 2001 From: winter Date: Sat, 31 Aug 2024 13:43:36 +0800 Subject: [PATCH] fix --- .../iformall/service/impl/WxRentContractServiceImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java index 66d092f93..0821d301d 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -100,6 +100,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import javax.servlet.http.HttpServletRequest; @@ -2451,7 +2452,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { return bs; } - + @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) @Override public WxRentContractRevenueSetSalesVo setRevenueSales(WxRentContract rentcontract, String sales, Long billId, Long propertyContractId) { //如果账单存在缴费,付款,减免,冲抵,等情况,则不允许。 @@ -2840,12 +2841,15 @@ public class WxRentContractServiceImpl implements WxRentContractService { wxRentContractRevenueSalesMapper.updateConfirm(sales); } + @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) @Override public WxRentContractYearsSumVo calcuteYearsRevenueRentUp(WxRentContract rentcontract) { //查询销售总数 WxRentContractRevenueSales rsq = new WxRentContractRevenueSales(); rsq.updateTenantInfo(rentcontract); rsq.setRentContractId(rentcontract.getId()); + rsq.setStarttime(rentcontract.getYearsBegin()); + rsq.setEndtime(rentcontract.getYearsEnd()); BigDecimal sum = wxRentContractRevenueSalesMapper.findSumSalesMoneyValid(rsq); if (null == sum || sum.compareTo(new BigDecimal(0)) <= 0 ) { WxRentContractYearsSumVo vo = new WxRentContractYearsSumVo(); @@ -2854,7 +2858,8 @@ public class WxRentContractServiceImpl implements WxRentContractService { vo.setBillReceivePay("0"); return vo; } - + //更新已计算 + wxRentContractRevenueSalesMapper.updateCalcute(rsq); //如果有账单已经缴费或者付款,扣减,减免,冲抵等,则不允许操作。 WxAllBill billd = new WxAllBill();