| | |
| | | _taskRepository = taskRepository; |
| | | _routerService = routerService; |
| | | } |
| | | //static int i = 0; |
| | | public Task Execute(IJobExecutionContext context) |
| | | { |
| | | try |
| | | { |
| | | OtherDevice ProductionLine = (OtherDevice)context.JobDetail.JobDataMap.Get("JobParams"); |
| | | short[] shorts = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }; |
| | | ProductionLineDTO MaterielGroupDTO = new ProductionLineDTO() |
| | | { |
| | | Barcode = "A1001", |
| | | batchNo = "20241212001T1", |
| | | stationCode = "Z1", |
| | | productQty = string.Join(",", shorts), |
| | | traytype = 4 |
| | | }; |
| | | ProductionLineToWMSRequest(MaterielGroupDTO); |
| | | if (ProductionLine != null) |
| | | { |
| | | switch (ProductionLine.DeviceName) |
| | | { |
| | | case "å
¥åºäº§çº¿": |
| | | ProductionLineIn(ProductionLine); |
| | | break; |
| | | case "åºåºäº§çº¿": |
| | | ProductionLineOut(ProductionLine); |
| | | break; |
| | | default: |
| | | throw new Exception("æªå®ä¹äº§çº¿"); |
| | | } |
| | | } |
| | | //if (i < 1) |
| | | //{ |
| | | // i++; |
| | | // ProductionLineDTO MaterielGroupDTO = new ProductionLineDTO() |
| | | // { |
| | | // stationCode = "MDX01", |
| | | // traytype = 4, |
| | | // Barcode = "A0216", |
| | | // batchNo = "20250113T2", |
| | | // }; |
| | | // var content = ProductionLineToWMSRequest(MaterielGroupDTO); |
| | | //} |
| | | #region MyRegion |
| | | //OtherDevice ProductionLine = (OtherDevice)context.JobDetail.JobDataMap.Get("JobParams"); |
| | | //if (ProductionLine != null) |
| | | //{ |
| | | // var request = ProductionLine.GetValue<ProductionLineDBName, short>(ProductionLineDBName.request); |
| | | // if (request == 1) |
| | | // { |
| | | // var traytype = ProductionLine.GetValue<ProductionLineDBName, short>(ProductionLineDBName.trayType); |
| | | // //var content = Request(ProductionLine, traytype, ProductionLine.DeviceCode); |
| | | // if (traytype == 4) |
| | | // { |
| | | // var Barcode = ProductionLine.GetValue<ProductionLineDBName, string>(ProductionLineDBName.trayBarcode); |
| | | // var batchNo = ProductionLine.GetValue<ProductionLineDBName, string>(ProductionLineDBName.batchNo); |
| | | // ProductionLineDTO MaterielGroupDTO = new ProductionLineDTO() |
| | | // { |
| | | // stationCode = ProductionLine.DeviceCode, |
| | | // traytype = traytype, |
| | | // Barcode = Barcode, |
| | | // batchNo = batchNo, |
| | | // }; |
| | | // var content = ProductionLineToWMSRequest(MaterielGroupDTO); |
| | | // if (content.Status) ProductionLine.SetValue(ProductionLineDBName.Wrequest, 1); |
| | | // } |
| | | // } |
| | | //} |
| | | #endregion |
| | | #region MyRegion |
| | | //short[] shorts = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }; |
| | | //ProductionLineDTO MaterielGroupDTO = new ProductionLineDTO() |
| | | //{ |
| | | // Barcode = "A1001", |
| | | // batchNo = "20241212001T1", |
| | | // stationCode = "Z1", |
| | | // productQty = string.Join(",", shorts), |
| | | // traytype = 4 |
| | | //}; |
| | | //ProductionLineToWMSRequest(MaterielGroupDTO); |
| | | //if (ProductionLine != null) |
| | | //{ |
| | | // switch (ProductionLine.DeviceName) |
| | | // { |
| | | // case "å
¥åºäº§çº¿": |
| | | // ProductionLineIn(ProductionLine); |
| | | // break; |
| | | // case "åºåºäº§çº¿": |
| | | // ProductionLineOut(ProductionLine); |
| | | // break; |
| | | // default: |
| | | // throw new Exception("æªå®ä¹äº§çº¿"); |
| | | // } |
| | | //} |
| | | #endregion |
| | | } |
| | | catch (Exception ex) |
| | | { |