wangxinhui
2025-01-15 994dced313b956180f1b95e68760290c5ed931ba
Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn

# Conflicts:
# 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs
已删除7个文件
已修改13个文件
已添加2个文件
523 ■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/18a53365-4699-4a05-a22d-52202ffc28c5.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/76b34398-56f7-412e-a330-a8b8def683e9.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9a9ae583-4231-47b4-b5bf-94e21e462e94.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c470cd75-662b-44ab-b67b-80ff3d784fdc.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/read.lock 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/RGVJob_BC.cs 108 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/a03bb6c9-6a9c-4e1f-9c40-304cdb5e9f4d.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/e3866d26-515d-474f-abfb-51e4ed23e1b5.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/ec7cf4a8-d49d-49ce-bf3c-1956e1538ec8.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderDetailService.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/AssignInboundTaskLocation_BC.cs 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/淮安PDA/pages/stash/raworderboxing.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/18a53365-4699-4a05-a22d-52202ffc28c5.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/76b34398-56f7-412e-a330-a8b8def683e9.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9a9ae583-4231-47b4-b5bf-94e21e462e94.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c470cd75-662b-44ab-b67b-80ff3d784fdc.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/read.lock
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs
@@ -84,6 +84,16 @@
        WebResponseContent RequestWMSTask(string palletCode, string sourceAddress, string roadway);
        /// <summary>
        ///
        /// </summary>
        /// <param name="sourceAddress"></param>
        /// <param name="palletCode"></param>
        /// <param name="heightType"></param>
        /// <param name="roadways"></param>
        /// <returns></returns>
        WebResponseContent RequestWMSTask(string palletCode, string sourceAddress, int heightType, List<string> roadways);
        /// <summary>
        /// å‘WMS申请分配货位
        /// </summary>
        /// <param name="taskNum">任务号</param>
@@ -191,6 +201,11 @@
        /// <returns></returns>
        AgvResponseContent AgvUpdateTask(AgvUpdateDTO agvUpdateModel);
        /// <summary>
        ///
        /// </summary>
        /// <param name="taskNum"></param>
        /// <returns></returns>
        WebResponseContent SendSecureReplyToAgv(int taskNum);
        /// <summary>
@@ -217,6 +232,15 @@
        /// 
        /// </summary>
        /// <param name="roadwayNos"></param>
        /// <param name="palletCode"></param>
        /// <param name="heightType"></param>
        /// <returns></returns>
        WebResponseContent RequestWMSAssignRoadway(List<string> roadwayNos, string palletCode, int heightType);
        /// <summary>
        ///
        /// </summary>
        /// <param name="roadwayNos"></param>
        /// <param name="taskNum"></param>
        /// <param name="heightType"></param>
        /// <returns></returns>
