diff --git a/Src/Dlhis.Basic/WorkGrids/Controllers/WorkGridsController.cs b/Src/Dlhis.Basic/WorkGrids/Controllers/WorkGridsController.cs
index d3aaba24..20bb2cc0 100644
--- a/Src/Dlhis.Basic/WorkGrids/Controllers/WorkGridsController.cs
+++ b/Src/Dlhis.Basic/WorkGrids/Controllers/WorkGridsController.cs
@@ -199,13 +199,12 @@ public class WorkGridsController : ControllerBase
///
///
[HttpGet("user/attendance/page-all")]
- [IgnoreTenant]
public async Task> GetAllAttendancePageAsync([FromQuery] WorkGridScheduleAttendancePageRequest request)
{
return await _workGridScheduleService.GetAllAttendancePageAsync(request);
}
- ///
+ ///
/// 网格人员考勤记录补传
///
///
diff --git a/Src/Dlhis.Basic/WorkGrids/Response/WorkGridScheduleAttendancePageResponse.cs b/Src/Dlhis.Basic/WorkGrids/Response/WorkGridScheduleAttendancePageResponse.cs
index a89311df..48b6f121 100644
--- a/Src/Dlhis.Basic/WorkGrids/Response/WorkGridScheduleAttendancePageResponse.cs
+++ b/Src/Dlhis.Basic/WorkGrids/Response/WorkGridScheduleAttendancePageResponse.cs
@@ -92,6 +92,21 @@ public class WorkGridScheduleAttendancePageResponse
}
}
+ public string LeaderUserCode
+ {
+ get
+ {
+ if (WorkGridInfoObj != null)
+ {
+ return WorkGridInfoObj?.WorkGrid?.LeaderUserCode;
+ }
+
+ return string.Empty;
+ }
+ }
+
+ public string LeaderUserName { get; set; }
+
///
/// 是否是异常记录
///
diff --git a/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridScheduleService.cs b/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridScheduleService.cs
index c638f6bf..570edb3c 100644
--- a/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridScheduleService.cs
+++ b/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridScheduleService.cs
@@ -315,7 +315,7 @@ public class WorkGridScheduleService : IWorkGridScheduleService
request.UserCode = request.Search;
}
- return await _dbContext.Queryable()
+ var page = await _dbContext.Queryable()
.LeftJoin((log, d) => log.DeviceUniqueNo == d.UniqueNo)
.LeftJoin((log, d, ga) => log.UserUniqueNo == ga.Code)
.WhereIF(request.DateTimePeriod.HasValue(), log => log.RaiseDateTime >= request.DateTimePeriod.Start
@@ -346,6 +346,22 @@ public class WorkGridScheduleService : IWorkGridScheduleService
WorkGridInfo = log.WorkGridInfo,
})
.ToPageListAsync(request);
+
+
+ var leaderUserCodes = page.Data.Select(x => x.LeaderUserCode).Distinct().ToList();
+ var gainfos = await _dbContext.Queryable().Where(x => leaderUserCodes.Contains(x.Code)).Select(x => new { x.Code, x.Name }).ToListAsync();
+
+ page.Data.ForEach(x =>
+ {
+ var gainfo = gainfos.FirstOrDefault(p => p.Code == x.LeaderUserCode);
+ if (gainfo != null)
+ {
+ x.LeaderUserName = gainfo.Name;
+ }
+ });
+
+
+ return page;
}
diff --git a/Src/Dlhis.Basic/appsettings.Development.json b/Src/Dlhis.Basic/appsettings.Development.json
index 0364272d..e384ae4e 100644
--- a/Src/Dlhis.Basic/appsettings.Development.json
+++ b/Src/Dlhis.Basic/appsettings.Development.json
@@ -27,9 +27,9 @@
},
"SwaggerOptions": {
"Enable": true,
- "Authority": "https://yikatong.isawesome.cn/oauth2",
- "ClientId": "4fb184324eac4180",
- "ClientSecret": "8ac8f235152f1524",
+ "Authority": "http://localhost:5000",
+ "ClientId": "98958aa485d38412",
+ "ClientSecret": "52589e011f02fe19",
"Scopes": {
"openid": "openid",
"profile": "profile",
@@ -37,8 +37,8 @@
}
},
"IdentityServerOptions": {
- "Authority": "https://yikatong.isawesome.cn/oauth2",
- "RequireHttpsMetadata": true,
+ "Authority": "http://localhost:5000",
+ "RequireHttpsMetadata": false,
"Issuer": "identity.isawesome.cn",
"Audience": "",
"Pat": {