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

zw
CZ 5 months ago
parent 20d70b954a
commit bd3325234e

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

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

Loading…
Cancel
Save