| | |
| | | if (traytype == 4) |
| | | { |
| | | #region 璇诲彇鏁伴噺 |
| | | var productQtyadd = ProductionLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == ProductionLineDBName.productQty.ToString() && x.DeviceChildCode == station); |
| | | var productQty = ProductionLine.Communicator.Read<short>(productQtyadd.DeviceProAddress, (ushort)productQtyadd.DeviceProDataLength); |
| | | #endregion |
| | | //var productQtyadd = ProductionLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == ProductionLineDBName.productQty.ToString() && x.DeviceChildCode == station); |
| | | //var productQty = ProductionLine.Communicator.Read<short>(productQtyadd.DeviceProAddress, (ushort)productQtyadd.DeviceProDataLength); |
| | | //#endregion |
| | | |
| | | #region 鍐欏叆鏁伴噺 |
| | | var WproductQtyadd = ProductionLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == ProductionLineDBName.WproductQty.ToString() && x.DeviceChildCode == station); |
| | | ProductionLine.Communicator.Write(WproductQtyadd.DeviceProAddress, productQty); |
| | | //#region 鍐欏叆鏁伴噺 |
| | | //var WproductQtyadd = ProductionLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == ProductionLineDBName.WproductQty.ToString() && x.DeviceChildCode == station); |
| | | //ProductionLine.Communicator.Write(WproductQtyadd.DeviceProAddress, productQty); |
| | | #endregion |
| | | |
| | | MaterielGroupDTO.batchNo = ProductionLine.GetValue<ProductionLineDBName, string>(ProductionLineDBName.batchNo, station); |
| | | MaterielGroupDTO.productQty = string.Join(",", productQty); |
| | | //MaterielGroupDTO.productQty = string.Join(",", productQty); |
| | | } |
| | | } |
| | | break; |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | content = RequestWMS.PostWMSLog(WMSInterfaceAddress.ProductionlineRequest, MaterielGroupDTO.ToJson(), "浜х嚎鍚慦MS璇锋眰", headers: new Dictionary<string, string>()); |
| | | if (!content.Status) throw new Exception(content.Message); |
| | | //var ResultData = HttpHelper.PostAsync(WMSInterfaceAddress.ProductionlineRequest, MaterielGroupDTO.ToJson(), headers: new Dictionary<string, string>()); |
| | | //if (ResultData.Result == null) throw new Exception($"浜х嚎鍚慦MS璇锋眰瓒呮椂"); |
| | | var ResultData = HttpHelper.PostAsync(WMSInterfaceAddress.ProductionlineRequest, MaterielGroupDTO.ToJson(), headers: new Dictionary<string, string>()); |
| | | if (ResultData.Result == null) throw new Exception($"浜х嚎鍚慦MS璇锋眰瓒呮椂"); |
| | | |
| | | //content = JsonConvert.DeserializeObject<WebResponseContent>(ResultData.Result); |
| | | content = JsonConvert.DeserializeObject<WebResponseContent>(ResultData.Result); |
| | | |
| | | #region 浜х嚎鐢宠鍏ュ簱浠诲姟 |
| | | if (content != null && content.Status)//浠诲姟杞崲 |