| | |
| | | { |
| | | |
| | | } |
| | | |
| | | private static bool toggle = false; |
| | | public int GetOrderDetails(string Barcodes) |
| | | { |
| | | OrderDetails orderDetails = BaseDal.QueryData(x=>x.Orderdetails_outid == Barcodes).FirstOrDefault(); |
| | | if(orderDetails != null) |
| | | { |
| | | if (orderDetails.Orderdetails_cutLength <= 800 && orderDetails.Orderdetails_cutLength>=50) |
| | | if (orderDetails.Orderdetails_width <= 800 && orderDetails.Orderdetails_width>=50) |
| | | { |
| | | Random random = new Random(); |
| | | return random.Next(0, 2) == 0 ? 2 : 3; |
| | | toggle = !toggle; // åæ¢ç¶æ |
| | | return toggle ? 2 : 3; |
| | | } |
| | | else if (orderDetails.Orderdetails_cutLength >= 800 && orderDetails.Orderdetails_cutLength <= 1220) |
| | | else if (orderDetails.Orderdetails_width >= 800 && orderDetails.Orderdetails_width <= 1220) |
| | | { |
| | | return 2; |
| | | } |
| | |
| | | |
| | | public string ToMesScan_sync = WIDESEAWCS_Core.Helper.AppSettings.Configuration["ToMesScan_sync"]; |
| | | |
| | | public bool ToMesBarc(int Barcodes) |
| | | public ToMesBarcRes ToMesBarc(int Barcodes) |
| | | { |
| | | ToMesBarc toMes = new ToMesBarc() |
| | | { |
| | |
| | | type = "1", |
| | | }; |
| | | ToMesBarcRes toMesBarc=HttpHelper.Post<ToMesBarcRes>($"{ToMesScan_sync}", toMes); |
| | | if (toMesBarc.code == 1) |
| | | { |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | return toMesBarc; |
| | | } |
| | | |
| | | |