|
|
@ -149,6 +149,7 @@ namespace WebStarter.Controllers.BasicConfig
|
|
|
|
stationBaseRespResp.AutoChargeEnabled = StaticStationInfo.AutoChargeEnabled;
|
|
|
|
stationBaseRespResp.AutoChargeEnabled = StaticStationInfo.AutoChargeEnabled;
|
|
|
|
stationBaseRespResp.Oid = StaticStationInfo.Oid;
|
|
|
|
stationBaseRespResp.Oid = StaticStationInfo.Oid;
|
|
|
|
stationBaseRespResp.StationStatus = StaticStationInfo.StationStatus;
|
|
|
|
stationBaseRespResp.StationStatus = StaticStationInfo.StationStatus;
|
|
|
|
|
|
|
|
stationBaseRespResp.ChargeSoc = StaticStationInfo.ChargeSoc;
|
|
|
|
|
|
|
|
|
|
|
|
return Result<StationConfigResp>.Success(stationBaseRespResp);
|
|
|
|
return Result<StationConfigResp>.Success(stationBaseRespResp);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -167,6 +168,8 @@ namespace WebStarter.Controllers.BasicConfig
|
|
|
|
StaticStationInfo.SwapFinishChargeTime = input.SwapFinishChargeTime;
|
|
|
|
StaticStationInfo.SwapFinishChargeTime = input.SwapFinishChargeTime;
|
|
|
|
|
|
|
|
|
|
|
|
StaticStationInfo.AutoChargeEnabled = input.AutoChargeEnabled;
|
|
|
|
StaticStationInfo.AutoChargeEnabled = input.AutoChargeEnabled;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
StaticStationInfo.ChargeSoc = input.ChargeSoc;
|
|
|
|
return Result<bool>.Success();
|
|
|
|
return Result<bool>.Success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -193,6 +196,7 @@ namespace WebStarter.Controllers.BasicConfig
|
|
|
|
Type = item.Type
|
|
|
|
Type = item.Type
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return Result<List<ElecPriceModelVersionDetailResp>>.Success(elecPriceModelVersionDetailResps);
|
|
|
|
return Result<List<ElecPriceModelVersionDetailResp>>.Success(elecPriceModelVersionDetailResps);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -255,6 +259,7 @@ namespace WebStarter.Controllers.BasicConfig
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Result<bool>.Fail("参数不能为空");
|
|
|
|
Result<bool>.Fail("参数不能为空");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
List<ElecPriceModelVersionDetail> elecPriceModelVersionDetails = new List<ElecPriceModelVersionDetail>();
|
|
|
|
List<ElecPriceModelVersionDetail> elecPriceModelVersionDetails = new List<ElecPriceModelVersionDetail>();
|
|
|
|
foreach (var item in model)
|
|
|
|
foreach (var item in model)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -271,19 +276,21 @@ namespace WebStarter.Controllers.BasicConfig
|
|
|
|
Type = item.Type
|
|
|
|
Type = item.Type
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!TimeListIfContains(elecPriceModelVersionDetails))
|
|
|
|
if (!TimeListIfContains(elecPriceModelVersionDetails))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return Result<bool>.Fail("时间区间重复请检查");
|
|
|
|
return Result<bool>.Fail("时间区间重复请检查");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
List<ElecPriceModelVersionDetail> modelFromDbs = await _elecPriceModelVersionDetailServices.QueryListByClauseAsync(u => u.Version == model[0].Version);
|
|
|
|
List<ElecPriceModelVersionDetail> modelFromDbs =
|
|
|
|
|
|
|
|
await _elecPriceModelVersionDetailServices.QueryListByClauseAsync(u => u.Version == model[0].Version);
|
|
|
|
if (modelFromDbs != null)
|
|
|
|
if (modelFromDbs != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
await _elecPriceModelVersionDetailServices.DeleteAsync(i => i.Version == model[0].Version);
|
|
|
|
await _elecPriceModelVersionDetailServices.DeleteAsync(i => i.Version == model[0].Version);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
await _elecPriceModelVersionDetailServices.InsertAsync(elecPriceModelVersionDetails);
|
|
|
|
await _elecPriceModelVersionDetailServices.InsertAsync(elecPriceModelVersionDetails);
|
|
|
|
return Result<bool>.Success(true);
|
|
|
|
return Result<bool>.Success(true);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|