From 7e47b8a74f69e532ad28c2ae2867f5b0cf056950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E6=88=90?= <2847920761@qq.com> Date: Tue, 28 Oct 2025 11:57:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=BD=E5=B7=A5=E4=BA=A7=E5=80=BC=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=AC=ACN=E5=91=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/OutConstructionValueRangeVo.java | 6 +++++ .../OutConstructionValueRangeServiceImpl.java | 26 ++++++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/out/domain/vo/OutConstructionValueRangeVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/out/domain/vo/OutConstructionValueRangeVo.java index 9d97a343..a304b323 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/out/domain/vo/OutConstructionValueRangeVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/out/domain/vo/OutConstructionValueRangeVo.java @@ -41,6 +41,12 @@ public class OutConstructionValueRangeVo implements Serializable { @ExcelProperty(value = "项目ID") private Long projectId; + /** + * 第N周 + */ + @ExcelProperty(value = "第N周") + private int week; + /** * 开始日期 */ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/out/service/impl/OutConstructionValueRangeServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/out/service/impl/OutConstructionValueRangeServiceImpl.java index 4c3ef4cc..31826829 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/out/service/impl/OutConstructionValueRangeServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/out/service/impl/OutConstructionValueRangeServiceImpl.java @@ -31,15 +31,15 @@ import org.dromara.progress.service.IPgsProgressPlanDetailService; import org.springframework.context.annotation.Lazy; import org.springframework.context.event.EventListener; import org.springframework.stereotype.Service; +import java.time.format.DateTimeFormatter; import java.math.BigDecimal; import java.math.RoundingMode; import java.time.DayOfWeek; import java.time.LocalDate; import java.time.temporal.TemporalAdjusters; -import java.util.Collection; -import java.util.List; -import java.util.Map; +import java.time.temporal.WeekFields; +import java.util.*; /** * 施工产值范围Service业务层处理 @@ -61,6 +61,22 @@ public class OutConstructionValueRangeServiceImpl extends ServiceImpl queryPageList(OutConstructionValueRangeBo bo, PageQuery pageQuery) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + //增加第N周 + result.getRecords().forEach(item -> { + item.setWeek(getCurrentWeekOfYear(item.getStartDate().toString())); + }); return TableDataInfo.build(result); }