|
@@ -51,7 +51,7 @@ public class WindturbinegoodnessService {
|
|
|
//构造分页构造器
|
|
|
Page<ProEconWindturbineGoodness> pageInfo = new Page<>(pageNum, pageSize);
|
|
|
if (StringUtils.notEmp(type) && StringUtils.notEmp(recorddate)) {
|
|
|
- Date date = com.gyee.common.util.DateUtils.parseDate(recorddate);
|
|
|
+ Date date = com.gyee.common.util.DateUtils.parseDate(recorddate);
|
|
|
|
|
|
//构造条件构造器
|
|
|
LambdaQueryWrapper<ProEconWindturbineGoodness> queryWrapper = new LambdaQueryWrapper<>();
|
|
@@ -268,7 +268,7 @@ public class WindturbinegoodnessService {
|
|
|
zt = zttemp;
|
|
|
c = Calendar.getInstance();
|
|
|
c.setTime(resultDate);
|
|
|
-// c.add(Calendar.MINUTE, -6);
|
|
|
+ // c.add(Calendar.MINUTE, -6);
|
|
|
endTime = sdf.format(c.getTime());
|
|
|
time = sdf2.format(c.getTime());
|
|
|
|
|
@@ -294,7 +294,7 @@ public class WindturbinegoodnessService {
|
|
|
zt = zttemp;
|
|
|
c = Calendar.getInstance();
|
|
|
c.setTime(resultDate);
|
|
|
-// c.add(Calendar.MINUTE, -6);
|
|
|
+ // c.add(Calendar.MINUTE, -6);
|
|
|
endTime = sdf.format(c.getTime());
|
|
|
time = sdf2.format(c.getTime());
|
|
|
|
|
@@ -399,11 +399,11 @@ public class WindturbinegoodnessService {
|
|
|
double endfdl = 0.0;
|
|
|
double fdl = 0.0;
|
|
|
|
|
|
-// String[] id=new String[1];
|
|
|
-// DNAVal[] val= edosUtil.getHistMatrix(id,begindate.getTime() / 1000);
|
|
|
-// beginfdl=val[0].DValue;
|
|
|
-// val= edosUtil.getHistMatrix(id,enddate.getTime() / 1000);
|
|
|
-// endfdl=val[0].DValue;
|
|
|
+ // String[] id=new String[1];
|
|
|
+ // DNAVal[] val= edosUtil.getHistMatrix(id,begindate.getTime() / 1000);
|
|
|
+ // beginfdl=val[0].DValue;
|
|
|
+ // val= edosUtil.getHistMatrix(id,enddate.getTime() / 1000);
|
|
|
+ // endfdl=val[0].DValue;
|
|
|
List<PointData> beginfdlls = edosUtil.getHistoryDatasSnap(fdlAi,
|
|
|
begindate.getTime() / 1000, begindate.getTime() / 1000,
|
|
|
(long) 1, 3600L);
|
|
@@ -872,53 +872,60 @@ public class WindturbinegoodnessService {
|
|
|
return vos;
|
|
|
}
|
|
|
|
|
|
- public List<PvVo> pvgoodness(String companys, String wpid, String recorddate, String target, String sort) {
|
|
|
+ public List<PvVo> pvgoodness(Integer pageNum, Integer pageSize, String companys, String wpid, String recorddate, String target, String sort) {
|
|
|
|
|
|
Map<String, ProEconEquipmentmodel> modelMap = CacheContext.modelMap;
|
|
|
Map<String, ProBasicOrganizeTree> wtmap = CacheContext.wtmap;
|
|
|
List<PvVo> resultList = new ArrayList<>();
|
|
|
LambdaQueryWrapper<ProEconEquipmentInfoDay6> qw = new LambdaQueryWrapper<>();
|
|
|
|
|
|
- qw.eq(ProEconEquipmentInfoDay6::getRecordDate,DateUtils.parseDate(recorddate));
|
|
|
+ qw.eq(ProEconEquipmentInfoDay6::getRecordDate, DateUtils.parseDate(recorddate));
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(companys)){
|
|
|
- if (companys.endsWith("ZGS")){
|
|
|
- qw.eq(ProEconEquipmentInfoDay6::getCompanyId,companys);
|
|
|
+ if (StringUtils.isNotEmpty(companys)) {
|
|
|
+ if (companys.endsWith("ZGS")) {
|
|
|
+ qw.eq(ProEconEquipmentInfoDay6::getCompanyId, companys);
|
|
|
}
|
|
|
|
|
|
- if (companys.endsWith("RGN")){
|
|
|
- qw.eq(ProEconEquipmentInfoDay6::getRegionId,companys);
|
|
|
+ if (companys.endsWith("RGN")) {
|
|
|
+ qw.eq(ProEconEquipmentInfoDay6::getRegionId, companys);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- if (StringUtils.isNotEmpty(wpid)){
|
|
|
- qw.eq(ProEconEquipmentInfoDay6::getWindpowerstationId,wpid);
|
|
|
+ if (StringUtils.isNotEmpty(wpid)) {
|
|
|
+ qw.eq(ProEconEquipmentInfoDay6::getWindpowerstationId, wpid);
|
|
|
}
|
|
|
- List<ProEconEquipmentInfoDay6> equipmentInfoDay6s = proEconEquipmentInfoDay6Service.list(qw);
|
|
|
+ if (StringUtils.empty(pageNum)) {
|
|
|
+ pageNum = 1;
|
|
|
+ }
|
|
|
+ if (StringUtils.empty(pageSize)) {
|
|
|
+ pageSize = 10;
|
|
|
+ }
|
|
|
+ Page<ProEconEquipmentInfoDay6> page = new Page<>(pageNum, pageSize);
|
|
|
+ Page<ProEconEquipmentInfoDay6> equipmentInfoDay6s = proEconEquipmentInfoDay6Service.page(page, qw);
|
|
|
|
|
|
- equipmentInfoDay6s.stream().forEach(i->{
|
|
|
+ equipmentInfoDay6s.getRecords().forEach(i -> {
|
|
|
PvVo vo = new PvVo();
|
|
|
vo.setWtid(i.getWindturbineId());
|
|
|
vo.setWtname(wtmap.get(i.getWindturbineId()).getAname());
|
|
|
vo.setModel(modelMap.get(wtmap.get(i.getWindturbineId()).getModelId()).getAname());
|
|
|
- vo.setRxtxl(DoubleUtils.keepPrecision(i.getRxtxl(),2));
|
|
|
- vo.setRlsl(DoubleUtils.keepPrecision(i.getRlsl(),2));
|
|
|
- vo.setRzhxl(DoubleUtils.keepPrecision(i.getRnbqzhxl(),2));
|
|
|
+ vo.setRxtxl(DoubleUtils.keepPrecision(i.getRxtxl(), 2));
|
|
|
+ vo.setRlsl(DoubleUtils.keepPrecision(i.getRlsl(), 2));
|
|
|
+ vo.setRzhxl(DoubleUtils.keepPrecision(i.getRnbqzhxl(), 2));
|
|
|
|
|
|
- vo.setYxtxl(DoubleUtils.keepPrecision(i.getYxtxl(),2));
|
|
|
- vo.setYlsl(DoubleUtils.keepPrecision(i.getYlsl(),2));
|
|
|
- vo.setYzhxl(DoubleUtils.keepPrecision(i.getYnbqzhxl(),2));
|
|
|
+ vo.setYxtxl(DoubleUtils.keepPrecision(i.getYxtxl(), 2));
|
|
|
+ vo.setYlsl(DoubleUtils.keepPrecision(i.getYlsl(), 2));
|
|
|
+ vo.setYzhxl(DoubleUtils.keepPrecision(i.getYnbqzhxl(), 2));
|
|
|
|
|
|
- vo.setNxtxl(DoubleUtils.keepPrecision(i.getNxtxl(),2));
|
|
|
- vo.setNlsl(DoubleUtils.keepPrecision(i.getNlsl(),2));
|
|
|
- vo.setNzhxl(DoubleUtils.keepPrecision(i.getNnbqzhxl(),2));
|
|
|
+ vo.setNxtxl(DoubleUtils.keepPrecision(i.getNxtxl(), 2));
|
|
|
+ vo.setNlsl(DoubleUtils.keepPrecision(i.getNlsl(), 2));
|
|
|
+ vo.setNzhxl(DoubleUtils.keepPrecision(i.getNnbqzhxl(), 2));
|
|
|
resultList.add(vo);
|
|
|
});
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(target)){
|
|
|
+ if (StringUtils.isNotEmpty(target)) {
|
|
|
if (sort.equals("1"))
|
|
|
- SortUtils.sort(resultList,target,SortUtils.ASC);
|
|
|
- SortUtils.sort(resultList,target,SortUtils.DESC);
|
|
|
+ SortUtils.sort(resultList, target, SortUtils.ASC);
|
|
|
+ SortUtils.sort(resultList, target, SortUtils.DESC);
|
|
|
}
|
|
|
|
|
|
return resultList;
|
|
@@ -930,42 +937,42 @@ public class WindturbinegoodnessService {
|
|
|
List<PvVo> resultList = new ArrayList<>();
|
|
|
LambdaQueryWrapper<ProEconEquipmentInfoDay6> qw = new LambdaQueryWrapper<>();
|
|
|
|
|
|
- qw.le(ProEconEquipmentInfoDay6::getRecordDate,DateUtils.parseDate(endDate));
|
|
|
- qw.ge(ProEconEquipmentInfoDay6::getRecordDate,DateUtils.parseDate(beginDate));
|
|
|
+ qw.le(ProEconEquipmentInfoDay6::getRecordDate, DateUtils.parseDate(endDate));
|
|
|
+ qw.ge(ProEconEquipmentInfoDay6::getRecordDate, DateUtils.parseDate(beginDate));
|
|
|
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(wpid)){
|
|
|
- qw.eq(ProEconEquipmentInfoDay6::getWindpowerstationId,wpid);
|
|
|
+ if (StringUtils.isNotEmpty(wpid)) {
|
|
|
+ qw.eq(ProEconEquipmentInfoDay6::getWindpowerstationId, wpid);
|
|
|
}
|
|
|
- if (StringUtils.isNotEmpty(wtid)){
|
|
|
- qw.eq(ProEconEquipmentInfoDay6::getWindturbineId,wtid);
|
|
|
+ if (StringUtils.isNotEmpty(wtid)) {
|
|
|
+ qw.eq(ProEconEquipmentInfoDay6::getWindturbineId, wtid);
|
|
|
}
|
|
|
List<ProEconEquipmentInfoDay6> equipmentInfoDay6s = proEconEquipmentInfoDay6Service.list(qw);
|
|
|
|
|
|
- equipmentInfoDay6s.stream().forEach(i->{
|
|
|
+ equipmentInfoDay6s.stream().forEach(i -> {
|
|
|
PvVo vo = new PvVo();
|
|
|
vo.setWtid(i.getWindturbineId());
|
|
|
vo.setWtname(wtmap.get(i.getWindturbineId()).getAname());
|
|
|
vo.setDate(i.getRecordDate());
|
|
|
vo.setModel(modelMap.get(wtmap.get(i.getWindturbineId()).getModelId()).getAname());
|
|
|
- vo.setRxtxl(DoubleUtils.keepPrecision(i.getRxtxl(),2));
|
|
|
- vo.setRlsl(DoubleUtils.keepPrecision(i.getRlsl(),2));
|
|
|
- vo.setRzhxl(DoubleUtils.keepPrecision(i.getRnbqzhxl(),2));
|
|
|
+ vo.setRxtxl(DoubleUtils.keepPrecision(i.getRxtxl(), 2));
|
|
|
+ vo.setRlsl(DoubleUtils.keepPrecision(i.getRlsl(), 2));
|
|
|
+ vo.setRzhxl(DoubleUtils.keepPrecision(i.getRnbqzhxl(), 2));
|
|
|
|
|
|
- vo.setYxtxl(DoubleUtils.keepPrecision(i.getYxtxl(),2));
|
|
|
- vo.setYlsl(DoubleUtils.keepPrecision(i.getYlsl(),2));
|
|
|
- vo.setYzhxl(DoubleUtils.keepPrecision(i.getYnbqzhxl(),2));
|
|
|
+ vo.setYxtxl(DoubleUtils.keepPrecision(i.getYxtxl(), 2));
|
|
|
+ vo.setYlsl(DoubleUtils.keepPrecision(i.getYlsl(), 2));
|
|
|
+ vo.setYzhxl(DoubleUtils.keepPrecision(i.getYnbqzhxl(), 2));
|
|
|
|
|
|
- vo.setNxtxl(DoubleUtils.keepPrecision(i.getNxtxl(),2));
|
|
|
- vo.setNlsl(DoubleUtils.keepPrecision(i.getNlsl(),2));
|
|
|
- vo.setNzhxl(DoubleUtils.keepPrecision(i.getNnbqzhxl(),2));
|
|
|
+ vo.setNxtxl(DoubleUtils.keepPrecision(i.getNxtxl(), 2));
|
|
|
+ vo.setNlsl(DoubleUtils.keepPrecision(i.getNlsl(), 2));
|
|
|
+ vo.setNzhxl(DoubleUtils.keepPrecision(i.getNnbqzhxl(), 2));
|
|
|
resultList.add(vo);
|
|
|
});
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(target)){
|
|
|
+ if (StringUtils.isNotEmpty(target)) {
|
|
|
if (sort.equals("1"))
|
|
|
- SortUtils.sort(resultList,target,SortUtils.ASC);
|
|
|
- SortUtils.sort(resultList,target,SortUtils.DESC);
|
|
|
+ SortUtils.sort(resultList, target, SortUtils.ASC);
|
|
|
+ SortUtils.sort(resultList, target, SortUtils.DESC);
|
|
|
}
|
|
|
|
|
|
return resultList;
|