|
@@ -1,9 +1,19 @@
|
|
|
package com.gyee.benchmarkingimpala.controller.auto;
|
|
|
|
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import com.gyee.benchmarkingimpala.common.StringUtils;
|
|
|
+import com.gyee.benchmarkingimpala.config.R;
|
|
|
+import com.gyee.benchmarkingimpala.model.auto.Benchmarkingbetween;
|
|
|
+import com.gyee.benchmarkingimpala.model.auto.Operationrecord;
|
|
|
+import com.gyee.benchmarkingimpala.service.auto.IOperationrecordService;
|
|
|
+import com.gyee.benchmarkingimpala.service.auto.impl.OperationrecordServiceImpl;
|
|
|
+import com.gyee.benchmarkingimpala.util.DateUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -16,5 +26,19 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
@RestController
|
|
|
@RequestMapping("//operationrecord")
|
|
|
public class OperationrecordController {
|
|
|
+ @Autowired
|
|
|
+ private OperationrecordServiceImpl operationrecordService;
|
|
|
+ @GetMapping("/czlb")
|
|
|
+ @ResponseBody
|
|
|
+ @CrossOrigin(origins = "*", maxAge = 3600)
|
|
|
+ public R czlb(@RequestParam(value = "WindPowerStation",required = true)String WindPowerStation,
|
|
|
+ @RequestParam( value ="wtid",required = false)String wtid,
|
|
|
+// @RequestParam(value = "type",required = false) String type,
|
|
|
+ @RequestParam(value = "beginDate",required = false) String beginDate,
|
|
|
+ @RequestParam(value = "endDate",required = true) String endDate){
|
|
|
+
|
|
|
+ List<Map> Map = operationrecordService.listBy(WindPowerStation,wtid,DateUtils.parseDate(beginDate),DateUtils.parseDate(endDate));
|
|
|
+ return R.ok(Map.size()).data(Map);
|
|
|
+ }
|
|
|
|
|
|
}
|