通用作业 检验时间
This commit is contained in:
父節點
445c7c0c3f
當前提交
3a583ac09f
@ -39,10 +39,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.Instant;
|
import java.time.*;
|
||||||
import java.time.LocalDateTime;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.time.ZoneOffset;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -79,6 +77,12 @@ public class InspectionSheetServiceImpl extends CrudServiceImpl<InspectionSheetM
|
|||||||
String batchNumber = (String) params.get("batchNumber");
|
String batchNumber = (String) params.get("batchNumber");
|
||||||
|
|
||||||
QueryWrapper<InspectionSheet> wrapper = new QueryWrapper<>();
|
QueryWrapper<InspectionSheet> 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(ObjectUtils.isNotNull(id), "id", id);
|
||||||
wrapper.like(StringUtils.isNotBlank(inspectionSite), "inspection_stage", inspectionSite);
|
wrapper.like(StringUtils.isNotBlank(inspectionSite), "inspection_stage", inspectionSite);
|
||||||
wrapper.like(StringUtils.isNotBlank(orderNumber), "order_number", orderNumber);
|
wrapper.like(StringUtils.isNotBlank(orderNumber), "order_number", orderNumber);
|
||||||
|
載入中…
新增問題並參考
Block a user