修改编辑唯一值卡控

This commit is contained in:
zmrid 2023-02-17 20:53:26 +08:00
parent 18828632bc
commit 06e4c1a31c
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ namespace iMES.Custom.Services
UpdateOnExecuting = (Base_WorkShop workShop, object addList, object updateList, List<object> delKeys) =>
{
//如果返回false,后面代码不会再执行
if (repository.Exists(x => x.WorkShopCode == workShop.WorkShopCode))
if (repository.Exists(x => x.WorkShopCode == workShop.WorkShopCode && x.WorkShopId != workShop.WorkShopId))
{
return webResponse.Error("车间编号已存在");
}