|
@@ -4,11 +4,9 @@ package com.gyee.benchmarkingimpala.controller;
|
|
|
import com.gyee.benchmarkingimpala.common.StringUtils;
|
|
|
import com.gyee.benchmarkingimpala.config.R;
|
|
|
import com.gyee.benchmarkingimpala.model.auto.*;
|
|
|
-import com.gyee.benchmarkingimpala.model.vo.FjjxbVo;
|
|
|
-import com.gyee.benchmarkingimpala.model.vo.FjjxbmxVo;
|
|
|
-import com.gyee.benchmarkingimpala.model.vo.Operation;
|
|
|
-import com.gyee.benchmarkingimpala.model.vo.WxsslVo;
|
|
|
+import com.gyee.benchmarkingimpala.model.vo.*;
|
|
|
import com.gyee.benchmarkingimpala.service.BenchmarkingService;
|
|
|
+import org.apache.poi.ss.formula.functions.T;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
@@ -79,6 +77,24 @@ public class BenchmarkingController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 根据场站查询
|
|
|
+ * 风机列表
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/wtList")
|
|
|
+ @ResponseBody
|
|
|
+ @CrossOrigin(origins = "*", maxAge = 3600)
|
|
|
+ public R wtList(@RequestParam(value = "wpid",required = true) String wpid){
|
|
|
+ List<Windturbine> resultList = benchmarkingService.wtList(wpid);
|
|
|
+
|
|
|
+ if (StringUtils.isNotNull(resultList)) {
|
|
|
+ return R.ok(resultList.size()).data(resultList);
|
|
|
+ }else{
|
|
|
+ return R.error().message("访问失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 风机绩效榜
|
|
|
* @param wpids
|
|
|
* @param projectids
|
|
@@ -96,9 +112,11 @@ public class BenchmarkingController {
|
|
|
@RequestParam(value = "lineids",required = true) String lineids,
|
|
|
@RequestParam(value = "beginDate",required = true) String beginDate,
|
|
|
@RequestParam(value = "endDate",required = true) String endDate,
|
|
|
- @RequestParam(value = "type",required = true) String type
|
|
|
+ @RequestParam(value = "type",required = true) String type,
|
|
|
+ @RequestParam(value = "target",required = true) String target,
|
|
|
+ @RequestParam(value = "sort",required = true) String sort
|
|
|
){
|
|
|
- List<FjjxbVo> resultList = benchmarkingService.fjjxb(wpids,projectids,lineids,beginDate,endDate,type);
|
|
|
+ List<FjjxbVo> resultList = benchmarkingService.fjjxb(wpids,projectids,lineids,beginDate,endDate,type,target,sort);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.ok(resultList.size()).data(resultList);
|
|
@@ -124,9 +142,11 @@ public class BenchmarkingController {
|
|
|
@RequestParam(value = "lineids",required = true) String lineids,
|
|
|
@RequestParam(value = "beginDate",required = true) String beginDate,
|
|
|
@RequestParam(value = "endDate",required = true) String endDate,
|
|
|
- @RequestParam(value = "type",required = true) String type
|
|
|
+ @RequestParam(value = "type",required = true) String type,
|
|
|
+ @RequestParam(value = "target",required = true) String target,
|
|
|
+ @RequestParam(value = "sort",required = true) String sort
|
|
|
){
|
|
|
- List<FjjxbmxVo> resultList = benchmarkingService.fjjxbmx(wpids,projectids,lineids,beginDate,endDate,type);
|
|
|
+ List<FjjxbmxVo> resultList = benchmarkingService.fjjxbmx(wpids,projectids,lineids,beginDate,endDate,type,target,sort);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.ok(resultList.size()).data(resultList);
|
|
@@ -151,9 +171,11 @@ public class BenchmarkingController {
|
|
|
@RequestParam(value = "projectids",required = true) String projectids,
|
|
|
@RequestParam(value = "lineids",required = true) String lineids,
|
|
|
@RequestParam(value = "beginDate",required = true) String beginDate,
|
|
|
- @RequestParam(value = "endDate",required = true) String endDate
|
|
|
+ @RequestParam(value = "endDate",required = true) String endDate,
|
|
|
+ @RequestParam(value = "target",required = true) String target,
|
|
|
+ @RequestParam(value = "sort",required = true) String sort
|
|
|
){
|
|
|
- List<WxsslVo> resultList = benchmarkingService.wxssl(wpids,projectids,lineids,beginDate,endDate);
|
|
|
+ List<WxsslVo> resultList = benchmarkingService.wxssl(wpids,projectids,lineids,beginDate,endDate,target,sort);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.ok(resultList.size()).data(resultList);
|
|
@@ -174,9 +196,11 @@ public class BenchmarkingController {
|
|
|
@CrossOrigin(origins = "*", maxAge = 3600)
|
|
|
public R cndb(@RequestParam(value = "wpid",required = true) String wpid,
|
|
|
@RequestParam(value = "beginDate",required = true) String beginDate,
|
|
|
- @RequestParam(value = "endDate",required = true) String endDate
|
|
|
+ @RequestParam(value = "endDate",required = true) String endDate,
|
|
|
+ @RequestParam(value = "target",required = true) String target,
|
|
|
+ @RequestParam(value = "sort",required = true) String sort
|
|
|
){
|
|
|
- List<WxsslVo> resultList = benchmarkingService.cndb(wpid,beginDate,endDate);
|
|
|
+ List<WxsslVo> resultList = benchmarkingService.cndb(wpid,beginDate,endDate,target,sort);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.ok(resultList.size()).data(resultList);
|
|
@@ -197,9 +221,11 @@ public class BenchmarkingController {
|
|
|
@CrossOrigin(origins = "*", maxAge = 3600)
|
|
|
public R cjdb(@RequestParam(value = "wpids",required = true) String wpids,
|
|
|
@RequestParam(value = "beginDate",required = true) String beginDate,
|
|
|
- @RequestParam(value = "endDate",required = true) String endDate
|
|
|
+ @RequestParam(value = "endDate",required = true) String endDate,
|
|
|
+ @RequestParam(value = "target",required = true) String target,
|
|
|
+ @RequestParam(value = "sort",required = true) String sort
|
|
|
){
|
|
|
- List<WxsslVo> resultList = benchmarkingService.cjdb(wpids,beginDate,endDate);
|
|
|
+ List<WxsslVo> resultList = benchmarkingService.cjdb(wpids,beginDate,endDate,target,sort);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.ok(resultList.size()).data(resultList);
|
|
@@ -222,9 +248,11 @@ public class BenchmarkingController {
|
|
|
public R xmdb(@RequestParam(value = "wpids",required = true) String wpids,
|
|
|
@RequestParam(value = "projectids",required = true) String projectids,
|
|
|
@RequestParam(value = "beginDate",required = true) String beginDate,
|
|
|
- @RequestParam(value = "endDate",required = true) String endDate
|
|
|
+ @RequestParam(value = "endDate",required = true) String endDate,
|
|
|
+ @RequestParam(value = "target",required = true) String target,
|
|
|
+ @RequestParam(value = "sort",required = true) String sort
|
|
|
){
|
|
|
- List<WxsslVo> resultList = benchmarkingService.xmdb(wpids,projectids,beginDate,endDate);
|
|
|
+ List<WxsslVo> resultList = benchmarkingService.xmdb(wpids,projectids,beginDate,endDate,target,sort);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.ok(resultList.size()).data(resultList);
|
|
@@ -249,9 +277,11 @@ public class BenchmarkingController {
|
|
|
@RequestParam(value = "projectids",required = true) String projectids,
|
|
|
@RequestParam(value = "lineids",required = true) String lineids,
|
|
|
@RequestParam(value = "beginDate",required = true) String beginDate,
|
|
|
- @RequestParam(value = "endDate",required = true) String endDate
|
|
|
+ @RequestParam(value = "endDate",required = true) String endDate,
|
|
|
+ @RequestParam(value = "target",required = true) String target,
|
|
|
+ @RequestParam(value = "sort",required = true) String sort
|
|
|
){
|
|
|
- List<WxsslVo> resultList = benchmarkingService.xldb(wpids,projectids,lineids,beginDate,endDate);
|
|
|
+ List<WxsslVo> resultList = benchmarkingService.xldb(wpids,projectids,lineids,beginDate,endDate,target,sort);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.ok(resultList.size()).data(resultList);
|
|
@@ -333,8 +363,101 @@ public class BenchmarkingController {
|
|
|
@CrossOrigin(origins = "*", maxAge = 3600)
|
|
|
public R details(@RequestParam(value = "id",required = true)String id,
|
|
|
@RequestParam(value = "beginDate",required = true)String beginDate,
|
|
|
- @RequestParam(value = "endDate",required = true)String endDate){
|
|
|
- List<WxsslVo> resultList = benchmarkingService.details(id,beginDate,endDate);
|
|
|
+ @RequestParam(value = "endDate",required = true)String endDate,
|
|
|
+ @RequestParam(value = "target",required = true) String target,
|
|
|
+ @RequestParam(value = "sort",required = true) String sort
|
|
|
+ ){
|
|
|
+ List<WxsslVo> resultList = benchmarkingService.details(id,beginDate,endDate,target,sort);
|
|
|
+
|
|
|
+ if (StringUtils.isNotNull(resultList)) {
|
|
|
+ return R.ok(resultList.size()).data(resultList);
|
|
|
+ }else{
|
|
|
+ return R.error().message("访问失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 日单机横向对比列表
|
|
|
+ * @param wpid
|
|
|
+ * @param wtids
|
|
|
+ * @param date
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/daydjhxdbtop")
|
|
|
+ @ResponseBody
|
|
|
+ @CrossOrigin(origins = "*", maxAge = 3600)
|
|
|
+ public R daydjhxdbtop(@RequestParam(value = "wpid",required = true)String wpid,
|
|
|
+ @RequestParam(value = "wtids",required = true)String wtids,
|
|
|
+ @RequestParam(value = "date",required = true)String date){
|
|
|
+ List<Object> resultList = benchmarkingService.daydjhxdbtop(wpid,wtids,date);
|
|
|
+
|
|
|
+ if (StringUtils.isNotNull(resultList)) {
|
|
|
+ return R.ok(resultList.size()).data(resultList);
|
|
|
+ }else{
|
|
|
+ return R.error().message("访问失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 月单机横向对比列表
|
|
|
+ * @param wpid
|
|
|
+ * @param wtids
|
|
|
+ * @param date
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/monthdjhxdbtop")
|
|
|
+ @ResponseBody
|
|
|
+ @CrossOrigin(origins = "*", maxAge = 3600)
|
|
|
+ public R monthdjhxdbtop(@RequestParam(value = "wpid",required = true)String wpid,
|
|
|
+ @RequestParam(value = "wtids",required = true)String wtids,
|
|
|
+ @RequestParam(value = "date",required = true)String date){
|
|
|
+ List<Object> resultList = benchmarkingService.monthdjhxdbtop(wpid,wtids,date);
|
|
|
+
|
|
|
+ if (StringUtils.isNotNull(resultList)) {
|
|
|
+ return R.ok(resultList.size()).data(resultList);
|
|
|
+ }else{
|
|
|
+ return R.error().message("访问失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 年单机横向对比列表
|
|
|
+ * @param wpid
|
|
|
+ * @param wtids
|
|
|
+ * @param date
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/yeardjhxdbtop")
|
|
|
+ @ResponseBody
|
|
|
+ @CrossOrigin(origins = "*", maxAge = 3600)
|
|
|
+ public R yeardjhxdbtop(@RequestParam(value = "wpid",required = true)String wpid,
|
|
|
+ @RequestParam(value = "wtids",required = true)String wtids,
|
|
|
+ @RequestParam(value = "date",required = true)String date){
|
|
|
+ List<Object> resultList = benchmarkingService.yeardjhxdbtop(wpid,wtids,date);
|
|
|
+
|
|
|
+ if (StringUtils.isNotNull(resultList)) {
|
|
|
+ return R.ok(resultList.size()).data(resultList);
|
|
|
+ }else{
|
|
|
+ return R.error().message("访问失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 日单机横向对比图
|
|
|
+ * @param wpid
|
|
|
+ * @param wtids
|
|
|
+ * @param date
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/djhxdbbottom")
|
|
|
+ @ResponseBody
|
|
|
+ @CrossOrigin(origins = "*", maxAge = 3600)
|
|
|
+ public R djhxdbbottom(@RequestParam(value = "wpid",required = true)String wpid,
|
|
|
+ @RequestParam(value = "wtids",required = true)String wtids,
|
|
|
+ @RequestParam(value = "date",required = true)String date){
|
|
|
+ List<Object> resultList = benchmarkingService.djhxdbbottom(wpid,wtids,date);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.ok(resultList.size()).data(resultList);
|