Forráskód Böngészése

1.巡检计划修改 查询条件 时间区间 由date格式改为string

wanghs 2 éve
szülő
commit
8836984cc5

+ 9 - 3
warning-web/src/main/java/com/gyee/wisdom/alarm/sharding/controller/InspectOrderController.java

@@ -3,9 +3,11 @@ package com.gyee.wisdom.alarm.sharding.controller;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.gyee.wisdom.alarm.sharding.biz.InspectOrderBiz;
 import com.gyee.wisdom.alarm.sharding.model.InspectOrderDto;
+import com.gyee.wisdom.alarm.sharding.util.DateUtils;
 import com.gyee.wisdom.alarm.sharding.util.ResponseWrapper;
 import com.gyee.wisdom.alarm.sharding.util.TokenUtil;
 import com.gyee.wisdom.alarm.sharding.util.UserLoginToken;
+import com.gyee.wisdom.common.utils.DateUtil;
 import io.jsonwebtoken.Claims;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
@@ -40,13 +42,17 @@ public class InspectOrderController {
             @Parameter(name = "pagesize", description = "分页大小") @RequestParam(value = "pagesize", required = true) Integer pageSize,
             @Parameter(name = "step", description = "节点 1-待审核,2-已审核,3-未计划,4-已计划,5-未巡检,6-已巡检") @RequestParam(value = "step", required = false) Optional<Integer> step,
             @Parameter(name = "windturbineId", description = "风机编号") @RequestParam(value = "windturbineId", required = false) String windturbineId,
-            @Parameter(name = "startTime", description = "起始时间") @RequestParam(value = "startTime", required = false) Date startTime,
-            @Parameter(name = "endTime", description = "结束时间") @RequestParam(value = "endTime", required = false) Date endTime
+            @Parameter(name = "startTime", description = "起始时间") @RequestParam(value = "startTime", required = false) String startTime,
+            @Parameter(name = "endTime", description = "结束时间") @RequestParam(value = "endTime", required = false) String endTime
 
     ) {
 
         ResponseWrapper wrapper = null;
-        IPage<InspectOrderDto> inspectOrderDtoPage = inspectOrderBiz.getInspectOrderDtoPage(pageNum, pageSize, windturbineId, step, startTime, endTime);
+
+        Date dateStart = DateUtils.parseDate(startTime);
+        Date dateEnd = DateUtils.parseDate(endTime);
+
+        IPage<InspectOrderDto> inspectOrderDtoPage = inspectOrderBiz.getInspectOrderDtoPage(pageNum, pageSize, windturbineId, step, dateStart, dateEnd);
 
         wrapper = new ResponseWrapper<>().success("请求成功", inspectOrderDtoPage);
         return wrapper;