|
@@ -1202,30 +1202,19 @@ public List<ProBasicOrganizeTree> modellist(String wpids) {
|
|
|
/**
|
|
|
* 设备对标
|
|
|
*/
|
|
|
- public List<WxsslVo> ppdb(String companys, String type, String wpids,String model, String projectids, String lineids, String squareids, String windturbineids, String beginDate, String endDate, String target, String sort) {
|
|
|
+ public List<WxsslVo> ppdb(String companys, String type, String wpids,String model, String beginDate, String endDate, String target, String sort) {
|
|
|
List<WxsslVo> resultList = new ArrayList<>();
|
|
|
QueryWrapper<ProEconEquipmentInfoDay1> qw = new QueryWrapper<>();
|
|
|
- qw.select("windturbine_id,sum(rfdl) rfdl,sum(rllfdl) rllfdl,avg(rpjfs) rpjfs,sum(rjxssdl) rjxssdl,sum(rcnsljxssdl) rcnsljxssdl,sum(rgzssdl) rgzssdl,sum(rcnslgzssdl) rcnslgzssdl,sum(rxdtjssdl) rxdtjssdl,sum(rxdjclssdl) rxdjclssdl,sum(rdjssdl) rdjssdl,sum(rqxjclssdl) rqxjclssdl,sum(rsdtjssdl) rsdtjssdl,sum(rxnssdl) rxnssdl,sum(rcwsldwssdl) rcwsldwssdl,sum(rcwsltqssdl) rcwsltqssdl");
|
|
|
+ qw.select("windpowerstation_id,sum(rfdl) rfdl,sum(rllfdl) rllfdl,avg(rpjfs) rpjfs,sum(rjxssdl) rjxssdl,sum(rcnsljxssdl) rcnsljxssdl,sum(rgzssdl) rgzssdl,sum(rcnslgzssdl) rcnslgzssdl,sum(rxdtjssdl) rxdtjssdl,sum(rxdjclssdl) rxdjclssdl,sum(rdjssdl) rdjssdl,sum(rqxjclssdl) rqxjclssdl,sum(rsdtjssdl) rsdtjssdl,sum(rxnssdl) rxnssdl,sum(rcwsldwssdl) rcwsldwssdl,sum(rcwsltqssdl) rcwsltqssdl");
|
|
|
|
|
|
qw.ge("record_date", DateUtils.parseDate(beginDate)).le("record_date", DateUtils.parseDate(endDate));
|
|
|
-
|
|
|
- if (StringUtils.isNotEmpty(windturbineids)) {
|
|
|
- List<String> equipmentidsList = Arrays.asList(windturbineids.split(","));
|
|
|
- qw.in("windturbine_id", equipmentidsList);
|
|
|
- } else if (StringUtils.isNotEmpty(squareids)) {
|
|
|
- List<String> squareidList = Arrays.asList(squareids.split(","));
|
|
|
- qw.in("square_id", squareidList);
|
|
|
- } else if (StringUtils.isNotEmpty(lineids)) {
|
|
|
- List<String> lineList = Arrays.asList(lineids.split(","));
|
|
|
- qw.in("line_id", lineList).isNotNull("square_id").ne("square_id", "");
|
|
|
- } else if (StringUtils.isNotEmpty(projectids)) {
|
|
|
- List<String> projectList = Arrays.asList(projectids.split(","));
|
|
|
- qw.in("project_id", projectList).isNotNull("square_id").ne("square_id", "");
|
|
|
- } else if (StringUtils.isNotEmpty(wpids)) {
|
|
|
+ if (StringUtils.isNotEmpty(wpids)) {
|
|
|
List<String> wpList = Arrays.asList(wpids.split(","));
|
|
|
- qw.in("windpowerstation_id", wpList).isNotNull("square_id").ne("square_id", "");
|
|
|
+ qw.in("windpowerstation_id", wpList);
|
|
|
} else if (StringUtils.isNotEmpty(companys)) {
|
|
|
+
|
|
|
String[] split = companys.split(",");
|
|
|
+
|
|
|
if (companys.contains("RGN")) {
|
|
|
for (String s : split) {
|
|
|
if (s.endsWith("RGN")) {
|
|
@@ -1242,8 +1231,8 @@ public List<ProBasicOrganizeTree> modellist(String wpids) {
|
|
|
} else {
|
|
|
qw.like("windturbine_id", "_IN_");
|
|
|
}
|
|
|
- qw.groupBy("windturbine_id");
|
|
|
- List<WxsslVo> wxsslVoList = getxinWxsslSortVos(qw, resultList, TYPE_WINDTURBINE,model,wpids);
|
|
|
+ qw.groupBy("windpowerstation_id");
|
|
|
+ List<WxsslVo> wxsslVoList = getxinWxsslSortVos(qw, resultList, TYPE_WIND,wpids,model);
|
|
|
if (StringUtils.isNotEmpty(target) && StringUtils.isNotEmpty(sort)) {
|
|
|
if (sort.equals("1")) {
|
|
|
SortUtils.sort(resultList, target, SortUtils.ASC);
|