|
@@ -26,7 +26,7 @@ import java.util.stream.Collectors;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("//benchmarking")
|
|
|
-@Api(value = "对标管理",tags = "对标管理")
|
|
|
+@Api(value = "对标管理", tags = "对标管理")
|
|
|
public class BenchmarkingController {
|
|
|
|
|
|
@Resource
|
|
@@ -35,7 +35,7 @@ public class BenchmarkingController {
|
|
|
|
|
|
@GetMapping(value = "/companys")
|
|
|
@ApiOperation(value = "公司列表", notes = "公司列表")
|
|
|
- public R companys () {
|
|
|
+ public R companys() {
|
|
|
List<ProBasicOrganizeTree> resultList = benchmarkingService.companys();
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
@@ -43,10 +43,11 @@ public class BenchmarkingController {
|
|
|
return R.error(ResultMsg.error());
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
@GetMapping(value = "/companysByRg")
|
|
|
@ApiOperation(value = "根据区域查询公司列表", notes = "根据区域查询公司列表")
|
|
|
- public R companysByRg(@RequestParam(value = "regionid", required = true) String regionid) {
|
|
|
- List<ProBasicOrganizeTree> resultList = benchmarkingService.companys().stream().filter(i->i.getParentCode().equals(regionid)).collect(Collectors.toList());
|
|
|
+ public R companysByRg(@RequestParam(value = "regionid", required = true) String regionid) {
|
|
|
+ List<ProBasicOrganizeTree> resultList = benchmarkingService.companys().stream().filter(i -> i.getParentCode().equals(regionid)).collect(Collectors.toList());
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
|
} else {
|
|
@@ -59,7 +60,7 @@ public class BenchmarkingController {
|
|
|
public R wpByCplist(@RequestParam(value = "companyids", required = true) String companyids,
|
|
|
@RequestParam(value = "type", required = false) String type) {
|
|
|
|
|
|
- List<ProBasicOrganizeTree> resultList = benchmarkingService.wpByCplist(companyids,type);
|
|
|
+ List<ProBasicOrganizeTree> resultList = benchmarkingService.wpByCplist(companyids, type);
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
|
} else {
|
|
@@ -70,9 +71,9 @@ public class BenchmarkingController {
|
|
|
@GetMapping(value = "/alllist")
|
|
|
@ApiOperation(value = "场站之后列表", notes = "场站之后列表")
|
|
|
public R alllist(@RequestParam(value = "ids", required = true) String ids,
|
|
|
- @RequestParam(value = "type", required = false) String type) {
|
|
|
+ @RequestParam(value = "type", required = false) String type) {
|
|
|
|
|
|
- List<ProBasicOrganizeTree> resultList = benchmarkingService.allList(ids,type);
|
|
|
+ List<ProBasicOrganizeTree> resultList = benchmarkingService.allList(ids, type);
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
|
} else {
|
|
@@ -94,7 +95,7 @@ public class BenchmarkingController {
|
|
|
|
|
|
@GetMapping(value = "/pjByWplist")
|
|
|
@ApiOperation(value = "项目列表", notes = "项目列表")
|
|
|
- public R pjByWplist(@RequestParam(value = "wpids", required = true) String wpids) {
|
|
|
+ public R pjByWplist(@RequestParam(value = "wpids", required = true) String wpids) {
|
|
|
|
|
|
List<ProBasicOrganizeTree> resultList = benchmarkingService.pjByWplist(wpids);
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
@@ -106,7 +107,7 @@ public class BenchmarkingController {
|
|
|
|
|
|
@GetMapping(value = "/lnByPjlist")
|
|
|
@ApiOperation(value = "线路列表", notes = "线路列表")
|
|
|
- public R lnByPjlist(@RequestParam(value = "pjids", required = true) String pjids) {
|
|
|
+ public R lnByPjlist(@RequestParam(value = "pjids", required = true) String pjids) {
|
|
|
|
|
|
List<ProBasicOrganizeTree> resultList = benchmarkingService.lnByPjlist(pjids);
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
@@ -118,7 +119,7 @@ public class BenchmarkingController {
|
|
|
|
|
|
@GetMapping(value = "/wtByLnlist")
|
|
|
@ApiOperation(value = "风机列表", notes = "风机列表")
|
|
|
- public R wtByLnlist(@RequestParam(value = "lnids", required = true) String lnids) {
|
|
|
+ public R wtByLnlist(@RequestParam(value = "lnids", required = true) String lnids) {
|
|
|
|
|
|
List<ProBasicOrganizeTree> resultList = benchmarkingService.wtByLnlist(lnids);
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
@@ -130,7 +131,7 @@ public class BenchmarkingController {
|
|
|
|
|
|
@GetMapping(value = "/wtByWplist")
|
|
|
@ApiOperation(value = "风机列表", notes = "风机列表")
|
|
|
- public R wtByWplist(@RequestParam(value = "wpids", required = true) String wpids) {
|
|
|
+ public R wtByWplist(@RequestParam(value = "wpids", required = true) String wpids) {
|
|
|
|
|
|
List<ProBasicOrganizeEquipment> resultList = benchmarkingService.wtByWplist(wpids);
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
@@ -143,9 +144,9 @@ public class BenchmarkingController {
|
|
|
@GetMapping(value = "/treeByWpid")
|
|
|
@ApiOperation(value = "场站树形", notes = "场站树形")
|
|
|
public R treeByWpid(@RequestParam(value = "wpId", required = true) String wpId,
|
|
|
- @RequestParam(value = "treeType", required = true) String treeType) {
|
|
|
+ @RequestParam(value = "treeType", required = true) String treeType) {
|
|
|
|
|
|
- ProBasicOrganizeTree resultList = benchmarkingService.treeByWpid(wpId,treeType);
|
|
|
+ ProBasicOrganizeTree resultList = benchmarkingService.treeByWpid(wpId, treeType);
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
|
} else {
|
|
@@ -163,9 +164,9 @@ public class BenchmarkingController {
|
|
|
@RequestParam(value = "wpids", required = true) String wpids,
|
|
|
@RequestParam(value = "projectids", required = true) String projectids,
|
|
|
@RequestParam(value = "lineids", required = true) String lineids,
|
|
|
- @RequestParam(value = "target",required = false) String target,
|
|
|
- @RequestParam(value = "sort",required = false) String sort){
|
|
|
- List<FjjxbVo> resultList = benchmarkingService.performance(companyid,getype,sttype,beginDate,endDate,wpids,projectids,lineids,target,sort);
|
|
|
+ @RequestParam(value = "target", required = false) String target,
|
|
|
+ @RequestParam(value = "sort", required = false) String sort) {
|
|
|
+ List<FjjxbVo> resultList = benchmarkingService.performance(companyid, getype, sttype, beginDate, endDate, wpids, projectids, lineids, target, sort);
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
|
} else {
|
|
@@ -183,9 +184,9 @@ public class BenchmarkingController {
|
|
|
@RequestParam(value = "wpids", required = true) String wpids,
|
|
|
@RequestParam(value = "projectids", required = true) String projectids,
|
|
|
@RequestParam(value = "lineids", required = true) String lineids,
|
|
|
- @RequestParam(value = "target",required = true) String target,
|
|
|
- @RequestParam(value = "sort",required = true) String sort){
|
|
|
- List<FjjxbmxVo> resultList = benchmarkingService.performanceMX(companyid,getype,sttype,beginDate,endDate,wpids,projectids,lineids,target,sort);
|
|
|
+ @RequestParam(value = "target", required = true) String target,
|
|
|
+ @RequestParam(value = "sort", required = true) String sort) {
|
|
|
+ List<FjjxbmxVo> resultList = benchmarkingService.performanceMX(companyid, getype, sttype, beginDate, endDate, wpids, projectids, lineids, target, sort);
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
|
} else {
|
|
@@ -197,17 +198,17 @@ public class BenchmarkingController {
|
|
|
@GetMapping("/wxssl")
|
|
|
@ResponseBody
|
|
|
@ApiOperation(value = "五项损失率", notes = "五项损失率")
|
|
|
- public R wxssl(@RequestParam(value = "companys",required = true) String companys,
|
|
|
- @RequestParam(value = "type",required = true) String type,
|
|
|
- @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
|
|
|
- ){
|
|
|
- List<WxsslVo> resultList = benchmarkingService.wxssl(companys,type,wpids,projectids,lineids,beginDate,endDate,target,sort);
|
|
|
+ public R wxssl(@RequestParam(value = "companys", required = true) String companys,
|
|
|
+ @RequestParam(value = "type", required = true) String type,
|
|
|
+ @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
|
|
|
+ ) {
|
|
|
+ List<WxsslVo> resultList = benchmarkingService.wxssl(companys, type, wpids, projectids, lineids, beginDate, endDate, target, sort);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
@@ -219,14 +220,14 @@ public class BenchmarkingController {
|
|
|
@GetMapping("/gsdb")
|
|
|
@ResponseBody
|
|
|
@ApiOperation(value = "公司对标", notes = "公司对标")
|
|
|
- public R gsdb(@RequestParam(value = "companys",required = true) String companys,
|
|
|
- @RequestParam(value = "type",required = true) String type,
|
|
|
- @RequestParam(value = "beginDate",required = true) String beginDate,
|
|
|
- @RequestParam(value = "endDate",required = true) String endDate,
|
|
|
- @RequestParam(value = "target",required = false) String target,
|
|
|
- @RequestParam(value = "sort",required = false) String sort
|
|
|
- ){
|
|
|
- List<WxsslVo> resultList = benchmarkingService.gsdb(companys,type,beginDate,endDate,target,sort);
|
|
|
+ public R gsdb(@RequestParam(value = "companys", required = true) String companys,
|
|
|
+ @RequestParam(value = "type", required = true) String type,
|
|
|
+ @RequestParam(value = "beginDate", required = true) String beginDate,
|
|
|
+ @RequestParam(value = "endDate", required = true) String endDate,
|
|
|
+ @RequestParam(value = "target", required = false) String target,
|
|
|
+ @RequestParam(value = "sort", required = false) String sort
|
|
|
+ ) {
|
|
|
+ List<WxsslVo> resultList = benchmarkingService.gsdb(companys, type, beginDate, endDate, target, sort);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
@@ -238,15 +239,15 @@ public class BenchmarkingController {
|
|
|
@GetMapping("/cndb")
|
|
|
@ResponseBody
|
|
|
@ApiOperation(value = "场内对标", notes = "场内对标")
|
|
|
- public R cndb(@RequestParam(value = "companys",required = true) String companys,
|
|
|
- @RequestParam(value = "type",required = true) String type,
|
|
|
- @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
|
|
|
- ){
|
|
|
- List<WxsslVo> resultList = benchmarkingService.cndb(companys,type,wpid,beginDate,endDate,target,sort);
|
|
|
+ public R cndb(@RequestParam(value = "companys", required = true) String companys,
|
|
|
+ @RequestParam(value = "type", required = true) String type,
|
|
|
+ @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
|
|
|
+ ) {
|
|
|
+ List<WxsslVo> resultList = benchmarkingService.cndb(companys, type, wpid, beginDate, endDate, target, sort);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
@@ -259,92 +260,92 @@ public class BenchmarkingController {
|
|
|
@GetMapping("/cndbthb")
|
|
|
@ResponseBody
|
|
|
@ApiOperation(value = "场内对标同环比", notes = "场内对标同环比")
|
|
|
- public R cndbthb(@RequestParam(value = "companys",required = true) String companys,
|
|
|
- @RequestParam(value = "type",required = true) String type,
|
|
|
- @RequestParam(value = "wpid",required = true) String wpid
|
|
|
+ public R cndbthb(@RequestParam(value = "companys", required = true) String companys,
|
|
|
+ @RequestParam(value = "type", required = true) String type,
|
|
|
+ @RequestParam(value = "wpid", required = true) String wpid
|
|
|
) throws Exception {
|
|
|
List<WxsslVo> resultList = new ArrayList<>();
|
|
|
//获取当前时间
|
|
|
String endDate = DateUtils.toDate1(new Date());
|
|
|
Date date = DateUtils.parseDate(endDate);
|
|
|
- String beginDate = DateUtils.toDate1(DateUtils.getFirstAndLastDayOfMonth(date));
|
|
|
- List<WxsslVo> dateList = benchmarkingService.cndbthb(companys,type,wpid,beginDate,endDate);
|
|
|
- if(dateList != null && dateList.size()>0){
|
|
|
+ String beginDate = DateUtils.toDate1(DateUtils.getFirstAndLastDayOfMonth(date));
|
|
|
+ List<WxsslVo> dateList = benchmarkingService.cndbthb(companys, type, wpid, beginDate, endDate);
|
|
|
+ if (dateList != null && dateList.size() > 0) {
|
|
|
dateList.get(0).setName("当月");
|
|
|
- resultList.add((dateList != null && dateList.size()>0)?dateList.get(0): null);
|
|
|
+ resultList.add((dateList != null && dateList.size() > 0) ? dateList.get(0) : null);
|
|
|
}
|
|
|
|
|
|
|
|
|
- String yestmonthLastday = DateUtils.toDate1(DateUtils.getYestmonthLastday(date));
|
|
|
- String yestmonthbeginday = DateUtils.toDate1(DateUtils.getFirstAndLastDayOfMonth(DateUtils.parseDate(yestmonthLastday)));
|
|
|
- List<WxsslVo> hbList = benchmarkingService.cndbthb(companys,type,wpid,yestmonthbeginday,yestmonthLastday);
|
|
|
- if(hbList != null && hbList.size()>0){
|
|
|
+ String yestmonthLastday = DateUtils.toDate1(DateUtils.getYestmonthLastday(date));
|
|
|
+ String yestmonthbeginday = DateUtils.toDate1(DateUtils.getFirstAndLastDayOfMonth(DateUtils.parseDate(yestmonthLastday)));
|
|
|
+ List<WxsslVo> hbList = benchmarkingService.cndbthb(companys, type, wpid, yestmonthbeginday, yestmonthLastday);
|
|
|
+ if (hbList != null && hbList.size() > 0) {
|
|
|
hbList.get(0).setName("环比");
|
|
|
- resultList.add((hbList != null && hbList.size()>0)?hbList.get(0): null);
|
|
|
+ resultList.add((hbList != null && hbList.size() > 0) ? hbList.get(0) : null);
|
|
|
}
|
|
|
|
|
|
|
|
|
- Date subOneYear = DateUtils.subOneYear(date);
|
|
|
+ Date subOneYear = DateUtils.subOneYear(date);
|
|
|
String tbbeginDate = DateUtils.toDate1(DateUtils.getMonthFirstZero(DateUtils.toDate1(subOneYear)));
|
|
|
String tbendDate = DateUtils.toDate1(DateUtils.getMonthLast(subOneYear));
|
|
|
- List<WxsslVo> tbList = benchmarkingService.cndbthb(companys,type,wpid,tbbeginDate,tbendDate);
|
|
|
- if(tbList != null && tbList.size()>0){
|
|
|
+ List<WxsslVo> tbList = benchmarkingService.cndbthb(companys, type, wpid, tbbeginDate, tbendDate);
|
|
|
+ if (tbList != null && tbList.size() > 0) {
|
|
|
tbList.get(0).setName("同比");
|
|
|
- resultList.add((tbList != null && tbList.size()>0)?tbList.get(0): null);
|
|
|
+ resultList.add((tbList != null && tbList.size() > 0) ? tbList.get(0) : null);
|
|
|
}
|
|
|
|
|
|
|
|
|
- SortUtils.sort(resultList,"llfdl",SortUtils.DESC);
|
|
|
- for (int i=0;i<resultList.size();i++){
|
|
|
- resultList.get(i).setZhpm(i+1);
|
|
|
+ SortUtils.sort(resultList, "llfdl", SortUtils.DESC);
|
|
|
+ for (int i = 0; i < resultList.size(); i++) {
|
|
|
+ resultList.get(i).setZhpm(i + 1);
|
|
|
}
|
|
|
- SortUtils.sort(resultList,"fdl",SortUtils.DESC);
|
|
|
- for (int i=0;i<resultList.size();i++){
|
|
|
- resultList.get(i).setFdlpm(i+1);
|
|
|
+ SortUtils.sort(resultList, "fdl", SortUtils.DESC);
|
|
|
+ for (int i = 0; i < resultList.size(); i++) {
|
|
|
+ resultList.get(i).setFdlpm(i + 1);
|
|
|
}
|
|
|
- SortUtils.sort(resultList,"fnlyl",SortUtils.DESC);
|
|
|
- for (int i=0;i<resultList.size();i++){
|
|
|
- resultList.get(i).setFnlylpm(i+1);
|
|
|
+ SortUtils.sort(resultList, "fnlyl", SortUtils.DESC);
|
|
|
+ for (int i = 0; i < resultList.size(); i++) {
|
|
|
+ resultList.get(i).setFnlylpm(i + 1);
|
|
|
}
|
|
|
- SortUtils.sort(resultList,"gzssdl",SortUtils.ASC);
|
|
|
- for (int i=0;i<resultList.size();i++){
|
|
|
- resultList.get(i).setGzssdlpm(i+1);
|
|
|
+ SortUtils.sort(resultList, "gzssdl", SortUtils.ASC);
|
|
|
+ for (int i = 0; i < resultList.size(); i++) {
|
|
|
+ resultList.get(i).setGzssdlpm(i + 1);
|
|
|
}
|
|
|
- SortUtils.sort(resultList,"gzssl",SortUtils.ASC);
|
|
|
- for (int i=0;i<resultList.size();i++){
|
|
|
- resultList.get(i).setGzsslpm(i+1);
|
|
|
+ SortUtils.sort(resultList, "gzssl", SortUtils.ASC);
|
|
|
+ for (int i = 0; i < resultList.size(); i++) {
|
|
|
+ resultList.get(i).setGzsslpm(i + 1);
|
|
|
}
|
|
|
- SortUtils.sort(resultList,"jxssdl",SortUtils.ASC);
|
|
|
- for (int i=0;i<resultList.size();i++){
|
|
|
- resultList.get(i).setJxssdlpm(i+1);
|
|
|
+ SortUtils.sort(resultList, "jxssdl", SortUtils.ASC);
|
|
|
+ for (int i = 0; i < resultList.size(); i++) {
|
|
|
+ resultList.get(i).setJxssdlpm(i + 1);
|
|
|
}
|
|
|
- SortUtils.sort(resultList,"jxssl",SortUtils.ASC);
|
|
|
- for (int i=0;i<resultList.size();i++){
|
|
|
- resultList.get(i).setJxsslpm(i+1);
|
|
|
+ SortUtils.sort(resultList, "jxssl", SortUtils.ASC);
|
|
|
+ for (int i = 0; i < resultList.size(); i++) {
|
|
|
+ resultList.get(i).setJxsslpm(i + 1);
|
|
|
}
|
|
|
- SortUtils.sort(resultList,"xdssdl",SortUtils.ASC);
|
|
|
- for (int i=0;i<resultList.size();i++){
|
|
|
- resultList.get(i).setXdssdlpm(i+1);
|
|
|
+ SortUtils.sort(resultList, "xdssdl", SortUtils.ASC);
|
|
|
+ for (int i = 0; i < resultList.size(); i++) {
|
|
|
+ resultList.get(i).setXdssdlpm(i + 1);
|
|
|
}
|
|
|
- SortUtils.sort(resultList,"qfl",SortUtils.ASC);
|
|
|
- for (int i=0;i<resultList.size();i++){
|
|
|
- resultList.get(i).setQflpm(i+1);
|
|
|
+ SortUtils.sort(resultList, "qfl", SortUtils.ASC);
|
|
|
+ for (int i = 0; i < resultList.size(); i++) {
|
|
|
+ resultList.get(i).setQflpm(i + 1);
|
|
|
}
|
|
|
- SortUtils.sort(resultList,"xnssdl",SortUtils.ASC);
|
|
|
- for (int i=0;i<resultList.size();i++){
|
|
|
- resultList.get(i).setXnssdlpm(i+1);
|
|
|
+ SortUtils.sort(resultList, "xnssdl", SortUtils.ASC);
|
|
|
+ for (int i = 0; i < resultList.size(); i++) {
|
|
|
+ resultList.get(i).setXnssdlpm(i + 1);
|
|
|
}
|
|
|
- SortUtils.sort(resultList,"xnssl",SortUtils.ASC);
|
|
|
- for (int i=0;i<resultList.size();i++){
|
|
|
- resultList.get(i).setXnsslpm(i+1);
|
|
|
+ SortUtils.sort(resultList, "xnssl", SortUtils.ASC);
|
|
|
+ for (int i = 0; i < resultList.size(); i++) {
|
|
|
+ resultList.get(i).setXnsslpm(i + 1);
|
|
|
}
|
|
|
- SortUtils.sort(resultList,"slssdl",SortUtils.ASC);
|
|
|
- for (int i=0;i<resultList.size();i++){
|
|
|
- resultList.get(i).setSlssdlpm(i+1);
|
|
|
+ SortUtils.sort(resultList, "slssdl", SortUtils.ASC);
|
|
|
+ for (int i = 0; i < resultList.size(); i++) {
|
|
|
+ resultList.get(i).setSlssdlpm(i + 1);
|
|
|
}
|
|
|
- SortUtils.sort(resultList,"slssl",SortUtils.ASC);
|
|
|
- for (int i=0;i<resultList.size();i++){
|
|
|
- resultList.get(i).setSlsslpm(i+1);
|
|
|
+ SortUtils.sort(resultList, "slssl", SortUtils.ASC);
|
|
|
+ for (int i = 0; i < resultList.size(); i++) {
|
|
|
+ resultList.get(i).setSlsslpm(i + 1);
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
@@ -358,15 +359,15 @@ public class BenchmarkingController {
|
|
|
@GetMapping("/cjdb")
|
|
|
@ResponseBody
|
|
|
@ApiOperation(value = "场际对标", notes = "场际对标")
|
|
|
- public R cjdb(@RequestParam(value = "companys",required = true) String companys,
|
|
|
- @RequestParam(value = "type",required = true) String type,
|
|
|
- @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
|
|
|
- ){
|
|
|
- List<WxsslVo> resultList = benchmarkingService.cjdb(companys,type,wpids,beginDate,endDate,target,sort);
|
|
|
+ public R cjdb(@RequestParam(value = "companys", required = true) String companys,
|
|
|
+ @RequestParam(value = "type", required = true) String type,
|
|
|
+ @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
|
|
|
+ ) {
|
|
|
+ List<WxsslVo> resultList = benchmarkingService.cjdb(companys, type, wpids, beginDate, endDate, target, sort);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
@@ -379,16 +380,16 @@ public class BenchmarkingController {
|
|
|
@GetMapping("/xmdb")
|
|
|
@ResponseBody
|
|
|
@ApiOperation(value = "项目对标", notes = "项目对标")
|
|
|
- public R xmdb(@RequestParam(value = "companys",required = true) String companys,
|
|
|
- @RequestParam(value = "type",required = true) String type,
|
|
|
- @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
|
|
|
- ){
|
|
|
- List<WxsslVo> resultList = benchmarkingService.xmdb(companys,type,wpids,projectids,beginDate,endDate,target,sort);
|
|
|
+ public R xmdb(@RequestParam(value = "companys", required = true) String companys,
|
|
|
+ @RequestParam(value = "type", required = true) String type,
|
|
|
+ @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
|
|
|
+ ) {
|
|
|
+ List<WxsslVo> resultList = benchmarkingService.xmdb(companys, type, wpids, projectids, beginDate, endDate, target, sort);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
@@ -401,17 +402,17 @@ public class BenchmarkingController {
|
|
|
@GetMapping("/xldb")
|
|
|
@ResponseBody
|
|
|
@ApiOperation(value = "线路对标", notes = "线路对标")
|
|
|
- public R xldb(@RequestParam(value = "companys",required = true) String companys,
|
|
|
- @RequestParam(value = "type",required = true) String type,
|
|
|
- @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
|
|
|
- ){
|
|
|
- List<WxsslVo> resultList = benchmarkingService.xldb(companys,type,wpids,projectids,lineids,beginDate,endDate,target,sort);
|
|
|
+ public R xldb(@RequestParam(value = "companys", required = true) String companys,
|
|
|
+ @RequestParam(value = "type", required = true) String type,
|
|
|
+ @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
|
|
|
+ ) {
|
|
|
+ List<WxsslVo> resultList = benchmarkingService.xldb(companys, type, wpids, projectids, lineids, beginDate, endDate, target, sort);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
@@ -423,18 +424,18 @@ public class BenchmarkingController {
|
|
|
@GetMapping("/zqdb")
|
|
|
@ResponseBody
|
|
|
@ApiOperation(value = "阵区对标", notes = "阵区对标")
|
|
|
- public R zqdb(@RequestParam(value = "companys",required = true) String companys,
|
|
|
- @RequestParam(value = "type",required = true) String type,
|
|
|
- @RequestParam(value = "wpids",required = true) String wpids,
|
|
|
- @RequestParam(value = "projectids",required = true) String projectids,
|
|
|
- @RequestParam(value = "lineids",required = true) String lineids,
|
|
|
- @RequestParam(value = "squareids",required = true) String squareids,
|
|
|
- @RequestParam(value = "beginDate",required = true) String beginDate,
|
|
|
- @RequestParam(value = "endDate",required = true) String endDate,
|
|
|
- @RequestParam(value = "target",required = false) String target,
|
|
|
- @RequestParam(value = "sort",required = false) String sort
|
|
|
- ){
|
|
|
- List<WxsslVo> resultList = benchmarkingService.zqdb(companys,type,wpids,projectids,lineids,squareids,beginDate,endDate,target,sort);
|
|
|
+ public R zqdb(@RequestParam(value = "companys", required = true) String companys,
|
|
|
+ @RequestParam(value = "type", required = true) String type,
|
|
|
+ @RequestParam(value = "wpids", required = true) String wpids,
|
|
|
+ @RequestParam(value = "projectids", required = true) String projectids,
|
|
|
+ @RequestParam(value = "lineids", required = true) String lineids,
|
|
|
+ @RequestParam(value = "squareids", required = true) String squareids,
|
|
|
+ @RequestParam(value = "beginDate", required = true) String beginDate,
|
|
|
+ @RequestParam(value = "endDate", required = true) String endDate,
|
|
|
+ @RequestParam(value = "target", required = false) String target,
|
|
|
+ @RequestParam(value = "sort", required = false) String sort
|
|
|
+ ) {
|
|
|
+ List<WxsslVo> resultList = benchmarkingService.zqdb(companys, type, wpids, projectids, lineids, squareids, beginDate, endDate, target, sort);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
@@ -447,19 +448,19 @@ public class BenchmarkingController {
|
|
|
@GetMapping("/sbdb")
|
|
|
@ResponseBody
|
|
|
@ApiOperation(value = "设备对标", notes = "设备对标")
|
|
|
- public R sbdb(@RequestParam(value = "companys",required = true) String companys,
|
|
|
- @RequestParam(value = "type",required = true) String type,
|
|
|
- @RequestParam(value = "wpids",required = true) String wpids,
|
|
|
- @RequestParam(value = "projectids",required = true) String projectids,
|
|
|
- @RequestParam(value = "lineids",required = true) String lineids,
|
|
|
- @RequestParam(value = "squareids",required = true) String squareids,
|
|
|
- @RequestParam(value = "windturbineids",required = false) String windturbineids,
|
|
|
- @RequestParam(value = "beginDate",required = true) String beginDate,
|
|
|
- @RequestParam(value = "endDate",required = true) String endDate,
|
|
|
- @RequestParam(value = "target",required = false) String target,
|
|
|
- @RequestParam(value = "sort",required = false) String sort
|
|
|
- ){
|
|
|
- List<WxsslVo> resultList = benchmarkingService.sbdb(companys,type,wpids,projectids,lineids,squareids,windturbineids,beginDate,endDate,target,sort);
|
|
|
+ public R sbdb(@RequestParam(value = "companys", required = true) String companys,
|
|
|
+ @RequestParam(value = "type", required = true) String type,
|
|
|
+ @RequestParam(value = "wpids", required = true) String wpids,
|
|
|
+ @RequestParam(value = "projectids", required = true) String projectids,
|
|
|
+ @RequestParam(value = "lineids", required = true) String lineids,
|
|
|
+ @RequestParam(value = "squareids", required = true) String squareids,
|
|
|
+ @RequestParam(value = "windturbineids", required = false) String windturbineids,
|
|
|
+ @RequestParam(value = "beginDate", required = true) String beginDate,
|
|
|
+ @RequestParam(value = "endDate", required = true) String endDate,
|
|
|
+ @RequestParam(value = "target", required = false) String target,
|
|
|
+ @RequestParam(value = "sort", required = false) String sort
|
|
|
+ ) {
|
|
|
+ List<WxsslVo> resultList = benchmarkingService.sbdb(companys, type, wpids, projectids, lineids, squareids, windturbineids, beginDate, endDate, target, sort);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
@@ -469,9 +470,31 @@ public class BenchmarkingController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @GetMapping("/operational/analysis")
|
|
|
+ @ResponseBody
|
|
|
+ @ApiOperation(value = "运行分析", notes = "运行分析")
|
|
|
+ public R operationalAnalysis(@RequestParam(value = "companys", required = true) String companys,
|
|
|
+ @RequestParam(value = "type", required = true) String type,
|
|
|
+ @RequestParam(value = "wpids", required = true) String wpids,
|
|
|
+ @RequestParam(value = "modelids", required = true) String modelids,
|
|
|
+ @RequestParam(value = "beginDate", required = true) String beginDate,
|
|
|
+ @RequestParam(value = "endDate", required = true) String endDate,
|
|
|
+ @RequestParam(value = "target", required = false) String target,
|
|
|
+ @RequestParam(value = "sort", required = false) String sort
|
|
|
+ ) {
|
|
|
+ try {
|
|
|
+ List<OperationalAnalysis> resultList = benchmarkingService.operationalAnalysis(companys, type, wpids, modelids, beginDate, endDate, target, sort);
|
|
|
+ if (StringUtils.isNotNull(resultList)) return R.data(ResultMsg.ok(resultList));
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return R.error(ResultMsg.error());
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 对标页面详情
|
|
|
+ *
|
|
|
* @param beginDate
|
|
|
* @param endDate
|
|
|
* @return
|
|
@@ -479,13 +502,13 @@ public class BenchmarkingController {
|
|
|
@GetMapping("/details")
|
|
|
@ResponseBody
|
|
|
@ApiOperation(value = "对标详情", notes = "对标详情")
|
|
|
- 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
|
|
|
- ){
|
|
|
- List<WxsslVo> resultList = benchmarkingService.details(id,beginDate,endDate,target,sort);
|
|
|
+ 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
|
|
|
+ ) {
|
|
|
+ List<WxsslVo> resultList = benchmarkingService.details(id, beginDate, endDate, target, sort);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
@@ -496,7 +519,7 @@ public class BenchmarkingController {
|
|
|
|
|
|
@GetMapping(value = "/companyslist")
|
|
|
@ApiOperation(value = "公司列表新", notes = "公司列表新")
|
|
|
- public R companyslist (@RequestParam(value = "type", required = true) String type) {
|
|
|
+ public R companyslist(@RequestParam(value = "type", required = true) String type) {
|
|
|
List<ProBasicOrganizeTree> resultList = benchmarkingService.companyslist(type);
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
@@ -508,9 +531,9 @@ public class BenchmarkingController {
|
|
|
@GetMapping(value = "/wpBylist")
|
|
|
@ApiOperation(value = "场站列表新", notes = "场站列表新")
|
|
|
public R wpBylist(@RequestParam(value = "companyids", required = true) String companyids,
|
|
|
- @RequestParam(value = "type", required = false) String type) {
|
|
|
+ @RequestParam(value = "type", required = false) String type) {
|
|
|
|
|
|
- List<ProBasicOrganizeTree> resultList = benchmarkingService.wpBylist(companyids,type);
|
|
|
+ List<ProBasicOrganizeTree> resultList = benchmarkingService.wpBylist(companyids, type);
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
|
} else {
|
|
@@ -520,7 +543,7 @@ public class BenchmarkingController {
|
|
|
|
|
|
@GetMapping(value = "/wtByWplistxin")
|
|
|
@ApiOperation(value = "风机列表", notes = "风机列表")
|
|
|
- public R wtByWplistxin(@RequestParam(value = "wpids", required = true) String wpids) {
|
|
|
+ public R wtByWplistxin(@RequestParam(value = "wpids", required = true) String wpids) {
|
|
|
|
|
|
List<ProBasicOrganizeEquipment> resultList = benchmarkingService.wtByWplistxin(wpids);
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
@@ -532,7 +555,7 @@ public class BenchmarkingController {
|
|
|
|
|
|
@GetMapping(value = "/modellist")
|
|
|
@ApiOperation(value = "型号列表", notes = "型号列表")
|
|
|
- public R modellist(@RequestParam(value = "wpids", required = true) String wpids) {
|
|
|
+ public R modellist(@RequestParam(value = "wpids", required = true) String wpids) {
|
|
|
|
|
|
List<ProBasicOrganizeTree> resultList = benchmarkingService.modellist(wpids);
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
@@ -545,16 +568,16 @@ public class BenchmarkingController {
|
|
|
@GetMapping("/ppdb")
|
|
|
@ResponseBody
|
|
|
@ApiOperation(value = "场际对标", notes = "场际对标")
|
|
|
- public R ppdb(@RequestParam(value = "companys",required = true) String companys,
|
|
|
- @RequestParam(value = "type",required = true) String type,
|
|
|
- @RequestParam(value = "wpids",required = true) String wpids,
|
|
|
- @RequestParam(value = "model",required = true) String model,
|
|
|
- @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
|
|
|
- ){
|
|
|
- List<WxsslVo> resultList = benchmarkingService.ppdb(companys,type,wpids,model,beginDate,endDate,target,sort);
|
|
|
+ public R ppdb(@RequestParam(value = "companys", required = true) String companys,
|
|
|
+ @RequestParam(value = "type", required = true) String type,
|
|
|
+ @RequestParam(value = "wpids", required = true) String wpids,
|
|
|
+ @RequestParam(value = "model", required = true) String model,
|
|
|
+ @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
|
|
|
+ ) {
|
|
|
+ List<WxsslVo> resultList = benchmarkingService.ppdb(companys, type, wpids, model, beginDate, endDate, target, sort);
|
|
|
|
|
|
if (StringUtils.isNotNull(resultList)) {
|
|
|
return R.data(ResultMsg.ok(resultList));
|
|
@@ -565,7 +588,7 @@ public class BenchmarkingController {
|
|
|
|
|
|
@GetMapping(value = "/squarelist")
|
|
|
@ApiOperation(value = "阵区列表", notes = "阵区列表")
|
|
|
- public R squarelist(@RequestParam(value = "wpids", required = true) String wpids) {
|
|
|
+ public R squarelist(@RequestParam(value = "wpids", required = true) String wpids) {
|
|
|
|
|
|
List<ProBasicOrganizeEquipment> resultList = benchmarkingService.squarelist(wpids);
|
|
|
if (StringUtils.isNotNull(resultList)) {
|