From 0b02a95f66bc03c2d51b2d57744de98458f19f87 Mon Sep 17 00:00:00 2001 From: cheche <717840555@qq.com> Date: Tue, 30 Jan 2024 14:53:31 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=A1=A3=E6=A1=88=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Organization/Controllers/GainfosController.cs | 2 +- Src/Dlhis.Basic/Organization/Services/IGainfoService.cs | 2 +- .../Organization/Services/Implements/GainfoService.cs | 8 ++++---- .../Services/Implements/DeviceTaskAssignmentService.cs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Src/Dlhis.Basic/Organization/Controllers/GainfosController.cs b/Src/Dlhis.Basic/Organization/Controllers/GainfosController.cs index 17ddbe3f..667ab402 100644 --- a/Src/Dlhis.Basic/Organization/Controllers/GainfosController.cs +++ b/Src/Dlhis.Basic/Organization/Controllers/GainfosController.cs @@ -152,7 +152,7 @@ public class GainfosController : ControllerBase /// /// [HttpGet("gainfodetail")] - public async Task> GetGainfoDetailTaskAsync([FromQuery] GainfoDetailRequest request) + public async Task GetGainfoDetailTaskAsync([FromQuery] GainfoDetailRequest request) { return await _gainfoService.GetGainfoDetailTaskAsync(request); } diff --git a/Src/Dlhis.Basic/Organization/Services/IGainfoService.cs b/Src/Dlhis.Basic/Organization/Services/IGainfoService.cs index 968b4225..51949307 100644 --- a/Src/Dlhis.Basic/Organization/Services/IGainfoService.cs +++ b/Src/Dlhis.Basic/Organization/Services/IGainfoService.cs @@ -29,5 +29,5 @@ public interface IGainfoService : IScopeDependency Task> GetGainfoListTaskAsync(GainfoListRequest request); - Task> GetGainfoDetailTaskAsync(GainfoDetailRequest request); + Task GetGainfoDetailTaskAsync(GainfoDetailRequest request); } diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs index 06e8e631..7a5506f2 100644 --- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs +++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs @@ -341,9 +341,9 @@ public class GainfoService : IGainfoService /// /// /// - public async Task> GetGainfoDetailTaskAsync(GainfoDetailRequest request) + public async Task GetGainfoDetailTaskAsync(GainfoDetailRequest request) { - var page = await _gainfoStore.Queryable(request.Status) + var info = await _gainfoStore.Queryable(request.Status) .LeftJoin((ga, de) => ga.DepartmentNo == de.No) .LeftJoin((ga,de,type) => ga.Native == type.Code && type.Type == "native") .LeftJoin((ga, de, type,posi) => ga.Position == posi.Name) @@ -373,8 +373,8 @@ public class GainfoService : IGainfoService CountryName = type2.Display, NationName = type3.Display, IsActive = ga.Employed == "Active" ? true : false, - }).ToPageListAsync(request); - return page; + }).FirstAsync(); + return info; } //-------------------------------------------help methods ------------------------------------------------ diff --git a/Src/Dlhis.ScheduledTask/TaskAssignment/Services/Implements/DeviceTaskAssignmentService.cs b/Src/Dlhis.ScheduledTask/TaskAssignment/Services/Implements/DeviceTaskAssignmentService.cs index b2b9b2c1..4169a7e1 100644 --- a/Src/Dlhis.ScheduledTask/TaskAssignment/Services/Implements/DeviceTaskAssignmentService.cs +++ b/Src/Dlhis.ScheduledTask/TaskAssignment/Services/Implements/DeviceTaskAssignmentService.cs @@ -51,8 +51,8 @@ public class DeviceTaskAssignmentService : IDeviceTaskAssignmentService { //获取启用的功能设备 var devices = await _dbContext.Queryable() - //.Where(x => x.Enable && x.Funcs.Contains(request.type)) - .Where(x=>x.UniqueNo == "717840555") + .Where(x => x.Enable && x.Funcs.Contains(request.type)) + //.Where(x=>x.UniqueNo == "717840555") .Select(x => x.UniqueNo) .ToListAsync(); devices.ThrowIfNull($"{request.type.GetDescription}功能机器为空");