@@ -229,6 +253,12 @@
        /// <returns></returns>
        WebResponseContent RequestWMSAssignRoadway(List<string> roadwayNos);
        /// <summary>
        ///
        /// </summary>
        /// <param name="agvPodModel"></param>
        /// <param name="PodBerthAndMat"></param>
        /// <returns></returns>
        WebResponseContent AgvPodBerthAndMat(AgvPodBerthAndMatDTO agvPodModel, APIEnum PodBerthAndMat = APIEnum.Agv_CSJPodBerthAndMat);
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -326,6 +326,12 @@
            return content;
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="palletCode"></param>
        /// <param name="sourceAddress"></param>
        /// <returns></returns>
        public WebResponseContent RequestWMSTaskSimple(string palletCode, string sourceAddress)
        {
            WebResponseContent content = new WebResponseContent();
@@ -355,6 +361,13 @@
            return content;
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="palletCode"></param>
        /// <param name="sourceAddress"></param>
        /// <param name="roadway"></param>
        /// <returns></returns>
        public WebResponseContent RequestWMSTask(string palletCode, string sourceAddress, string roadway)
        {
            WebResponseContent content = new WebResponseContent();
@@ -366,6 +379,43 @@
                    return WebResponseContent.Instance.Error($"未找到WMSApi地址");
                }
                string responseStr = HttpHelper.Get($"{address}/api/Task/DeviceRequestInboundTask?stationCode={sourceAddress}&roadwayNo={roadway}&palletCode={palletCode}");
                WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr);
                if (responseContent != null && responseContent.Status && responseContent.Data != null)
                {
                    WMSTaskDTO? taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(responseContent.Data.ToString());
                    if (taskDTO != null)
                    {
                        content = ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO });
                    }
                }
            }
            catch (Exception ex)
            {
                content = WebResponseContent.Instance.Error(ex.Message);
            }
            return content;
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="sourceAddress"></param>
        /// <param name="palletCode"></param>
        /// <param name="heightType"></param>
        /// <param name="roadways"></param>
        /// <returns></returns>
        public WebResponseContent RequestWMSTask(string palletCode, string sourceAddress,  int heightType, List<string> roadways)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                string address = AppSettings.Get("WMSApiAddress");
                if (string.IsNullOrEmpty(address))
                {
                    return WebResponseContent.Instance.Error($"未找到WMSApi地址");
                }
                string responseStr = HttpHelper.Post($"{address}/api/Task/DeviceRequestInboundTaskByRoadways?stationCode={sourceAddress}&palletCode={palletCode}&heightType={heightType}", roadways.Serialize());
                WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr);
                if (responseContent != null && responseContent.Status && responseContent.Data != null)
                {
@@ -416,6 +466,38 @@
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="roadwayNos"></param>
        /// <param name="palletCode"></param>
        /// <param name="heightType"></param>
        /// <returns></returns>
        public WebResponseContent RequestWMSAssignRoadway(List<string> roadwayNos, string palletCode, int heightType)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                string address = AppSettings.Get("WMSApiAddress");
                if (string.IsNullOrEmpty(address))
                {
                    return WebResponseContent.Instance.Error($"未找到WMSApi地址");
                }
                string responseStr = HttpHelper.Post($"{address}/api/Task/AssignRoadwayByHeightAndCode?palletCode={palletCode}&heightType={heightType}", roadwayNos.Serialize());
                WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr);
                if (responseContent != null && responseContent.Status && responseContent.Data != null)
                {
                    return responseContent;
                }
            }
            catch (Exception ex)
            {
                content = WebResponseContent.Instance.Error(ex.Message);
            }
            return content;
        }
        /// <summary>
        /// åˆ†é…å··é“
        /// </summary>
        /// <param name="roadwayNos"></param>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/°å²Ä²Ö/RGVJob_BC.cs
