xxyy
2025-03-10 85fd548c3948b4ded198f304204e9ce602761edc
修复日志输出和更正创建者名称

在多个文件中注释掉了 `Console.WriteLine` 调用,以避免在控制台输出日志和错误信息。
更正了 `Creater` 属性的默认值,从 "Systeam" 更改为 "System"。
在 `NotifyFinishTest.cs` 中注释掉了对 `_simpleCacheService.HashDel` 的调用。
修改了 `Program.cs` 中的库存查询逻辑,以确保只获取状态为 `InStock` 的库存信息。
在 `appsettings.json` 中启用了 Redis,并调整了连接信息。
已修改12个文件
421 ■■■■■ 文件已修改
Code Management/WMS/WIDESEA_WMSServer/LogLibrary/Log/Log.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/DB/Models/BaseEntity.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Services/Sys_CompanyRegistrationService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/CellState/CellStateService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/ProcessApply/ProcessApplyService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs 322 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/LogLibrary/Log/Log.cs
@@ -398,7 +398,7 @@
        public void FatalFormat(bool isWriteFile, IFormatProvider provider, string format, params object[] args)
        {
            string log = GetDataTimeLog(string.Format(provider, format, args));
            Console.WriteLine(m_MessageTemplate, m_Name, m_Fatal, log);
            //Console.WriteLine(m_MessageTemplate, m_Name, m_Fatal, log);
            if (isWriteFile)
            {
                LogUtil.WriteLogFile(m_Name, m_Fatal, log);
@@ -415,7 +415,7 @@
        public void FatalFormat(bool isWriteFile, string format, object arg0, object arg1)
        {
            string log = GetDataTimeLog(string.Format(format, arg0, arg1));
            Console.WriteLine(m_MessageTemplate, m_Name, m_Fatal, log);
            //Console.WriteLine(m_MessageTemplate, m_Name, m_Fatal, log);
            if (isWriteFile)
            {
                LogUtil.WriteLogFile(m_Name, m_Fatal, log);
@@ -433,7 +433,7 @@
        public void FatalFormat(bool isWriteFile, string format, object arg0, object arg1, object arg2)
        {
            string log = GetDataTimeLog(string.Format(format, arg0, arg1, arg2));
            Console.WriteLine(m_MessageTemplate, m_Name, m_Fatal, log);
            //Console.WriteLine(m_MessageTemplate, m_Name, m_Fatal, log);
            if (isWriteFile)
            {
                LogUtil.WriteLogFile(m_Name, m_Fatal, log);
@@ -448,7 +448,7 @@
        public void Info(bool isWriteFile, object message)
        {
            string log = GetDataTimeLog(message.ToString());
            Console.WriteLine(m_MessageTemplate, m_Name, m_Info, log);
            //Console.WriteLine(m_MessageTemplate, m_Name, m_Info, log);
            if (isWriteFile)
            {
                LogUtil.WriteLogFile(m_Name, m_Info, log);
@@ -464,7 +464,7 @@
        public void Info(bool isWriteFile, object message, Exception exception)
        {
            string log = GetDataTimeLog(message + Environment.NewLine + exception.Message + exception.StackTrace);
            Console.WriteLine(m_MessageTemplate, m_Name, m_Info, log);
            //Console.WriteLine(m_MessageTemplate, m_Name, m_Info, log);
            if (isWriteFile)
            {
                LogUtil.WriteLogFile(m_Name, m_Info, log);
@@ -480,7 +480,7 @@
        public void InfoFormat(bool isWriteFile, string format, object arg0)
        {
            string log = GetDataTimeLog(string.Format("\n{0}\n{1}\n-----------------------------------------------------------\n\n", format, arg0));
            Console.WriteLine(m_MessageTemplate, m_Name, m_Info, log);
            //Console.WriteLine(m_MessageTemplate, m_Name, m_Info, log);
            if (isWriteFile)
            {
                LogUtil.WriteLogFile(m_Name, m_Info, log);
@@ -570,7 +570,7 @@
        public void Warn(bool isWriteFile, object message)
        {
            string log = GetDataTimeLog(message.ToString());
            Console.WriteLine(m_MessageTemplate, m_Name, m_Warn, log);
            //Console.WriteLine(m_MessageTemplate, m_Name, m_Warn, log);
            if (isWriteFile)
            {
                LogUtil.WriteLogFile(m_Name, m_Warn, log);
@@ -586,7 +586,7 @@
        public void Warn(bool isWriteFile, object message, Exception exception)
        {
            string log = GetDataTimeLog(message + Environment.NewLine + exception.Message + exception.StackTrace);
            Console.WriteLine(m_MessageTemplate, m_Name, m_Warn, log);
            //Console.WriteLine(m_MessageTemplate, m_Name, m_Warn, log);
            if (isWriteFile)
            {
                LogUtil.WriteLogFile(m_Name, m_Warn, log);
@@ -602,7 +602,7 @@
        public void WarnFormat(bool isWriteFile, string format, object arg0)
        {
            string log = GetDataTimeLog(string.Format(format, arg0));
            Console.WriteLine(m_MessageTemplate, m_Name, m_Warn, log);
            //Console.WriteLine(m_MessageTemplate, m_Name, m_Warn, log);
            if (isWriteFile)
            {
                LogUtil.WriteLogFile(m_Name, m_Warn, log);
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/DB/Models/BaseEntity.cs
@@ -50,7 +50,7 @@
        [ImporterHeader(Name = "创建者")]
        [ExporterHeader(DisplayName = "创建者")]
        [SugarColumn(IsNullable = false, IsOnlyIgnoreUpdate = true, ColumnDescription = "创建者")]
        public string Creater { get; set; } = "Systeam";
        public string Creater { get; set; } = "System";
        /// <summary>
        /// 创建时间
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Services/Sys_CompanyRegistrationService.cs
@@ -74,7 +74,7 @@
            // 设置默认值
            registration.RegistrationStatus = "待审核";
            registration.Creater = "Systeam";
            registration.Creater = "System";
            // 创建 HTML 格式的邮件内容
            var bodyBuilder = new BodyBuilder();
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs
@@ -105,8 +105,10 @@
                    if (respone.Status)
                    {
                        var taskId = _taskRepository.AddData(task);
                        location.LocationStatus = (int) LocationEnum.InStockDisable;
                        _locationRepository.UpdateData(location);
                        //_simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { taskDTO.PalletCode });
                        _simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { taskDTO.PalletCode });
                    }
                    else
@@ -118,6 +120,7 @@
                {
                    throw new Exception("WCS处理失败");
                }
                //WMSTaskDTO taskDTO = new WMSTaskDTO
                //{
                //    Id = 0,
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs
@@ -65,7 +65,7 @@
        catch (Exception err)
        {
            //MoMErrorMsg.AddMoMErrorMsg(0, input.TrayBarcode, err.Message, SysConfigConst.AgingInput);
            Console.WriteLine(err.Message.ToString());
            //Console.WriteLine(err.Message.ToString());
            LogFactory.GetLog("静置陈化入库(整托盘)").Error(true, $"\r\r--------------------------------------");
            LogFactory.GetLog("静置陈化入库(整托盘)").Error(true, err.StackTrace);
        }
@@ -115,7 +115,7 @@
        catch (Exception err)
        {
            //MoMErrorMsg.AddMoMErrorMsg(0, input.TrayBarcode, err.Message, SysConfigConst.AgingOutput);
            Console.WriteLine(err.Message.ToString());
            //Console.WriteLine(err.Message.ToString());
            LogFactory.GetLog("静置陈化出库(整托盘)").Error(true, $"\r\r--------------------------------------");
            LogFactory.GetLog("静置陈化出库(整托盘)").Error(true, err.StackTrace);
            content.Error(err.Message);
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/CellState/CellStateService.cs
@@ -60,7 +60,7 @@
        }
        catch (Exception err)
        {
            Console.WriteLine(err.Message.ToString());
            //Console.WriteLine(err.Message.ToString());
            LogFactory.GetLog("单电芯属性获取").Error(true, $"\r\r--------------------------------------");
            LogFactory.GetLog("单电芯属性获取").Error(true, $"请求参数: {JsonConvert.SerializeObject(input)}");
            LogFactory.GetLog("单电芯属性获取").Error(true, err.Message);
@@ -113,7 +113,7 @@
        {
            //MoMErrorMsg.AddMoMErrorMsg(0, input.TrayBarcode, err.Message, SysConfigConst.TrayCellsStatus);
            Console.WriteLine(err.Message.ToString());
            //Console.WriteLine(err.Message.ToString());
            LogFactory.GetLog("整盘电芯属性获取").Error(true, $"\r\r--------------------------------------");
            LogFactory.GetLog("整盘电芯属性获取").Error(true, $"请求参数: {JsonConvert.SerializeObject(input)}");
            LogFactory.GetLog("整盘电芯属性获取").Error(true, err.Message);
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/ProcessApply/ProcessApplyService.cs
@@ -78,7 +78,7 @@
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.Message);
            //Console.WriteLine(ex.Message);
            LogFactory.GetLog("工艺路线申请").Error(true, $"\r\r--------------------------------------");
            LogFactory.GetLog("工艺路线申请").Error(true, ex.StackTrace);
        }
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
@@ -201,7 +201,7 @@
                        RoadwayNo = locType > 1 ? $"GWSC{((line - 1) / 4) + 1}" : $"GWSC{((line - 1) / 2) + 1}",
                        LocationStatus = LocationEnum.Free.ObjToInt(),
                        AreaId = areaId,
                        Creater = "systeam",
                        Creater = "System",
                        EnalbeStatus = 2,
                    });
                }
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -1,5 +1,6 @@
using Mapster;
using Masuit.Tools;
using NewLife.Log;
using SqlSugar;
using System.Text.RegularExpressions;
using WIDESEA_Cache;
@@ -112,12 +113,12 @@
                ConsoleHelper.WriteErrorLine("MOM通报点芯NG");
                return content.Error("MOM通报点芯NG");
            }
            // 更新库存状态和任务状态
            (var loc, var tas) = UpdateStockAndTaskStatus(stock, task);
            var taskHty = task.Adapt<Dt_Task_Hty>();
            taskHty.FinishTime = DateTime.Now;
            taskHty.OperateType = (int)OperateTypeEnum.自动完成;
            taskHty.OperateType = App.User.UserName != null ? (int)OperateTypeEnum.人工完成 : (int)OperateTypeEnum.自动完成;
            taskHty.Creater = App.User.UserName != null ? App.User.UserName : "System";
            DtStockInfo_Hty stockInfo_Hty = stock.Adapt<DtStockInfo_Hty>();
            stockInfo_Hty.ModifyDate = DateTime.Now;
@@ -137,18 +138,17 @@
            });
            try
            {
                using(_simpleCacheService.AcquireLock(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, 2000))
                {
                    _simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { stock.PalletCode });
                }
                //using (_simpleCacheService.AcquireLock(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, 2000))
                //{
                _simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { stock.PalletCode });
                //}
            }
            catch (Exception ex)
            {
                LogFactory.GetLog("删除缓存失败").Error(true, $"{stock.PalletCode}_删除缓存失败,异常信息:{ex.Message}");
                using(_simpleCacheService.AcquireLock(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, 2000))
                {
                    _simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { stock.PalletCode });
                }
                //using (_simpleCacheService.AcquireLock(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, 2000))
                //{
                //}
            }
            return content.OK("任务完成成功", task.Remark);
@@ -386,9 +386,16 @@
                _locationStatusChangeRecordRepository.AddLocationStatusChangeRecord(locationInf, lastStatus, (int)StatusChangeTypeEnum.AutomaticStorage, task.TaskNum);
                stock.StockInfoDetails = new List<DtStockInfoDetail>() { { stock.StockInfoDetails[0] } };
                using(_simpleCacheService.AcquireLock(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, 2000))
                stock.LocationInfo = locationInf;
                //using(_simpleCacheService.AcquireLock(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, 2000))
                //{
                try
                {
                    _simpleCacheService.HashAdd(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, stock.PalletCode, stock);
                }
                catch (Exception ex)
                {
                    LogFactory.GetLog("添加缓存失败").Error(true, $"{stock.PalletCode}_添加缓存失败,异常信息:{ex.Message}");
                }
                content.OK("入库任务完成成功");
@@ -539,9 +546,9 @@
            {
                isFull = respone.SpecialParameterDuration.IsNullOrEmpty();
            }
            if (respone.ProductionLine == null || respone.ParameterInfos == null)
            if (respone.ProductionLine == null || respone.ParameterInfos == null|| respone.ParameterInfos.IsNullOrEmpty())
            {
                throw new Exception("MOM数据返回错误");
                throw new Exception($"MOM数据返回错误,产线{respone.ProductionLine},ParameterInfos{respone.ParameterInfos}");
            }
            stock.LinedProcessFeedbackTime = respone.LinedProcessFeedbackTime;
            stock.SpecialParameterDuration = respone.SpecialParameterDuration;
@@ -1023,18 +1030,6 @@
            {
                // 创建WMS任务
                WMSTaskDTO taskDTO = CreateTaskDTO(task);
                //WMSTaskDTO taskDTO = new WMSTaskDTO()
                //{
                //    TaskNum = task.TaskNum.Value,
                //    Grade = 1,
                //    PalletCode = task.PalletCode,
                //    RoadWay = task.Roadway,
                //    SourceAddress = task.SourceAddress,
                //    TargetAddress = task.Roadway,
                //    TaskState = task.TaskState.Value,
                //    Id = 0,
                //    TaskType = task.TaskType,
                //};
                return content.OK(data: task);
            }
@@ -1182,7 +1177,7 @@
        {
            // 记录异常信息并抛出
            LogFactory.GetLog("请求托盘任务").Error(true, ex);
            ConsoleHelper.WriteErrorLine("请求空/实托盘任务" + ex.Message);
            ConsoleHelper.WriteErrorLine("请求空/实托盘任务" + ex.Message + "\r\n" + ex.StackTrace);
            return content.Error(ex.Message);
        }
    }
@@ -1192,39 +1187,52 @@
    /// </summary>
    private async Task<DtStockInfo> QueryStockInfoForRealTrayAsync(string areaCode, List<string> devices, string productionLine)
    {
        var area = await _areaInfoRepository.QueryFirstAsync(x => x.AreaCode == areaCode);
        if (area == null)
        try
        {
            ConsoleHelper.WriteErrorLine($"查询实盘库存信息时,未找到区域代码为{areaCode}的数据");
            var area = await _areaInfoRepository.QueryFirstAsync(x => x.AreaCode == areaCode);
            if (area == null)
            {
                ConsoleHelper.WriteErrorLine($"查询实盘库存信息时,未找到区域代码为{areaCode}的数据");
                return null;
            }
            var outBoundMateriel = AppSettings.app<OutBoundMateriel>("OutBoundMateriel");
            List<string>? materielCodes = outBoundMateriel.Count != 0
                ? outBoundMateriel.Where(x => x.ProductionLine == productionLine && x.ProcessCode == area.AreaCode)
                                  .Select(x => x.MaterielCode)
                                  .ToList()
                : null;
            IDictionary<string, DtStockInfo>? stockInfos = _simpleCacheService.HashGetAll<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo);
            List<DtStockInfo> stockInfoList = stockInfos.Values.ToList();
            var result = new DtStockInfo();
            //if (stockInfoList.IsNullOrEmpty())
            //{
            //    stockInfoList = await _stockInfoRepository.Db.Queryable<DtStockInfo>()
            //        .Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock).IncludesAllFirstLayer().ToListAsync();
            //}
            result = stockInfoList.Where(x => x.AreaCode == areaCode && x.OutboundTime < DateTime.Now && x.IsFull)
                              .WhereIF(!productionLine.IsNullOrEmpty(), x => x.ProductionLine == productionLine)
                              .Where(x => x.LocationInfo != null && x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable)
                              .WhereIF(!devices.IsNullOrEmpty(), x => devices.Contains(x.LocationInfo.RoadwayNo))
                              .WhereIF(!materielCodes.IsNullOrEmpty(), x => x.StockInfoDetails != null && x.StockInfoDetails.Any(y => materielCodes.Contains(y.MaterielCode)))
                              .OrderBy(x => x.OutboundTime)
            .FirstOrDefault();
            if (result != null)
                _simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { result.PalletCode });
            else
                ConsoleHelper.WriteErrorLine("QueryStockInfoForRealTrayAsync查询实盘库存信息失败:未找到符合条件的数据");
            return result;
        }
        catch (Exception ex)
        {
            ConsoleHelper.WriteErrorLine("QueryStockInfoForRealTrayAsync查询实盘库存信息失败:" + ex.Message + "\r\n" + ex.StackTrace);
            return null;
        }
        var outBoundMateriel = AppSettings.app<OutBoundMateriel>("OutBoundMateriel");
        List<string>? materielCodes = outBoundMateriel.Count != 0
            ? outBoundMateriel.Where(x => x.ProductionLine == productionLine && x.ProcessCode == area.AreaCode)
                              .Select(x => x.MaterielCode)
                              .ToList()
            : null;
        IDictionary<string, DtStockInfo>? stockInfos = _simpleCacheService.HashGetAll<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo);
        List<DtStockInfo> stockInfoList = stockInfos.Values.ToList();
        var result = new DtStockInfo();
        //if (stockInfoList.IsNullOrEmpty())
        //{
        //    stockInfoList = await _stockInfoRepository.Db.Queryable<DtStockInfo>()
        //        .Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock).IncludesAllFirstLayer().ToListAsync();
        //}
        result = stockInfoList.Where(x => x.AreaCode == areaCode && x.OutboundTime < DateTime.Now && x.IsFull)
                          .WhereIF(!productionLine.IsNullOrEmpty(), x => x.ProductionLine == productionLine)
                          .Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable)
                          .WhereIF(!devices.IsNullOrEmpty(), x => devices.Contains(x.LocationInfo.RoadwayNo))
                          .WhereIF(!materielCodes.IsNullOrEmpty(), x => x.StockInfoDetails.Any(y => materielCodes.Contains(y.MaterielCode)))
                          .OrderBy(x => x.OutboundTime)
                          .FirstOrDefault();
        return result;
    }
    /// <summary>
@@ -1232,45 +1240,62 @@
    /// </summary>
    private async Task<DtStockInfo> QueryStockInfoForRealTrayCWAsync(List<string> areaCodes, string productionLine)
    {
        var areaId = (await _areaInfoRepository.QueryDataAsync(x => areaCodes.Contains(x.AreaCode))).Select(x => x.AreaID).ToList();
        if (areaId.Count == 0)
        try
        {
            ConsoleHelper.WriteErrorLine($"查询常温实盘库存信息时,未找到区域代码为{JsonConvert.SerializeObject(areaCodes)}的数据");
            var areaId = (await _areaInfoRepository.QueryDataAsync(x => areaCodes.Contains(x.AreaCode))).Select(x => x.AreaID).ToList();
            if (areaId.Count == 0)
            {
                ConsoleHelper.WriteErrorLine($"查询常温实盘库存信息时,未找到区域代码为{JsonConvert.SerializeObject(areaCodes)}的数据");
                return null;
            }
            //var outBoundMateriel = AppSettings.app<OutBoundMateriel>("OutBoundMateriel");
            //List<string> materielCodes = null;
            //if (outBoundMateriel.Count != 0)
            //{
            //    materielCodes = outBoundMateriel.Where(x => x.ProductionLine == productionLine && x.ProcessCode == areaCodes[0]).Select(x => x.MaterielCode).ToList();
            //}
            var outBoundMateriel = AppSettings.app<OutBoundMateriel>("OutBoundMateriel");
            List<string>? materielCodes = outBoundMateriel.Count != 0
                ? outBoundMateriel.Where(x => x.ProductionLine == productionLine && x.ProcessCode == areaCodes[0])
                                  .Select(x => x.MaterielCode)
                                  .ToList()
                : null;
            var deviceCode = SqlSugarHelper.DbWCS.Queryable<Dt_DeviceInfo>()
                .Where(x => x.DeviceStatus == "1")
                .Where(x => x.DeviceCode.Contains("CWSC"))
                .ToList().Select(x => x.DeviceCode).ToList();
            //var deviceCode = devices.Select(x => x.DeviceCode).ToList();
            IDictionary<string, DtStockInfo>? stockInfos = _simpleCacheService.HashGetAll<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo);
            List<DtStockInfo> stockInfoList = stockInfos.Values.ToList();
            var result = stockInfoList.Where(x => areaCodes.Contains(x.AreaCode) && x.OutboundTime < DateTime.Now && x.IsFull == true) // 过滤条件
                .WhereIF(!productionLine.IsNullOrEmpty(), x => x.ProductionLine == productionLine)
                .Where(x => x.LocationInfo != null && x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && areaId.Contains(x.LocationInfo.AreaId) && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // 过滤条件
                .WhereIF(!deviceCode.IsNullOrEmpty(), x => deviceCode.Contains(x.LocationInfo.RoadwayNo))
                .WhereIF(!materielCodes.IsNullOrEmpty(), x => x.StockInfoDetails != null && x.StockInfoDetails.Any(y => materielCodes.Contains(y.MaterielCode)))
                .OrderBy(x => x.OutboundTime) // 排序
                .FirstOrDefault(); // 获取第一个元素
            if (result != null)
            {
                _simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { result.PalletCode });
            }
            else
            {
                ConsoleHelper.WriteErrorLine("QueryStockInfoForRealTrayCWAsync查询常温实盘库存信息失败:未找到符合条件的数据");
            }
            return result;
        }
        catch (Exception ex)
        {
            ConsoleHelper.WriteErrorLine("QueryStockInfoForRealTrayCWAsync查询实盘库存信息失败:" + ex.Message + "\r\n" + ex.StackTrace);
            return null;
        }
        //var outBoundMateriel = AppSettings.app<OutBoundMateriel>("OutBoundMateriel");
        //List<string> materielCodes = null;
        //if (outBoundMateriel.Count != 0)
        //{
        //    materielCodes = outBoundMateriel.Where(x => x.ProductionLine == productionLine && x.ProcessCode == areaCodes[0]).Select(x => x.MaterielCode).ToList();
        //}
        var outBoundMateriel = AppSettings.app<OutBoundMateriel>("OutBoundMateriel");
        List<string>? materielCodes = outBoundMateriel.Count != 0
            ? outBoundMateriel.Where(x => x.ProductionLine == productionLine && x.ProcessCode == areaCodes[0])
                              .Select(x => x.MaterielCode)
                              .ToList()
            : null;
        var deviceCode = SqlSugarHelper.DbWCS.Queryable<Dt_DeviceInfo>()
            .Where(x => x.DeviceStatus == "1")
            .Where(x => x.DeviceCode.Contains("CWSC"))
            .ToList().Select(x => x.DeviceCode).ToList();
        //var deviceCode = devices.Select(x => x.DeviceCode).ToList();
        IDictionary<string, DtStockInfo>? stockInfos = _simpleCacheService.HashGetAll<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo);
        List<DtStockInfo> stockInfoList = stockInfos.Values.ToList();
        var result = stockInfoList.Where(x => areaCodes.Contains(x.AreaCode) && x.OutboundTime < DateTime.Now && x.IsFull == true) // 过滤条件
            .WhereIF(!productionLine.IsNullOrEmpty(), x => x.ProductionLine == productionLine)
            .Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && areaId.Contains(x.LocationInfo.AreaId) && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // 过滤条件
            .WhereIF(!deviceCode.IsNullOrEmpty(), x => deviceCode.Contains(x.LocationInfo.RoadwayNo))
            .WhereIF(!materielCodes.IsNullOrEmpty(), x => x.StockInfoDetails.Any(y => materielCodes.Contains(y.MaterielCode)))
            .OrderBy(x => x.OutboundTime) // 排序
            .FirstOrDefault(); // 获取第一个元素
        return result;
    }
    /// <summary>
@@ -1278,37 +1303,44 @@
    /// </summary>
    private async Task<DtStockInfo> QueryStockInfoForEmptyTrayAsync(string areaCode, string position)
    {
        var area = await _areaInfoRepository.QueryFirstAsync(x => x.AreaCode == areaCode);
        try
        {
            var area = await _areaInfoRepository.QueryFirstAsync(x => x.AreaCode == areaCode);
        ConsoleHelper.WriteColorLine(position + "..." + areaCode, ConsoleColor.Magenta);
        var station = await _stationManagerRepository.QueryFirstAsync(x => x.stationChildCode == position && x.stationType == 17);
            ConsoleHelper.WriteColorLine(position + "..." + areaCode, ConsoleColor.Magenta);
            var station = await _stationManagerRepository.QueryFirstAsync(x => x.stationChildCode == position && x.stationType == 17);
        ConsoleHelper.WriteColorLine(station.Roadway, ConsoleColor.Magenta);
        var stackers = station.Roadway.Split(',').ToList();
            ConsoleHelper.WriteColorLine(station.Roadway, ConsoleColor.Magenta);
            var stackers = station.Roadway.Split(',').ToList();
        var deviceCode = SqlSugarHelper.DbWCS.Queryable<Dt_DeviceInfo>()
            .Where(x => x.DeviceStatus == "1")
            .Where(x => stackers.Contains(x.DeviceCode))
            .ToList().Select(x => x.DeviceCode).ToList();
            var deviceCode = SqlSugarHelper.DbWCS.Queryable<Dt_DeviceInfo>()
                .Where(x => x.DeviceStatus == "1")
                .Where(x => stackers.Contains(x.DeviceCode))
                .ToList().Select(x => x.DeviceCode).ToList();
        IDictionary<string, DtStockInfo>? stockInfos = _simpleCacheService.HashGetAll<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo);
        List<DtStockInfo> stockInfoList = stockInfos.Values.ToList();
            IDictionary<string, DtStockInfo>? stockInfos = _simpleCacheService.HashGetAll<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo);
            List<DtStockInfo> stockInfoList = stockInfos.Values.ToList();
        var result = stockInfoList.Where(x => x.ProductionLine == station.productLine)
            .Where(x => x.AreaCode == areaCode && x.IsFull == false)
            .Where(x => x.StockInfoDetails.Any(y => y.MaterielCode == "空托盘"))
            .Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // 过滤条件
            .WhereIF(!deviceCode.IsNullOrEmpty(), x => deviceCode.Contains(x.LocationInfo.RoadwayNo))
            .OrderBy(x => x.CreateDate) // 排序
            .FirstOrDefault(); // 转换为列表
            var result = stockInfoList.Where(x => x.ProductionLine == station.productLine)
                .Where(x => x.AreaCode == areaCode && x.IsFull == false)
                .Where(x => x.StockInfoDetails != null && x.StockInfoDetails.Any(y => y.MaterielCode == "空托盘"))
                .Where(x => x.LocationInfo != null && x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // 过滤条件
                .WhereIF(!deviceCode.IsNullOrEmpty(), x => deviceCode.Contains(x.LocationInfo.RoadwayNo))
                .OrderBy(x => x.CreateDate) // 排序
                .FirstOrDefault(); // 转换为列表
        //if (result != null)
        //{
        //    stockInfoList = stockInfoList.Where(x => x != result).ToList();
        //    _simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { result.PalletCode });
        //}
            if (result != null)
                _simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { result.PalletCode });
            else
                ConsoleHelper.WriteErrorLine("QueryStockInfoForEmptyTrayAsync查询空盘库存信息失败:未找到符合条件的数据");
        return result;
            return result;
        }
        catch (Exception ex)
        {
            ConsoleHelper.WriteErrorLine("QueryStockInfoForEmptyTrayAsync查询实盘库存信息失败:" + ex.Message + "\r\n" + ex.StackTrace);
            return null;
        }
    }
    /// <summary>
