| | |
| | | BILLLINE = Convert.ToInt32(item.sfdcseq), |
| | | UNITCODE = item.sfdc006, |
| | | MATERIALCODE = item.sfdc004, |
| | | PRQTY = Convert.ToDecimal(item.sfdc007), |
| | | PRQTY = Convert.ToDouble(item.sfdc007), |
| | | DELIVERYDATE = Convert.ToDateTime(item.sfdareqdt), |
| | | WAREHOUSECODE = item.sfdc012, |
| | | SOURCETYPE = Convert.ToInt32(item.sfdc003), |
| | |
| | | prd_d = prd_d ?? new WMS_PRDPICK_D() |
| | | { |
| | | LINESTATUS = "INIT", |
| | | QTY = Convert.ToDecimal(0), |
| | | QTY = Convert.ToDouble(0), |
| | | CreationTime = DateTime.Now, |
| | | CreatorUserId = 1, |
| | | }; |
| | |
| | | prd_d.BILLLINE = item_d.BILLLINE; |
| | | prd_d.UNITCODE = item_d.UNITCODE; |
| | | prd_d.MATERIALCODE = item_d.MATERIALCODE; |
| | | prd_d.PRQTY = Convert.ToDecimal(item_d.PRQTY); |
| | | prd_d.PRQTY = Convert.ToDouble(item_d.PRQTY); |
| | | prd_d.DELIVERYDATE = Convert.ToDateTime(item_d.DELIVERYDATE); |
| | | prd_d.WAREHOUSECODE = item_d.WAREHOUSECODE; |
| | | prd_d.LINESTATUS = prd_d.PRQTY == prd_d.QTY ? "COMPLETE" : Convert.ToDecimal(item_d.PRQTY) == 0 ? "COMPLETE" : prd_d.LINESTATUS == "DELETE" ? "INIT" : prd_d.LINESTATUS; |
| | |
| | | |
| | | |
| | | // 判断标签数量是否合法 |
| | | if (!decimal.TryParse(nLotQty, out decimal nBarcodeQty)) |
| | | if (!double.TryParse(nLotQty, out double nBarcodeQty)) |
| | | { |
| | | result.Flag = Result.Flags.Failed; |
| | | result.Message = $"条码格式错误:未取到正确的条码数量"; |
| | |
| | | bool isBox = false; |
| | | var nLotNo = ""; |
| | | |
| | | List<Tuple<string, decimal>> snList = new List<Tuple<string, decimal>>(); |
| | | List<Tuple<string, double>> snList = new List<Tuple<string, double>>(); |
| | | |
| | | |
| | | foreach (string item in nSplitArray) |
| | |
| | | if (nInputSnDto.Any()) |
| | | { |
| | | isBox = true; |
| | | snList = nInputSnDto.Select(t => new Tuple<string, decimal>(t.SmallBarcode, t.IncludeQty)).ToList(); |
| | | snList = nInputSnDto.Select(t => new Tuple<string, double>(t.SmallBarcode, t.IncludeQty)).ToList(); |
| | | } |
| | | |
| | | |
| | | if (!decimal.TryParse(nLotQty, out decimal nBarcodeQty)) |
| | | if (!double.TryParse(nLotQty, out double nBarcodeQty)) |
| | | { |
| | | //throw new UserFriendlyException("条码格式错误:未取到正确的条码数量"); |
| | | result.Flag = Result.Flags.Failed; |
| | |
| | | var nLotNo = ""; |
| | | |
| | | // 最小包装条码列表 |
| | | List<Tuple<string, decimal>> snList = new List<Tuple<string, decimal>>(); |
| | | List<Tuple<string, double>> snList = new List<Tuple<string, double>>(); |
| | | // 送货单行明细 |
| | | List<InputAsnLineDto> asnLineList = new List<InputAsnLineDto>(); |
| | | // 最小包装条码明细 |
| | |
| | | |
| | | if (snBarcodeList.Any()) |
| | | { |
| | | snList = snBarcodeList.Select(t => new Tuple<string, decimal>(t.SmallBarcode, t.IncludeQty)).ToList(); |
| | | snList = snBarcodeList.Select(t => new Tuple<string, double>(t.SmallBarcode, t.IncludeQty)).ToList(); |
| | | snBarcodeList = snBarcodeList.Select(t => new WMS_SRMSNList |
| | | { |
| | | BILLCODE = t.BILLCODE, |
| | |
| | | } |
| | | |
| | | // 验证条码标签数量格式是否正确 |
| | | if (!decimal.TryParse(nLotQty, out decimal nBarcodeQty)) |
| | | if (!double.TryParse(nLotQty, out double nBarcodeQty)) |
| | | { |
| | | //throw new UserFriendlyException("条码格式错误:未取到正确的条码数量"); |
| | | result.Flag = Result.Flags.Failed; |
| | |
| | | } |
| | | |
| | | // 验证条码标签数量与SRM 最小包装数量合计是否一致 |
| | | decimal snQtyTotal = snBarcodeList.Sum(t => t.IncludeQty); |
| | | double snQtyTotal = snBarcodeList.Sum(t => t.IncludeQty); |
| | | if (nBarcodeQty != snQtyTotal) |
| | | { |
| | | //throw new UserFriendlyException("标签数量与SRM最小包装总数量不一致"); |