物料清单添加-FL等判定
This commit is contained in:
@@ -65,16 +65,26 @@ namespace ZR.Service.Business
|
||||
// TYPE === 1 时,同时根据物料清单获取详细信息
|
||||
if (type == 1)
|
||||
{
|
||||
string checkPartnumber = labelAnalysisDto.Partnumber;
|
||||
// 使用正则表达式匹配并移除特殊后缀
|
||||
string processedPartnumber = Regex.Replace(
|
||||
checkPartnumber,
|
||||
@"-(FL|FR|RR|RL)$",
|
||||
"",
|
||||
RegexOptions.IgnoreCase
|
||||
);
|
||||
|
||||
|
||||
WmMaterial material = Context
|
||||
.Queryable<WmMaterial>()
|
||||
.Where(it => it.Partnumber == labelAnalysisDto.Partnumber)
|
||||
.Where(it => it.Partnumber == processedPartnumber)
|
||||
.Where(it => it.Type == 1)
|
||||
.Where(it => it.Status == 1)
|
||||
.First();
|
||||
if (material == null)
|
||||
{
|
||||
labelAnalysisDto.IsOk = false;
|
||||
labelAnalysisDto.Msg = "物料清单内无此零件号!请检查物料清单:" + labelAnalysisDto.Partnumber;
|
||||
labelAnalysisDto.Msg = "物料清单内无此零件号!请检查物料清单:" + processedPartnumber;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -708,7 +718,7 @@ namespace ZR.Service.Business
|
||||
if (packageLabelConfig == null)
|
||||
{
|
||||
Context.Ado.RollbackTran();
|
||||
return $"该产品内标签,未检测到对应打印参数:{data.PartNumber}";
|
||||
return $"该产品内标签,未检测到对应打印参数:{data.PartNumber},{workorder.Description}";
|
||||
}
|
||||
// 上一个内标签流水号检查
|
||||
int oldInnerLabelSort = 0;
|
||||
|
||||
Reference in New Issue
Block a user