diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoIdCardFaceCompareService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoIdCardFaceCompareService.cs index 90170693..fa8ef7d7 100644 --- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoIdCardFaceCompareService.cs +++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoIdCardFaceCompareService.cs @@ -148,15 +148,15 @@ public class GainfoIdCardFaceCompareService : IGainfoIdCardFaceCompareService await _dbContext.UpdateAsync(record); - return await GetRecordAsync(record.Id); + return await GetRecordAsync(record.UserCode); } - private async Task GetRecordAsync(long id) + private async Task GetRecordAsync(string userCode) { return await _dbContext.Queryable() .LeftJoin((record, gainfo) => record.UserCode == gainfo.Code) .LeftJoin((record, gainfo, department) => gainfo.DepartmentNo == department.No) - .Where(record => record.Id == id) + .Where(record => record.UserCode == userCode) .Select((record, gainfo, department) => new IdCardFaceCompareRecordResponse { Id = record.Id,