| | |
| | | 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(); |