😭开放接口给Sap修改逻辑

This commit is contained in:
bairubing 2024-10-21 13:33:59 +08:00
parent 2095b88323
commit 0a109b93c7

View File

@ -79,7 +79,7 @@ public class SapOpenInterfaceService : IDynamicApiController, ITransient
return response;
}
//判断是否存在客户记录
var clientExists = await _obj132Rep.AsQueryable().AnyAsync(x => x._System_objNBS == input._System_objNBS);
var clientExists = await _obj132Rep.AsQueryable().AnyAsync(x => x._System_objNBS == input._System_objNBS && x.deleted == false);
if (clientExists == false)
{
@ -104,7 +104,7 @@ public class SapOpenInterfaceService : IDynamicApiController, ITransient
field_group_id = 422,
fields = fieldList
};
response= await _solidWorksManageService.CreateRecord(data);
response = await _solidWorksManageService.CreateRecord(data);
return response;
}
else if (clientExists == true)
@ -116,7 +116,7 @@ public class SapOpenInterfaceService : IDynamicApiController, ITransient
fld004808 = input.fld004808,
fld004950 = input.fld004950
})
.Where(x => x._System_objNBS == input._System_objNBS)
.Where(x => x._System_objNBS == input._System_objNBS && x.deleted == false)
.ExecuteCommandHasChangeAsync();
response.Success = true;