From ea1832894e95fcf57946425e1d7f7f617f38af7f Mon Sep 17 00:00:00 2001 From: liguoyang Date: Tue, 13 May 2025 10:30:42 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E7=A6=BB=E8=81=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WorkGrids/Services/Implements/WorkGridService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridService.cs b/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridService.cs index 074c5f4f..35b9eb15 100644 --- a/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridService.cs +++ b/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridService.cs @@ -161,6 +161,10 @@ public class WorkGridService : IWorkGridService .Where(p => p.Code == x.LeaderUserCode && p.Factory == factory) .Any() || + SqlFunc.Subqueryable() + .Where(p => p.Code == x.LeaderUserCode && p.Factory == factory) + .Any() + || SqlFunc.Subqueryable() .LeftJoin((p, pga) => p.UserCode == pga.Code) .Where(p => p.WorkGridCode == x.Code) @@ -198,7 +202,7 @@ public class WorkGridService : IWorkGridService workGrid.ThrowIfNull($"{from}管理的网格不存在"); var beforeGainfo = await _dbContext.Queryable().Where(x => x.Code == from).SingleAsync(); - beforeGainfo??=await _dbContext.Queryable().Where(x => x.Code == from).SingleAsync(); + beforeGainfo ??= await _dbContext.Queryable().Where(x => x.Code == from).SingleAsync(); beforeGainfo.ThrowIfNull($"{from}人员不存在"); var gainfo = await _dbContext.Queryable().Where(x => x.Code == to).SingleAsync();