|
@@ -0,0 +1,388 @@
|
|
|
+package com.gyee.consumer.controller.benching;
|
|
|
+
|
|
|
+import com.gyee.common.config.R;
|
|
|
+import com.gyee.common.model.StringUtils;
|
|
|
+import com.gyee.common.util.RandomUtil;
|
|
|
+import com.gyee.common.util.SortUtils;
|
|
|
+import com.gyee.common.vo.algorithm.LineParameters;
|
|
|
+import com.gyee.common.vo.benchmark.Operation;
|
|
|
+import com.gyee.common.vo.benchmark.WxsslVo;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.client.RestTemplate;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : BenchmarkingController
|
|
|
+ * @Author : xieshengjie
|
|
|
+ * @Date: 2021/11/17 14:28
|
|
|
+ * @Description : 对标管理消费
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+public class BenchmarkingController {
|
|
|
+
|
|
|
+ @Value("${url.benchmaring}")
|
|
|
+ private String BENCHMARKING_URL;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private RestTemplate restTemplate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 场站列表
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/consumer/benchmarking/wplist")
|
|
|
+ public R wplist(){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/wplist",R.class);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 光伏场站列表
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/consumer/benchmarking/wpgflist")
|
|
|
+ public R wpGFlist(){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/wpgflist",R.class);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据场站查询期次
|
|
|
+ * @param wpids
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/consumer/benchmarking/projectList")
|
|
|
+ public R projectList(@RequestParam(value = "wpids",required = true) String wpids){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/projectList?wpids="+wpids,R.class);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据期次查询线路
|
|
|
+ * @param projects
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/consumer/benchmarking/lineList")
|
|
|
+ public R lineList(@RequestParam(value = "projects",required = true) String projects){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/lineList?projects="+projects,R.class);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据场站查询风机
|
|
|
+ * @param wpid
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/consumer/benchmarking/wtList")
|
|
|
+ public R wtList(@RequestParam(value = "wpid",required = true) String wpid){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/wtList?wpid="+wpid,R.class);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 风机绩效榜
|
|
|
+ * @param wpids
|
|
|
+ * @param projectids
|
|
|
+ * @param lineids
|
|
|
+ * @param beginDate
|
|
|
+ * @param endDate
|
|
|
+ * @param type
|
|
|
+ * @param target
|
|
|
+ * @param sort
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/consumer/benchmarking/fjjxb")
|
|
|
+ public R fjjxb(@RequestParam(value = "wpids",required = true) String wpids,
|
|
|
+ @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 = "type",required = true) String type,
|
|
|
+ @RequestParam(value = "target",required = true) String target,
|
|
|
+ @RequestParam(value = "sort",required = true) String sort){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/fjjxb?wpids="+wpids+"&projectids="+projectids+"&lineids="+lineids+"&beginDate="+beginDate+"&endDate="+endDate+"&type="+type+"&target="+target+"&sort="+sort,R.class);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 风机绩效榜明细
|
|
|
+ * @param wpids
|
|
|
+ * @param projectids
|
|
|
+ * @param lineids
|
|
|
+ * @param beginDate
|
|
|
+ * @param endDate
|
|
|
+ * @param type
|
|
|
+ * @param target
|
|
|
+ * @param sort
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/consumer/benchmarking/fjjxbmx")
|
|
|
+ public R fjjxbmx(@RequestParam(value = "wpids",required = true) String wpids,
|
|
|
+ @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 = "type",required = true) String type,
|
|
|
+ @RequestParam(value = "target",required = true) String target,
|
|
|
+ @RequestParam(value = "sort",required = true) String sort){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/fjjxbmx?wpids="+wpids+"&projectids="+projectids+"&lineids="+lineids+"&beginDate="+beginDate+"&endDate="+endDate+"&type="+type+"&target="+target+"&sort="+sort,R.class);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 五项损失率
|
|
|
+ * @param wpids
|
|
|
+ * @param projectids
|
|
|
+ * @param lineids
|
|
|
+ * @param beginDate
|
|
|
+ * @param endDate
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/consumer/benchmarking/wxssl")
|
|
|
+ public R wxssl(@RequestParam(value = "wpids",required = true) String wpids,
|
|
|
+ @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 = "target",required = true) String target,
|
|
|
+ @RequestParam(value = "sort",required = true) String sort
|
|
|
+ ){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/wxssl?wpids="+wpids+"&projectids="+projectids+"&lineids="+lineids+"&beginDate="+beginDate+"&endDate="+endDate+"&target="+target+"&sort="+sort,R.class);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 场内对标
|
|
|
+ * @param wpid
|
|
|
+ * @param beginDate
|
|
|
+ * @param endDate
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/consumer/benchmarking/cndb")
|
|
|
+ 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 = "target",required = true) String target,
|
|
|
+ @RequestParam(value = "sort",required = true) String sort
|
|
|
+ ){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/cndb?wpid="+wpid+"&beginDate="+beginDate+"&endDate="+endDate+"&target="+target+"&sort="+sort,R.class);
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 场际对标
|
|
|
+ * @param wpids
|
|
|
+ * @param beginDate
|
|
|
+ * @param endDate
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/consumer/benchmarking/cjdb")
|
|
|
+ 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 = "target",required = true) String target,
|
|
|
+ @RequestParam(value = "sort",required = true) String sort
|
|
|
+ ){
|
|
|
+
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/cjdb?wpids="+wpids+"&beginDate="+beginDate+"&endDate="+endDate+"&target="+target+"&sort="+sort,R.class);
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 项目对标
|
|
|
+ * @param wpids
|
|
|
+ * @param projectids
|
|
|
+ * @param beginDate
|
|
|
+ * @param endDate
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/consumer/benchmarking/xmdb")
|
|
|
+ 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 = "target",required = true) String target,
|
|
|
+ @RequestParam(value = "sort",required = true) String sort
|
|
|
+ ){
|
|
|
+
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/xmdb?wpids="+wpids+"&projectids="+projectids+"&beginDate="+beginDate+"&endDate="+endDate+"&target="+target+"&sort="+sort,R.class);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 线路对标
|
|
|
+ * @param wpids
|
|
|
+ * @param projectids
|
|
|
+ * @param lineids
|
|
|
+ * @param beginDate
|
|
|
+ * @param endDate
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/consumer/benchmarking/xldb")
|
|
|
+ @ResponseBody
|
|
|
+ @CrossOrigin(origins = "*", maxAge = 3600)
|
|
|
+ public R xldb(@RequestParam(value = "wpids",required = true) String wpids,
|
|
|
+ @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 = "target",required = true) String target,
|
|
|
+ @RequestParam(value = "sort",required = true) String sort
|
|
|
+ ){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/xldb?wpids="+wpids+"&projectids="+projectids+"&lineids"+lineids+"&beginDate="+beginDate+"&endDate="+endDate+"&target="+target+"&sort="+sort,R.class);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 值际操作指令list
|
|
|
+ * @param beginDate
|
|
|
+ * @param endDate
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/consumer/benchmarking/zjlist")
|
|
|
+ public R listplus(@RequestParam(value = "beginDate",required = true)String beginDate,
|
|
|
+ @RequestParam(value = "endDate",required = true)String endDate){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/zjlist?beginDate="+beginDate+"&endDate="+endDate,R.class);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 值际点击钻取
|
|
|
+ * @param beginDate
|
|
|
+ * @param endDate
|
|
|
+ * @param dutyname
|
|
|
+ * @param direct
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/consumer/benchmarking/zjdrill")
|
|
|
+ public R zjdrill(@RequestParam(value = "beginDate",required = true)String beginDate,
|
|
|
+ @RequestParam(value = "endDate",required = true)String endDate,
|
|
|
+ @RequestParam(value = "dutyname",required = true)String dutyname,
|
|
|
+ @RequestParam(value = "direct",required = true)String direct){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/zjdrill?beginDate="+beginDate+"&endDate="+endDate+"&dutyname="+dutyname+"&direct="+direct,R.class);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 值际损失电量
|
|
|
+ * @param beginDate
|
|
|
+ * @param endDate
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/consumer/benchmarking/zjwxssl")
|
|
|
+ public R zjwxssl(@RequestParam(value = "beginDate",required = true)String beginDate,
|
|
|
+ @RequestParam(value = "endDate",required = true)String endDate){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/zjwxssl?beginDate="+beginDate+"&endDate="+endDate,R.class);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 对标页面详情
|
|
|
+ * @param beginDate
|
|
|
+ * @param endDate
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/consumer/benchmarking/details")
|
|
|
+ public R details(@RequestParam(value = "id",required = true)String id,
|
|
|
+ @RequestParam(value = "beginDate",required = true)String beginDate,
|
|
|
+ @RequestParam(value = "endDate",required = true)String endDate,
|
|
|
+ @RequestParam(value = "target",required = true) String target,
|
|
|
+ @RequestParam(value = "sort",required = true) String sort
|
|
|
+ ){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/details?id="+id+"&beginDate="+beginDate+"&endDate="+endDate+"&target="+target+"&sort="+sort,R.class);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 日单机横向对比列表
|
|
|
+ * @param wpid
|
|
|
+ * @param wtids
|
|
|
+ * @param date
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/consumer/benchmarking/daydjhxdbtop")
|
|
|
+ public R daydjhxdbtop(@RequestParam(value = "wpid",required = true)String wpid,
|
|
|
+ @RequestParam(value = "wtids",required = true)String wtids,
|
|
|
+ @RequestParam(value = "date",required = true)String date){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/daydjhxdbtop?wpid="+wpid+"&wtids="+wtids+"&date="+date,R.class);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 月单机横向对比列表
|
|
|
+ * @param wpid
|
|
|
+ * @param wtids
|
|
|
+ * @param date
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/consumer/benchmarking/monthdjhxdbtop")
|
|
|
+ public R monthdjhxdbtop(@RequestParam(value = "wpid",required = true)String wpid,
|
|
|
+ @RequestParam(value = "wtids",required = true)String wtids,
|
|
|
+ @RequestParam(value = "date",required = true)String date){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/monthdjhxdbtop?wpid="+wpid+"&wtids="+wtids+"&date="+date,R.class);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 年单机横向对比列表
|
|
|
+ * @param wpid
|
|
|
+ * @param wtids
|
|
|
+ * @param date
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/consumer/benchmarking/yeardjhxdbtop")
|
|
|
+ public R yeardjhxdbtop(@RequestParam(value = "wpid",required = true)String wpid,
|
|
|
+ @RequestParam(value = "wtids",required = true)String wtids,
|
|
|
+ @RequestParam(value = "date",required = true)String date){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/yeardjhxdbtop?wpid="+wpid+"&wtids="+wtids+"&date="+date,R.class);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 日单机横向对比图
|
|
|
+ * @param wpid
|
|
|
+ * @param wtids
|
|
|
+ * @param date
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/consumer/benchmarking/djhxdbbottom")
|
|
|
+ public R djhxdbbottom(@RequestParam(value = "wpid",required = true)String wpid,
|
|
|
+ @RequestParam(value = "wtids",required = true)String wtids,
|
|
|
+ @RequestParam(value = "date",required = true)String date){
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/djhxdbbottom?wpid="+wpid+"&wtids="+wtids+"&date="+date,R.class);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 对标首页下面部分
|
|
|
+ * @param timetype
|
|
|
+ * @param foreigntype
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ @GetMapping("/consumer/benchmarking/dbmainbottom")
|
|
|
+ @ResponseBody
|
|
|
+ @CrossOrigin(origins = "*", maxAge = 3600)
|
|
|
+ public R dbmainbottom(@RequestParam(value = "timetype",required = true)String timetype,
|
|
|
+ @RequestParam(value = "foreigntype",required = true)String foreigntype) throws Exception {
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/djhxdbbottom?timetype="+timetype+"&foreigntype="+foreigntype,R.class);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 对标首页上面部分
|
|
|
+ * @param timetype
|
|
|
+ * @param foreigntype
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ @GetMapping("/consumer/benchmarking/dbmaintop")
|
|
|
+ public R dbmaintop(@RequestParam(value = "timetype",required = true)String timetype,
|
|
|
+ @RequestParam(value = "foreigntype",required = true)String foreigntype) throws Exception {
|
|
|
+ return restTemplate.getForObject(BENCHMARKING_URL+"/benchmarking/dbmaintop?timetype="+timetype+"&foreigntype="+foreigntype,R.class);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|