Commit 1a344cac 刘韬

优化匹配日志输出

1 个父辈 f2a55c49
...@@ -55,7 +55,8 @@ namespace BLL ...@@ -55,7 +55,8 @@ namespace BLL
//MatchTemplateList[CurrnetTemplateName].MatchCollections[matchKey].Matchs.Add(match); //MatchTemplateList[CurrnetTemplateName].MatchCollections[matchKey].Matchs.Add(match);
} }
public static void MatchResult(string matchKey, bool isMatch) { public static void MatchResult(string matchKey, bool isMatch,string matchtxt) {
LogNet.log.Info($"Match result:isMatch:{isMatch},{matchKey}={matchtxt}");
if (!MatchTemplateList[CurrnetTemplateName].BarcodeMatchs[CurrnetBarcode.Text].MatchCollections.ContainsKey(matchKey)) if (!MatchTemplateList[CurrnetTemplateName].BarcodeMatchs[CurrnetBarcode.Text].MatchCollections.ContainsKey(matchKey))
return; return;
MatchTemplateList[CurrnetTemplateName].BarcodeMatchs[CurrnetBarcode.Text].MatchCollections[matchKey].isMatch = isMatch; MatchTemplateList[CurrnetTemplateName].BarcodeMatchs[CurrnetBarcode.Text].MatchCollections[matchKey].isMatch = isMatch;
......
...@@ -785,7 +785,7 @@ namespace BLL ...@@ -785,7 +785,7 @@ namespace BLL
if (!ismatch) if (!ismatch)
continue; continue;
MatchAnalysis.MatchResult(codeMatch[i].Keyword, true); MatchAnalysis.MatchResult(codeMatch[i].Keyword, true, filtercode);
if (key.ContainsKey(codeMatch[i].Keyword)) if (key.ContainsKey(codeMatch[i].Keyword))
{ {
LogNet.log.Info($"匹配冲突 [{codeMatch[i].Keyword}], {key[codeMatch[i].Keyword]} != {filtercode}"); LogNet.log.Info($"匹配冲突 [{codeMatch[i].Keyword}], {key[codeMatch[i].Keyword]} != {filtercode}");
...@@ -793,6 +793,7 @@ namespace BLL ...@@ -793,6 +793,7 @@ namespace BLL
} }
else else
key.Add(codeMatch[i].Keyword, filtercode.Trim()); key.Add(codeMatch[i].Keyword, filtercode.Trim());
if (codeMatch[i].Characteristic) if (codeMatch[i].Characteristic)
{ {
Identification = true; Identification = true;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!