diff --git a/WCS.BLL/Services/Service/BatchBindMatDetailService.cs b/WCS.BLL/Services/Service/BatchBindMatDetailService.cs index afe0d8d..b0b52db 100644 --- a/WCS.BLL/Services/Service/BatchBindMatDetailService.cs +++ b/WCS.BLL/Services/Service/BatchBindMatDetailService.cs @@ -354,6 +354,27 @@ namespace WCS.BLL.Services.Service }; } + //物料批次 + //如果未填写 默认为当前日期 + matDetailCurrentInfo.物料批次 = matDetailCurrentInfo.物料批次.Trim(); + if (string.IsNullOrEmpty(matDetailCurrentInfo.物料批次)) + { + matDetailCurrentInfo.物料批次 = DateTime.Now.ToString("yyMMdd"); + } + //如果填写 校验其必须为6位数字 + else + { + if (!Regex.IsMatch(matDetailCurrentInfo.物料批次, @"^\d{6}$")) + { + return new ResponseCommon>() + { + Code = 201, + Message = $"导入失败:批次应输入六位数字!\r\n(如20250101)", + Data = null, + }; + } + } + //不校验货架 //if (!string.IsNullOrEmpty(matDetailCurrentInfo.货架编码) && matDetailCurrentInfo.货架编码 == shelfInfo.ShelfCode) //{ diff --git a/货架标准上位机/货架标准上位机.csproj b/货架标准上位机/货架标准上位机.csproj index cb70eed..8f413e9 100644 --- a/货架标准上位机/货架标准上位机.csproj +++ b/货架标准上位机/货架标准上位机.csproj @@ -8,7 +8,7 @@ latest 重庆盟讯电子科技有限公司 Copyright © 2025 - 1.0.2 + 1.0.3 1.0.2 Resources\Logo.ico 重庆盟讯电子科技有限公司