Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0eb229c5
由
LN
编写于
2023-08-24 09:09:44 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
入库完成通知失败时不结束入库。
1 个父辈
94a6848c
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
83 行增加
和
19 行删除
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/store/StoreStep.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
0eb229c
...
...
@@ -1457,6 +1457,11 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil
.
info
(
logName
+
" 第"
+
i
+
"次发送超时 "
);
continue
;
}
else
if
(
lastPosId
!=
""
)
{
LogUtil
.
info
(
$
"SendLineStatus ,发送成功,清空 lastPosId "
+
lastPosId
);
lastPosId
=
""
;
}
if
(
resultOperation
==
null
)
{
...
...
@@ -1700,7 +1705,7 @@ namespace OnlineStore.DeviceLibrary
if
(
StoreManager
.
IsConnectServer
)
{
try
{
{
SendLineStatus
();
}
catch
(
Exception
ex
)
...
...
@@ -1796,7 +1801,7 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil
.
info
(
"给服务器发送出入库完成消息:"
+
StoreName
+
",status【"
+
lastPosIdStatus
+
"】posId【"
+
lastPosId
+
"】"
);
}
lastPosId
=
""
;
//
lastPosId = "";
}
//如果在空闲中,且有入库未完成,直接发送入库执行中
...
...
@@ -1827,8 +1832,16 @@ namespace OnlineStore.DeviceLibrary
return
lineOperation
;
}
public
void
SendLineStatus
(
)
public
bool
SendLineStatus
(
string
posId
=
""
,
StoreStatus
storeStatus
=
StoreStatus
.
StoreOnline
)
{
if
(
posId
!=
""
)
{
lastPosId
=
posId
;
lastPosIdStatus
=
StoreStatus
.
InStoreEnd
;
storeStatus
=
StoreStatus
.
InStoreEnd
;
LogUtil
.
info
(
$
"SendLineStatus ,设置 lastPosId={lastPosId} ,storeStatus={storeStatus}"
);
}
DateTime
time
=
DateTime
.
Now
;
//构建发送给服务器的对象
Operation
lineOperation
=
getLineBoxStatus
();
...
...
@@ -1841,12 +1854,20 @@ namespace OnlineStore.DeviceLibrary
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
bool
isTimeout
=
false
;
Operation
resultOperation
=
HttpHelper
.
PostOP
(
StoreManager
.
GetPostApi
(
server
),
lineOperation
,
out
isTimeout
);
if
(
isTimeout
)
{
return
false
;
}
else
if
(
lastPosId
!=
""
)
{
LogUtil
.
info
(
$
"SendLineStatus ,发送成功,清空 lastPosId "
+
lastPosId
);
lastPosId
=
""
;
}
//发送状态信息到服务器
if
(
resultOperation
==
null
||
(
resultOperation
.
op
<=
0
))
{
//判断服务端是否返回出库操作
return
;
return
true
;
}
if
(
resultOperation
.
op
.
Equals
(
1
))
{
...
...
@@ -1869,6 +1890,7 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil
.
info
(
StoreName
+
"执行 SendLineStatus 共 【"
+
span
.
TotalMilliseconds
+
"】毫秒"
);
}
return
true
;
}
private
void
ProcessHumidityCMD
(
Operation
resultOperation
)
{
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
0eb229c
...
...
@@ -28,6 +28,7 @@ namespace OnlineStore.DeviceLibrary
public
int
autoPositionIndex
=
0
;
public
string
autoMsg
=
""
;
public
int
AutoStartIndex
=
-
1
;
private
bool
InstoreNoticeOk
=
false
;
#
endregion
#
region
出入库参数
...
...
@@ -453,11 +454,12 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
HIGH
));
//打开仓门,等待信号
OpenDoor
(
false
);
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_01_TrayCheck
)
{
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_01_TrayCheck
)
{
SI_02_Move
(
moveP
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_02_InOutAxisHome
)
...
...
@@ -532,7 +534,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
CodeMsg
);
}
SI_11_MoveToBag
();
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_08_WaitTray
)
...
...
@@ -609,21 +611,56 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_16_GoBack
)
{
TimeSpan
span
=
DateTime
.
Now
-
startInStoreTime
;
RunLogUtil
.
InoutEndLog
(
new
InoutEndLog
(
StoreName
,
"入库"
,
startInStoreTime
,
DateTime
.
Now
,
StoreMove
.
MoveParam
.
PosInfo
.
PosId
,
StoreMove
.
MoveParam
.
PosInfo
.
barcode
));
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PosInfo
.
PosId
:
""
;
LogUtil
.
info
(
StoreName
+
" 【"
+
posId
+
"】 整个入库流程结束,耗时【"
+
FormUtil
.
GetSpanStr
(
span
)
+
"】!"
);
StoreMove
.
EndMove
();
storeRunStatus
=
StoreRunStatus
.
Runing
;
//设备连接,入库后,BOX恢复原始状态
storeStatus
=
StoreStatus
.
StoreOnline
;
InOutEndProcess
(
StoreMoveType
.
InStore
);
if
(
lastPosId
==
""
)
{
InStoreEnd
();
}
else
{
SI_18_WaitSendOK
();
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_18_WaitSendOK
)
{
if
(
lastPosId
==
""
)
{
InStoreEnd
();
}
else
{
SI_18_WaitSendOK
();
}
}
else
{
LogUtil
.
info
(
StoreName
+
" 入库,moveStatus="
+
StoreMove
.
MoveStep
+
",没有对应的处理!"
);
LogUtil
.
info
(
StoreName
+
" 入库,moveStatus="
+
StoreMove
.
MoveStep
+
",没有对应的处理!"
);
}
}
private
void
SI_18_WaitSendOK
()
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_18_WaitSendOK
);
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PosInfo
.
PosId
:
""
;
lastPosId
=
posId
;
lastPosIdStatus
=
StoreStatus
.
InStoreEnd
;
storeStatus
=
StoreStatus
.
InStoreEnd
;
InStoreLog
(
$
"入库: 入库通知未完成,等待入库通知完成 posId={posId} , storeStatus={storeStatus} ,等待10秒重新验证"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
WarnMsg
=
$
"入库通知未完成,等待入库通知完成 posId={posId} , storeStatus={storeStatus} ,等待10秒重新验证"
;
}
private
void
InStoreEnd
()
{
WarnMsg
=
""
;
TimeSpan
span
=
DateTime
.
Now
-
startInStoreTime
;
RunLogUtil
.
InoutEndLog
(
new
InoutEndLog
(
StoreName
,
"入库"
,
startInStoreTime
,
DateTime
.
Now
,
StoreMove
.
MoveParam
.
PosInfo
.
PosId
,
StoreMove
.
MoveParam
.
PosInfo
.
barcode
));
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PosInfo
.
PosId
:
""
;
LogUtil
.
info
(
StoreName
+
" 【"
+
posId
+
"】 整个入库流程结束,耗时【"
+
FormUtil
.
GetSpanStr
(
span
)
+
"】!"
);
StoreMove
.
EndMove
();
storeRunStatus
=
StoreRunStatus
.
Runing
;
//设备连接,入库后,BOX恢复原始状态
storeStatus
=
StoreStatus
.
StoreOnline
;
InOutEndProcess
(
StoreMoveType
.
InStore
);
}
private
void
SI_11_MoveToBag
()
{
...
...
source/DeviceLibrary/store/StoreStep.cs
查看文件 @
0eb229c
...
...
@@ -438,6 +438,11 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
[
Description
(
"入库_放料完成_等待料叉无信号"
)]
SI_17_WaitNoReel
,
/// <summary>
/// 入库。等待料叉无信号
/// </summary>
[
Description
(
"入库_放料完成_等待状态通知完成"
)]
SI_18_WaitSendOK
,
#
endregion
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论