ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4b0ec078-98ea-4b55-b93a-79926ca1c474.vsidxBinary files differ
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/50c56e15-47e1-4795-b6c9-2c025997ff34.vsidxBinary files differ
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6855f602-a964-45db-8412-82429bed1009.vsidxBinary files differ
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/84f959ce-ebac-4741-9ac4-ce8d64779034.vsidxBinary files differ
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/fa8502a9-61dd-4861-9163-b1d608a7f9fc.vsidxBinary 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.vsidxBinary files differ
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/602f5cae-8926-4c6a-91e8-770b3f127a3d.vsidxBinary files differ
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/903d2997-d863-4f7f-ace5-9e0b1935c919.vsidxBinary files differ
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9c38a34d-18e2-4e47-a9de-0141309ea5a8.vsidxBinary files differ
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/a9f62c67-e5cb-4109-8694-4cec2518ac56.vsidxBinary files differ
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/ae00f733-946e-47b3-ba7f-8fd0db44196e.vsidxBinary files differ
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.futdcache.v2Binary files differ
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suoBinary files differ
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/fileList.binBinary 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> /// ä¿®æ¹ä»»å¡ç¶æ