@@ -1704,7 +1736,7 @@
                        TaskState = (int)TaskInStatusEnum.Line_InFinish,
                        TaskType = (int)TaskInboundTypeEnum.Inbound,
                        TaskNum = await BaseDal.GetTaskNo(),
                        Creater = "Systeam",
                        Creater = "System",
                        ProductionLine = result.ProductionLine,
                        ProcessCode = result.ProcessCode,
                    };
@@ -1742,7 +1774,7 @@
                        TaskState = (int)TaskInStatusEnum.Line_InFinish,
                        TaskType = (int)TaskInboundTypeEnum.InTray,
                        TaskNum = await BaseDal.GetTaskNo(),
                        Creater = "Systeam",
                        Creater = "System",
                        ProductionLine = result.ProductionLine,
                        ProcessCode = result.ProcessCode,
                    };
@@ -2010,7 +2042,7 @@
        var taskHty = _mapper.Map<Dt_Task_Hty>(task);
        taskHty.FinishTime = DateTime.Now;
        taskHty.TaskId = 0;
        taskHty.OperateType = isHand ? (int)OperateTypeEnum.人工删除 : (int)OperateTypeEnum.自动完成;
        taskHty.OperateType = isHand ? (int)OperateTypeEnum.人工删除 : App.User.UserName != null ? (int)OperateTypeEnum.人工完成 : (int)OperateTypeEnum.自动完成;
        taskHty.SourceId = task.TaskId;
        if (isHand)
        {
@@ -2072,32 +2104,34 @@
                }
            }
            if (stock.IsFull)
            {
                // 查询符合条件的库存信息
                var stocks = _stockInfoRepository.QueryData(x => x.AreaCode == stock.AreaCode && x.ProductionLine == stock.ProductionLine && x.SpecialParameterDuration != stock.SpecialParameterDuration);
            #region 更新库存信息(暂时不需要)
            //if (stock.IsFull)
            //{
            //    // 查询符合条件的库存信息
            //    var stocks = _stockInfoRepository.QueryData(x => x.AreaCode == stock.AreaCode && x.ProductionLine == stock.ProductionLine && x.SpecialParameterDuration != stock.SpecialParameterDuration);
                // 查询任务信息
                var tasks = BaseDal.QueryData(x => x.PalletCode != stock.PalletCode && x.ProductionLine == stock.ProductionLine).Select(x => x.PalletCode).ToList();
            //    // 查询任务信息
            //    var tasks = BaseDal.QueryData(x => x.PalletCode != stock.PalletCode && x.ProductionLine == stock.ProductionLine).Select(x => x.PalletCode).ToList();
                if (stocks != null && stocks.Count > 0)
                {
                    // 过滤出需要更新的库存信息
                    var stocksToUpdate = stocks.Where(item => !tasks.Contains(item.PalletCode)).ToList();
                    foreach (var item in stocksToUpdate)
                    {
                        // 更新库存信息的特定参数
                        item.SpecialParameterDuration = stock.SpecialParameterDuration;
                        item.ParameterInfos = stock.ParameterInfos;
                        item.OutboundTime = Convert.ToDateTime(item.LinedProcessFeedbackTime == null ? item.CreateDate : item.LinedProcessFeedbackTime).AddHours(Convert.ToDouble(stock.SpecialParameterDuration));
                    }
                    if (stocksToUpdate.Count > 0)
                    {
                        // 异步更新库存信息
                        var isUpdates = await _stockInfoRepository.UpdateDataAsync(stocksToUpdate);
                    }
                }
            }
            //    if (stocks != null && stocks.Count > 0)
            //    {
            //        // 过滤出需要更新的库存信息
            //        var stocksToUpdate = stocks.Where(item => !tasks.Contains(item.PalletCode)).ToList();
            //        foreach (var item in stocksToUpdate)
            //        {
            //            // 更新库存信息的特定参数
            //            item.SpecialParameterDuration = stock.SpecialParameterDuration;
            //            item.ParameterInfos = stock.ParameterInfos;
            //            item.OutboundTime = Convert.ToDateTime(item.LinedProcessFeedbackTime == null ? item.CreateDate : item.LinedProcessFeedbackTime).AddHours(Convert.ToDouble(stock.SpecialParameterDuration));
            //        }
            //        if (stocksToUpdate.Count > 0)
            //        {
            //            // 异步更新库存信息
            //            var isUpdates = await _stockInfoRepository.UpdateDataAsync(stocksToUpdate);
            //        }
            //    }
            //}
            #endregion
            // 添加历史任务
            var isTaskHtyAdd = await _task_HtyRepository.AddDataAsync(taskHty) > 0;
