dengjunjie
2025-04-13 2950220f98f891a64cc452478e2a2ae61b82a8cd
优化代码、添加大屏
已删除4个文件
已修改12个文件
已重命名3个文件
已添加5个文件
195 ■■■■ 文件已修改
项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4b0ec078-98ea-4b55-b93a-79926ca1c474.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/50c56e15-47e1-4795-b6c9-2c025997ff34.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6855f602-a964-45db-8412-82429bed1009.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/84f959ce-ebac-4741-9ac4-ce8d64779034.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/fa8502a9-61dd-4861-9163-b1d608a7f9fc.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskEnumHelper.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGVJob.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarExtend/PartialTaskService.cs 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/1b491b5d-708a-47fa-8233-947a9dfe5dae.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/602f5cae-8926-4c6a-91e8-770b3f127a3d.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/903d2997-d863-4f7f-ace5-9e0b1935c919.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9c38a34d-18e2-4e47-a9de-0141309ea5a8.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/a9f62c67-e5cb-4109-8694-4cec2518ac56.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/ae00f733-946e-47b3-ba7f-8fd0db44196e.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.futdcache.v2 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/fileList.bin 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/LargeScreenController.cs 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/WCSInterfaceController.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4b0ec078-98ea-4b55-b93a-79926ca1c474.vsidx
Binary files differ
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/50c56e15-47e1-4795-b6c9-2c025997ff34.vsidx
Binary files differ
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6855f602-a964-45db-8412-82429bed1009.vsidx
Binary files differ
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/84f959ce-ebac-4741-9ac4-ce8d64779034.vsidx
Binary files differ
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/fa8502a9-61dd-4861-9163-b1d608a7f9fc.vsidx
Binary files differ
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskEnumHelper.cs
@@ -64,6 +64,11 @@
                List<int> taskInboundTypes = type.GetEnumIndexList();
                return taskInboundTypes.Where(x => x > currentStatus && x < (int)TaskRelocationStatusEnum.RelocationFinish).OrderBy(x => x).FirstOrDefault();
            }
            else if (type == typeof(CarChargingTaskEnum))
            {
                List<int> taskInboundTypes = type.GetEnumIndexList();
                return taskInboundTypes.Where(x => x > currentStatus && x < (int)CarChargingTaskEnum.RelocationCarFinish).OrderBy(x => x).FirstOrDefault();
            }
            else
            {
                throw new NotImplementedException();
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -640,11 +640,12 @@
                NextAddress = TargetAddress,
                CreateDate = DateTime.Now,
                Creater = "WCS",
                TaskState = (int)TaskCarStatusEnum.CarNew,
                TaskState = string.IsNullOrEmpty(remark) ? (int)TaskCarStatusEnum.CarNew : (int)CarChargingTaskEnum.CarNew,
                ShuttleCarCode = ShuttleCarCode,
                WMSId = 0,
                Remark = remark
            };
            if (SourceAddress == TargetAddress) dt_Task.TaskState = (int)CarChargingTaskEnum.SC_CarFinish;
            return AddData(dt_Task);
            #endregion
        }
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGVJob.cs
@@ -91,7 +91,7 @@
                            }
                        }
                    }
                    Thread.Sleep(1000);
                    Thread.Sleep(5000);
                }
                _taskService.Db.Updateable(Tasks).ExecuteCommand();
                #endregion
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarExtend/PartialTaskService.cs
@@ -74,9 +74,20 @@
        {
            lock (_CarTaskObject)
            {
                #region èŽ·å–æ–°å»ºç§»è½¦å……ç”µä»»åŠ¡
                Dt_Task dt_Task = GetTask((int)CarChargingTaskEnum.CarNew, (int)TaskOtherTypeEnum.RelocationCarCharging);
                if (dt_Task != null && dt_Task.ShuttleCarCode == shuttleCar.DeviceCode)
                {
                    if (!string.IsNullOrEmpty(dt_Task.SourceAddress) && !string.IsNullOrEmpty(dt_Task.TargetAddress) && !string.IsNullOrEmpty(dt_Task.ShuttleCarCode))
                    {
                        SendTask(dt_Task);
                    }
                }
                #endregion
                #region èŽ·å–æ–°å»ºç§»è½¦ä»»åŠ¡
                Dt_Task dt_Task = GetTask((int)TaskCarStatusEnum.CarNew, (int)TaskOtherTypeEnum.RelocationCar);
                if (dt_Task != null)
                dt_Task = GetTask((int)TaskCarStatusEnum.CarNew, (int)TaskOtherTypeEnum.RelocationCar);
                if (dt_Task != null && dt_Task.ShuttleCarCode == shuttleCar.DeviceCode)
                {
                    if (string.IsNullOrEmpty(dt_Task.SourceAddress))
                    {
@@ -89,8 +100,9 @@
                    else if (string.IsNullOrEmpty(dt_Task.TargetAddress))
                    {
                        #region å‘WMS申请
                        var ShuttleCar = _shuttleCarService.QueryNoCode(dt_Task.ShuttleCarCode);
                        WebResponseContent content = new WebResponseContent();
                        var ResultData = HttpHelper.PostAsync(WMSInterfaceAddress.GetPosition + $"?position={dt_Task.SourceAddress}", "", headers: new Dictionary<string, string>());
                        var ResultData = HttpHelper.PostAsync(WMSInterfaceAddress.GetPosition + $"?position={dt_Task.SourceAddress}&&position1={ShuttleCar.ShuttleCarPosition}", "", headers: new Dictionary<string, string>());
                        if (ResultData.Result != null)
                        {
                            content = JsonConvert.DeserializeObject<WebResponseContent>(ResultData.Result);
@@ -216,7 +228,7 @@
            if (shuttleCar != null)
            {
                ShuttleCarTaskCommandR command = ReadCustomer<ShuttleCarTaskCommandR>(shuttleCar, shuttleCar.DeviceCode);//读取穿梭车信息
                if (command != null && command.Status == (short)ShuttleCarStatus.Standby && command.TaskTypeComplete == (short)ShuttleCarTaskComplete.Standby && command.Err_Status == (short)ShuttleCarErr.Normal)
                if (command != null && command.Status == (short)ShuttleCarStatus.Standby && command.TaskTypeComplete == (short)ShuttleCarTaskComplete.Standby && (command.Err_Status == (short)ShuttleCarErr.Normal || command.Err_Status == (short)ShuttleCarErr.LowBattery))
                {
                    #region åˆ¤æ–­å°è½¦ä½ç½®æ— AB面不下发任务
                    short Position = 0;
@@ -226,7 +238,10 @@
                    {
                        var Message = $"{shuttleCar.DeviceName}无AB面";
                        if (task.ExceptionMessage != Message)
                        {
                            task.ExceptionMessage = Message;
                            _taskService.UpdateData(task);
                        }
                        return;
                    }
                    #endregion
@@ -252,7 +267,9 @@
                    }
                    else if (task.TaskType == (int)TaskOtherTypeEnum.RelocationCarCharging)
                    {
                        shuttleCarTaskCommand.TaskType = (short)GetCarTaskType(ShuttleCarTaskType.Charging.ToString());
                        shuttleCarTaskCommand.TaskType = task.TaskState == CarChargingTaskEnum.CarNew.ObjToInt() ?
                            (short)GetCarTaskType(task.TaskType, shuttleCarTaskCommand.Direction) :
                            (short)GetCarTaskType(ShuttleCarTaskType.Charging.ToString());
                    }
                    else
                        shuttleCarTaskCommand.TaskType = (short)GetCarTaskType(task.TaskType, shuttleCarTaskCommand.Direction);
@@ -262,8 +279,9 @@
                    {
                        if (shuttleCar.SendCommand(shuttleCarTaskCommand, shuttleCar.DeviceCode))
                        {
                            if (!string.IsNullOrEmpty(task.Remark)) task.Remark = task.Remark + "已下发";
                            task.TaskState = GetTaskState(task.TaskType);
                            if (!string.IsNullOrEmpty(task.Remark) && task.TaskState == CarChargingTaskEnum.CarNew.ObjToInt())
                                task.Remark = task.Remark + "已下发";
                            task.TaskState = GetTaskState(task.TaskType, task.TaskState);
                            _taskService.UpdateData(task);
                        }
                    }
@@ -324,9 +342,8 @@
        /// </summary>
        /// <param name="TaskType"></param>
        /// <returns></returns>
        int GetTaskState(int TaskType)
        int GetTaskState(int TaskType, int state)
        {
            int state = 0;
            switch (TaskType)
            {
                case (int)TaskInboundTypeEnum.Inbound:
@@ -341,7 +358,9 @@
                    state = (int)TaskCarStatusEnum.ShuttleCar_Executing;
                    break;
                case (int)TaskOtherTypeEnum.RelocationCarCharging:
                    state = (int)CarChargingTaskEnum.ShuttleCar_Charging;
                    state = state < (int)CarChargingTaskEnum.SC_CarFinish ?
                        (int)CarChargingTaskEnum.ShuttleCar_Executing :
                        (int)CarChargingTaskEnum.ShuttleCar_Charging;
                    break;
                default:
                    break;
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs
@@ -77,7 +77,7 @@
                        #region åˆ›å»ºç§»è½¦å……电任务
                        if (command.Err_Status == (short)ShuttleCarErr.LowBattery || command.ElectricQuantity <= (short)ShuttleCarErr.LowBattery)
                        {
                            var ShuttleCar = QueryCode(shuttleCar.DeviceCode);
                            var ShuttleCar = QueryCode(shuttleCar.DeviceCode);//在充电位直接让穿梭车去充电
                            //生成堆垛机移车任务&穿梭车充电任务,判断是否有穿梭车在充电
                            Dt_Task _Task = _taskRepository.QueryFirst(x => x.TaskType == TaskOtherTypeEnum.RelocationCarCharging.ObjToInt());
                            if (_Task != null)
@@ -90,7 +90,6 @@
                                    {
                                        if (command1.Status == (short)ShuttleCarStatus.Charging && command1.ElectricQuantity >= 50)
                                        {
                                            _taskService.AddRelocationCarTask(ShuttleCar.ShuttleCarPosition, "", ShuttleCar.ShuttleCarCode);
                                            shuttleCar1.SetValue(ShuttleCarDBName.TaskType, (short)ShuttleCarStatus.QuitCharging);
                                        }
                                    }
@@ -98,7 +97,16 @@
                            }
                            else
                            {
                                _taskService.AddRelocationCarTask(ShuttleCar.ShuttleCarPosition, "003-002-001", ShuttleCar.ShuttleCarCode, ShuttleCarTaskType.Charging.ToString());
                                //判断充电位是否有车
                                var ShuttleCar1 = _shuttleCarService.QueryShuttleCar("003-002-001");
                                if (ShuttleCar1 != null && ShuttleCar1.ShuttleCarCode != shuttleCar.DeviceCode)
                                {
                                    _taskService.AddRelocationCarTask(ShuttleCar1.ShuttleCarPosition, "", ShuttleCar1.ShuttleCarCode);
                                }
                                else
                                {
                                    _taskService.AddRelocationCarTask(ShuttleCar.ShuttleCarPosition, "003-002-001", ShuttleCar.ShuttleCarCode, ShuttleCarTaskType.Charging.ToString());
                                }
                            }
                        }
                        #endregion
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -65,12 +65,17 @@
                    #endregion
                    #region ä»»åŠ¡å®Œæˆ
                    DeviceProtocolDetailDTO? deviceProtocolDetail = commonStackerCrane.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.ProtocalDetailValue == commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.CompleteStatus).ToString() && x.DeviceProParamName == nameof(StackerCraneTaskCommandR.CompleteStatus));
                    if (deviceProtocolDetail != null)
                    var completeStatus = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.CompleteStatus);
                    if (completeStatus == 2 || completeStatus == 3)
                    {
                        MethodInfo? method = GetType().GetMethod(deviceProtocolDetail.ProtocolDetailType);
                        if (method != null) method.Invoke(this, new object[] { commonStackerCrane });
                        NormalCompleted(commonStackerCrane);
                    }
                    //DeviceProtocolDetailDTO? deviceProtocolDetail = commonStackerCrane.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.ProtocalDetailValue == commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.CompleteStatus).ToString() && x.DeviceProParamName == nameof(StackerCraneTaskCommandR.CompleteStatus));
                    //if (deviceProtocolDetail != null)
                    //{
                    //    MethodInfo? method = GetType().GetMethod(deviceProtocolDetail.ProtocolDetailType);
                    //    if (method != null) method.Invoke(this, new object[] { commonStackerCrane });
                    //}
                    #endregion
                    #region ä»»åŠ¡é€»è¾‘å¤„ç†
                    var onlinestate = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.Onlinestate);
@@ -80,11 +85,11 @@
                        #region æŸ¥è¯¢ä»»åŠ¡,逻辑处理
                        if (Enum.Parse<RunStatus>(commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.RunStatus).ToString()) == RunStatus.Standby)
                        {
                            var Task = _taskService.GetTaskState(TaskType: (int)TaskOtherTypeEnum.RelocationCar);//获取移车任务
                            var Task = _taskService.GetTaskState((int)TaskCarStatusEnum.ShuttleCar_Finish, (int)TaskOtherTypeEnum.RelocationCar);//获取移车任务
                            var Task1 = _taskService.GetTaskState((int)CarChargingTaskEnum.ShuttleCar_Finish, (int)TaskOtherTypeEnum.RelocationCarCharging);//获取移车充电任务
                            if (Task != null)
                            {
                                if (Task.TaskState == (int)TaskCarStatusEnum.ShuttleCar_Finish) SendTask(commonStackerCrane, Task);
                                SendTask(commonStackerCrane, Task);
                            }
                            else if (Task1 != null)
                            {
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/1b491b5d-708a-47fa-8233-947a9dfe5dae.vsidx
Binary files differ
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/602f5cae-8926-4c6a-91e8-770b3f127a3d.vsidx
Binary files differ
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/903d2997-d863-4f7f-ace5-9e0b1935c919.vsidx
Binary files differ
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9c38a34d-18e2-4e47-a9de-0141309ea5a8.vsidx
Binary files differ
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/a9f62c67-e5cb-4109-8694-4cec2518ac56.vsidx
Binary files differ
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/ae00f733-946e-47b3-ba7f-8fd0db44196e.vsidx
Binary files differ
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.futdcache.v2
Binary files differ
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo
Binary files differ
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/fileList.bin
Binary files differ
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
using SqlSugar;
using System;
@@ -207,13 +208,28 @@
            return BaseDal.QueryFirst(x => x.RoadwayNo == locationInfo.RoadwayNo && x.Column == locationInfo.Column && x.Layer == locationInfo.Layer && x.Depth != locationInfo.Depth && x.Row != locationInfo.Row && (SqlFunc.Abs(x.Row - locationInfo.Row) == 1));
        }
        public WebResponseContent GetPosition(string position)
        public WebResponseContent GetPosition(string position, string position1)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                Dt_LocationInfo? locationInfo = null;
                //Dt_LocationInfo locationInfo = BaseDal.QueryFirst(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && (x.Row == 1 || x.Row == 3), _emptyAssignOrderBy);
                Dt_LocationInfo locationInfo = BaseDal.QueryFirst(x => x.CurrentQty < x.MaxQty && x.LocationCode != position, _emptyAssignOrderBy);
                string position2 = string.Empty;
                string[] Codes = position1.Split("-");
                var row = Convert.ToInt16(Codes[0]);
                if (row < 3)
                {
                    position2 = row == 1 ? "002" + "-" + Codes[1] + "-" + Codes[2] : "001" + "-" + Codes[1] + "-" + Codes[2];
                }
                if (string.IsNullOrEmpty(position2))
                {
                    locationInfo = BaseDal.QueryFirst(x => x.CurrentQty < x.MaxQty && x.LocationCode != position && x.LocationCode != position1, _emptyAssignOrderBy);
                }
                else
                {
                    locationInfo = BaseDal.QueryFirst(x => x.CurrentQty < x.MaxQty && x.LocationCode != position && x.LocationCode != position1 && x.LocationCode != position2, _emptyAssignOrderBy);
                }
                if (locationInfo != null) content.OK(locationInfo.LocationCode);
            }
            catch (Exception ex)
@@ -222,5 +238,36 @@
            }
            return content;
        }
        /// <summary>
        /// èŽ·å–è´§ä½ä¿¡æ¯
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public WebResponseContent GetLocationInfo(SaveModel model)
        {
            WebResponseContent response = new WebResponseContent();
            try
            {
                List<Dt_LocationInfo> locationInfos = BaseDal.QueryData(x => true);
                var Freelocations = locationInfos.Where(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt()).ToList();
                var Palletlocations = locationInfos.Where(x => x.LocationStatus == LocationStatusEnum.Pallet.ObjToInt()).ToList();
                var InStocklocations = locationInfos.Where(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.LocationStatus != LocationStatusEnum.Pallet.ObjToInt()).ToList();
                //Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
                //keyValuePairs.Add("空货位", Freelocations.Count);
                //keyValuePairs.Add("空托盘", Palletlocations.Count);
                //keyValuePairs.Add("有货", InStocklocations.Count);
                response.OK(data: new
                {
                    FreeQty = Freelocations.Count,
                    PalletQty = Palletlocations.Count,
                    InStockQty = InStocklocations.Count,
                });
            }
            catch (Exception ex)
            {
                response.Error(ex.Message);
            }
            return response;
        }
    }
}
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs
@@ -29,7 +29,7 @@
        WebResponseContent LocationEnableStatus(int key);
        WebResponseContent LocationDisableStatus(int key);
        WebResponseContent GetPosition(string position);
        WebResponseContent GetPosition(string position, string position1);
        WebResponseContent UpdateEnableStatus(SaveModel saveModel);
        /// <summary>
        /// èŽ·å–ç©¿æ¢­è½¦å……ç”µå¯å…¥è´§ä½
