dengjunjie
2025-02-17 2bdad959bc30a7c24bf08ca81fb52fff63e79f52
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ProductionLineJob/ProductionLineExtend/ProductionLineExtend.cs
@@ -102,17 +102,17 @@
                            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;
@@ -176,12 +176,10 @@
            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)//浠诲姟杞崲