Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 66b210f2
由
LN
编写于
2020-01-14 13:10:52 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
孝感料仓增加条码处理
1 个父辈
bab040c2
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
57 行增加
和
1 行删除
source/ACSingleStore/App.config
source/ACSingleStore/记录.txt
source/Common/Setting_Init.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/halcon/CodeManager.cs
source/ACSingleStore/App.config
查看文件 @
66b210f
...
...
@@ -45,6 +45,8 @@
<!--解码方式,
0
=
halcon
解码,
1
=西安料仓 使用
zxing
解码,
2
=成都料仓-->
<
add
key
=
"DeCodeType"
value
=
"2"
/>
<
add
key
=
"DefaultPWD"
value
=
"123456"
/>
<!--料仓名称,
XG
=孝感料仓-->
<
add
key
=
"StoreName"
value
=
"XG"
/>
</
appSettings
>
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
...
...
source/ACSingleStore/记录.txt
查看文件 @
66b210f
...
...
@@ -85,4 +85,11 @@ PRO,特殊二维码尺寸配置,CodeSizeConfig,XA=13x48#XB=13x32#FA=7x32,,,,,,,
2.相机名称 未配置时可以自动默认配置。
DeCodeType=解码类型,0=halcon,1=zxing解码 西安料仓解析方式。2=成都料仓 PN;RI;
\ No newline at end of file
DeCodeType=解码类型,0=halcon,1=zxing解码 西安料仓解析方式。2=成都料仓 PN;RI;
孝感料仓增加条码处理:
ACSingleStore.exe.config文件增加配置:
<!--料仓名称,XG=孝感料仓-->
<add key ="StoreName" value ="XG"/>
\ No newline at end of file
source/Common/Setting_Init.cs
查看文件 @
66b210f
...
...
@@ -90,5 +90,6 @@ namespace OnlineStore.Common
/// </summary>
public
static
string
DeCodeType
=
"DeCodeType"
;
public
static
string
DefaultPWD
=
"DefaultPWD"
;
public
static
string
StoreName
=
"StoreName"
;
}
}
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
66b210f
...
...
@@ -1557,6 +1557,7 @@ namespace OnlineStore.DeviceLibrary
message
=
message
+
code
+
spiltStr
;
}
}
string
StoreName
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
StoreName
);
//成都料仓条码处理
if
((!
hasSpecialCode
)
&&
CodeManager
.
DeCodeType
.
Equals
(
2
)
&&
codeList
.
Count
>
0
)
{
...
...
@@ -1565,6 +1566,13 @@ namespace OnlineStore.DeviceLibrary
{
message
=
"=1+0x0-"
+
GetSize
()
+
"x"
+
GetHeight
()
+
"="
+
code
;
}
}
else
if
((!
hasSpecialCode
)
&&
StoreName
.
Equals
(
"XG"
))
{
string
code
=
CodeManager
.
ProcessXiaoGanCode
(
codeList
);
if
(!
String
.
IsNullOrEmpty
(
code
))
{
message
=
"=1+0x0-"
+
GetSize
()
+
"x"
+
GetHeight
()
+
"="
+
code
;
}
}
//if (!outMsg.Equals(""))
//{
...
...
source/DeviceLibrary/halcon/CodeManager.cs
查看文件 @
66b210f
...
...
@@ -342,7 +342,45 @@ namespace OnlineStore.DeviceLibrary
return
result
;
}
public
static
string
ProcessXiaoGanCode
(
List
<
string
>
codeList
)
{
string
codeStr
=
""
;
foreach
(
string
key
in
codeList
)
{
if
(
key
.
Trim
().
Equals
(
""
))
{
continue
;
}
codeStr
=
key
.
Trim
()
+
";"
;
}
if
(
codeStr
.
EndsWith
(
";"
))
{
codeStr
=
codeStr
.
Substring
(
0
,
codeStr
.
Length
-
1
);
}
if
(
codeStr
!=
null
&&
codeStr
.
Contains
(
";"
))
{
string
[]
codeArr
=
codeStr
.
Split
(
';'
);
string
pn
=
""
;
string
qty
=
""
;
foreach
(
string
temp
in
codeList
)
{
if
(
temp
.
StartsWith
(
"DM"
))
{
pn
=
temp
;
}
if
(
temp
.
StartsWith
(
"SL"
))
{
qty
=
temp
;
}
}
if
(
pn
.
Length
!=
0
&&
qty
.
Length
!=
0
)
{
return
pn
+
"@"
+
codeStr
+
"@"
+
qty
;
}
}
return
codeStr
;
}
private
static
string
GetCodeByStart
(
List
<
string
>
codeList
,
string
start
)
{
List
<
string
>
pCode
=
(
from
m
in
codeList
where
m
.
StartsWith
(
start
)
select
m
).
ToList
<
string
>();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论