From 209a219fd924ab0bbf88b1fd6b1534421c735666 Mon Sep 17 00:00:00 2001
From: liulijun <liulijun@hnkhzn.com>
Date: 星期二, 14 四月 2026 14:29:52 +0800
Subject: [PATCH] 添加强制结托

---
 项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/码垛/MDJob4_CP.cs |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob4_CP.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob4_CP.cs"
index 29ee466..ce7cffa 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob4_CP.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob4_CP.cs"
@@ -1,4 +1,4 @@
-锘縰sing Autofac.Core;
+using Autofac.Core;
 using Microsoft.AspNetCore.Components.Routing;
 using Newtonsoft.Json;
 using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
@@ -130,6 +130,21 @@
                                 var axis = _packaxisRepository.QueryFirst(x => x.DeviceCode == item.StackerCraneCode && x.StationCode == stationPackInfo.StationCode && x.PackType== stationPackInfo.PackType);
                                 if (axis != null)
                                 {
+                                    //寮哄埗缁撴墭
+                                    if (PackState == 2 && Convert.ToInt32(PackNum) < axis.PackNum)
+                                    {
+                                        WebResponseContent responseContent = _packaxisTaskService.BoxingInBound(item.StationCode);
+                                        if (responseContent.Status)
+                                        {
+                                            device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == GetPackSendEnum(item.StackerCraneStationCode).ToString()).DeviceProDataBlock, 2);
+                                            WriteInfo(item.StationName, $"{item.StationName}鍐欏叆宸ヤ綅寮哄埗缁撴墭淇″彿");
+                                        }
+                                        else
+                                        {
+                                            WriteError(item.StationName, $"{responseContent.Message}");
+                                        }
+                                        continue;
+                                    }
                                     //杩涜缁撴墭
                                     if (Convert.ToInt32(PackNum) == axis.PackNum)
                                     {

--
Gitblit v1.9.3