From 53d6a24cb335b0c9b4449e1211ce8ea644d68d67 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期五, 31 五月 2024 20:48:53 +0800
Subject: [PATCH] 可根据图号更改下料口车轮数量入库条件

---
 代码管理/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs"
index bff502d..948272b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs"
@@ -164,10 +164,10 @@
                         {
                             Station.location_state = LocationStateEnum.Abnormal.ToString();
                             Station.remark = "杞﹁疆鏁伴噺涓嶴N鍙锋暟閲忎笉涓�鑷�";
-                            stationinfoRepository.Update(Station, true);
+                            stationinfoRepository.Update(Station, x => new { x.location_state, x.remark }, true);
                             Gantry_client.WriteByOrder("W_RequestUnload", false, number);//淇″彿涓篺alse妗佹灦鍋滄杩涘叆
                             #region 鏃ュ織璁板綍
-                            WriteDBLog.Error("涓婃枡鍖�", $"鍐欏叆妗佹灦淇℃伅锛歕nW_RequestUnload锛歠alse\n\n{Station.stationCode}杞﹁疆鏁伴噺涓嶴N鍙锋暟閲忎笉涓�鑷�", "PCS");
+                            //WriteDBLog.Error("涓婃枡鍖�", $"鍐欏叆妗佹灦淇℃伅锛歕nW_RequestUnload锛歠alse\n\n{Station.stationCode}杞﹁疆鏁伴噺涓嶴N鍙锋暟閲忎笉涓�鑷�", "PCS");
                             #endregion
                             return;
                         }
@@ -178,7 +178,15 @@
 
                         if (PalletSignal == 1 && MaterialSignal == 1)
                         {
-                            Gantry_client.WriteByOrder("W_Wheel_Type", (Int16)Convert.ToInt16(QueryMateriel(Station.stationType) == null ? QueryMateriel1(Station.stationType).TypeId : QueryMateriel(Station.stationType).TypeId), number);//杞﹁疆绫诲瀷
+                            var geometry = QueryMateriel(Station.stationType);
+                            if (geometry == null)
+                            {
+                                Station.remark = "鏈壘鍒拌溅杞俊鎭�";
+                                stationinfoRepository.Update(Station, x => new { x.remark }, true);
+                                Gantry_client.WriteByOrder("W_RequestUnload", false, number);//淇″彿涓篺alse妗佹灦鍋滄杩涘叆
+                                return;
+                            }
+                            Gantry_client.WriteByOrder("W_Wheel_Type", (Int16)Convert.ToInt16(geometry.TypeId), number);//杞﹁疆绫诲瀷
                             var area = Convert.ToInt16(Station.stationCode.Substring(Station.stationCode.Length - 1, 1));
                             Gantry_client.WriteByOrder("W_AreaNr", (Int16)area, number);//鍖哄煙璐т綅鍙�
                             Gantry_client.WriteByOrder("W_IndexNr", (Int16)SNS.Length, number);//鎵樼洏涓婄殑绗嚑涓溅杞�
@@ -187,7 +195,7 @@
                             Gantry_client.WriteByOrder("W_RequestUnload", true, number);
                             #region 鏃ュ織璁板綍
                             WriteDBLog.Success("涓婃枡鍖虹敵璇�", $"璇诲彇鎵樼洏鍏夌數淇″彿锛歿PalletSignal}\n璇诲彇绗竴涓溅杞厜鐢典俊鍙凤細{MaterialSignal}\n\n" +
-                                $"鍐欏叆妗佹灦淇℃伅锛歕n鍖哄煙璐т綅鍙凤細{area}\n鎵樼洏涓婄殑绗嚑涓溅杞細{SNS.Length}\n鎵樼洏绫诲瀷锛歿1}\n杞﹁疆绫诲瀷锛歿(QueryMateriel(Station.stationType) == null ? QueryMateriel1(Station.stationType).TypeId : QueryMateriel(Station.stationType).TypeId)}" +
+                                $"鍐欏叆妗佹灦淇℃伅锛歕n鍖哄煙璐т綅鍙凤細{area}\n鎵樼洏涓婄殑绗嚑涓溅杞細{SNS.Length}\n鎵樼洏绫诲瀷锛歿1}\n杞﹁疆绫诲瀷锛歿geometry.TypeId}" +
                                 $"\n杞﹁疆SN鍙凤細{SNS[SNS.Length - 1]}\nW_RequestUnload锛歵rue", "PCS");
                             #endregion
                         }

--
Gitblit v1.9.3