|
@@ -12,6 +12,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
12
|
12
|
import org.springframework.web.bind.annotation.*;
|
13
|
13
|
|
14
|
14
|
import java.text.ParseException;
|
|
15
|
+import java.time.LocalDate;
|
|
16
|
+import java.time.LocalDateTime;
|
|
17
|
+import java.time.format.DateTimeFormatter;
|
15
|
18
|
import java.util.List;
|
16
|
19
|
import java.util.Map;
|
17
|
20
|
|
|
@@ -57,6 +60,15 @@ public class AoidSinglegtYieldController {
|
57
|
60
|
@ApiOperation(value = "根据井号和日期时间段查询量液的基本信息--分页" ,notes = "根据井号和日期时间段查询量液的基本信息--分页")
|
58
|
61
|
@PostMapping("/getAoidSinglegtYieldInfoByPages")
|
59
|
62
|
public Result getAoidSinglegtYieldInfoByWellIdAndPorDatePeriodAndPages(@RequestBody AoidYeildVo aoidYeildVo) throws ParseException {
|
|
63
|
+ String datePattern = "\\d{4}-\\d{1,2}-\\d{1,2}";
|
|
64
|
+ if(aoidYeildVo.getStartDate()==null){
|
|
65
|
+ LocalDate now = LocalDate.now();
|
|
66
|
+ aoidYeildVo.setStartDate(now.format(DateTimeFormatter.ISO_DATE));
|
|
67
|
+ aoidYeildVo.setEndDate(now.plusDays(1).format(DateTimeFormatter.ISO_DATE));
|
|
68
|
+ }
|
|
69
|
+ if (aoidYeildVo.getStartDate()==null||aoidYeildVo.getEndDate()==null ||!aoidYeildVo.getStartDate().matches(datePattern) || !aoidYeildVo.getEndDate().matches(datePattern))
|
|
70
|
+ return Result.error("日期格式有误");
|
|
71
|
+
|
60
|
72
|
Page<Map<String,Object>> mapPage = aoidSinglegtYieldService.getAoidSinglegtYieldInfoByWellIdAndPorDatePeriodAndPages(
|
61
|
73
|
aoidYeildVo.getWellId(),
|
62
|
74
|
aoidYeildVo.getStartDate(),
|