| | |
| | | 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) |
| | | { |
| | |
| | | } |
| | | } |
| | | } |
| | | 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(); |
| | | |
| | |
| | | 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 |
| | |
| | | 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() |