现场更改,区间电池设置模型ID添加可以相同。基础配置充电仓信息中顺序调整

zw
CZ 5 months ago
parent 20d70b954a
commit bd3325234e

@ -34,6 +34,7 @@ namespace Repository.Station
.OrderBuilder(input) .OrderBuilder(input)
.WithNoLockOrNot(blUseNoLock) .WithNoLockOrNot(blUseNoLock)
.ToPageListAsync(pageNumber, pageSize, totalNumber); .ToPageListAsync(pageNumber, pageSize, totalNumber);
page.Reverse();//倒序一下
return page; return page;
} }
} }

@ -105,11 +105,11 @@ public class BatteryOpModelDetailService : BaseServices<BatteryOpModelDetail>
} }
// 检查两个表模型id是否已存在 // 检查两个表模型id是否已存在
var isExistModel = await _batteryOpModelRepository.QueryByClauseAsync(u => u.ModelId == input.ModelId); /*var isExistModel = await _batteryOpModelRepository.QueryByClauseAsync(u => u.ModelId == input.ModelId);
if (isExistModel != null) if (isExistModel != null)
{ {
return Result<string>.Fail("模型id在模型详情表已存在"); return Result<string>.Fail("模型id在模型详情表已存在");
} }*/
var batteryOpModel = new BatteryOpModel var batteryOpModel = new BatteryOpModel
{ {
@ -117,7 +117,12 @@ public class BatteryOpModelDetailService : BaseServices<BatteryOpModelDetail>
}; };
await _batteryOpModelDetailRepository.InsertAsync(input); await _batteryOpModelDetailRepository.InsertAsync(input);
var isExistModel = await _batteryOpModelRepository.QueryByClauseAsync(u => u.ModelId == input.ModelId);
if (isExistModel == null)
{
//return Result<string>.Fail("模型id在模型详情表已存在");
await _batteryOpModelRepository.InsertAsync(batteryOpModel); await _batteryOpModelRepository.InsertAsync(batteryOpModel);
}
var insertedDetail = var insertedDetail =
await _batteryOpModelDetailRepository.QueryByClauseAsync(u => u.ModelId == input.ModelId); await _batteryOpModelDetailRepository.QueryByClauseAsync(u => u.ModelId == input.ModelId);

Loading…
Cancel
Save