| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using ZXing; |
| | | |
| | | namespace Bro.M141.Process |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public async Task<string> MESForProduceAsync(ProductModel pro, string zwoid, int znonum, string endtray = "N", string line = "NQ216", int timeoutMs = 3000) |
| | | public async Task<string> MESForProduceAsync(ProductModel pro, int znonum, string endtray = "N", string line = "NQ216", int timeoutMs = 3000) |
| | | { |
| | | var guid = Guid.NewGuid().ToString(); |
| | | var tcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); |
| | | _pendingTask2[guid] = tcs; |
| | | |
| | | string zresult = "OK"; |
| | | if (string.IsNullOrWhiteSpace(pro.Result)) |
| | | { |
| | | zresult = "NG"; |
| | | } |
| | | else if (!"OK".Equals(pro.Result)) |
| | | { |
| | | zresult = "NG"; |
| | | } |
| | | |
| | | var msgObj = new AutoLineMacBarcodeQueue |
| | | { |
| | |
| | | zdate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff"), |
| | | zline = line, |
| | | zbarcode = pro.SN, |
| | | zresult = string.IsNullOrWhiteSpace(pro.Result) ? "NG" : pro.Result, |
| | | zresult = zresult, |
| | | zreson = pro.Result == "OK" ? "" : "SZ2014", |
| | | zno = znonum.ToString(), |
| | | zwoid = zwoid, |
| | | zwoid = pro.Zword, |
| | | endtray = endtray |
| | | }; |
| | | |