@@ -36,9 +36,10 @@
        private readonly IStationMangerRepository _stationMangerRepository;
        private readonly IRouterRepository _routerRepository;
        private readonly IRouterService _routerService;
        private readonly IRouterExtension _routerExtension;
        private readonly List<Dt_WarehouseDevice> warehouseDevices;
        public RGVJob_BC(ICacheService cacheService, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IRouterService routerService)
        public RGVJob_BC(ICacheService cacheService, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IRouterService routerService, IRouterExtension routerExtension)
        {
            _cacheService = cacheService;
            _taskService = taskService;
@@ -47,6 +48,7 @@
            _stationMangerRepository = stationMangerRepository;
            _routerRepository = routerRepository;
            _routerService = routerService;
            _routerExtension = routerExtension;
            string? warehouseDevicesStr = _cacheService.Get<string>(nameof(Dt_WarehouseDevice));
            if (!string.IsNullOrEmpty(warehouseDevicesStr))
@@ -99,7 +101,26 @@
                        if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt())
                        {
                            if (conveyorLineSignalRead.STB && /*conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && */!conveyorLineSignalWrite.ACK && !string.IsNullOrEmpty(conveyorLineInfoRead.Barcode) && conveyorLineInfoRead.TaskNum == 0)//入库
                            //if (conveyorLineSignalRead.STB && !conveyorLineSignalWrite.ACK && !string.IsNullOrEmpty(conveyorLineInfoRead.Barcode) && conveyorLineInfoRead.TaskNum == 0)//入库
                            //{
                            //    List<string> stations = _routerExtension.GetEndPoint(item.StationCode, TaskTypeEnum.Inbound.ObjToInt()).Select(x => x.NextPosi).ToList();
                            //    WebResponseContent responseContent = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode,  conveyorLineInfoRead.Spare2, stations);
                            //    if (responseContent.Status)
                            //    {
                            //        Dt_Task task = _taskRepository.QueryFirst(x => x.PalletCode == conveyorLineInfoRead.Barcode && x.CurrentAddress == item.StationCode && x.DeviceCode == device.DeviceCode && x.TaskState == TaskStatusEnum.New.ObjToInt());
                            //        if (task != null)
                            //        {
                            //            device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
                            //            device.SetValue(W_ConveyorLineDB.StartPos, task.CurrentAddress, item.StationCode);
                            //            device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Inbound.ObjToInt(), item.StationCode);
                            //            device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
                            //            device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
                            //            _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing);
                            //        }
                            //    }
                            //}
                            if (conveyorLineSignalRead.STB && !conveyorLineSignalWrite.ACK && !string.IsNullOrEmpty(conveyorLineInfoRead.Barcode) && conveyorLineInfoRead.TaskNum == 0)//入库
                            {
                                WebResponseContent content = _taskService.RequestWMSTaskSimple(conveyorLineInfoRead.Barcode, item.StationCode);
                                if (content.Status)
@@ -115,89 +136,6 @@
                                        _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing);
                                    }
                                }
                                #region
                                //Dt_Task task = _taskRepository.QueryFirst(x => x.SourceAddress == item.StationDeviceCode && x.TaskState == TaskStatusEnum.New.ObjToInt() && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.PalletCode == conveyorLineInfoRead.Barcode && string.IsNullOrEmpty(x.DeviceCode) && string.IsNullOrEmpty(x.NextAddress) && string.IsNullOrEmpty(x.TargetAddress));
                                //if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
                                //{
                                //    Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode);
                                //    if (stationManger == null)
                                //    {
                                //        WriteError(item.StationName, $"未找到对应站台信息,设备编号:{item.StationCode},任务号:{task.TaskNum}");
                                //        continue;
                                //    }
                                //    List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == task.TaskType && (task.Roadway == x.ChildPosiDeviceCode || task.Roadway == x.ChildPosi));
                                //    Dt_Router? router = routers.FirstOrDefault();
                                //    if (router == null)
                                //    {
                                //        WriteError(device.DeviceName, $"未找到任务类型{task.TaskType}对应的路由信息");
                                //    }
                                //    else
                                //    {
                                //        if (routers.Count == 1)
                                //        {
                                //            task.Dispatchertime = DateTime.Now;
                                //            _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing, deviceCode: router.ChildPosi, targetAddress: router.NextPosi, nextAddress: router.StartPosi, currentAddress: item.StationCode);
                                //            device.SetValue(W_ConveyorLineDB.StartPos, item.StationCode, item.StationCode);
                                //            device.SetValue(W_ConveyorLineDB.EndPos, router.StartPosi, item.StationCode);
                                //            device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
                                //            device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Inbound.ObjToInt(), item.StationCode);
                                //            device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
                                //        }
                                //        else
                                //        {
                                //            List<string> canInboundStations = new List<string>();
                                //            List<string> stations = routers.Select(x => x.NextPosi).ToList();
                                //            foreach (string station in stations)
                                //            {
                                //                Dt_StationManger stationManger1 = _stationMangerRepository.QueryFirst(x => x.StationCode == station);
                                //                if (stationManger1 != null)
                                //                {
                                //                    IDevice? device1 = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger1.StationDeviceCode);
                                //                    if (device1 != null)
                                //                    {
                                //                        OtherDevice otherDevice = (OtherDevice)device1;
                                //                        //short workType = otherDevice.GetValue<R_ConveyorLineWorkType, short>(R_ConveyorLineWorkType.ConveyorLineWorkType, item.StationCode);
                                //                        //if (workType == ConveyorWorkTypeEnum.Undefined.ObjToInt() || workType == ConveyorWorkTypeEnum.Inbound.ObjToInt())
                                //                        {
                                //                            canInboundStations.Add(stationManger1.Remark);
                                //                        }
                                //                    }
                                //                }
                                //            }
                                //            WebResponseContent responseContent = _taskService.RequestWMSAssignRoadway(task.TaskNum, canInboundStations);
                                //            if (responseContent.Status)
                                //            {
                                //                List<Dt_Router> dt_Routers = _routerService.QueryNextRoutes(item.StationCode, responseContent.Data.ToString() ?? "", task.TaskType);
                                //                Dt_Router? routerTemp = _routerService.QueryNextRoutes(item.StationCode, responseContent.Data.ToString() ?? "", task.TaskType).FirstOrDefault();
                                //                if (routerTemp != null)
                                //                {
                                //                    task.Dispatchertime = DateTime.Now;
                                //                    task.Roadway = responseContent.Data.ToString() ?? task.Roadway;
                                //                    _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing, deviceCode: routerTemp.ChildPosiDeviceCode, targetAddress: routerTemp.NextPosi, nextAddress: routerTemp.NextPosi, currentAddress: item.StationCode);
                                //                    device.SetValue(W_ConveyorLineDB.StartPos, item.StationCode, item.StationCode);
                                //                    device.SetValue(W_ConveyorLineDB.EndPos, routerTemp.NextPosi, item.StationCode);
                                //                    device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
                                //                    device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Inbound.ObjToInt(), item.StationCode);
                                //                    device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
                                //                }
                                //                else
                                //                {
                                //                    WriteError(device.DeviceName, $"未找到任务类型{task.TaskType},起点{item.StationCode},终点{responseContent.Data.ToString()}的路由信息");
                                //                }
                                //            }
                                //            else
                                //            {
                                //                WriteError(device.DeviceName, responseContent.Message);
                                //            }
                                //        }
                                //    }
                                //}
                                #endregion
                            }
                            else if (conveyorLineSignalRead.STB /*&& conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm*/ && !conveyorLineSignalWrite.ACK && conveyorLineInfoRead.TaskNum > 0)//出库
                            {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue
@@ -50,9 +50,8 @@
          title: "物料编码",
          field: "materielCode",
          type: "select",
          required: true,
          // dataKey: "MaterielCodes",
          data: [],
          required: true,
        },
      ],
      [
@@ -60,7 +59,6 @@
          title: "采购单号",
          field: "purchaseOrderNo",
          type: "select",
          // dataKey: "purchaseOrderNos",
          data: [],
          required: true,
        },
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/a03bb6c9-6a9c-4e1f-9c40-304cdb5e9f4d.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/e3866d26-515d-474f-abfb-51e4ed23e1b5.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/ec7cf4a8-d49d-49ce-bf3c-1956e1538ec8.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
@@ -94,7 +94,17 @@
        /// <param name="stationCode"></param>
        /// <param name="palletCode"></param>
        /// <returns></returns>
        WebResponseContent DeviceRequestInboundTask(string stationCode, string palletCode);
        WebResponseContent DeviceRequestInboundTaskSimple(string stationCode, string palletCode);
        /// <summary>
        ///
        /// </summary>
        /// <param name="stationCode"></param>
        /// <param name="palletCode"></param>
        /// <param name="roadwayNos"></param>
        /// <param name="heightType"></param>
        /// <returns></returns>
        WebResponseContent DeviceRequestInboundTaskByRoadways(string stationCode, string palletCode, List<string> roadwayNos, int heightType);
        /// <summary>
        /// å…¥åº“任务申请分配货位
