From 76eef0389848065963a295c66163a630697054fa Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期日, 07 七月 2024 09:47:01 +0800
Subject: [PATCH] PDA
---
代码管理/WMS/WMS_Server/WIDESEA_WMS/ToMes/shiftingparking.cs | 19 +++++++------------
1 files changed, 7 insertions(+), 12 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/ToMes/shiftingparking.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/ToMes/shiftingparking.cs"
index dfc9c30..65dd109 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/ToMes/shiftingparking.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/ToMes/shiftingparking.cs"
@@ -42,6 +42,8 @@
if (station2 == null) return content.Error("璇疯緭鍏ユ纭殑璧风偣鍦板潃锛�");
if (!station1.tray_type.Contains("Small") && station2.area != "4")
throw new Exception($"澶ф墭鐩樺彧鑳藉瓨鏀惧湪搴撳尯4锛�");
+ if (station1.tray_type.Contains("Small") && station2.area != "3" && station2.area != "2")
+ throw new Exception($"灏忔墭鐩樺彧鑳藉瓨鏀惧湪搴撳尯2/搴撳尯3锛�");
if (agvtaskRepository.Find(x => x.agv_fromaddress.Contains(from_address) || x.agv_toaddress.Contains(from_address)).Any())
throw new Exception($"璧风偣{from_address}宸插瓨鍦ㄤ换鍔★紒");
if (agvtaskRepository.Find(x => x.agv_fromaddress.Contains(to_address) || x.agv_toaddress.Contains(to_address)).Any())
@@ -52,17 +54,9 @@
throw new Exception($"缁堢偣{to_address}涓嶆槸绌鸿揣浣嶏紒");
if (string.IsNullOrEmpty(station1.stationType))
throw new Exception($"璧风偣{from_address}鏈粦瀹氱墿鏂欑被鍨嬶紒");
-
- if (station2.area == "1")
- {
- if (stationinfoRepository.Find(x => x.area == station2.area && x.column == station2.column && x.location_state != LocationStateEnum.Empty.ToString() && x.stationType != station1.stationType).Any())
- throw new Exception($"缁堢偣{to_address}鍚屽垪瀛樺湪涓庤捣鐐圭墿鏂欑被鍨嬩笉鍖归厤锛�");
- }
- else
- {
- if (stationinfoRepository.Find(x => x.area == station2.area && x.line == station2.line && x.location_state != LocationStateEnum.Empty.ToString() && x.stationType != station1.stationType).Any())
- throw new Exception($"缁堢偣{to_address}鍚岃瀛樺湪涓庤捣鐐圭墿鏂欑被鍨嬩笉鍖归厤锛�");
- }
+
+ if (stationinfoRepository.Find(x => x.area == station2.area && x.line == station2.line && x.enable && x.location_state != LocationStateEnum.Empty.ToString() && x.stationType != station1.stationType).Any())
+ throw new Exception($"缁堢偣{to_address}鍚岃瀛樺湪涓庤捣鐐圭墿鏂欑被鍨嬩笉鍖归厤锛�");
var inventory = inventoryRepository.Find(x => x.stationCode == station1.stationCode).FirstOrDefault();
if (inventory == null) throw new Exception($"璧风偣{from_address}鏈壘鍒板簱瀛樹俊鎭紒");
@@ -71,7 +65,7 @@
agv_fromaddress = station1.stationCode,
agv_id = Guid.NewGuid(),
agv_tasknum = IdenxManager.GetTaskNo("KH-", "WMS"),
- agv_grade = 1,
+ agv_grade = 0,
agv_createtime = DateTime.Now,
agv_taskstate = "Create",
agv_materielid = station1.stationType,
@@ -92,6 +86,7 @@
station2.location_state = LocationStateEnum.InBusy.ToString();
station2.heatNumber = station1.heatNumber;
station2.Number = station1.Number;
+ station2.billetID = station1.billetID;
station2.stationType = station1.stationType;
stationinfoRepository.Update(station2, true);
content.OK();
--
Gitblit v1.9.3