@@ -2288,7 +2322,7 @@
            TaskState = flag == 3 ? (int)TaskOutStatusEnum.OutNew : (int)TaskInStatusEnum.InNew,
            TaskType = flag == 0 ? (int)TaskInboundTypeEnum.Inbound : flag == 1 ? (int)TaskInboundTypeEnum.InTray : flag == 2 ? (int)TaskInboundTypeEnum.InNG : (int)TaskOutboundTypeEnum.Outbound,
            TaskNum = await BaseDal.GetTaskNo(),
            Creater = "Systeam",
            Creater = "System",
            ProductionLine = productionLine,
            ProcessCode = processCode
        };
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
@@ -200,7 +200,7 @@
                    TaskState = (int)TaskInStatusEnum.Line_InFinish,
                    TaskType = (int)TaskOutboundTypeEnum.InToOut,
                    TaskNum = await BaseDal.GetTaskNo(),
                    Creater = "Systeam",
                    Creater = "System",
                    ProductionLine = result.ProductionLine,
                    ProcessCode = result.ProcessCode,
                };
@@ -227,7 +227,7 @@
                        TaskState = (int)TaskInStatusEnum.Line_InFinish,
                        TaskType = (int)TaskOutboundTypeEnum.InToOut,
                        TaskNum = await BaseDal.GetTaskNo(),
                        Creater = "Systeam"
                        Creater = "System"
                    };
                    return taskNG;
                }
