huangxiaoqiang
2025-04-25 a8f4641741af34ffbe5fd565003cc5d55bbec119
添加火警任务
已删除1个文件
已修改15个文件
345 ■■■■■ 文件已修改
.gitignore 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerStationJob/CommonStackerStationCraneJob.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/CustomModels/DTSEmergencyTask.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/ManageEnum.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs 191 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -1710,3 +1710,4 @@
/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.439.2385/CodeChunks.db-wal
/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.439.2385/SemanticSymbols.db-shm
/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.439.2385/SemanticSymbols.db-wal
/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs
@@ -89,6 +89,12 @@
        /// </summary>
        [Description("直接出库")]
        InToOut = 106,
        /// <summary>
        /// ç«è­¦å‡ºåº“
        /// </summary>
        [Description("火警出库")]
        OutFireAlarm = 500,
    }
    public enum TaskRelocationTypeEnum
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs
@@ -306,5 +306,12 @@
        /// <param name="deviceNo"></param>
        /// <returns></returns>
        Dt_Task QueryRelocationTask(string deviceNo);
        /// <summary>
        /// æŸ¥è¯¢æ˜¯å¦å­˜åœ¨ç«è­¦ä»»åŠ¡
        /// </summary>
        /// <param name="deviceNo"></param>
        /// <returns></returns>
        Dt_Task QueryOutFireAlarmTask(string deviceNo);
    }
}
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs
@@ -676,7 +676,7 @@
            catch (Exception ex)
            {
                content = WebResponseContent.Instance.Error($"任务完成异常,任务号:【{taskNum}】");
                QuartzLogger.WriteLogToFile($"Info_分容任务完成", $"任务完成异常,任务号:【{taskNum}】异常信息【{ex.Message}】{Environment.NewLine}{Environment.NewLine}");
                QuartzLogger.WriteLogToFile($"Info_分容任务完成", $"任务完成异常,任务号:【{taskNum}】异常信息【{ex.StackTrace}】{Environment.NewLine}{Environment.NewLine}");
            }
            QuartzLogger.WriteLogToFile($"Info_分容任务完成", $"任务完成,任务号:【{taskNum}】返回参数【{JsonConvert.SerializeObject(content)}】{Environment.NewLine}{Environment.NewLine}");
            return content;
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -94,7 +94,7 @@
                    if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
                    {
                        // åˆ¤æ–­ä»»åŠ¡ç›®æ ‡åœ°å€å’Œè·¯å¾„æ˜¯å¦æ»¡è¶³ç‰¹å®šæ¡ä»¶
                        if ((task.TargetAddress == "002-021-001" || task.TargetAddress == "001-021-001") && task.Roadway.Contains("JZ"))
                        if (((task.TargetAddress == "002-021-001" || task.TargetAddress == "001-021-001") && task.Roadway.Contains("JZ"))|| task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm)
                        {
                            // è®¾ç½®ä»»åŠ¡çŠ¶æ€ä¸ºå‡ºåº“æ–°å»º
                            task.TaskState = (int)TaskOutStatusEnum.OutNew;
@@ -791,7 +791,7 @@
            catch (Exception ex)
            {
                content = WebResponseContent.Instance.Error($"任务完成异常,任务号:【{taskNum}】");
                QuartzLogger.WriteLogToFile($"Info_任务完成", $"任务完成异常,任务号:【{taskNum}】异常信息【{ex.Message}】{Environment.NewLine}{Environment.NewLine}");
                QuartzLogger.WriteLogToFile($"Info_任务完成", $"任务完成异常,任务号:【{taskNum}】异常信息【{ex.StackTrace}】{Environment.NewLine}{Environment.NewLine}");
            }
            QuartzLogger.WriteLogToFile($"Info_任务完成", $"任务完成,任务号:【{taskNum}】返回参数【{JsonConvert.SerializeObject(content)}】{Environment.NewLine}{Environment.NewLine}");
            return content;
@@ -891,6 +891,10 @@
        {
            return BaseDal.QueryFirst(x => x.Roadway == deviceNo && x.TaskType == (int)TaskRelocationTypeEnum.Relocation && x.TaskState == (int)TaskStatus.Created);
        }
        public Dt_Task QueryOutFireAlarmTask(string deviceNo)
        {
            return BaseDal.QueryFirst(x => x.Roadway == deviceNo && x.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm && x.TaskState == (int)TaskOutStatusEnum.OutNew);
        }
        public Dt_Task QueryExecutingTaskByBarcode(string barcode, string nextAddress)
        {
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
@@ -352,6 +352,7 @@
                conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, stationManager.stationNGChildCode, childDeviceCode);
                conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode);
                ConsoleHelper.WriteErrorLine($"【{conveyorLine.DeviceName}】托盘号:【{command.ConveyorLineBarcode}】请求点位:【{childDeviceCode}】异常信息【{content.Message}】");
                WriteInfo(conveyorLine.DeviceName, $"【{conveyorLine.DeviceName}】托盘号:【{command.ConveyorLineBarcode}】请求点位:【{childDeviceCode}】异常信息【{content.Message}】");
                //_taskRepository.AddData(taskGW);
            }
        }
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -198,7 +198,7 @@
                        Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress);
                        _taskService.UpdateData(newTask);
                    }
                    if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && (task.TargetAddress == "002-021-001" || task.TargetAddress == "001-021-001"))
                    if ((task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && (task.TargetAddress == "002-021-001" || task.TargetAddress == "001-021-001"))|| task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm)
                    {
                        var TASKHTY = task.Adapt<Dt_Task_Hty>();
                        _taskRepository.DeleteData(task);
@@ -220,6 +220,12 @@
        private Dt_Task? GetTask(CommonStackerCrane commonStackerCrane)
        {
            Dt_Task task;
            task = _taskService.QueryOutFireAlarmTask(commonStackerCrane.DeviceCode);
            if (task != null)
            {
                return task;
            }
            if (commonStackerCrane.LastTaskType == null)
            {
                task = _taskService.QueryStackerCraneTask(commonStackerCrane.DeviceCode);
@@ -476,7 +482,7 @@
            }
            else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
            {
                if (task.Roadway.Contains("GW"))
                if (task.Roadway.Contains("GW")|| task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm)
                {
                    string[] endCodes = task.NextAddress.Split("-");
                    stackerCraneTaskCommand.EndRow = Convert.ToInt16(endCodes[0]);
@@ -489,7 +495,7 @@
                }
                else
                {
                    if ((task.TargetAddress == "002-021-001" || task.TargetAddress == "001-021-001") && task.Roadway.Contains("JZ"))
                    if (((task.TargetAddress == "002-021-001" || task.TargetAddress == "001-021-001") && task.Roadway.Contains("JZ")) || task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm)
                    {
                        string[] endCodes = task.NextAddress.Split("-");
                        stackerCraneTaskCommand.EndRow = Convert.ToInt16(endCodes[0]);
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerStationJob/CommonStackerStationCraneJob.cs
@@ -176,6 +176,11 @@
        private Dt_Task? GetTask(CommonStackerStationCrane commonStackerCrane)
        {
            Dt_Task task;
            task = _taskService.QueryOutFireAlarmTask(commonStackerCrane.DeviceCode);
            if (task != null)
            {
                return task;
            }
            task = _taskService.QueryRelocationTask(commonStackerCrane.DeviceCode);
            if (task != null)
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/CustomModels/DTSEmergencyTask.cs
@@ -30,5 +30,10 @@
        /// å··é“
        /// </summary>
        public string Roadway { get; set; }
        /// <summary>
        /// è´§ä½ID
        /// </summary>
        public string LocationCode {  get; set; }
    }
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/ManageEnum.cs
@@ -192,6 +192,12 @@
        /// </summary>
        [Description("直接出库")]
        InToOut = 106,
        /// <summary>
        /// ç«è­¦å‡ºåº“
        /// </summary>
        [Description("火警出库")]
        OutFireAlarm = 500,
    }
    public enum TaskRelocationTypeEnum
@@ -273,7 +279,7 @@
        /// <summary>
        /// åº“外移库
        /// </summary>
        RelocationOut = 302
        RelocationOut = 302,
    }
    #endregion ä»»åŠ¡ç±»åž‹
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs
@@ -34,6 +34,9 @@
                if (string.IsNullOrEmpty(result?.PalletBarcode))
                    throw new Exception("上传托盘号为空");
                LogFactory.GetLog("分容测试完成通知").Info(true, $"\r\r--------------------------------------");
                LogFactory.GetLog("分容测试完成通知").Info(true, result.ToJsonString());
                var location = _locationRepository.QueryFirst(x => x.AreaId == result.LocationArea && x.LocationCode == result.LocationID);
                if (location == null) throw new Exception("未知库位");
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -2,6 +2,7 @@
using Masuit.Tools;
using SqlSugar;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using WIDESEA_Cache;
using WIDESEA_Core.Const;
using WIDESEA_DTO.MOM;
@@ -280,6 +281,36 @@
    }
    #endregion å‡ºåº“任务完成
    #region ç«è­¦ä»»åŠ¡å®Œæˆ
    public async Task<WebResponseContent> CompleteOutFireAlarmTaskAsync(Dt_Task task, DtStockInfo stock)
    {
        WebResponseContent content = new WebResponseContent();
        (var loc, var tas) = UpdateStockAndTaskStatus(stock, task);
        var taskHty = task.Adapt<Dt_Task_Hty>();
        taskHty.FinishTime = DateTime.Now;
        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;
        // äº‹åŠ¡å¤„ç†
        await _unitOfWorkManage.UseTranAsync(async () =>
        {
            if (task.TaskType != (int)TaskOutboundTypeEnum.OutQuality)
            {
                await DeleteStockInfoAsync(stock.Id);
                await DeleteStockInfoDetailsAsync(stock.StockInfoDetails);
                await AddStockInfoHtyAsync(stockInfo_Hty);
                await UpdateLocationAsync(loc); //质检任务需要持续锁定库位
            }
            await DeleteTaskAsync(task.TaskId);
            await AddTaskHtyAsync(taskHty);
        });
        return content.OK("任务完成成功", task.Remark);
    }
    #endregion
    #region ç§»åº“任务完成
@@ -599,9 +630,15 @@
            case (int)TaskOutboundTypeEnum.OutTray:
            case (int)TaskOutboundTypeEnum.Outbound:
            case (int)TaskOutboundTypeEnum.OutNG:
                LogFactory.GetLog("任务完成").InfoFormat(true, "出库任务", "");
                return await CompleteStackTaskAsync(task, stock);
            case (int)TaskOutboundTypeEnum.OutFireAlarm:
                LogFactory.GetLog("任务完成").InfoFormat(true, "火警任务", "");
                return await CompleteOutFireAlarmTaskAsync(task, stock);
            case (int)TaskRelocationTypeEnum.Relocation:
                return await CompleteTransferTaskAsync(task, stock);
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
@@ -1050,6 +1050,7 @@
                                  .ToList()
                : null;
            #region
            //// ä»Žç¼“存中获取库存信息
            //IDictionary<string, DtStockInfo>? stockInfos = _simpleCacheService.HashGetAll<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo);
            //List<DtStockInfo> stockInfoList = stockInfos.Values.ToList();
@@ -1069,6 +1070,7 @@
            //    .WhereIF(!materielCodes.IsNullOrEmpty(), x => x.StockInfoDetails != null && x.StockInfoDetails.Any(y => materielCodes.Contains(y.MaterielCode)))
            //    .FirstOrDefault();
            // ä¿®æ”¹åŽçš„æŸ¥è¯¢ä»£ç 
            #endregion
            var stockInfo = await _stockInfoRepository.Db.Queryable<DtStockInfo>()
                                .Includes(x => x.LocationInfo)
                                .Includes(x => x.StockInfoDetails)
@@ -1145,100 +1147,119 @@
            if (emergencyTask == null) throw new Exception("火警参数为空");
            DtLocationInfo locationInfo = _locationRepository.QueryFirst(x => x.Row == emergencyTask.row && x.Column == emergencyTask.column && x.Layer == emergencyTask.layer && x.AreaId == emergencyTask.zone);
            if (locationInfo == null)
            string[] strings = emergencyTask.LocationCode.Split("-");
            string[] Roadways = strings[0].Select(x => x.ToString()).ToArray();
            string Roadway = string.Empty;
            switch (Roadways[0])
            {
                throw new Exception("未知库位");
                case "J":
                    Roadway = "JZSC" + Roadways[1];
                        break;
                case "G":
                    Roadway = "GWSC" + Roadways[1];
                    break;
                case "C":
                    Roadway = "CWSC" + Roadways[1];
                    break;
                default: throw new Exception("未识别库位编码");
            }
            //查找消防站台
            var station = _stationManagerRepository.QueryFirst(t => t.Roadway == locationInfo.RoadwayNo
                 && t.stationType == (int)StationManager.FireStation
                 /*&& t. == "Enable"*/);
            if (station == null)
            for (int i = 0; i < 2; i++)
            {
                throw new Exception("消防站台未配置!");
            }
            //查找库存信息
            var stockInfo = _stockInfoRepository.QueryFirst(x => x.LocationCode == locationInfo.LocationCode && x.LocationInfo.RoadwayNo == locationInfo.RoadwayNo);
            //托盘码
            string barcode = string.Empty;
            if (stockInfo != null)
            {
                barcode = stockInfo.PalletCode;
            }
            else
            {
                //无库存信息,生成随机托盘码
                barcode = "M" + DateTime.Now.ToString("MMddHHmmss") + "-" + new Random().Next(100, 1000);
            }
            Dt_Task fireTask = BaseDal.QueryFirst(x => x.TaskType == 500 && x.SourceAddress == locationInfo.LocationCode && x.Roadway == station.Roadway);
            if (fireTask != null)
            {
                throw new Exception("已添加火警出库任务");
            }
            int taskNum = BaseDal.GetTaskNo().Result;
            Dt_Task task = new Dt_Task
            {
                CreateDate = DateTime.Now,
                Creater = "DTS",
                CurrentAddress = locationInfo.LocationCode,
                Grade = 1,
                Dispatchertime = DateTime.Now,
                PalletCode = barcode,
                Roadway = station.Roadway,
                SourceAddress = locationInfo.LocationCode,
                TaskState = (int)TaskOutStatusEnum.OutNew,
                TaskType = 500,
                TargetAddress = station.stationLocation,
                NextAddress = station.stationChildCode,
                TaskNum = taskNum, //_taskRepository.GetTaskNo().Result,
                TaskId = 0,
            };
            // å°è¯•添加新任务
            WMSTaskDTO taskDTO = new WMSTaskDTO()
            {
                TaskNum = task.TaskNum.Value,
                Grade = 1,
                PalletCode = task.PalletCode,
                RoadWay = task.Roadway,
                SourceAddress = task.SourceAddress,
                TargetAddress = task.TargetAddress,
                TaskState = task.TaskState.Value,
                Id = 0,
                TaskType = 500,
            };
            var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
            var ipAddress = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.WCSIPAddress)?.ConfigValue;
            var ReceiveByWMSTask = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.ReceiveByWMSTask)?.ConfigValue;
            if (ReceiveByWMSTask == null || ipAddress == null)
            {
                throw new Exception("WMS IP æœªé…ç½®");
            }
            var wmsIpAddrss = ipAddress + ReceiveByWMSTask;
            var respon = HttpHelper.Post(wmsIpAddrss, JsonConvert.SerializeObject(taskDTO));
            if (respon != null)
            {
                WebResponseContent respone = JsonConvert.DeserializeObject<WebResponseContent>(respon.ToString());
                if (respone.Status)
                DtLocationInfo locationInfo = _locationRepository.QueryFirst(x => x.Row == Convert.ToInt16(strings[1]) && x.Column == Convert.ToInt16(strings[2]) && x.Layer == (i == 0 ? Convert.ToInt16(strings[3]) * 2 - 1 : Convert.ToInt16(strings[3]) * 2) && x.RoadwayNo == Roadway);
                if (locationInfo == null)
                {
                    var taskId = BaseDal.AddData(task);
                    throw new Exception("未知库位");
                }
                //查找消防站台
                var station = _stationManagerRepository.QueryFirst(t => t.Roadway == locationInfo.RoadwayNo && t.stationType == (int)StationManager.FireStation);
                if (station == null)
                {
                    throw new Exception("消防站台未配置!");
                }
                //查找库存信息
                var stockInfo = _stockInfoRepository.QueryFirst(x => x.LocationCode == locationInfo.LocationCode && x.LocationInfo.RoadwayNo == locationInfo.RoadwayNo);
                //托盘码
                string barcode = string.Empty;
                if (stockInfo != null)
                {
                    barcode = stockInfo.PalletCode;
                }
                else
                {
                    throw new Exception("WCS处理失败:" + respone.Message);
                    //无库存信息,生成随机托盘码
                    barcode = "M" + DateTime.Now.ToString("MMddHHmmss") + "-" + new Random().Next(100, 1000);
                }
            }
            else
            {
                throw new Exception("请求处理失败");
                Dt_Task fireTask = BaseDal.QueryFirst(x => x.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm && x.SourceAddress == locationInfo.LocationCode && x.Roadway == station.Roadway);
                if (fireTask != null)
                {
                    throw new Exception("已添加火警出库任务");
                }
                int taskNum = BaseDal.GetTaskNo().Result;
                Dt_Task task = new Dt_Task
                {
                    CreateDate = DateTime.Now,
                    Creater = "DTS",
                    CurrentAddress = locationInfo.LocationCode,
                    Grade = i == 0 ? 5 : 3,
                    Dispatchertime = DateTime.Now,
                    PalletCode = barcode,
                    Roadway = station.Roadway,
                    SourceAddress = locationInfo.LocationCode,
                    TaskState = (int)TaskOutStatusEnum.OutNew,
                    TaskType = (int)TaskOutboundTypeEnum.OutFireAlarm,
                    TargetAddress = station.stationLocation,
                    NextAddress = station.stationLocation,
                    TaskNum = taskNum, //_taskRepository.GetTaskNo().Result,
                    TaskId = 0,
                };
                // å°è¯•添加新任务
                WMSTaskDTO taskDTO = new WMSTaskDTO()
                {
                    TaskNum = task.TaskNum.Value,
                    Grade = 1,
                    PalletCode = task.PalletCode,
                    RoadWay = task.Roadway,
                    SourceAddress = task.SourceAddress,
                    TargetAddress = task.TargetAddress,
                    TaskState = task.TaskState.Value,
                    Id = 0,
                    TaskType = task.TaskType,
                };
                var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
                var ipAddress = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.WCSIPAddress)?.ConfigValue;
                var ReceiveByWMSTask = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.ReceiveByWMSTask)?.ConfigValue;
                if (ReceiveByWMSTask == null || ipAddress == null)
                {
                    throw new Exception("WMS IP æœªé…ç½®");
                }
                var wmsIpAddrss = ipAddress + ReceiveByWMSTask;
                var respon = HttpHelper.Post(wmsIpAddrss, JsonConvert.SerializeObject(taskDTO));
                if (respon != null)
                {
                    WebResponseContent respone = JsonConvert.DeserializeObject<WebResponseContent>(respon.ToString());
                    if (respone.Status)
                    {
                        var taskId = BaseDal.AddData(task);
                    }
                    else
                    {
                        throw new Exception("WCS处理失败:" + respone.Message);
                    }
                }
                else
                {
                    throw new Exception("请求处理失败");
                }
            }
            LogFactory.GetLog("DTS火警出库").Info(true, $"\r\r--------------------------------------");
            LogFactory.GetLog("DTS火警出库").Info(true, obj.ToJsonString());
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
@@ -3,6 +3,7 @@
using WIDESEA_Core.Const;
using WIDESEA_DTO.MOM;
using WIDESEA_DTO.WMS;
using WIDESEA_StorageTaskRepository;
//using WIDESEAWCS_Model.Models;
@@ -78,8 +79,8 @@
            // TODO åˆ¤æ–­åœ¨é€”数量
            var needBarcode = await SqlSugarHelper.DbWCS.Queryable<dt_needBarcode>().FirstAsync(x => x.productLine == STATION.productLine);
            var needCount = needBarcode.inLineNum;
            var needBarcode = await SqlSugarHelper.DbWCS.Queryable<dt_needBarcode>().FirstAsync(x => x.productLine == STATION.productLine && x.fromArea == "CW");
            var needCount = needBarcode.inLineNum = BaseDal.QueryData(x => x.TargetAddress == STATION.stationChildCode).Count();
            //var count = BaseDal.QueryData(x => x.TargetAddress == stationManagers[0].Roadway).Count;
            if (needCount < needBarcode.cacheNum)
            {
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs
@@ -174,7 +174,6 @@
    /// <param name="input">请求数据</param>
    /// <returns></returns>
    [HttpPost, AllowAnonymous, Route("EmergencyTask")]
    [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5秒节流
    public WebResponseContent EmergencyTask([FromBody] object input)
    {
        return Service.EmergencyTask(input);
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
ÎļþÒÑɾ³ý