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); }