@@ -259,7 +259,7 @@
                        TaskState = (int)TaskInStatusEnum.Line_InFinish,
                        TaskType = (int)TaskOutboundTypeEnum.InToOut,
                        TaskNum = await BaseDal.GetTaskNo(),
                        Creater = "Systeam",
                        Creater = "System",
                        ProductionLine = result.ProductionLine,
                        ProcessCode = result.ProcessCode,
                    };
@@ -293,7 +293,7 @@
                TaskState = (int)TaskInStatusEnum.Line_InFinish,
                TaskType = (int)TaskOutboundTypeEnum.InToOut,
                TaskNum = await BaseDal.GetTaskNo(),
                Creater = "Systeam",
                Creater = "System",
                ProductionLine = result.ProductionLine,
                ProcessCode = result.ProcessCode,
            };
@@ -371,7 +371,7 @@
                    TaskState = (int)TaskInStatusEnum.Line_InFinish,
                    TaskType = (int)TaskOutboundTypeEnum.InToOut,
                    TaskNum = await BaseDal.GetTaskNo(),
                    Creater = "Systeam",
                    Creater = "System",
                    ProductionLine = result.ProductionLine,
                    ProcessCode = result.ProcessCode,
                };
@@ -421,7 +421,7 @@
            TaskState = (int)TaskInStatusEnum.Line_InFinish,
            TaskType = stationManager.stationType == 1 ? (int)TaskInboundTypeEnum.Inbound : (int)TaskInboundTypeEnum.InTray,
            TaskNum = await BaseDal.GetTaskNo(),
            Creater = "Systeam",
            Creater = "System",
            ProductionLine = result.ProductionLine,
            ProcessCode = result.ProcessCode,
        };
@@ -546,8 +546,9 @@
            IDictionary<string, DtStockInfo>? stockInfos = _simpleCacheService.HashGetAll<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo);
            List<DtStockInfo> stockInfoList = stockInfos.Values.ToList();
            var stockinfo = stockInfoList.Where(x => x.LocationInfo != null && !x.IsFull && x.LocationInfo.RoadwayNo == stationManager.Roadway)
                .OrderBy(x => x.CreateDate)
            var stockinfo1 = stockInfoList.OrderBy(x => x.CreateDate)
                .ToList();
            var stockinfo = stockinfo1.Where(x => x.LocationInfo != null && !x.IsFull && x.LocationInfo.RoadwayNo == stationManager.Roadway)
                .FirstOrDefault();
            if (stockinfo == null) return null;
@@ -567,10 +568,10 @@
                TaskState = (int)TaskOutStatusEnum.OutNew,
                TaskType = (int)TaskOutboundTypeEnum.OutTray,
                TaskNum = await BaseDal.GetTaskNo(),
                Creater = "Systeam",
                Creater = "System",
                ProductionLine = stockinfo.ProductionLine,
            };
            _simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { task.PalletCode });
            return task;
        }
        catch (Exception ex)
@@ -662,7 +663,7 @@
                    TaskState = (int)TaskInStatusEnum.Line_InFinish,
                    TaskType = (int)TaskInboundTypeEnum.InTray,
                    TaskNum = await BaseDal.GetTaskNo(),
                    Creater = "Systeam",
                    Creater = "System",
                    ProductionLine = result.ProductionLine,
                    ProcessCode = result.ProcessCode,
                };
@@ -724,7 +725,7 @@
                TaskState = (int)TaskInStatusEnum.Line_InFinish,
                TaskType = (int)TaskInboundTypeEnum.Inbound,
                TaskNum = await BaseDal.GetTaskNo(),
                Creater = "Systeam",
                Creater = "System",
                ProductionLine = result.ProductionLine,
                ProcessCode = result.ProcessCode,
            };
@@ -984,13 +985,20 @@
        IDictionary<string, DtStockInfo>? stockInfos = _simpleCacheService.HashGetAll<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo);
        List<DtStockInfo> stockInfoList = stockInfos.Values.ToList();
        var result = stockInfoList.Where(x => x.ProductionLine == productLine)
        var result1 = stockInfoList.Where(x => x.ProductionLine == productLine)
            .Where(x => x.AreaCode == areaCode && x.IsFull == false)
            .Where(x => x.StockInfoDetails != null && x.StockInfoDetails.Any(y => y.MaterielCode == "空托盘"))
            .Where(x => x.LocationInfo != null && x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // 过滤条件
            .WhereIF(!deviceCode.IsNullOrEmpty(), x => x.LocationInfo != null && deviceCode.Contains(x.LocationInfo.RoadwayNo))
            .OrderBy(x => x.CreateDate) // 排序
            .FirstOrDefault(); // 转换为列表
            .ToList(); // 转换为列表
        var result = result1.Where(x => x.StockInfoDetails != null && x.StockInfoDetails.Any(y => y.MaterielCode == "空托盘"))
            .Where(x => x.LocationInfo != null && x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // 过滤条件
            .FirstOrDefault(); // 获取第一个元素
        if (result != null)
            _simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { result.PalletCode });
        else
            ConsoleHelper.WriteColorLine($"常温{productLine}空托盘库存不足", ConsoleColor.Red);
        return result;
    }
@@ -1025,14 +1033,17 @@
            List<DtStockInfo> stockInfoList = stockInfos.Values.ToList();
            // 修改后的查询代码
            var stockInfo = stockInfoList
            var stockInfo1 = stockInfoList
                .Where(x => x.ProductionLine == station.productLine)
                .Where(x => x.AreaCode == "CWSC3" && x.IsFull == true)
                .OrderBy(x => x.OutboundTime)
                .ToList();
            var stockInfo = stockInfo1
                // 增加对 LocationInfo 的空值检查
                .Where(x => x.LocationInfo != null && x.LocationInfo.LocationStatus == (int)LocationEnum.InStock)
                // 增加对 LocationInfo 的空值检查
                .WhereIF(!deviceCode.IsNullOrEmpty(), x => x.LocationInfo != null && deviceCode.Contains(x.LocationInfo.RoadwayNo))
                .OrderBy(x => x.OutboundTime)
                .FirstOrDefault();
            if (stockInfo == null) throw new Exception($"库内{station.productLine}无满足条件的库存可出库");
@@ -1057,7 +1068,7 @@
                TaskState = (int)TaskOutStatusEnum.OutNew,
                TaskType = (int)TaskOutboundTypeEnum.Outbound,
                TaskNum = await BaseDal.GetTaskNo(),
                Creater = "Systeam",
                Creater = "System",
                ProductionLine = stockInfo.ProductionLine,
                ProcessCode = stockInfo.ProcessCode,
            };
@@ -1070,6 +1081,8 @@
            stockInfo.LocationInfo.LocationStatus = (int)LocationEnum.InStockDisable;
            _locationRepository.UpdateData(stockInfo.LocationInfo);
            _simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { taskDTO.PalletCode });
            _locationStatusChangeRecordRepository.AddLocationStatusChangeRecord(stockInfo.LocationInfo, lastStatus, (int)StatusChangeTypeEnum.AutomaticDelivery, task.TaskNum);
            return content.OK(data: taskDTO);
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
@@ -201,7 +201,8 @@
    redis.DelByPattern(CacheConst.Cache_Prefix);
    WIDESEA_Core.Helper.ConsoleHelper.WriteInfoLine("正在缓存库存信息");
    var stockInfoList = await SqlSugarHelper.DbWMS.Queryable<DtStockInfo>().IncludesAllFirstLayer().ToListAsync();
    var stockInfoList = await SqlSugarHelper.DbWMS.Queryable<DtStockInfo>()
        .Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock).IncludesAllFirstLayer().ToListAsync();
    // 缓存库存信息
    foreach (var item in stockInfoList)
    {
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
@@ -11,9 +11,9 @@
  //连接字符串
  //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
  //"ConnectionString": "Data Source=192.168.5.251;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WMS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WMS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=.\\LIULEI;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=192.168.20.251;Initial Catalog=WIDESEA_WMSDB;User ID=sa;Password=123456@gy;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=192.168.20.251;Initial Catalog=WIDESEA_WMSDB;User ID=sa;Password=123456@gy;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionStringWCS": "Data Source=192.168.5.251;Initial Catalog=WIDESEAWCS_TEST;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionStringWCS": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WCS2F09;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //跨域
@@ -27,7 +27,7 @@
  //缓存设置
  "CacheSettings": {
    "UseRedis": false, //启用redis
    "UseRedis": true, //启用redis
    "RedisSettings": {
      "Address": "127.0.0.1:6379", //地址
      "Password": "123456", //Redis服务密码