| | |
| | | else |
| | | { |
| | | //从物料名称-批次中取出批次 |
| | | int indexOfDash = model.LotNo.IndexOf("-"); |
| | | int indexOfDash = model.LotNo.IndexOf("=>"); |
| | | if (indexOfDash != -1) |
| | | { |
| | | model.LotNo = model.LotNo.Substring(indexOfDash + 1); |
| | | model.LotNo = model.LotNo.Substring(indexOfDash + 2); |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("物料-批次不可为空!"); |
| | | model.LotNo = ""; |
| | | //throw new Exception("物料-批次不可为空!"); |
| | | } |
| | | } |
| | | |
| | |
| | | #endregion |
| | | |
| | | #region 质检请验 |
| | | if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1") |
| | | if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1" && sku.IsControlled != "1") |
| | | { |
| | | var qualityRequest = Db.Queryable<BllQualityInspectionRequest>().First(m => m.IsDel == "0" && m.SkuNo == sku.SkuNo && m.LotNo == bind.LotNo && m.SupplierLot == bind.SupplierLot); |
| | | if (qualityRequest == null) |
| | |
| | | #endregion |
| | | |
| | | #region 质检请验 |
| | | if ((arrNotice.Type == "1" || arrNotice.Type == "4" || arrNotice.Type == "5") && sku.IsInspect != "1") |
| | | if ((arrNotice.Type == "1" || arrNotice.Type == "4" || arrNotice.Type == "5") && sku.IsInspect != "1" && sku.IsControlled != "1") |
| | | { |
| | | var qualityRequest = Db.Queryable<BllQualityInspectionRequest>().First(m => m.IsDel == "0" && m.SkuNo == sku.SkuNo && m.LotNo == bind.LotNo && m.SupplierLot == bind.SupplierLot); |
| | | if (qualityRequest == null) |
| | |
| | | else |
| | | { |
| | | //从物料名称-批次中取出批次 |
| | | int indexOfDash = model.LotNo.IndexOf("-"); |
| | | int indexOfDash = model.LotNo.IndexOf("=>"); |
| | | if (indexOfDash != -1) |
| | | { |
| | | model.LotNo = model.LotNo.Substring(indexOfDash + 1); |
| | | model.LotNo = model.LotNo.Substring(indexOfDash + 2); |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("物料批次不可为空!"); |
| | | model.LotNo = ""; |
| | | //throw new Exception("物料批次不可为空!"); |
| | | } |
| | | } |
| | | |
| | |
| | | #endregion |
| | | |
| | | #region 质检请验 |
| | | if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1") |
| | | if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1" && sku.IsControlled != "1") |
| | | { |
| | | var qualityRequest = Db.Queryable<BllQualityInspectionRequest>().First(m => m.IsDel == "0" && m.SkuNo == sku.SkuNo && m.LotNo == bind.LotNo && m.SupplierLot == bind.SupplierLot); |
| | | if (qualityRequest == null) |
| | |
| | | if (boxNoList.Count > 0) |
| | | { |
| | | data.BoxNoList = boxNoList; |
| | | data.Date1 = item.ProductionTime.ToString(); |
| | | data.Date2 = item.ExpirationTime.ToString(); |
| | | data.Date1 = item.ProductionTime == null ? "" : Convert.ToDateTime(item.ProductionTime).ToString("yyyy-MM-dd"); |
| | | data.Date2 = item.ExpirationTime == null ? "" : Convert.ToDateTime(item.ExpirationTime).ToString("yyyy-MM-dd"); |
| | | |
| | | break; |
| | | } |
| | |
| | | #endregion |
| | | |
| | | #region 质检请验 |
| | | if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1") |
| | | if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1" && sku.IsControlled != "1") |
| | | { |
| | | var qualityRequest = Db.Queryable<BllQualityInspectionRequest>().First(m => m.IsDel == "0" && m.SkuNo == sku.SkuNo && m.LotNo == bind.LotNo && m.SupplierLot == bind.SupplierLot); |
| | | if (qualityRequest == null) |