WMS
dengjunjie
2024-12-18 eb9439d4c635ec89482951dc532327126d142354
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs
@@ -162,6 +162,35 @@
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        public WebResponseContent ScaninnerCode(string innerCode)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                var innerCodes = innerCode.Split(',');
                var matCode = innerCodes.FirstOrDefault(x => x.Contains("M:"));//.Replace("M:", "");
                if (matCode == null) throw new Exception("未获取到物料码");
                var batchNo = innerCodes.FirstOrDefault(x => x.Contains("BS:"));//.Replace("BS:", "")
                if (batchNo == null) throw new Exception("未获取到批次号");
                var purchaseOrderNo = innerCodes.FirstOrDefault(x => x.Contains("PO:"));//.Replace("PO:", "")
                if (purchaseOrderNo == null) throw new Exception("未获取到采购单号");
                var qty = innerCodes.FirstOrDefault(x => x.Contains("Q:"));
                if (qty == null) throw new Exception("未获取到数量");
                InnerCodeDTO innerCodeDTO = new InnerCodeDTO()
                {
                    matCode = matCode.Replace("M:", ""),
                    batchNo = batchNo.Replace("BS:", ""),
                    purchaseOrderNo = purchaseOrderNo.Replace("PO:", ""),
                    qty = Convert.ToInt32(qty.Replace("Q:", ""))
                };
                content.OK("扫描成功", data: innerCodeDTO);
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
        public WebResponseContent GetReceiveOrderInfos(SaveModel saveModel)
        {
            WebResponseContent content = new WebResponseContent();