Commit 6e5b6b4e authored by tangwei's avatar tangwei

修改监盘功率bug

parent 323862c1
...@@ -63,6 +63,8 @@ public class ImasterConstant { ...@@ -63,6 +63,8 @@ public class ImasterConstant {
public static String baseurl ="https://cn.fusionsolar.huawei.com"; public static String baseurl ="https://cn.fusionsolar.huawei.com";
public static String account ="ahsjmg-API"; public static String account ="ahsjmg-API";
public static String password ="huawei123"; public static String password ="huawei123";
// public static String account ="xtt163";
// public static String password ="a1234560";
public static String tokenUrl ="/thirdData/login"; public static String tokenUrl ="/thirdData/login";
......
...@@ -138,7 +138,7 @@ public class HouseholdTestController { ...@@ -138,7 +138,7 @@ public class HouseholdTestController {
imasterDataService.stationList(); imasterDataService.stationList();
imasterDataService.stationDetail(); imasterDataService.stationDetail();
imasterDataService.collectorList(); imasterDataService.collectorList();
imasterDataService.inverterList(); imasterDataService.inverterList(null);
imasterDataService.inverterDetail(); // imasterDataService.inverterDetail(null);
} }
} }
...@@ -18,4 +18,9 @@ public class ImasterCollectorList { ...@@ -18,4 +18,9 @@ public class ImasterCollectorList {
private String invType; private String invType;
private Double longitude; private Double longitude;
private Double latitude; private Double latitude;
private String addr;
private String collectorSnCode;
} }
package com.yeejoin.amos.api.householdapi.face.service; package com.yeejoin.amos.api.householdapi.face.service;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.ImasterCollectorList;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.ImasterInverterList;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.ImasterInverterListDetails;
import java.util.List;
public interface ImasterDataService { public interface ImasterDataService {
/** /**
...@@ -21,11 +27,11 @@ public interface ImasterDataService { ...@@ -21,11 +27,11 @@ public interface ImasterDataService {
/** /**
* @descrption 逆变器列表数据入库 * @descrption 逆变器列表数据入库
*/ */
void inverterList(); void inverterList(List<ImasterCollectorList> result);
/** /**
* @descrption 逆变器详情数据入库 * @descrption 逆变器详情数据入库
*/ */
void inverterDetail(); void inverterDetail(List<ImasterInverterListDetails> result);
/** /**
* @descrption 采集器告警列表数据入库 * @descrption 采集器告警列表数据入库
*/ */
......
...@@ -277,28 +277,42 @@ public class JpStationController extends BaseController { ...@@ -277,28 +277,42 @@ public class JpStationController extends BaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false,ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "工率曲线", notes = "电站监控电量收益") @ApiOperation(httpMethod = "GET",value = "工率曲线", notes = "电站监控电量收益")
@GetMapping(value = "/getPowerqx") @GetMapping(value = "/getPowerqx")
public ResponseModel< Map<String, List<Object>>> getPowerqx(JpStationDto reviewDto,String date, String type) { public ResponseModel< Map<String, List<Object>>> getPowerqx(JpStationDto reviewDto,String date, String type) {
//获取当前人管理场站 //获取当前人管理场站
List<String> data=new ArrayList(); List<String> data=new ArrayList();
if(reviewDto.getThirdStationId()==null){ Set<String> se=new HashSet<>();
//获取当前人管理场站 if(reviewDto.getName()!=null){
LambdaQueryWrapper<JpPersonStation> qug=new LambdaQueryWrapper<>(); LambdaQueryWrapper<JpPersonStation> qug1=new LambdaQueryWrapper<>();
qug.eq(JpPersonStation::getPersonId,getUserInfo().getUserId()); qug1.like(JpPersonStation::getStationName,reviewDto.getName());
List<JpPersonStation> pPersonStation=pPersonStationMapper.selectList(qug); List<JpPersonStation> pPersonStation1=pPersonStationMapper.selectList(qug1);
if(pPersonStation!=null&&!pPersonStation.isEmpty()){ if(pPersonStation1!=null&&!pPersonStation1.isEmpty()){
for (JpPersonStation jpPersonStation : pPersonStation1) {
se.add(jpPersonStation.getStationId());
}
}
data.addAll(se);
}else{
if(reviewDto.getThirdStationId()==null){
//获取当前人管理场站
LambdaQueryWrapper<JpPersonStation> qug=new LambdaQueryWrapper<>();
qug.eq(JpPersonStation::getPersonId,getUserInfo().getUserId());
List<JpPersonStation> pPersonStation=pPersonStationMapper.selectList(qug);
if(pPersonStation!=null&&!pPersonStation.isEmpty()){
for (JpPersonStation jpPersonStation : pPersonStation) { for (JpPersonStation jpPersonStation : pPersonStation) {
data.add(jpPersonStation.getStationId()); data.add(jpPersonStation.getStationId());
}
}else{
return ResponseHelper.buildResponse(null);
} }
}else{ }else{
return ResponseHelper.buildResponse(null); data.add(reviewDto.getThirdStationId());
} }
}else{
data.add(reviewDto.getThirdStationId());
} }
return ResponseHelper.buildResponse(jpStationServiceImpl.getPowerqx( date, type,data)); return ResponseHelper.buildResponse(jpStationServiceImpl.getPowerqx( date, type,data));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment