Commit b4b7cb7a1757a7ddfb36c1e0670ec8f4c5ae8a96

Authored by YunaiV
1 parent ccc3d1e4

✨ feat(mes): 优化 cal plan 的代码实现

yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/cal/plan/vo/MesCalPlanPageReqVO.java
@@ -34,10 +34,10 @@ public class MesCalPlanPageReqVO extends PageParam { @@ -34,10 +34,10 @@ public class MesCalPlanPageReqVO extends PageParam {
34 34
35 @Schema(description = "开始日期") 35 @Schema(description = "开始日期")
36 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) 36 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
37 - private LocalDateTime startDate; 37 + private LocalDateTime[] startDate;
38 38
39 @Schema(description = "结束日期") 39 @Schema(description = "结束日期")
40 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) 40 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
41 - private LocalDateTime endDate; 41 + private LocalDateTime[] endDate;
42 42
43 } 43 }
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/cal/plan/MesCalPlanMapper.java
@@ -22,8 +22,8 @@ public interface MesCalPlanMapper extends BaseMapperX<MesCalPlanDO> { @@ -22,8 +22,8 @@ public interface MesCalPlanMapper extends BaseMapperX<MesCalPlanDO> {
22 .eqIfPresent(MesCalPlanDO::getShiftType, reqVO.getShiftType()) 22 .eqIfPresent(MesCalPlanDO::getShiftType, reqVO.getShiftType())
23 .eqIfPresent(MesCalPlanDO::getStatus, reqVO.getStatus()) 23 .eqIfPresent(MesCalPlanDO::getStatus, reqVO.getStatus())
24 .eqIfPresent(MesCalPlanDO::getCalendarType, reqVO.getCalendarType()) 24 .eqIfPresent(MesCalPlanDO::getCalendarType, reqVO.getCalendarType())
25 - .geIfPresent(MesCalPlanDO::getStartDate, reqVO.getStartDate())  
26 - .leIfPresent(MesCalPlanDO::getEndDate, reqVO.getEndDate()) 25 + .betweenIfPresent(MesCalPlanDO::getStartDate, reqVO.getStartDate())
  26 + .betweenIfPresent(MesCalPlanDO::getEndDate, reqVO.getEndDate())
27 .orderByDesc(MesCalPlanDO::getId)); 27 .orderByDesc(MesCalPlanDO::getId));
28 } 28 }
29 29