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