@@ -147,7 +157,7 @@
        /// </summary>
        /// <param name="keys"></param>
        /// <returns></returns>
        WebResponseContent GenerateOutboundTask(int[] keys);
        WebResponseContent GenerateOutboundTasks(int[] keys);
        /// <summary>
        /// å‡ºåº“任务完成
@@ -221,7 +231,16 @@
        /// <param name="taskNum"></param>
        /// <param name="heightType"></param>
        /// <returns></returns>
        WebResponseContent AssignRoadway(List<string> roadwayNos, int taskNum, int heightType = 0);
        WebResponseContent AssignRoadwayByHeight(List<string> roadwayNos, int taskNum, int heightType = 0);
        /// <summary>
        ///
        /// </summary>
        /// <param name="roadwayNos"></param>
        /// <param name="palletCode"></param>
        /// <param name="heightType"></param>
        /// <returns></returns>
        WebResponseContent AssignRoadwayByHeightAndCode(List<string> roadwayNos, string palletCode, int heightType = 0);
        /// <summary>
        /// åˆ†é…å··é“
@@ -236,7 +255,7 @@
        /// </summary>
        /// <param name="roadwayNos"></param>
        /// <returns></returns>
        WebResponseContent AssignRoadway(List<string> roadwayNos);
        WebResponseContent SingleAssignRoadway(List<string> roadwayNos);
        /// <summary>
        /// 
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs
@@ -534,7 +534,7 @@
                        PalletCode = palletCode,
                        StockStatus = StockStatusEmun.组盘暂存.ObjToInt(),
                        WarehouseId = inboundOrder.WarehouseId,
                        PalletType = GetPalletType(warehouse, palletCode, materielInfo),
                        PalletType = GetPalletType(warehouse, palletCode),
                        Details = new List<Dt_StockInfoDetail>()
                    };
                }
