电量差值计算

master
tq 1 month ago
parent 2df864b383
commit 4a468d137f

@ -104,10 +104,13 @@ public class SwapOrderController : ControllerBase
swapOrder.DownBatteryElectricQuantity = ((double)swapOrder.DownBatterySoc * 3.75).ToString();
swapOrder.UpBatteryElectricQuantity = ((double)swapOrder.UpBatterySoc * 3.75).ToString();
if (swapOrderBatteryResp.DownNominalEnergy!=null&&swapOrderBatteryResp.UpNominalEnergy!=null)
if (swapOrderBatteryResp.DownNominalEnergy!=null&&swapOrderBatteryResp.UpNominalEnergy!=null
&&swapOrderBatteryResp.UpBatterySoc!=null
&&swapOrderBatteryResp.DownBatterySoc!=null
)
{
swapOrder.ElectricQuantity = (swapOrderBatteryResp.UpNominalEnergy -
swapOrderBatteryResp.DownNominalEnergy).ToString();
swapOrder.ElectricQuantity = (swapOrderBatteryResp.UpNominalEnergy* swapOrderBatteryResp.UpBatterySoc-
swapOrderBatteryResp.DownNominalEnergy*swapOrderBatteryResp.DownBatterySoc).ToString();
}
}

Loading…
Cancel
Save