From 808b89b332762278d61374b03e78184eae62b4c6 Mon Sep 17 00:00:00 2001 From: syruan <321359594@qq.com> Date: Fri, 24 Jan 2025 17:58:58 +0800 Subject: [PATCH] =?UTF-8?q?i=E7=9A=96=E9=80=81=E6=8E=A8=E9=80=81=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E5=88=86=E9=A1=B5,=E5=AE=8C=E5=96=84=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=A0=87=E8=AE=B0=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/push/controller/IwsCostPushController.java | 4 ++-- .../push/service/impl/IwsCostPushServiceImpl.java | 8 ++++++-- .../resources/mapper/material/push/IwsCostPushMapper.xml | 4 +++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/controller/IwsCostPushController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/controller/IwsCostPushController.java index 3b8fc1f3..6b100cf1 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/controller/IwsCostPushController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/controller/IwsCostPushController.java @@ -62,9 +62,9 @@ public class IwsCostPushController extends BaseController { * @param obj 查询条件 */ @GetMapping("/getCostPushCheckList") - @ApiOperation("查询费用推送审核列表--分页") + @ApiOperation("查询费用推送审核列表--不分页") public TableDataInfo getCostPushCheckList(IwsCostPushBean obj) { - startPage(); + //startPage(); 取消分页 List list = iwsCostPushService.getCostPushCheckList(obj); return getDataTable(list); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/service/impl/IwsCostPushServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/service/impl/IwsCostPushServiceImpl.java index 6dccb012..3b43778f 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/service/impl/IwsCostPushServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/service/impl/IwsCostPushServiceImpl.java @@ -11,6 +11,7 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.math.BigDecimal; +import java.math.RoundingMode; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; @@ -76,7 +77,7 @@ public class IwsCostPushServiceImpl implements IwsCostPushService { // 清除旧的费用计算数据 // cleanSameMonthOldRecords(record); - // 插入新的当前月份记录,并生成 + // 插入新的当前月份记录,并生成id iwsCostPushMapper.insertCalcMonthRecord(costDto); String taskId = costDto.getId(); @@ -143,10 +144,13 @@ public class IwsCostPushServiceImpl implements IwsCostPushService { // 计算费用 leaseCostInfo.setLeaseMoney(new BigDecimal(leaseCostInfo.getLeaseDays()) .multiply(new BigDecimal(leaseCostInfo.getLeasePrice())) - .multiply(leaseCostInfo.getLeaseNum()) + .multiply(leaseCostInfo.getLeaseNum()).setScale(2, RoundingMode.HALF_UP) ); } + + // 删除标记的非期间段数据 + theMonthAgreementLeaseList.removeIf(IwsCostPushBean::isDelFlag); return theMonthAgreementLeaseList; } } diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/push/IwsCostPushMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/push/IwsCostPushMapper.xml index c78fd5b4..a25747fc 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/push/IwsCostPushMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/push/IwsCostPushMapper.xml @@ -98,6 +98,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN slt_agreement_info sai ON bma.agreement_id = sai.agreement_id LEFT JOIN ma_type mt ON mt.type_id = sai.type_id LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id - where bma.agreement_id = #{agreementId} + + bma.agreement_id = #{agreementId} + \ No newline at end of file