| | |
| | | { |
| | | throw new Exception("单据数量不能小于等于0"); |
| | | } |
| | | if (string.IsNullOrWhiteSpace(asnList.LotNo)) |
| | | //if (string.IsNullOrWhiteSpace(asnList.LotNo)) |
| | | //{ |
| | | // throw new Exception("单据批次号不能为空"); |
| | | //} |
| | | if (string.IsNullOrWhiteSpace(asnList.BoxCodeStr)) |
| | | { |
| | | throw new Exception("单据批次号不能为空"); |
| | | throw new Exception("单据箱码常值不能为空"); |
| | | } |
| | | var asn = Db.Queryable<BllArrivalNotice>().First(m => m.ASNNo == asnList.ASNNo && m.IsDel == "0"); |
| | | if (asn == null) |
| | |
| | | |
| | | string maxLotNoStr = ""; //批次号 |
| | | string maxBoxCode = ""; //箱码号 |
| | | |
| | | maxLotNoStr = asnList.LotNo; |
| | | maxBoxCode = label.Where(m => m.LotNo == maxLotNoStr).Max(a => a.BoxNo); |
| | | |
| | | maxLotNoStr = asnList.BoxCodeStr;//asnList.LotNo; |
| | | if (string.IsNullOrEmpty(asnList.LotNo)) |
| | | { |
| | | maxBoxCode = label.Where(m => m.ASNDetailNo == asnList.Id).Max(a => a.BoxNo); |
| | | } |
| | | else |
| | | { |
| | | maxBoxCode = label.Where(m => m.LotNo == maxLotNoStr).Max(a => a.BoxNo); |
| | | } |
| | | #endregion |
| | | |
| | | for (int i = 1; i <= labelNum; i++) |
| | |
| | | Status = "0", |
| | | SkuNo = asnList.SkuNo, |
| | | SkuName = asnList.SkuName, |
| | | LotNo = maxLotNoStr, |
| | | LotNo = asnList.LotNo,//maxLotNoStr, |
| | | Standard = asnList.Standard, |
| | | PackageStandard = packStr, |
| | | SupplierLot = supplierLot, |