This commit is contained in:
qianhao.xu
2024-03-14 08:18:42 +08:00
parent 3ab1ba3064
commit 46cca98136

View File

@@ -76,14 +76,31 @@ namespace ZR.Service.mes.wms
/// <returns></returns>
public int isProductionPackage(string production_packcode)
{
Regex r = new Regex("BNW_\\d{9}_\\d{3}");
Regex r = new Regex("CodeBNW\\d{9}_\\d{0,3}");
Regex r1 = new Regex("Code=BNW\\d{9}_\\d{0,3}");
//todo 不是箱子
if (!r.IsMatch(production_packcode))
if (!r.IsMatch(production_packcode)& !r1.IsMatch(production_packcode))
{
return 2;
}
// 匹配 CodeBNW\\d{9}_\\d{0,3}
if (r.IsMatch(production_packcode))
{
string workorder_id = production_packcode.Substring(3, 9);
string flow_id = production_packcode.Substring(13, 3).ToString("000");
}
if (r1.IsMatch(production_packcode))
{
}
string workorder_id = production_packcode.Substring(3, 9);
string flow_id = production_packcode.Substring(13, 3);
string flow_id = production_packcode.Substring(13, 3).ToString("000");
bool isExist = Context.Queryable<WmPackingrecord>()
.Where(it => it.WorkOrderNum == workorder_id)
.Where(it => it.PackingCode.EndsWith(flow_id))