Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit aabdd124
由
张东亮
编写于
2024-03-18 09:45:14 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
添加出入库完成消息发送失败重发机制
1 个父辈
b1103d34
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
38 行增加
和
2 行删除
source/DeviceLibrary/PackingStore/AC_BOX_Bean_server_connect.cs
source/DeviceLibrary/PackingStore/AC_BOX_Bean_server_connect.cs
查看文件 @
aabdd12
...
...
@@ -51,7 +51,7 @@ namespace OnlineStore.DeviceLibrary
isInProcess
=
false
;
}
}
ConcurrentQueue
<
posStatus
>
waitSendPosIds
=
new
ConcurrentQueue
<
posStatus
>();
/// <summary>
/// 获取整个料仓的状态
/// </summary>
...
...
@@ -104,7 +104,15 @@ namespace OnlineStore.DeviceLibrary
}
lastPosId
=
""
;
}
else
if
(
storeStatus
==
StoreStatus
.
StoreOnline
)
{
if
(
waitSendPosIds
.
TryDequeue
(
out
posStatus
pos
))
{
boxStatus
.
data
.
Add
(
ParamDefine
.
posId
,
pos
.
PosId
);
boxStatus
.
status
=
(
int
)
pos
.
StoreStatus
;
LogUtil
.
info
(
$
"发送未发送完成的消息:【{pos.PosId}】【{pos.StoreStatus}】"
);
}
}
//温湿度
//ASTemperateParam param = HumitureServer.GetTemperateParam(Config.Temperate_Serveraddress);
HumitureParam
param
=
humBean
.
LastData
;
...
...
@@ -140,6 +148,28 @@ namespace OnlineStore.DeviceLibrary
if
(
resultOperation
==
null
||
(
resultOperation
.
op
<=
0
))
{
//判断服务端是否返回出库操作
try
{
if
(
lineOperation
.
boxStatus
.
ContainsKey
(
1
))
{
BoxStatus
boxStatus
=
lineOperation
.
boxStatus
[
1
];
if
(
boxStatus
.
data
.
ContainsKey
(
ParamDefine
.
posId
))
{
string
posid
=
boxStatus
.
data
[
ParamDefine
.
posId
];
if
(
boxStatus
.
status
.
Equals
((
int
)
StoreStatus
.
InStoreEnd
)
||
boxStatus
.
status
.
Equals
((
int
)
StoreStatus
.
OutStoreBoxEnd
))
{
waitSendPosIds
.
Enqueue
(
new
posStatus
()
{
PosId
=
posid
,
StoreStatus
=
(
StoreStatus
)
boxStatus
.
status
});
LogUtil
.
error
(
$
"{posid}发送[{boxStatus.status}]失败,存入待发送列表"
);
}
}
}
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
"处理定时发送异常"
,
e
);
}
return
;
}
if
(
resultOperation
.
op
.
Equals
(
1
))
...
...
@@ -248,4 +278,10 @@ namespace OnlineStore.DeviceLibrary
}
}
}
class
posStatus
{
public
string
PosId
{
get
;
set
;
}
public
StoreStatus
StoreStatus
{
get
;
set
;
}
}
}
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论