@@ -678,7 +678,7 @@
                        PalletCode = palletCode,
                        StockStatus = StockStatusEmun.手动组盘暂存.ObjToInt(),
                        WarehouseId = warehouse.WarehouseId,
                        PalletType = GetPalletType(warehouse, palletCode, materielInfo),
                        PalletType = GetPalletType(warehouse, palletCode),
                        Details = new List<Dt_StockInfoDetail>()
                    };
                }
@@ -1029,7 +1029,7 @@
        //    }
        //}
        public int GetPalletType(Dt_Warehouse warehouse, string palletCode, Dt_MaterielInfo materielInfo)
        public int GetPalletType(Dt_Warehouse warehouse, string palletCode)
        {
            if (warehouse.WarehouseCode == WarehouseEnum.HA64.ToString())
            {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderDetailService.cs
@@ -27,6 +27,7 @@
            {
                List<Dt_PurchaseOrderDetail> purchaseOrderDetails = BaseDal.QueryData(x => x.WarehouseId == warehouseId && x.PurchaseDetailStatus != PurchaseOrderDetailStatusEnum.Received.ObjToInt());
                List<string> MaterielCodes = purchaseOrderDetails.Select(x => x.MaterielCode).ToList();
                MaterielCodes = MaterielCodes.Distinct().ToList();
                return WebResponseContent.Instance.OK(data: MaterielCodes);
            }
            catch (Exception ex)
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/AssignInboundTaskLocation_BC.cs
@@ -24,7 +24,7 @@
        /// <param name="taskNum">任务号</param>
        /// <param name="roadwayNos">巷道号</param>
        /// <returns></returns>
        public WebResponseContent AssignRoadway(List<string> roadwayNos, int taskNum, int heightType = 0)
        public WebResponseContent AssignRoadwayByHeight(List<string> roadwayNos, int taskNum, int heightType = 0)
        {
            try
            {
@@ -70,6 +70,123 @@
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="roadwayNos"></param>
        /// <param name="palletCode"></param>
        /// <param name="heightType"></param>
        /// <returns></returns>
        public WebResponseContent AssignRoadwayByHeightAndCode(List<string> roadwayNos, string palletCode, int heightType = 0)
        {
            try
            {
                if (heightType == 0 || heightType > 3)
                {
                    return WebResponseContent.Instance.Error($"高度错误");
                }
                if (roadwayNos == null || roadwayNos.Count == 0)
                {
                    return WebResponseContent.Instance.Error($"巷道不能为空");
                }
                Dt_LocationInfo locationInfo = _basicRepository.LocationInfoRepository.QueryFirst(x => x.RoadwayNo == roadwayNos[0]);
                if (locationInfo == null)
                {
                    return WebResponseContent.Instance.Error($"未找到巷道对应货位");
                }
                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == locationInfo.WarehouseId);
                if (warehouse == null)
                {
                    return WebResponseContent.Instance.Error($"未找到巷道对应仓库信息");
                }
                int palletType = _inboundOrderService.GetPalletType(warehouse, palletCode);
                if (palletType == -1)
                {
                    return WebResponseContent.Instance.Error($"托盘号解析托盘类型错误");
                }
                string roadwayNo = "";
                if (heightType == 1)
                {
                    List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => (x.LocationType == palletType || x.LocationType == LocationTypeEnum.Undefined.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && roadwayNos.Contains(x.RoadwayNo) && x.Layer <= 3).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
                    roadwayNo = locationCounts.OrderBy(x => x.Count).FirstOrDefault()?.RoadwayNo ?? "";
                }
                else if (heightType == 2)
                {
                    List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => (x.LocationType == palletType || x.LocationType == LocationTypeEnum.Undefined.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && roadwayNos.Contains(x.RoadwayNo) && x.Layer == 4).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
                    roadwayNo = locationCounts.OrderBy(x => x.Count).FirstOrDefault()?.RoadwayNo ?? "";
                }
                else if (heightType == 3)
                {
                    List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => (x.LocationType == palletType || x.LocationType == LocationTypeEnum.Undefined.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && roadwayNos.Contains(x.RoadwayNo) && x.Layer == 5).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
                    roadwayNo = locationCounts.OrderBy(x => x.Count).FirstOrDefault()?.RoadwayNo ?? "";
                }
                return !string.IsNullOrEmpty(roadwayNo) ? WebResponseContent.Instance.OK(data: roadwayNo) : WebResponseContent.Instance.Error("未找到可分配巷道");
            }
            catch (Exception ex)
            {
                _unitOfWorkManage.RollbackTran();
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        public string AssignRoadwayNo(List<string> roadwayNos, string palletCode, int heightType = 0)
        {
            try
            {
                if (heightType == 0 || heightType > 3)
                {
                    throw new Exception($"高度错误");
                }
                if (roadwayNos == null || roadwayNos.Count == 0)
                {
                    throw new Exception($"巷道不能为空");
                }
                Dt_LocationInfo locationInfo = _basicRepository.LocationInfoRepository.QueryFirst(x => x.RoadwayNo == roadwayNos[0]);
                if (locationInfo == null)
                {
                    throw new Exception($"未找到巷道对应货位");
                }
                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == locationInfo.WarehouseId);
                if (warehouse == null)
                {
                    throw new Exception($"未找到巷道对应仓库信息");
                }
                int palletType = _inboundOrderService.GetPalletType(warehouse, palletCode);
                if (palletType == -1)
                {
                    throw new Exception($"托盘号解析托盘类型错误");
                }
                string roadwayNo = "";
                if (heightType == 1)
                {
                    List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => (x.LocationType == palletType || x.LocationType == LocationTypeEnum.Undefined.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && roadwayNos.Contains(x.RoadwayNo) && x.Layer <= 3).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
                    roadwayNo = locationCounts.OrderBy(x => x.Count).FirstOrDefault()?.RoadwayNo ?? "";
                }
                else if (heightType == 2)
                {
                    List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => (x.LocationType == palletType || x.LocationType == LocationTypeEnum.Undefined.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && roadwayNos.Contains(x.RoadwayNo) && x.Layer == 4).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
                    roadwayNo = locationCounts.OrderBy(x => x.Count).FirstOrDefault()?.RoadwayNo ?? "";
                }
                else if (heightType == 3)
                {
                    List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => (x.LocationType == palletType || x.LocationType == LocationTypeEnum.Undefined.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && roadwayNos.Contains(x.RoadwayNo) && x.Layer == 5).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
                    roadwayNo = locationCounts.OrderBy(x => x.Count).FirstOrDefault()?.RoadwayNo ?? "";
                }
                return !string.IsNullOrEmpty(roadwayNo) ? ( roadwayNo) : throw new Exception("未找到可分配巷道");
            }
            catch (Exception ex)
            {
                _unitOfWorkManage.RollbackTran();
                throw new Exception(ex.Message);
            }
        }
        /// <summary>
        /// å…¥åº“任务申请分配货位
        /// </summary>
        /// <param name="taskNum">任务号</param>
@@ -108,7 +225,7 @@
        /// </summary>
        /// <param name="roadwayNos">巷道号</param>
        /// <returns></returns>
        public WebResponseContent AssignRoadway(List<string> roadwayNos)
        public WebResponseContent SingleAssignRoadway(List<string> roadwayNos)
        {
            try
            {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs
@@ -334,7 +334,7 @@
        /// <param name="stationCode"></param>
        /// <param name="palletCode"></param>
        /// <returns></returns>
        public WebResponseContent DeviceRequestInboundTask(string stationCode, string palletCode)
        public WebResponseContent DeviceRequestInboundTaskSimple(string stationCode, string palletCode)
        {
            try
            {
@@ -412,6 +412,92 @@
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="stationCode"></param>
        /// <param name="palletCode"></param>
        /// <param name="staions"></param>
        /// <param name="heightType"></param>
        /// <returns></returns>
        public WebResponseContent DeviceRequestInboundTaskByRoadways(string stationCode, string palletCode, List<string> staions, int heightType)
        {
            try
            {
                Dt_Task task = Repository.QueryFirst(x => x.PalletCode == palletCode);
                if (task != null)
                {
                    PushTasksToWCS(new List<Dt_Task> { task });
                    return WebResponseContent.Instance.OK($"该托盘已生成任务", _mapper.Map<WMSTaskDTO>(task));
                }
                if (Repository.QueryFirst(x => x.SourceAddress == stationCode && x.TaskStatus == TaskStatusEnum.New.ObjToInt()) != null)
                {
                    return WebResponseContent.Instance.Error($"该站点已有未执行的任务");
                }
                string roadwayNo = AssignRoadwayNo(staions, palletCode, heightType);
                Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == palletCode);
                if (stockInfo == null)
                {
                    return WebResponseContent.Instance.Error($"未找到组盘信息");
                }
                if (stockInfo.StockStatus != StockStatusEmun.组盘暂存.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.手动组盘暂存.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.出库完成.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.拣选完成.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.退库.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.MES退库.ObjToInt())
                {
                    return WebResponseContent.Instance.Error($"该托盘状态不正确,不可申请入库");
                }
                if (!string.IsNullOrEmpty(stockInfo.LocationCode))
                {
                    return WebResponseContent.Instance.Error($"该托盘已绑定货位");
                }
                Dt_Task newTask = new Dt_Task()
                {
                    CurrentAddress = stationCode,
                    Grade = 0,
                    NextAddress = "",
                    PalletCode = palletCode,
                    Roadway = roadwayNo,
                    SourceAddress = stationCode,
                    TargetAddress = roadwayNo,
                    TaskType = TaskTypeEnum.Inbound.ObjToInt(),
                    TaskStatus = TaskStatusEnum.New.ObjToInt(),
                    WarehouseId = stockInfo.WarehouseId,
                    PalletType = stockInfo.PalletType
                };
                if (stockInfo.StockStatus == StockStatusEmun.手动组盘暂存.ObjToInt())
                {
                    stockInfo.StockStatus = StockStatusEmun.手动组盘入库确认.ObjToInt();
                }
                else if (stockInfo.StockStatus == StockStatusEmun.MES退库.ObjToInt())
                {
                    newTask.TaskType = TaskTypeEnum.MesMatReturn.ObjToInt();
                }
                else
                {
                    stockInfo.StockStatus = StockStatusEmun.入库确认.ObjToInt();
                }
                _unitOfWorkManage.BeginTran();
                int taskId = BaseDal.AddData(newTask);
                newTask.TaskId = taskId;
                _stockRepository.StockInfoRepository.UpdateData(stockInfo);
                _unitOfWorkManage.CommitTran();
                WMSTaskDTO wMSTaskDTO = _mapper.Map<WMSTaskDTO>(newTask);
                PushTasksToWCS(new List<Dt_Task> { newTask });
                //if (newTask.WarehouseId == 5) PutFinish(stationCode);
                return WebResponseContent.Instance.OK(data: wMSTaskDTO);
            }
            catch (Exception ex)
            {
                _unitOfWorkManage.RollbackTran();
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        /// <summary>
        /// å…¥åº“任务申请分配货位
        /// </summary>
        /// <param name="taskNum">任务号</param>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs
@@ -461,7 +461,7 @@
        /// </summary>
        /// <param name="keys">出库单明细主键</param>
        /// <returns></returns>
        public WebResponseContent GenerateOutboundTask(int[] keys)
        public WebResponseContent GenerateOutboundTasks(int[] keys)
        {
            try
            {
@@ -515,7 +515,7 @@
            {
                List<int> keys = _outboundService.OutboundOrderDetailService.Repository.QueryData(x => x.Id, x => x.OrderId == outboundId);
                return GenerateOutboundTask(keys.ToArray());
                return GenerateOutboundTasks(keys.ToArray());
            }
            catch (Exception ex)
            {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs
@@ -89,7 +89,21 @@
        [HttpPost, HttpGet, Route("DeviceRequestInboundTaskSimple"), AllowAnonymous]
        public WebResponseContent DeviceRequestInboundTaskSimple(string stationCode, string palletCode)
        {
            return Service.DeviceRequestInboundTask(stationCode, palletCode);
            return Service.DeviceRequestInboundTaskSimple(stationCode, palletCode);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="stationCode"></param>
        /// <param name="palletCode"></param>
        /// <param name="roadwayNos"></param>
        /// <param name="heightType"></param>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("DeviceRequestInboundTaskByRoadways"), AllowAnonymous]
        public WebResponseContent DeviceRequestInboundTaskByRoadways(string stationCode, string palletCode, int heightType, [FromBody] List<string> roadwayNos)
        {
            return Service.DeviceRequestInboundTaskByRoadways(stationCode, palletCode, roadwayNos, heightType);
        }
        /// <summary>
@@ -158,9 +172,9 @@
        /// <param name="keys"></param>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("GenerateOutboundTasks"), AllowAnonymous]
        public WebResponseContent GenerateOutboundTask([FromBody] int[] keys)
        public WebResponseContent GenerateOutboundTasks([FromBody] int[] keys)
        {
            return Service.GenerateOutboundTask(keys);
            return Service.GenerateOutboundTasks(keys);
        }
        /// <summary>
@@ -229,7 +243,20 @@
        [HttpPost, Route("AssignRoadwayByHeight"), AllowAnonymous]
        public WebResponseContent AssignRoadwayByHeight([FromBody] List<string> roadwayNos, int taskNum, int heightType = 0)
        {
            return Service.AssignRoadway(roadwayNos, taskNum, heightType);
            return Service.AssignRoadwayByHeight(roadwayNos, taskNum, heightType);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="roadwayNos"></param>
        /// <param name="palletCode"></param>
        /// <param name="heightType"></param>
        /// <returns></returns>
        [HttpPost, Route("AssignRoadwayByHeightAndCode"), AllowAnonymous]
        public WebResponseContent AssignRoadwayByHeightAndCode([FromBody] List<string> roadwayNos, string palletCode, int heightType = 0)
        {
            return Service.AssignRoadwayByHeightAndCode(roadwayNos, palletCode, heightType);
        }
        /// <summary>
@@ -250,9 +277,9 @@
        /// <param name="roadwayNos"></param>
        /// <returns></returns>
        [HttpPost, Route("SingleAssignRoadway"), AllowAnonymous]
        public WebResponseContent AssignRoadway([FromBody] List<string> roadwayNos)
        public WebResponseContent SingleAssignRoadway([FromBody] List<string> roadwayNos)
        {
            return Service.AssignRoadway(roadwayNos);
            return Service.SingleAssignRoadway(roadwayNos);
        }
        /// <summary>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
@@ -103,13 +103,13 @@
app.UseAllServicesMiddle(builder.Services);
app.UseSession();
//if (app.Environment.IsDevelopment())
if (app.Environment.IsProduction())
{
    //todo
    app.UseSwaggerAuthorized();
    app.UseSwaggerMiddle(() => Assembly.GetExecutingAssembly().GetManifestResourceStream("WIDESEA_WMSServer.index.html") ?? throw new Exception("WIDESEA_WMSServer.index.html文件"));
}//判断是否需要打开swagger
app.UseSwaggerMiddle(() => Assembly.GetExecutingAssembly().GetManifestResourceStream("WIDESEA_WMSServer.index.html") ?? throw new Exception("WIDESEA_WMSServer.index.html文件"));
app.UseIpLimitMiddle();
app.UseApiLogMiddleware();
//todo
´úÂë¹ÜÀí/»´°²PDA/pages/stash/raworderboxing.vue
@@ -68,8 +68,8 @@
                                placeholder="请扫描托盘条码" ref='midInput' @input="inputChangebarcode" />
                        </uni-forms-item>
                        <uni-forms-item label="地址条码">
                            <uni-easyinput type="text" v-model="address" :disabled="addressdisabled" placeholder="请扫描地址条码" ref='midInput'
                                :focus="addressFocus" />
                            <uni-easyinput type="text" v-model="address" :disabled="addressdisabled"
                                placeholder="请扫描地址条码" ref='midInput' :focus="addressFocus" />
                        </uni-forms-item>
                        <uni-forms-item>
                            <button @click="inbound" type="primary" size="default" style="margin-top: 2%;">入库确认</button>
@@ -87,8 +87,7 @@
                                        <view style="font-size: 18px;">单据号:{{orderNo}}</view>
                                        <view style="font-size: 18px;">物料编码:{{item.materielCode}}</view>
                                        <!-- <view style="font-size: 18px;">物料名称:{{item.matName}}</view> -->
                                        <view style="font-size: 18px;">数量:{{item.orderQuantity}}</view>
                                        <view style="font-size: 18px;">单位:{{item.unit}}</view>
                                        <view style="font-size: 18px;">数量:{{item.orderQuantity+item.unit}}</view>
                                        <view style="font-size: 18px;">组盘数量:{{item.receiptQuantity}}</view>
                                    </view>
                                </view>