|
|
@ -153,6 +153,25 @@ namespace WebStarter.Controllers.Ammeter
|
|
|
|
return Result<EmeterEnergyResp>.Success(resp,"成功");
|
|
|
|
return Result<EmeterEnergyResp>.Success(resp,"成功");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 获取直流交流电表实时数据
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
[HttpGet("GetEnergyMeterRealTime")]
|
|
|
|
|
|
|
|
public async Task<Result<EmeterEnergyResp>> GetEnergyMeterRealTime()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// 获取实时直流和交流表数据
|
|
|
|
|
|
|
|
List<EmeterEnergy> minutesElectrical = await _emeterEnergyService.GetEnergyMeterRealTime();
|
|
|
|
|
|
|
|
List<EmeterEnergyChange> minutesElectricalChange = await _emeterEnergyChangeService.GetEnergyMeterRealTime();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EmeterEnergyResp resp = new EmeterEnergyResp();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ChargeAssignment(minutesElectrical, minutesElectricalChange, resp);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Result<EmeterEnergyResp>.Success(resp,"成功");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static void ChargeAssignment(List<EmeterEnergy> emeterEnergy, List<EmeterEnergyChange> emeterEnergyChanges, EmeterEnergyResp resp)
|
|
|
|
private static void ChargeAssignment(List<EmeterEnergy> emeterEnergy, List<EmeterEnergyChange> emeterEnergyChanges, EmeterEnergyResp resp)
|
|
|
|
{
|
|
|
|
{
|
|
|
|