ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -926,8 +926,8 @@ if (task.TaskState == (int)TaskStatusEnum.Line_Executing) { #region å ¥åºè°ç¨æ¥å£è·åè´§ä½å°å //string? local = RequestAssignLocation(task.TaskNum, task.Roadway); string? local = "SC05_YLDual-002-090-009-01"; string? local = RequestAssignLocation(task.TaskNum, task.Roadway); //string? local = "SC05_YLDual-002-090-009-01"; if (!string.IsNullOrEmpty(local)) { task.CurrentAddress = stationManger.StackerCraneStationCode; @@ -946,8 +946,8 @@ } else if (task.TaskState == (int)TaskStatusEnum.AGV_Finish) { //content = AssignYLRoadwayNo(task.PalletCode); content.OK(data: "SC05_YLDual"); content = AssignYLRoadwayNo(task.PalletCode); //content.OK(data: "SC05_YLDual"); if (!content.Status) { return content.Error($"请æ±å ¥åºå¤±è´¥ï¼{content.Message}"); @@ -983,8 +983,8 @@ } task.ModifyDate = DateTime.Now; task.Modifier = "System"; BaseDal.UpdateData(task); //UpdateTask(task, nextStatus); //BaseDal.UpdateData(task); UpdateTask(task, nextStatus); content = WebResponseContent.Instance.OK(); } catch (Exception ex) ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommand.cs
@@ -112,6 +112,11 @@ public short WorkType { get; set; } /// <summary> /// å®æä¿¡å· /// </summary> public short WriteFinish { get; set; } /// <summary> /// æçç±»å /// </summary> public short PalletType { get; set; } ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/ÔÁÏ¿â/ConveyorLineJob_YL2ndFloor.cs
@@ -155,6 +155,7 @@ conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskCommand.TaskNum, childDeviceCode); conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, taskCommand.TargetAddress, childDeviceCode); conveyorLine.SetValue(ConveyorLineDBName.Weight, taskCommand.Weight, childDeviceCode); conveyorLine.SetValue(ConveyorLineDBName.Barcode, taskCommand.Barcode, childDeviceCode); conveyorLine.SetValue(ConveyorLineDBName.ResponState, 86, childDeviceCode); for (int i = 0; i < 6; i++) @@ -162,7 +163,7 @@ ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(childDeviceCode); if (command != null) { if (command.TaskNum == taskCommand.TaskNum && command.TargetAddress == taskCommand.TargetAddress && command.Weight == taskCommand.Weight) if (command.TaskNum == taskCommand.TaskNum && command.TargetAddress == taskCommand.TargetAddress && command.Weight == taskCommand.Weight && command.Barcode == taskCommand.Barcode) { WriteInfo(conveyorLine.DeviceName, $"æ¶é´ï¼ã{DateTime.Now}ãåå ¥ä»»å¡æååå ¥æ¬¡æ°{i}åå ¥ä»»å¡ã{JsonConvert.SerializeObject(taskCommand)}ã"); return true; @@ -172,6 +173,11 @@ conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskCommand.TaskNum, childDeviceCode); Thread.Sleep(100); } if (command.Barcode != taskCommand.Barcode) { conveyorLine.SetValue(ConveyorLineDBName.Barcode, taskCommand.Barcode, childDeviceCode); Thread.Sleep(100); } if (command.TaskNum != taskCommand.TaskNum) { conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskCommand.TaskNum, childDeviceCode); ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/ÔÁÏ¿â/StackerCraneJob_YLSC3.cs
@@ -76,8 +76,8 @@ commonStackerCrane.LastTaskType = task.TaskType; task.Dispatchertime = DateTime.Now; task.ExceptionMessage = ""; //_taskService.UpdateTask(task, TaskStatusEnum.SC_Executing); _taskService.UpdateTaskStatusToNext(task); _taskService.UpdateTask(task, TaskStatusEnum.SC_Executing); //_taskService.UpdateTaskStatusToNext(task); commonStackerCrane.Communicator.Write("DB1000.20.0", true); //å»¶æ¶1s Thread.Sleep(1000); @@ -141,33 +141,20 @@ //åæä¸æ¥¼åºåºä¸å线ä½é»è¾ if (stationManger.StationDeviceCode == "CL1_YL") { IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode); if (device != null) { OtherDevice conveyorLine = (OtherDevice)device; conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskNum, stationManger.StationCode); conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, router.NextPosi, stationManger.StationCode); conveyorLine.SetValue(ConveyorLineDBName.ResponState, 86, stationManger.StationCode); // å åæºå®æ _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: router.NextPosi); } else { WriteInfo(deviceCode, $"æªæ¾å°åºåºç«å°ã{stationManger.StationDeviceCode}ã对åºçéè®¯å¯¹è±¡ï¼æ æ³åéè¾é线åºåºä¿¡å·"); _taskService.UpdateTaskExceptionMessage(taskNum, $"æªæ¾å°åºåºç«å°ã{stationManger.StationDeviceCode}ã对åºçéè®¯å¯¹è±¡ï¼æ æ³åéè¾é线åºåºä¿¡å·"); return WebResponseContent.Instance.Error($"æªæ¾å°åºåºç«å°ã{stationManger.StationDeviceCode}ã对åºçéè®¯å¯¹è±¡ï¼æ æ³åéè¾é线åºåºä¿¡å·"); } }//åæäºæ¥¼åºåºä¸å线ä½é»è¾ else else//åæäºæ¥¼åºåºä¸å线ä½é»è¾ { IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode); if (device != null) { CommonConveyorLine conveyorLine = (CommonConveyorLine)device; conveyorLine.SetValue(WR_CLineYLDB.WR_Task, taskNum, stationManger.StationCode); conveyorLine.SetValue(WR_CLineYLDB.WR_ToHode, router.NextPosi, stationManger.StationCode); conveyorLine.SetValue(WR_CLineYLDB.WR_Reresult, 86, stationManger.StationCode); conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskNum, stationManger.StationCode); conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, router.NextPosi, stationManger.StationCode); conveyorLine.SetValue(ConveyorLineDBName.Width, task.TaskLength, stationManger.StationCode); conveyorLine.SetValue(ConveyorLineDBName.Barcode, task.PalletCode, stationManger.StationCode); conveyorLine.SetValue(ConveyorLineDBName.ResponState, 86, stationManger.StationCode); _taskService.UpdateTaskStatusToNext(task); } else