Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 475ba646
由
LN
编写于
2019-08-05 17:26:22 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
西安料仓扫码尺寸修改。
1 个父辈
316aad3f
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
44 行增加
和
12 行删除
source/ACSingleStore/记录.txt
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/halcon/CodeManager.cs
source/ACSingleStore/记录.txt
查看文件 @
475ba64
...
...
@@ -84,7 +84,8 @@
<!--解码方式,0=halcon 解码,1=使用zxing解码-->
<add key="DeCodeType" value="1"/>
西安料仓,有两种料盒,二维码定义如下:
XA 开头的二维码,默认为 13*48
XB 开头的二维码,默认为 13*
\ No newline at end of file
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
475ba64
...
...
@@ -1513,7 +1513,17 @@ namespace OnlineStore.DeviceLibrary
string
code
=
str
;
if
(
CodeManager
.
DeCodeType
.
Equals
(
1
))
{
code
=
"=1+0x0-"
+
GetSize
()
+
"x"
+
height
+
"="
+
CodeManager
.
GetBarcode
(
str
);
if
(
str
.
ToUpper
().
StartsWith
(
"XA"
))
{
code
=
"=1+0x0-13x48"
+
"="
+
code
;
}
else
if
(
str
.
ToUpper
().
StartsWith
(
"XB"
))
{
code
=
"=1+0x0-13x32"
+
"="
+
code
;
}
else
{
code
=
"=1+0x0-"
+
GetSize
()
+
"x"
+
height
+
"="
+
CodeManager
.
GetBarcode
(
str
);
}
}
else
{
...
...
@@ -1592,7 +1602,18 @@ namespace OnlineStore.DeviceLibrary
double
ai1Value
=
KNDAIManager
.
ConvertAI
(
KNDAIManager
.
GetAIValue
(
Config
.
AIDevice_IP
,
Config
.
AIDI1_Addr
),
Config
.
AIDI1_DefaultPosition
);
double
ai2Value
=
KNDAIManager
.
ConvertAI
(
KNDAIManager
.
GetAIValue
(
Config
.
AIDevice_IP
,
Config
.
AIDI2_Addr
),
Config
.
AIDI2_DefaultPosition
);
double
Value
=
Math
.
Round
((
ai1Value
+
ai2Value
)
/
2
,
1
);
if
(
Value
>
14
)
if
(
Value
>
18
)
{
if
((
Value
%
4
).
Equals
(
0
))
{
result
=
(
int
)
Value
;
}
else
{
result
=
((
int
)
Value
/
4
*
4
)
+
4
;
}
}
else
if
(
Value
>
14
)
{
result
=
16
;
}
...
...
@@ -1602,7 +1623,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
Value
>=
4
)
{
if
(
ai1Value
>=
9
||
ai2Value
>=
9
)
if
(
ai1Value
>=
10
||
ai2Value
>=
10
)
{
result
=
12
;
}
...
...
@@ -1656,7 +1677,18 @@ namespace OnlineStore.DeviceLibrary
double
ai1Value
=
KNDAIManager
.
ConvertAI
(
KNDAIManager
.
GetAIValue
(
Config
.
AIDevice_IP
,
Config
.
AIDI3_Addr
),
Config
.
AIDI3_DefaultPosition
);
double
ai2Value
=
KNDAIManager
.
ConvertAI
(
KNDAIManager
.
GetAIValue
(
Config
.
AIDevice_IP
,
Config
.
AIDI4_Addr
),
Config
.
AIDI4_DefaultPosition
);
double
Value
=
Math
.
Round
((
ai1Value
+
ai2Value
)
/
2
,
1
);
if
(
Value
>
14
)
if
(
Value
>
18
)
{
if
((
Value
%
4
).
Equals
(
0
))
{
result
=
(
int
)
Value
;
}
else
{
result
=
((
int
)
Value
/
4
*
4
)
+
4
;
}
}
else
if
(
Value
>
14
)
{
result
=
16
;
}
...
...
@@ -1666,7 +1698,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
Value
>=
4
)
{
if
(
ai1Value
>=
9
||
ai2Value
>=
9
)
if
(
ai1Value
>=
10
||
ai2Value
>=
10
)
{
result
=
12
;
}
...
...
@@ -1679,7 +1711,6 @@ namespace OnlineStore.DeviceLibrary
{
result
=
0
;
}
return
result
;
}
...
...
source/DeviceLibrary/halcon/CodeManager.cs
查看文件 @
475ba64
...
...
@@ -228,7 +228,7 @@ namespace OnlineStore.DeviceLibrary
}
}
public
static
string
GetBarcode
(
string
codeStr
)
{
{
if
(!
string
.
IsNullOrEmpty
(
codeStr
))
{
string
[]
codeInfos
=
codeStr
.
Replace
(
"\r"
,
""
).
Split
(
'\n'
);
...
...
@@ -237,15 +237,15 @@ namespace OnlineStore.DeviceLibrary
string
youxiao
=
""
;
foreach
(
string
codeInfo
in
codeInfos
)
{
if
(
codeInfo
.
StartsWith
(
"物料编码:"
))
if
(
codeInfo
.
StartsWith
(
"物料编码:"
)
||
codeInfo
.
StartsWith
(
"物料编码:"
)
)
{
ri
=
codeInfo
.
Substring
(
5
);
}
else
if
(
codeInfo
.
StartsWith
(
"入库数量:"
))
else
if
(
codeInfo
.
StartsWith
(
"入库数量:"
)
||
codeInfo
.
StartsWith
(
"入库数量:"
)
)
{
qty
=
codeInfo
.
Substring
(
5
);
}
else
if
(
codeInfo
.
StartsWith
(
"有效期限:"
))
else
if
(
codeInfo
.
StartsWith
(
"有效期限:"
)
||
codeInfo
.
StartsWith
(
"有效期限:"
)
)
{
youxiao
=
codeInfo
.
Substring
(
5
);
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论