Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO908-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit e6b670ed
由
张东亮
编写于
2022-04-25 15:34:12 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
入库验证请求重试次数改为5次且有提示消息时可进行重试
1 个父辈
ff4a2e32
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
16 行增加
和
9 行删除
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
查看文件 @
e6b670e
...
@@ -197,10 +197,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -197,10 +197,9 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
Name
+
"执行TimerProcess 共处理了【"
+
span
.
TotalMilliseconds
+
"】毫秒"
);
LogUtil
.
info
(
Name
+
"执行TimerProcess 共处理了【"
+
span
.
TotalMilliseconds
+
"】毫秒"
);
}
}
}
}
public
bool
ReviceInStoreCMD
(
string
posId
,
int
plateH
,
int
plateW
,
string
message
)
public
bool
ReviceInStoreCMD
(
string
posId
,
int
plateH
,
int
plateW
,
string
message
)
{
{
string
logName
=
"入库库位验证【
"
+
message
+
"】【"
+
posId
+
"】:"
;
string
logName
=
"入库库位验证【"
+
message
+
"】【"
+
posId
+
"】:"
;
try
try
{
{
...
@@ -214,42 +213,42 @@ namespace OnlineStore.DeviceLibrary
...
@@ -214,42 +213,42 @@ namespace OnlineStore.DeviceLibrary
operation
.
op
=
1
;
operation
.
op
=
1
;
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
message
},
{
"boxId"
,
this
.
DeviceID
.
ToString
()
}
};
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
message
},
{
"boxId"
,
this
.
DeviceID
.
ToString
()
}
};
operation
.
data
.
Add
(
"inPos"
,
posId
);
operation
.
data
.
Add
(
"inPos"
,
posId
);
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
for
(
int
i
=
1
;
i
<=
5
;
i
++)
for
(
int
i
=
1
;
i
<=
3
;
i
++)
{
{
bool
timeOut
=
false
;
bool
timeOut
=
false
;
Operation
resultOperation
=
HttpHelper
.
PostOperation
(
SServerManager
.
GetPostApi
(
server
),
operation
);
Operation
resultOperation
=
HttpHelper
.
PostOperation
(
SServerManager
.
GetPostApi
(
server
),
operation
);
if
(
timeOut
)
if
(
timeOut
)
{
{
LogUtil
.
info
(
logName
+
" 第"
+
i
+
"次发送超时 "
);
LogUtil
.
error
(
logName
+
" 第"
+
i
+
"次发送超时 "
);
continue
;
continue
;
}
}
if
(
resultOperation
==
null
)
if
(
resultOperation
==
null
)
{
{
// CodeMsg = "二维码【" + message + "】没有收到服务器反馈";
// CodeMsg = "二维码【" + message + "】没有收到服务器反馈";
LogUtil
.
info
(
logName
+
" 没有收到服务器反馈 "
);
LogUtil
.
error
(
logName
+
" 没有收到服务器反馈 "
);
}
}
else
if
(!
string
.
IsNullOrEmpty
(
resultOperation
.
msg
))
else
if
(!
string
.
IsNullOrEmpty
(
resultOperation
.
msg
))
{
{
//如果有提示消息,直接显示提示
//如果有提示消息,直接显示提示
LogUtil
.
info
(
logName
+
"服务器反馈 :"
+
resultOperation
.
msg
);
LogUtil
.
info
(
logName
+
"服务器反馈 :"
+
resultOperation
.
msg
);
continue
;
}
}
else
if
(
resultOperation
.
op
.
Equals
(
1
))
else
if
(
resultOperation
.
op
.
Equals
(
1
))
{
{
LogUtil
.
info
(
logName
+
" 成功"
);
LogUtil
.
info
(
logName
+
" 成功"
+
$
"【{JsonHelper.SerializeObject(resultOperation)}】"
);
return
true
;
return
true
;
}
}
else
else
{
{
LogUtil
.
info
(
logName
+
"服务器反馈 :"
+
JsonHelper
.
SerializeObject
(
resultOperation
));
LogUtil
.
info
(
logName
+
"服务器反馈 :"
+
JsonHelper
.
SerializeObject
(
resultOperation
));
continue
;
}
}
break
;
break
;
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
LogUtil
.
info
(
logName
+
" 出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
logName
+
" 出错:"
+
ex
.
ToString
());
}
}
return
false
;
return
false
;
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute.cs
查看文件 @
e6b670e
...
@@ -77,6 +77,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -77,6 +77,10 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
$
" 入库验证失败:{param.PosInfo.ToStr()}"
);
LogUtil
.
error
(
$
" 入库验证失败:{param.PosInfo.ToStr()}"
);
return
false
;
return
false
;
}
}
else
{
ClearSpecifiedAlarm
(
"入库验证失败"
);
}
}
}
return
true
;
return
true
;
}
}
...
@@ -108,6 +112,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -108,6 +112,10 @@ namespace OnlineStore.DeviceLibrary
SetWarnMsg
(
$
" 入库验证失败:{posinfo.ToStr()}"
);
SetWarnMsg
(
$
" 入库验证失败:{posinfo.ToStr()}"
);
return
false
;
return
false
;
}
}
else
{
ClearSpecifiedAlarm
(
"入库验证失败"
);
}
}
}
return
true
;
return
true
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论