|
|
@ -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);
|
|
|
|