From 6e7f192546903b04d2d37e852dd9b248e938c790 Mon Sep 17 00:00:00 2001
From: z8018 <1282578289@qq.com>
Date: 星期五, 01 八月 2025 09:23:17 +0800
Subject: [PATCH] 1
---
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/OrderDetailsService.cs | 39 ++++++++++++++++++++++++++++++++++-----
1 files changed, 34 insertions(+), 5 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/OrderDetailsService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/OrderDetailsService.cs"
index 5357c80..585de7c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/OrderDetailsService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/OrderDetailsService.cs"
@@ -69,11 +69,20 @@
Length = Convert.ToInt32(orderDetails.Orderdetails_length),
Width = Convert.ToInt32(orderDetails.Orderdetails_width),
};
+
+ int length = productInfo.Length;
+ int width = productInfo.Width;
+ if (length < width)
+ {
+ length = productInfo.Width;
+ width = productInfo.Length;
+ }
+
useableStations = useableStations.OrderByDescending(x => x).ToList();
- if (orderDetails.Orderdetails_width < 60)
+ if (width < 100)
useableStations = useableStations.Where(x => x != 1).OrderByDescending(x => x).ToList();
- if (orderDetails.Orderdetails_width <= 800 && orderDetails.Orderdetails_width >= 50)//1,2,3
+ if (width <= 800 && width >= 50)//1,2,3
{
if (lastStaion == 0)
{
@@ -95,7 +104,7 @@
}
}
}
- else if (orderDetails.Orderdetails_width >= 800 && orderDetails.Orderdetails_width <= 1220)//1,2
+ else if (width >= 800 && width <= 1220)//1,2
{
useableStations = useableStations.Where(x => x != 3).ToList();
@@ -150,6 +159,26 @@
return toMesBarc;
}
+ public ToMesBarcRes? ToMes(string barcode, int processId)
+ {
+ try
+ {
+ object obj = new
+ {
+ id = barcode,
+ processId
+ };
+
+ ToMesBarcRes? toMesBarc = JsonConvert.DeserializeObject<ToMesBarcRes>(HttpHelper.Post($"{ToMesScan_sync}", obj.Serialize()));
+ return toMesBarc;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
+
+ }
+
public OrderInfo GetOrderInfoByBarcode(string barcode)
{
try
@@ -157,13 +186,13 @@
OrderDetails orderDetails = BaseDal.QueryFirst(x => x.Orderdetails_outid == barcode);
if (orderDetails == null)
{
- throw new Exception("鏈壘鍒版潯鐮佸搴旇鍗曚俊鎭�");
+ throw new Exception($"銆恵barcode}銆戞湭鎵惧埌鏉$爜瀵瑰簲璁㈠崟淇℃伅");
}
Orderrows orderrows = _orderrowsRepository.QueryFirst(x => x.id == orderDetails.Orderrowsid);
if (orderrows == null)
{
- throw new Exception($"鏈壘鍒板搴旇鍗曞ご淇℃伅");
+ throw new Exception($"銆恵barcode}銆戞湭鎵惧埌瀵瑰簲璁㈠崟澶翠俊鎭�");
}
OrderInfo orderInfo = new OrderInfo()
--
Gitblit v1.9.3