Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
NS100
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 53b5e2bb
由
刘韬
编写于
2025-12-11 10:02:47 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
条码匹配解析日志优化
1 个父辈
a03fc2eb
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
17 行增加
和
12 行删除
BLL/MatchAnalysis.cs
BLL/MatchAnalysis.cs
查看文件 @
53b5e2b
...
...
@@ -43,23 +43,24 @@ namespace BLL
if
(!
ms
.
ContainsKey
(
matchKey
))
ms
.
Add
(
matchKey
,
new
MatchCollection
());
ms
[
matchKey
].
Matchs
.
Add
(
match
);
if
(!
MatchTemplateList
[
CurrnetTemplateName
].
MatchCollections
.
ContainsKey
(
matchKey
))
{
MatchTemplateList
[
CurrnetTemplateName
].
MatchCollections
.
Add
(
matchKey
,
new
MatchCollection
());
MatchTemplateList
[
CurrnetTemplateName
].
MatchCollections
[
matchKey
].
barcodeInfo
=
CurrnetBarcode
;
}
//
if (!MatchTemplateList[CurrnetTemplateName].MatchCollections.ContainsKey(matchKey))
//
{
//
MatchTemplateList[CurrnetTemplateName].MatchCollections.Add(matchKey, new MatchCollection());
//
MatchTemplateList[CurrnetTemplateName].MatchCollections[matchKey].barcodeInfo = CurrnetBarcode;
//
}
MatchTemplateList
[
CurrnetTemplateName
].
MatchCollections
[
matchKey
].
Matchs
.
Add
(
match
);
//
MatchTemplateList[CurrnetTemplateName].MatchCollections[matchKey].Matchs.Add(match);
}
public
static
void
MatchResult
(
string
matchKey
,
bool
isMatch
)
{
if
(!
MatchTemplateList
[
CurrnetTemplateName
].
BarcodeMatchs
[
CurrnetBarcode
.
Text
].
MatchCollections
.
ContainsKey
(
matchKey
))
return
;
MatchTemplateList
[
CurrnetTemplateName
].
BarcodeMatchs
[
CurrnetBarcode
.
Text
].
MatchCollections
[
matchKey
].
isMatch
=
isMatch
;
MatchTemplateList
[
CurrnetTemplateName
].
MatchCollections
[
matchKey
]=
MatchTemplateList
[
CurrnetTemplateName
].
BarcodeMatchs
[
CurrnetBarcode
.
Text
].
MatchCollections
[
matchKey
];
MatchTemplateList
[
CurrnetTemplateName
].
MatchCollections
[
matchKey
].
barcodeInfo
=
CurrnetBarcode
;
//
MatchTemplateList[CurrnetTemplateName].MatchCollections[matchKey]=MatchTemplateList[CurrnetTemplateName].BarcodeMatchs[CurrnetBarcode.Text].MatchCollections[matchKey];
//
MatchTemplateList[CurrnetTemplateName].MatchCollections[matchKey].barcodeInfo = CurrnetBarcode;
}
public
static
void
TemplateResult
(
bool
isMatch
)
{
MatchTemplateList
[
CurrnetTemplateName
].
isMatch
=
isMatch
;
...
...
@@ -70,19 +71,23 @@ namespace BLL
//return;
foreach
(
var
tp
in
MatchTemplateList
)
{
LogNet
.
log
.
Info
(
$
"开始解析模版:{tp.Key}"
);
foreach
(
var
m
in
tp
.
Value
.
MatchCollections
)
{
foreach
(
var
b
in
tp
.
Value
.
BarcodeMatchs
)
{
LogNet
.
log
.
Info
(
$
"开始解析条码:{b.Key}"
);
foreach
(
var
m
in
b
.
Value
.
MatchCollections
)
{
LogNet
.
log
.
Info
(
$
"开始解析关键字:{m.Key}"
);
//LogNet.log.Info($"匹配到关键字:{m.Key}");
string
matchlist
=
m
.
Value
.
barcodeInfo
.
Text
+
"\t/\t"
;
string
matchlist
=
b
.
Key
+
"\t/\t"
;
foreach
(
var
item
in
m
.
Value
.
Matchs
)
{
matchlist
+=
$
"
{item.colName},{item.isMatch},{item.matchDesc}\t/\t"
;
matchlist
+=
$
"{item.matchKey},
{item.colName},{item.isMatch},{item.matchDesc}\t/\t"
;
}
LogNet
.
log
.
Info
(
matchlist
);
}
}
}
}
public
class
TemplateCollection
{
public
Dictionary
<
string
,
BarcodeMatch
>
BarcodeMatchs
=
new
();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论