master
lxw 5 months ago
parent 0f46ce90d4
commit 20d70b954a

@ -97,11 +97,6 @@ public class BatteryOpModelDetailService : BaseServices<BatteryOpModelDetail>
List<BatteryOpModelDetail> batteryOpModelDetails = await _batteryOpModelDetailRepository.QueryAsync();
foreach (var detail in batteryOpModelDetails)
{
if (detail.ModelId == input.ModelId)
{
return Result<string>.Fail("模型id在模型详情表已存在");
}
if (detail.StartTime == input.StartTime && detail.Id != input.Id ||
detail.EndTime == input.EndTime && detail.Id != input.Id)
{
@ -147,10 +142,6 @@ public class BatteryOpModelDetailService : BaseServices<BatteryOpModelDetail>
List<BatteryOpModelDetail> batteryOpModelDetails = await _batteryOpModelDetailRepository.QueryAsync();
foreach (var detail in batteryOpModelDetails)
{
if (detail.ModelId == batteryOpReq.ModelId&& detail.Id != batteryOpReq.Id)
{
return Result<string>.Fail("模型id在模型详情表已存在");
}
if (detail.StartTime == batteryOpReq.StartTime && detail.Id != batteryOpReq.Id ||
detail.EndTime == batteryOpReq.EndTime && detail.Id != batteryOpReq.Id)

Loading…
Cancel
Save