Commit c8da2863 authored by tangwei's avatar tangwei

增加场站统计接口

parent c1c650ed
......@@ -12,6 +12,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 第三方场站
......@@ -157,4 +158,11 @@ public class JpStationDto extends BaseDto {
private Double fullhour;
/**
*
* 实时功率比/
* **/
List<Map<String,Object>> powerRatio;
}
......@@ -33,7 +33,7 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
List<DropDown> getDealer(@Param("regionalCompaniesCode") String regionalCompaniesCode);
@UserEmpower(field ={"regional_companies_code","amos_company_code"} ,fieldConditions ={"in","in"} ,relationship="and")
JpStation getCountJpStationdata(@Param("dto") JpStationDto reviewDto);
JpStationDto getCountJpStationdata(@Param("dto") JpStationDto reviewDto);
@UserEmpower(field ={"regional_companies_code","amos_company_code"} ,fieldConditions ={"in","in"} ,relationship="and")
List<Map<String,Object>> getcountState(@Param("dto") JpStationDto reviewDto);
......
......@@ -215,7 +215,7 @@
<select id="getCountJpStationdata" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.JpStation">
<select id="getCountJpStationdata" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto">
select
......
......@@ -388,9 +388,14 @@ public class JpStationController extends BaseController {
@ApiOperation(httpMethod = "GET",value = "电站发电量统计", notes = "电站发电量统计")
@GetMapping(value = "/getCountJpStationdata")
@UserLimits
public ResponseModel< List<JpStation>> getCountJpStationdata(JpStationDto reviewDto) {
JpStation jpStation= jpStationMapper.getCountJpStationdata(reviewDto);
List<JpStation> list=new ArrayList<>();
public ResponseModel< List<JpStationDto>> getCountJpStationdata(JpStationDto reviewDto) {
JpStationDto jpStation= jpStationMapper.getCountJpStationdata(reviewDto);
List<Map<String,Object>> powerRatio=new ArrayList<>();
Map<String,Object> map=new HashMap<>();
map.put("value",String.format("%.2f",jpStation.getRealTimePower()/jpStation.getRatedPower()));
powerRatio.add(map);
jpStation.setPowerRatio(powerRatio);
List<JpStationDto> list=new ArrayList<>();
list.add(jpStation);
return ResponseHelper.buildResponse(list);
}
......@@ -412,7 +417,7 @@ public class JpStationController extends BaseController {
@GetMapping(value = "/getEnergyConservation")
@UserLimits
public ResponseModel< Map<String,Object>> getEnergyConservation(JpStationDto reviewDto) {
JpStation jpStation= jpStationMapper.getCountJpStationdata(reviewDto);
JpStationDto jpStation= jpStationMapper.getCountJpStationdata(reviewDto);
Map<String,Object> map=new HashMap<>();
DecimalFormat format2 = new DecimalFormat("#.00");
//炭
......@@ -537,12 +542,16 @@ public class JpStationController extends BaseController {
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "登录人场站", notes = "登录人场站")
@GetMapping(value = "/getuserJpStation")
public ResponseModel< List<JpStation>> getuserJpStation(JpStationDto reviewDto) {
List<JpStation> list = jpStationServiceImpl.getJpStation(reviewDto);
return ResponseHelper.buildResponse(list);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "工率曲线", notes = "电站监控电量收益")
@GetMapping(value = "/test")
public Object getPowerqx(JpStationDto reviewDto) {
......
......@@ -392,10 +392,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
list = getJpStationDtoyear( dataJpStation, listyear);
break;
default:
list = getJpStationDtoAll(dataJpStation);
}
PageInfo<JpStationDto> page = new PageInfo(list);
com.baomidou.mybatisplus.extension.plugins.pagination.Page<JpStationDto> pagenew = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<JpStationDto>();
......@@ -419,14 +416,12 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
hd.setStationContact(jpStation.getStationContact());
hd.setState(jpStation.getState());
hd.setAccumulatedPower(jpStation.getAccumulatedPower());
hd.setFullhour(jpStation.getAccumulatedPower()/jpStation.getCapacity());
hd.setFullhour(Double.valueOf(String.format("%.2f", jpStation.getAccumulatedPower()/jpStation.getCapacity())));
hd.setAccumulatedPower(jpStation.getAccumulatedPower());
hd.setDayIncome(null);
ld.add(hd);
}
return ld;
}
......
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