diff --git a/src/main/java/com/biutag/supervision/pojo/param/SuperviseReportQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/SuperviseReportQueryParam.java index 1647c67..3720ae6 100644 --- a/src/main/java/com/biutag/supervision/pojo/param/SuperviseReportQueryParam.java +++ b/src/main/java/com/biutag/supervision/pojo/param/SuperviseReportQueryParam.java @@ -1,7 +1,13 @@ package com.biutag.supervision.pojo.param; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Getter; import lombok.Setter; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; @Setter @Getter @@ -16,4 +22,8 @@ public class SuperviseReportQueryParam extends BasePage{ private String deptId; private Integer type; + + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private List crtTime = new ArrayList<>(); } diff --git a/src/main/java/com/biutag/supervision/service/SuperviseReportService.java b/src/main/java/com/biutag/supervision/service/SuperviseReportService.java index c604883..cebf20a 100644 --- a/src/main/java/com/biutag/supervision/service/SuperviseReportService.java +++ b/src/main/java/com/biutag/supervision/service/SuperviseReportService.java @@ -57,6 +57,9 @@ public class SuperviseReportService extends ServiceImpl orgIds = departService.getAllNodeIds(queryParam.getDeptId()); queryWrapper.in("t.crt_depart_id", orgIds); } + if (CollectionUtil.isNotEmpty(queryParam.getCrtTime())){ + queryWrapper.between("t.crt_time", queryParam.getCrtTime().get(0), queryParam.getCrtTime().get(1)); + } //查询条件 queryWrapper .eq(Objects.nonNull(queryParam.getType()), "t.type", queryParam.getType())