| | |
| | | } |
| | | string lot1 = detailModel.Lot1; |
| | | string lot2 = detailModel.Lot2; |
| | | if (sku.IsPasteCode == "0") |
| | | if (sku.IsInspect == "0")//是否免检,0:否 1:是 |
| | | { |
| | | //不贴标物料 生产日期、有效期不能为空 |
| | | //不免检物料 生产日期、有效期不能为空 |
| | | DateTime lot12; |
| | | DateTime lot22; |
| | | if (!DateTime.TryParse(detailModel.Lot1, out lot12)) |
| | | { |
| | | throw new Exception("非贴标物料生产日期转换失败"); |
| | | throw new Exception("不免检物料生产日期转换失败"); |
| | | } |
| | | if (!DateTime.TryParse(detailModel.Lot2, out lot22)) |
| | | { |
| | | throw new Exception("非贴标物料过期日期转换失败"); |
| | | throw new Exception("不免检物料过期日期转换失败"); |
| | | } |
| | | lot1 = lot12.ToString(); |
| | | lot2 = lot22.ToString(); |
| | |
| | | && it.IsBelt == detailModel.IsBelt |
| | | && it.Lot1 == detailModel.Lot1 // 生产日期 |
| | | && it.Lot2 == detailModel.Lot2 // 过期日期 |
| | | && it.BoxCodeStr == detailModel.BoxCodeStr |
| | | && it.UDF1 == detailModel.UDF1 |
| | | && it.UDF2 == detailModel.UDF2 |
| | | && it.UDF3 == detailModel.UDF3 |
| | |
| | | dbDetail.IsBale = detailModel.IsBale; |
| | | dbDetail.Lot1 = detailModel.Lot1; |
| | | dbDetail.Lot2 = detailModel.Lot2; |
| | | dbDetail.BoxCodeStr = detailModel.BoxCodeStr; |
| | | dbDetail.UDF1 = detailModel.UDF1; |
| | | dbDetail.UDF2 = detailModel.UDF2; |
| | | dbDetail.UDF3 = detailModel.UDF3; |