分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-04-16 e883d7e4bf057f7a2ed7cc001fe27083d82baa22
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Services/system/Partial/dt_inventoryService.cs
@@ -17,6 +17,10 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using WIDESEA_WMS.IRepositories;
using System.Configuration;
using WIDESEA_Comm.LogInfo;
using WIDESEA_Core.ManageUser;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
namespace WIDESEA_WMS.Services
{
@@ -37,5 +41,29 @@
            //多租户会用到这init代码,其他情况可以不用
            //base.Init(dbRepository);
        }
  }
        public override WebResponseContent Del(object[] keys, bool delList = true)
        {
            WebResponseContent content = new WebResponseContent();
            string str = "";
            try
            {
                List<string> KeyList = new List<string>();
                foreach ( string key in keys )
                {
                    KeyList.Add(key);
                }
                var inventoryList= _repository.Find(x=>KeyList.Contains(x.ID.ToString())).ToList();
                 str = $"{string.Join('、', inventoryList.Select(t => t.SN).ToArray())}";
                content = base.Del(keys, delList);
                WriteDBLog.Write($"手动删除库存 ", str, LogState.Sucess, "WMS", UserContext.Current.UserName);
            }
            catch (Exception ex)
            {
                WriteDBLog.Write($"手动删除库存 ", new { é”™è¯¯ä¿¡æ¯ = ex.Message, æ•°æ® = str }, LogState.Error, "WMS", UserContext.Current.UserName);
            }
            return content;
        }
    }
}