|
|
@@ -61,7 +61,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services |
|
|
|
try |
|
|
|
{ |
|
|
|
_db.Ado.BeginTran(); |
|
|
|
var resEntity = _db.Queryable<BPA_GoodsEnergyConfig>().First(it => it.Name == dto.Name && it.GoodsId != dto.GoodsId); |
|
|
|
var resEntity = _db.Queryable<BPA_GoodsEnergyConfig>().First(it => it.Name == dto.Name && it.GoodsId == dto.GoodsId); |
|
|
|
if (resEntity != null) throw Oops.Oh("配置名称已存在"); |
|
|
|
var newType = new BPA_GoodsEnergyConfig |
|
|
|
{ |
|
|
@@ -88,7 +88,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services |
|
|
|
catch (Exception e) |
|
|
|
{ |
|
|
|
_db.Ado.RollbackTran(); |
|
|
|
throw Oops.Oh("系统异常,异常信息:"+ e.Message); |
|
|
|
throw Oops.Oh("系统异常:"+ e.Message); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|