From bb56b2b6f21acb7c69c02585e5bc534d2f67715f Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 27 三月 2025 17:13:35 +0800
Subject: [PATCH] WMS首页优化,WCS优化AGV和产线、输送线交互逻辑

---
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ProductionLineJob/CommonProductionLineJob.cs |   34 ++++++++++++++++++++++++----------
 1 files changed, 24 insertions(+), 10 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ProductionLineJob/CommonProductionLineJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ProductionLineJob/CommonProductionLineJob.cs"
index 7bc6222..e29bab2 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ProductionLineJob/CommonProductionLineJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ProductionLineJob/CommonProductionLineJob.cs"
@@ -40,6 +40,15 @@
                 OtherDevice ProductionLine = (OtherDevice)context.JobDetail.JobDataMap.Get("JobParams");
                 if (ProductionLine != null)
                 {
+                    //ProductionLineDTO MaterielGroupDTO = new ProductionLineDTO()
+                    //{
+                    //    stationCode = ProductionLine.DeviceCode,
+                    //    traytype = 4,
+                    //    Barcode = "25000037",
+                    //    batchNo = "250325T1",
+                    //};
+                    //var content = ProductionLineToWMSRequest(MaterielGroupDTO);
+                    #region MyRegion
                     var request = ProductionLine.GetValue<ProductionLineDBName, short>(ProductionLineDBName.request);
                     if (request == 1)
                     {
@@ -48,19 +57,24 @@
                         if (traytype == 4)
                         {
                             var Barcode = ProductionLine.GetValue<ProductionLineDBName, string>(ProductionLineDBName.trayBarcode).Replace("\0", "");
-                            var batchNo = ProductionLine.GetValue<ProductionLineDBName, string>(ProductionLineDBName.batchNo).Replace("\0", "");
-                            ProductionLineDTO MaterielGroupDTO = new ProductionLineDTO()
+                            var task = _taskRepository.QueryFirst(x => x.PalletCode == Barcode);
+                            if (task == null)
                             {
-                                stationCode = ProductionLine.DeviceCode,
-                                traytype = traytype,
-                                Barcode = Barcode,
-                                batchNo = batchNo,
-                            };
-                            var content = ProductionLineToWMSRequest(MaterielGroupDTO);
-                            if (content.Status)
-                                ProductionLine.SetValue(ProductionLineDBName.Wrequest, request);
+                                var batchNo = ProductionLine.GetValue<ProductionLineDBName, string>(ProductionLineDBName.batchNo).Replace("\0", "");
+                                ProductionLineDTO MaterielGroupDTO = new ProductionLineDTO()
+                                {
+                                    stationCode = ProductionLine.DeviceCode,
+                                    traytype = traytype,
+                                    Barcode = Barcode,
+                                    batchNo = batchNo,
+                                };
+                                var content = ProductionLineToWMSRequest(MaterielGroupDTO);
+                                if (content.Status)
+                                    ProductionLine.SetValue(ProductionLineDBName.Wrequest, request);
+                            }
                         }
                     }
+                    #endregion
                 }
                 #endregion
             }

--
Gitblit v1.9.3