From 5707781039b9d902ce1d2d6727fba65bbab14574 Mon Sep 17 00:00:00 2001 From: 啊鑫 <t2856754968@163.com> Date: 星期六, 13 九月 2025 17:02:06 +0800 Subject: [PATCH] 异常单回滚 --- WebApi/Gs.BaseInfo/Services/MesStaffManager.cs | 36 ++++++++++++++---------------------- 1 files changed, 14 insertions(+), 22 deletions(-) diff --git a/WebApi/Gs.BaseInfo/Services/MesStaffManager.cs b/WebApi/Gs.BaseInfo/Services/MesStaffManager.cs index d8cdc49..23936cc 100644 --- a/WebApi/Gs.BaseInfo/Services/MesStaffManager.cs +++ b/WebApi/Gs.BaseInfo/Services/MesStaffManager.cs @@ -17,7 +17,6 @@ private readonly IHttpContextAccessor _http; private readonly string _userCode, _userGuid, _orgFids; - public MesStaffManager(IHttpContextAccessor httpContextAccessor) { _http = httpContextAccessor; @@ -40,32 +39,24 @@ var _sbBy = new StringBuilder(query.sortName + " " + query.sortOrder); var totalCount = 0; - var itemsList = Db - .Queryable<MesStaff, SysOrganization, - MesPosition>((a, org, c) => + var itemsList = Db.Queryable<MesStaff, SysOrganization, MesPosition>((a, org, c) => new object[] { JoinType.Left, a.FSubsidiary == org.Fid, JoinType.Left, a.PositionCode == c.Id.ToString() }).Select((a, org, c) => new MesStaff - { - FSubsidiary = "(" + org.FNumber + ")" + org.Name, - PositionName = c.PositionName, - FforbidStatus = a.FforbidStatus + ":" + - (a.FforbidStatus == "A" ? "姝e父" : "绂佺敤"), - DataType = a.DataType + ":" - + SqlFunc.IF(a.DataType == "Z") - .Return("鏆傚瓨") - .ElseIF(a.DataType == "A") - .Return("鍒涘缓") - .ElseIF(a.DataType == "B") - .Return("瀹℃牳涓�") - .ElseIF(a.DataType == "C") - .Return("宸插鏍�") - .ElseIF(a.DataType == "D") - .Return("閲嶆柊瀹℃牳") - .End(a.DataType) - }, true) + { + FSubsidiary = "(" + org.FNumber + ")" + org.Name, + PositionName = c.PositionName, + FforbidStatus = a.FforbidStatus + ":" + (a.FforbidStatus == "A" ? "姝e父" : "绂佺敤"), + DataType = a.DataType + ":" + + SqlFunc.IF(a.DataType == "Z").Return("鏆傚瓨") + .ElseIF(a.DataType == "A").Return("鍒涘缓") + .ElseIF(a.DataType == "B").Return("瀹℃牳涓�") + .ElseIF(a.DataType == "C").Return("宸插鏍�") + .ElseIF(a.DataType == "D").Return("閲嶆柊瀹℃牳") + .End(a.DataType) + }, true) .Where(_sbWhere.ToString()) .OrderBy(_sbBy.ToString()) .ToPageList(query.currentPage, query.everyPageSize, @@ -97,4 +88,5 @@ "璇诲彇鎴愬姛锛�"); return ReturnDto<MesStaff>.QuickReturn(m, ReturnCode.Default, "璇诲彇澶辫触锛�"); } + } \ No newline at end of file -- Gitblit v1.9.3