Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
NS100
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b1a35793
由
刘韬
编写于
2023-04-10 09:12:48 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
优化从web接口解析式的结果排序
1 个父辈
1fe12e83
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
27 行增加
和
3 行删除
BLL/MaterialEdit.cs
ExtensionGroup/ExtensionGroup.csproj
SmartScan/PlusSettingFrm/FrmSetPlus.cs
SmartScan/Program.cs
SmartScan/WebCallWork.cs
BLL/MaterialEdit.cs
查看文件 @
b1a3579
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Drawing
;
using
System.Drawing
;
using
System.IO
;
using
System.IO
;
using
System.Linq
;
using
System.Reflection.Emit
;
using
System.Reflection.Emit
;
using
System.Xml
;
using
System.Xml
;
using
CameraVisionLib.Model
;
using
CameraVisionLib.Model
;
...
@@ -397,6 +398,8 @@ namespace BLL
...
@@ -397,6 +398,8 @@ namespace BLL
bool
isMatch
=
false
;
bool
isMatch
=
false
;
List
<
MaterialCodeOCR
>
ocrlist
=
new
List
<
MaterialCodeOCR
>();
List
<
MaterialCodeOCR
>
ocrlist
=
new
List
<
MaterialCodeOCR
>();
List
<
BarcodeInfo
>
ocrcode
=
new
List
<
BarcodeInfo
>();
List
<
BarcodeInfo
>
ocrcode
=
new
List
<
BarcodeInfo
>();
//命中规则的条码索引
List
<
int
>
MatchCodeIndex
=
new
List
<
int
>();
int
[]
id
=
mateTemp
[
index
].
GetCodeID
();
int
[]
id
=
mateTemp
[
index
].
GetCodeID
();
for
(
int
i
=
0
;
i
<
id
.
Length
;
i
++)
for
(
int
i
=
0
;
i
<
id
.
Length
;
i
++)
{
{
...
@@ -415,6 +418,7 @@ namespace BLL
...
@@ -415,6 +418,7 @@ namespace BLL
{
{
if
(!
keyword
.
ContainsKey
(
key
))
if
(!
keyword
.
ContainsKey
(
key
))
{
{
MatchCodeIndex
.
Add
(
j
);
keyword
.
Add
(
key
,
matchKey
[
key
]);
keyword
.
Add
(
key
,
matchKey
[
key
]);
LogNet
.
log
.
Info
(
$
"{mateTemp[index].Name} 匹配 [{key}={matchKey[key]}]"
);
LogNet
.
log
.
Info
(
$
"{mateTemp[index].Name} 匹配 [{key}={matchKey[key]}]"
);
}
}
...
@@ -484,6 +488,20 @@ namespace BLL
...
@@ -484,6 +488,20 @@ namespace BLL
if
(
isMatch
)
if
(
isMatch
)
{
{
MatchAnalysis
.
TemplateResult
(
true
);
MatchAnalysis
.
TemplateResult
(
true
);
#
region
将
Code
按照
匹配到的列表重新排序
MatchCodeIndex
=
MatchCodeIndex
.
Distinct
().
ToList
();
var
code2
=
new
List
<
BarcodeInfo
>();
foreach
(
var
i
in
MatchCodeIndex
)
{
if
(
code
.
Count
>
i
)
code2
.
Add
(
code
[
i
]);
}
foreach
(
var
c
in
code
)
{
if
(!
code2
.
Contains
(
c
))
code2
.
Add
(
c
);
}
code
=
code2
.
ToList
();
#
endregion
return
true
;
return
true
;
}
}
else
else
...
...
ExtensionGroup/ExtensionGroup.csproj
查看文件 @
b1a3579
...
@@ -9,9 +9,10 @@
...
@@ -9,9 +9,10 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ExtensionGroup</RootNamespace>
<RootNamespace>ExtensionGroup</RootNamespace>
<AssemblyName>ExtensionGroup</AssemblyName>
<AssemblyName>ExtensionGroup</AssemblyName>
<TargetFrameworkVersion>v4.
6.1
</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.
8
</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugSymbols>true</DebugSymbols>
...
...
SmartScan/PlusSettingFrm/FrmSetPlus.cs
查看文件 @
b1a3579
...
@@ -20,6 +20,10 @@ namespace SmartScan
...
@@ -20,6 +20,10 @@ namespace SmartScan
//Language.SetLanguage(this);
//Language.SetLanguage(this);
this
.
SizeChanged
+=
FrmSetPlus_SizeChanged
;
this
.
SizeChanged
+=
FrmSetPlus_SizeChanged
;
this
.
FormClosing
+=
FrmSetPlus_FormClosing
;
this
.
FormClosing
+=
FrmSetPlus_FormClosing
;
this
.
Width
=
1024
;
this
.
Height
=
738
;
this
.
Top
=
15
;
this
.
Left
=
0
;
}
}
private
void
FrmSetPlus_FormClosing
(
object
sender
,
FormClosingEventArgs
e
)
private
void
FrmSetPlus_FormClosing
(
object
sender
,
FormClosingEventArgs
e
)
...
...
SmartScan/Program.cs
查看文件 @
b1a3579
...
@@ -50,7 +50,8 @@ namespace SmartScan
...
@@ -50,7 +50,8 @@ namespace SmartScan
process
.
StartInfo
=
new
ProcessStartInfo
();
process
.
StartInfo
=
new
ProcessStartInfo
();
process
.
StartInfo
.
FileName
=
paddle
;
process
.
StartInfo
.
FileName
=
paddle
;
process
.
StartInfo
.
WorkingDirectory
=
".\\paddle"
;
process
.
StartInfo
.
WorkingDirectory
=
".\\paddle"
;
process
.
Start
();
if
(
File
.
Exists
(
".\\paddle\\paddleOCR.exe"
))
process
.
Start
();
}
}
//else
//else
...
...
SmartScan/WebCallWork.cs
查看文件 @
b1a3579
...
@@ -77,7 +77,7 @@ namespace SmartScan
...
@@ -77,7 +77,7 @@ namespace SmartScan
}
}
if
(
webResultCode
!=
null
)
if
(
webResultCode
!=
null
||
!
rtn
)
return
webResultCode
;
return
webResultCode
;
LogNet
.
log
.
Info
(
"Work scan is done"
);
LogNet
.
log
.
Info
(
"Work scan is done"
);
List
<
KeyValuePair
<
string
,
string
>>
result
=
new
List
<
KeyValuePair
<
string
,
string
>>();
List
<
KeyValuePair
<
string
,
string
>>
result
=
new
List
<
KeyValuePair
<
string
,
string
>>();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论