@@ -63,5 +63,6 @@
        WebResponseContent UpdateStatus(List<string> locationCodes,int Statu);
        WebResponseContent GetLocationCodes();
        object GetLocationLayer();
        WebResponseContent GetLocationInfo(SaveModel model);
    }
}
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/LargeScreenController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,55 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using SqlSugar.Extensions;
using WIDESEA_Common.TaskEnum;
using WIDESEA_Core;
using WIDESEA_Core.Enums;
using WIDESEA_IBasicService;
using WIDESEA_IInboundRepository;
using WIDESEA_ITaskInfoRepository;
using WIDESEA_Model.Models;
using WIDESEAWCS_DTO.WCSInfo;
namespace WIDESEA_WMSServer.Controllers
{
    [Route("api/LargeScreen")]
    [ApiController, AllowAnonymous]
    public class LargeScreenController : Controller
    {
        private readonly ILocationInfoService _locationInfoService;
        private readonly ITaskRepository _taskRepository;
        private readonly ITask_HtyRepository _taskHtyRepository;
        private readonly IInboundOrderDetailRepository _inboundOrderDetailRepository;
        public LargeScreenController(ILocationInfoService locationInfoService, ITaskRepository taskRepository, ITask_HtyRepository taskHtyRepository, IInboundOrderDetailRepository inboundOrderDetailRepository)
        {
            _locationInfoService = locationInfoService;
            _taskRepository = taskRepository;
            _taskHtyRepository = taskHtyRepository;
            _inboundOrderDetailRepository = inboundOrderDetailRepository;
        }
        [HttpPost, Route("GetLocationInfo")]
        public WebResponseContent GetLocationInfo([FromBody] SaveModel model)
        {
            return _locationInfoService.GetLocationInfo(model);
        }
        [HttpPost, Route("GetTask")]
        public WebResponseContent GetTask([FromBody] SaveModel model)
        {
            List<Dt_Task_Hty> task_Hties = _taskHtyRepository.QueryData(x => x.TaskType == TaskInboundTypeEnum.Inbound.ObjToInt()).ToList();
            var task_htys = task_Hties.Where(x => x.InsertTime.Date == DateTime.Now.Date).ToList();
            var tasks = _taskRepository.QueryData(x => x.TaskType == TaskInboundTypeEnum.Inbound.ObjToInt()).ToList();
            List<Dt_InboundOrderDetail> inboundOrderDetails = _inboundOrderDetailRepository.QueryData(x => x.OrderDetailStatus <= OrderDetailStatusEnum.GroupAndInbound.ObjToInt()).ToList();
            return WebResponseContent.Instance.OK(data: new
            {
                task_Htiesqty = task_Hties.Count,
                task_htysqty = task_htys.Count,
                tasksqty = tasks.Count,
                inboundOrderDetailsqty = inboundOrderDetails.Sum(x => x.OrderQuantity - x.OverInQuantity)
            });
        }
    }
}
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/WCSInterfaceController.cs
@@ -25,9 +25,9 @@
        /// <param name="position"></param>
        /// <returns></returns>
        [HttpPost, Route("GetPosition")]
        public WebResponseContent GetPosition(string position)
        public WebResponseContent GetPosition(string position, string position1)
        {
            return _locationInfoService.GetPosition(position);
            return _locationInfoService.GetPosition(position,position1);
        }
        /// <summary>
        /// ä¿®æ”¹ä»»åŠ¡çŠ¶æ€