diff --git a/ym-process-inspection/src/main/java/com/cnbm/processInspection/service/impl/InspectionSheetServiceImpl.java b/ym-process-inspection/src/main/java/com/cnbm/processInspection/service/impl/InspectionSheetServiceImpl.java index 6ff548f..0399913 100644 --- a/ym-process-inspection/src/main/java/com/cnbm/processInspection/service/impl/InspectionSheetServiceImpl.java +++ b/ym-process-inspection/src/main/java/com/cnbm/processInspection/service/impl/InspectionSheetServiceImpl.java @@ -39,10 +39,8 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.RequestBody; import javax.annotation.Resource; -import java.time.Instant; -import java.time.LocalDateTime; -import java.time.ZoneId; -import java.time.ZoneOffset; +import java.time.*; +import java.time.format.DateTimeFormatter; import java.util.*; import java.util.stream.Collectors; @@ -79,6 +77,12 @@ public class InspectionSheetServiceImpl extends CrudServiceImpl wrapper = new QueryWrapper<>(); + DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + if(params.get("startTime")!=null && params.get("endTime")!=null){ + LocalDateTime startTime = LocalDate.parse(params.get("startTime").toString(),df).atStartOfDay(); + LocalDateTime endTime = LocalDate.parse(params.get("endTime").toString(),df).atStartOfDay(); + wrapper.between(startTime!=null && endTime!=null,"create_time", startTime, endTime); + } wrapper.like(ObjectUtils.isNotNull(id), "id", id); wrapper.like(StringUtils.isNotBlank(inspectionSite), "inspection_stage", inspectionSite); wrapper.like(StringUtils.isNotBlank(orderNumber), "order_number", orderNumber);