Browse Source

fix--通报管理加上创建时间查询

master
parent
commit
ac7e7c6fae
  1. 10
      src/main/java/com/biutag/supervision/pojo/param/SuperviseReportQueryParam.java
  2. 3
      src/main/java/com/biutag/supervision/service/SuperviseReportService.java

10
src/main/java/com/biutag/supervision/pojo/param/SuperviseReportQueryParam.java

@ -1,7 +1,13 @@
package com.biutag.supervision.pojo.param; package com.biutag.supervision.pojo.param;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Setter @Setter
@Getter @Getter
@ -16,4 +22,8 @@ public class SuperviseReportQueryParam extends BasePage{
private String deptId; private String deptId;
private Integer type; private Integer type;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private List<Date> crtTime = new ArrayList<>();
} }

3
src/main/java/com/biutag/supervision/service/SuperviseReportService.java

@ -57,6 +57,9 @@ public class SuperviseReportService extends ServiceImpl<SuperviseReportMapper, S
List<String> orgIds = departService.getAllNodeIds(queryParam.getDeptId()); List<String> orgIds = departService.getAllNodeIds(queryParam.getDeptId());
queryWrapper.in("t.crt_depart_id", orgIds); 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 queryWrapper
.eq(Objects.nonNull(queryParam.getType()), "t.type", queryParam.getType()) .eq(Objects.nonNull(queryParam.getType()), "t.type", queryParam.getType())

Loading…
Cancel
Save