diff --git a/Src/Dlhis.Basic/Device/Controllers/DevicePermissionsController.cs b/Src/Dlhis.Basic/Device/Controllers/DevicePermissionsController.cs
index ac4563e5..c3b1cd11 100644
--- a/Src/Dlhis.Basic/Device/Controllers/DevicePermissionsController.cs
+++ b/Src/Dlhis.Basic/Device/Controllers/DevicePermissionsController.cs
@@ -30,6 +30,7 @@ public class DevicePermissionsController : ControllerBase
[HttpPost("assign")]
[Transactional]
[IgnoreTenant]
+ [DataPermission]
[AssignPermissionLimit]
public async Task AssignAsync(DevicePermissionSaveRequest request)
{
diff --git a/Src/Dlhis.Basic/Organization/Response/GainfoFacePageResponse.cs b/Src/Dlhis.Basic/Organization/Response/GainfoFacePageResponse.cs
index c105aa40..313221b0 100644
--- a/Src/Dlhis.Basic/Organization/Response/GainfoFacePageResponse.cs
+++ b/Src/Dlhis.Basic/Organization/Response/GainfoFacePageResponse.cs
@@ -25,6 +25,11 @@ public class GainfoFacePageResponse
///
public string UserName { get; set; }
+ ///
+ /// 部门名称
+ ///
+ public string DepartmentName { get; set; }
+
///
/// 是否存在人脸
///
diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoFaceService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoFaceService.cs
index 36d48369..5ee0898d 100644
--- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoFaceService.cs
+++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoFaceService.cs
@@ -50,13 +50,15 @@ public class GainfoFaceService : IGainfoFaceService
var existsFaceCodes = await _faceDbContext.Queryable().Where(x => userCodes.Contains(x.UserCode)).Select(x => x.UserCode).ToListAsync();
var list = await _dbContext.Queryable()
+ .LeftJoin((x, d) => x.DepartmentNo == d.No)
.Where(x => x.Factory == request.Factory)
.WhereIF(request.Exists.HasValue && request.Exists.Value, x => existsFaceCodes.Contains(x.Code))
.WhereIF(request.Exists.HasValue && !request.Exists.Value, x => !existsFaceCodes.Contains(x.Code))
- .Select(x => new GainfoFacePageResponse
+ .Select((x, d) => new GainfoFacePageResponse
{
UserCode = x.Code,
UserName = x.Name,
+ DepartmentName = d.Name,
Exists = false
})
.ToListAsync();
diff --git a/Src/Dlhis.Entity/Dlhis.Entity.csproj b/Src/Dlhis.Entity/Dlhis.Entity.csproj
index 56780d28..978a1283 100644
--- a/Src/Dlhis.Entity/Dlhis.Entity.csproj
+++ b/Src/Dlhis.Entity/Dlhis.Entity.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/Src/Dlhis.ScheduledTask/Jobs/MealSupplementHandlerJob.cs b/Src/Dlhis.ScheduledTask/Jobs/MealSupplementHandlerJob.cs
index b254623c..ab44ca54 100644
--- a/Src/Dlhis.ScheduledTask/Jobs/MealSupplementHandlerJob.cs
+++ b/Src/Dlhis.ScheduledTask/Jobs/MealSupplementHandlerJob.cs
@@ -137,25 +137,6 @@ public class MealSupplementHandlerJob : BaseJob
.ExecuteCommandThrowVersionAsync();
}, 5);
- var r = await _jinkoJIPService.SyncMealSupplementRecordsAsync(new List
- {
- new()
- {
- UniqueId = mealSupplement.UniqueId,
- Status = "SUCCESS",
- Msg = "操作成功"
- }
- });
-
- //更新餐补信息为成功(同步成功)
- await DbContext.Updateable()
- .SetColumns(x => x.Result == r)
- .SetColumns(x => x.Status == MealSupplementStatusEnumtype.Success)
- .SetColumns(x => x.Sync == true)
- .SetColumns(x => x.ModifiedTime == DateTime.Now)
- .Where(x => x.UniqueId == mealSupplement.UniqueId)
- .ExecuteCommandAsync();
-
await DbContext.InsertAsync(new BalanceRecordEntity
{
Amount = mealSupplement.Amount,
@@ -189,6 +170,25 @@ public class MealSupplementHandlerJob : BaseJob
ModifiedBy = 1,
ModifiedTime = DateTime.Now,
});
+
+ var r = await _jinkoJIPService.SyncMealSupplementRecordsAsync(new List
+ {
+ new()
+ {
+ UniqueId = mealSupplement.UniqueId,
+ Status = "SUCCESS",
+ Msg = "操作成功"
+ }
+ });
+
+ //更新餐补信息为成功(同步成功)
+ await DbContext.Updateable()
+ .SetColumns(x => x.Result == r)
+ .SetColumns(x => x.Status == MealSupplementStatusEnumtype.Success)
+ .SetColumns(x => x.Sync == true)
+ .SetColumns(x => x.ModifiedTime == DateTime.Now)
+ .Where(x => x.UniqueId == mealSupplement.UniqueId)
+ .ExecuteCommandAsync();
await DbContext.Client.Ado.CommitTranAsync();
}