Commit 89b6bb5c66ca3d2ed85f01e5d740bcde183b0d86
1 parent
9bac7a5e
feature(*): 时间处理
时间处理
Showing
2 changed files
with
8 additions
and
4 deletions
fw-morax-domain/src/main/java/cn/fw/morax/domain/dto/query/EvalIndicatorImportQueryDTO.java
... | ... | @@ -27,12 +27,12 @@ public class EvalIndicatorImportQueryDTO extends BasePageQuery { |
27 | 27 | /** |
28 | 28 | * 开始导入时间 |
29 | 29 | */ |
30 | - private LocalDateTime startTime; | |
30 | + private LocalDate startTime; | |
31 | 31 | |
32 | 32 | /** |
33 | 33 | * 结束导入时间 |
34 | 34 | */ |
35 | - private LocalDateTime endTime; | |
35 | + private LocalDate endTime; | |
36 | 36 | |
37 | 37 | /** |
38 | 38 | * 集团id | ... | ... |
fw-morax-service/src/main/java/cn/fw/morax/service/biz/eval/EvalIndicatorReportService.java
... | ... | @@ -34,6 +34,8 @@ import javax.servlet.http.HttpServletResponse; |
34 | 34 | import java.io.IOException; |
35 | 35 | import java.math.BigDecimal; |
36 | 36 | import java.time.LocalDate; |
37 | +import java.time.LocalDateTime; | |
38 | +import java.time.LocalTime; | |
37 | 39 | import java.time.YearMonth; |
38 | 40 | import java.time.format.DateTimeFormatter; |
39 | 41 | import java.util.*; |
... | ... | @@ -77,12 +79,14 @@ public class EvalIndicatorReportService { |
77 | 79 | * @return |
78 | 80 | */ |
79 | 81 | public AppPage<EvalIndicatorImportRecordVO> importPage(EvalIndicatorImportQueryDTO dto) { |
82 | + LocalDateTime startTime = LocalDateTime.of(dto.getStartTime(), LocalTime.MIN); | |
83 | + LocalDateTime endTime = LocalDateTime.of(dto.getStartTime(), LocalTime.MAX); | |
80 | 84 | PageData<EvalIndicatorImportRecord> pageData = evalIndicatorImportRecordService.page(new PageData<>(dto.getCurrent(), dto.getPageSize()), |
81 | 85 | Wrappers.<EvalIndicatorImportRecord>lambdaQuery() |
82 | 86 | .eq(PublicUtil.isNotEmpty(dto.getUserId()), EvalIndicatorImportRecord::getImportUserId, dto.getUserId()) |
83 | 87 | .eq(PublicUtil.isNotEmpty(dto.getIndicatorCode()), EvalIndicatorImportRecord::getIndicatorCode, dto.getIndicatorCode()) |
84 | - .ge(PublicUtil.isNotEmpty(dto.getStartTime()), EvalIndicatorImportRecord::getCreateTime, dto.getStartTime()) | |
85 | - .le(PublicUtil.isNotEmpty(dto.getEndTime()), EvalIndicatorImportRecord::getCreateTime, dto.getEndTime()) | |
88 | + .ge(PublicUtil.isNotEmpty(startTime), EvalIndicatorImportRecord::getCreateTime, startTime) | |
89 | + .le(PublicUtil.isNotEmpty(endTime), EvalIndicatorImportRecord::getCreateTime, endTime) | |
86 | 90 | .eq(EvalIndicatorImportRecord::getYn, Boolean.TRUE) |
87 | 91 | .orderByDesc(EvalIndicatorImportRecord::getCreateTime) |
88 | 92 | ); | ... | ... |