Browse Source

风机绩效榜接口开发

xieshengjie 2 years ago
parent
commit
a1f9a8371a

+ 109 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/bmk/BenchmarkingController.java

@@ -0,0 +1,109 @@
+package com.gyee.runeconomy.controller.bmk;/*
+@author   谢生杰
+@date   2022/11/23-13:16
+*/
+
+import com.gyee.common.model.StringUtils;
+import com.gyee.common.vo.benchmark.FjjxbVo;
+import com.gyee.runeconomy.dto.R;
+import com.gyee.runeconomy.dto.response.EconHomePagePointRateDTO;
+import com.gyee.runeconomy.model.auto.ProBasicCompany;
+import com.gyee.runeconomy.model.auto.ProBasicLine;
+import com.gyee.runeconomy.model.auto.ProBasicPowerstation;
+import com.gyee.runeconomy.model.auto.ProBasicProject;
+import com.gyee.runeconomy.service.bmk.BenchmarkingService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@RestController
+@RequestMapping("//benchmarking")
+public class BenchmarkingController {
+
+    @Resource
+    private BenchmarkingService benchmarkingService;
+
+
+    @GetMapping(value = "/companys")
+    @ApiOperation(value = "公司列表", notes = "公司列表")
+    public R companys()  {
+        List<ProBasicCompany> resultList = benchmarkingService.companys();
+        if (StringUtils.isNotNull(resultList)) {
+            return R.ok().data(resultList);
+        } else {
+            return R.error().data("查询失败!");
+        }
+    }
+    @GetMapping(value = "/wpByCplist")
+    @ApiOperation(value = "场站列表", notes = "场站列表")
+    public R wpByCplist(@RequestParam(value = "companyids", required = true) String companyids)  {
+
+        List<ProBasicPowerstation> resultList = benchmarkingService.wpByCplist(companyids);
+        if (StringUtils.isNotNull(resultList)) {
+            return R.ok().data(resultList);
+        } else {
+            return R.error().data("查询失败!");
+        }
+    }
+    @GetMapping(value = "/pjByWplist")
+    @ApiOperation(value = "项目列表", notes = "项目列表")
+    public R pjByWplist(@RequestParam(value = "wpids", required = true) String wpids)  {
+
+        List<ProBasicProject> resultList = benchmarkingService.pjByWplist(wpids);
+        if (StringUtils.isNotNull(resultList)) {
+            return R.ok().data(resultList);
+        } else {
+            return R.error().data("查询失败!");
+        }
+    }
+
+    @GetMapping(value = "/lnByPjlist")
+    @ApiOperation(value = "线路列表", notes = "线路列表")
+    public R lnByPjlist(@RequestParam(value = "pjids", required = true) String pjids)  {
+
+        List<ProBasicLine> resultList = benchmarkingService.lnByPjlist(pjids);
+        if (StringUtils.isNotNull(resultList)) {
+            return R.ok().data(resultList);
+        } else {
+            return R.error().data("查询失败!");
+        }
+    }
+
+    @GetMapping(value = "/performance")
+    @ApiOperation(value = "风机绩效榜", notes = "风机绩效榜")
+    public R performance(@RequestParam(value = "companyid", required = true) String companyid,
+                             @RequestParam(value = "getype", required = true) String getype,
+                             @RequestParam(value = "sttype", required = true) String sttype,
+                             @RequestParam(value = "beginDate", required = true) String beginDate,
+                             @RequestParam(value = "endDate", required = true) String endDate,
+                             @RequestParam(value = "wpids", required = true) String wpids,
+                             @RequestParam(value = "projectids", required = true) String projectids,
+                             @RequestParam(value = "lineids", required = true) String lineids){
+        List<FjjxbVo> resultList = benchmarkingService.performance(companyid,getype,sttype,beginDate,endDate,wpids,projectids,lineids);
+        if (StringUtils.isNotNull(resultList)) {
+            return R.ok().data(resultList);
+        } else {
+            return R.error().data("查询失败!");
+        }
+    }
+
+    @GetMapping(value = "/performanceMX")
+    @ApiOperation(value = "风机绩效榜明细", notes = "风机绩效榜明细")
+    public R performanceMX(@RequestParam(value = "companyid", required = true) String companyid,
+                         @RequestParam(value = "getype", required = true) String getype,
+                         @RequestParam(value = "sttype", required = true) String sttype,
+                         @RequestParam(value = "beginDate", required = true) String beginDate,
+                         @RequestParam(value = "endDate", required = true) String endDate,
+                         @RequestParam(value = "wpids", required = true) String wpids,
+                         @RequestParam(value = "projectids", required = true) String projectids,
+                         @RequestParam(value = "lineids", required = true) String lineids){
+        List<FjjxbVo> resultList = benchmarkingService.performanceMX(companyid,getype,sttype,beginDate,endDate,wpids,projectids,lineids);
+        if (StringUtils.isNotNull(resultList)) {
+            return R.ok().data(resultList);
+        } else {
+            return R.error().data("查询失败!");
+        }
+    }
+ }