From 74d068d0bf8a55fd8c910b46de8d3e0c0fc2ecf7 Mon Sep 17 00:00:00 2001 From: sjz <1240968267@qq.com> Date: 星期一, 21 四月 2025 12:13:43 +0800 Subject: [PATCH] 处理 获取金蝶云库存返回的空字段 --- MES.Service/service/QC/BaseService.cs | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/MES.Service/service/QC/BaseService.cs b/MES.Service/service/QC/BaseService.cs index a827168..4c9af3a 100644 --- a/MES.Service/service/QC/BaseService.cs +++ b/MES.Service/service/QC/BaseService.cs @@ -5,14 +5,15 @@ public class BaseService { - public string[]? getUserLineNo(string userNo) + public string?[] getUserLineNo(string userNo) { //MesLineUser var db = SqlSugarHelper.GetInstance(); var mesLineUsers = db.Queryable<MesLineUser>() .Where(a => a.Fcode == userNo) .ToList(); - return mesLineUsers.Select(s => s.LineNo).ToArray(); + // 浣跨敤 Distinct 鏂规硶瀵� LineNo 杩涜鍘婚噸 + return mesLineUsers.Select(s => s.LineNo).Distinct().ToArray(); } public int saveImage(List<MesQsImage> entity) -- Gitblit v1.9.3