Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
SO1057-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 1c8a38a6
由
张东亮
编写于
2023-04-13 11:36:48 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
上报出库确保完成
1 个父辈
c6f1994c
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
45 行增加
和
17 行删除
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip_InStore.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
查看文件 @
1c8a38a
using
Asa
;
using
Asa
;
using
log4net.Util
;
using
OnlineStore.Common
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System
;
...
@@ -33,6 +34,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -33,6 +34,7 @@ namespace OnlineStore.DeviceLibrary
private
string
CodeMsg
=
""
;
private
string
CodeMsg
=
""
;
private
bool
isInProcess
=
false
;
private
bool
isInProcess
=
false
;
private
DateTime
lastConTime
=
DateTime
.
Now
;
private
DateTime
lastConTime
=
DateTime
.
Now
;
object
serverLoc
=
new
object
();
public
void
server_connect_timer_Tick
(
object
sender
,
EventArgs
e
)
public
void
server_connect_timer_Tick
(
object
sender
,
EventArgs
e
)
{
{
if
(
isInProcess
)
if
(
isInProcess
)
...
@@ -52,9 +54,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -52,9 +54,12 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
StoreManager
.
IsConnectServer
)
if
(
StoreManager
.
IsConnectServer
)
{
{
SendLineStatus
();
if
(!
Monitor
.
IsEntered
(
serverLoc
))
HttpHelper
.
Post
<
DoorInfo
>(
HttpHelper
.
GetPostApi
(
"/api/xlc/updateDoorInfo"
),
StoreManager
.
XLRStore
.
inputEquip
.
BatchMove_A
.
doorInfo
);
{
HttpHelper
.
Post
<
DoorInfo
>(
HttpHelper
.
GetPostApi
(
"/api/xlc/updateDoorInfo"
),
StoreManager
.
XLRStore
.
inputEquip
.
BatchMove_B
.
doorInfo
);
SendLineStatus
();
HttpHelper
.
Post
<
DoorInfo
>(
HttpHelper
.
GetPostApi
(
"/api/xlc/updateDoorInfo"
),
StoreManager
.
XLRStore
.
inputEquip
.
BatchMove_A
.
doorInfo
);
HttpHelper
.
Post
<
DoorInfo
>(
HttpHelper
.
GetPostApi
(
"/api/xlc/updateDoorInfo"
),
StoreManager
.
XLRStore
.
inputEquip
.
BatchMove_B
.
doorInfo
);
}
}
}
}
}
...
@@ -68,22 +73,44 @@ namespace OnlineStore.DeviceLibrary
...
@@ -68,22 +73,44 @@ namespace OnlineStore.DeviceLibrary
isInProcess
=
false
;
isInProcess
=
false
;
}
}
}
}
public
void
SendStoreState
(
string
posid
,
DeviceStatus
storeStatus
)
public
bool
SendStoreState
(
string
posid
,
DeviceStatus
storeStatus
)
{
{
Operation
operation
=
getLineBoxStatus
();
if
(
Monitor
.
TryEnter
(
serverLoc
))
if
(!
string
.
IsNullOrEmpty
(
posid
)
&&
!
operation
.
boxStatus
[
1
].
data
.
ContainsKey
(
ParamDefine
.
posId
))
operation
.
boxStatus
[
1
].
data
.
Add
(
ParamDefine
.
posId
,
posid
);
else
if
(!
string
.
IsNullOrEmpty
(
posid
)
&&
operation
.
boxStatus
[
1
].
data
.
ContainsKey
(
ParamDefine
.
posId
))
{
{
operation
.
boxStatus
[
1
].
data
[
ParamDefine
.
posId
]
=
posid
;
try
}
{
LogUtil
.
info
(
$
"SendStoreState,posid:{posid}, storeStatus:{storeStatus}"
);
Operation
operation
=
getLineBoxStatus
();
operation
.
boxStatus
[
1
].
status
=
(
int
)
storeStatus
;
for
(
int
i
=
0
;
i
<
5
;
i
++)
{
LogUtil
.
info
(
JsonHelper
.
SerializeObject
(
operation
));
if
(!
string
.
IsNullOrEmpty
(
posid
)
&&
!
operation
.
boxStatus
[
1
].
data
.
ContainsKey
(
ParamDefine
.
posId
))
operation
.
boxStatus
[
1
].
data
.
Add
(
ParamDefine
.
posId
,
posid
);
else
if
(!
string
.
IsNullOrEmpty
(
posid
)
&&
operation
.
boxStatus
[
1
].
data
.
ContainsKey
(
ParamDefine
.
posId
))
{
operation
.
boxStatus
[
1
].
data
[
ParamDefine
.
posId
]
=
posid
;
}
operation
.
boxStatus
[
1
].
status
=
(
int
)
storeStatus
;
LogUtil
.
info
(
JsonHelper
.
SerializeObject
(
operation
));
Operation
resultOperation
=
HttpHelper
.
Post
(
SServerManager
.
GetPostApi
(
server
),
operation
,
false
);
if
(
operation
.
seq
==
resultOperation
.
seq
)
{
LogUtil
.
info
(
$
"SendStoreState,posid:{posid}, storeStatus:{storeStatus}"
);
return
true
;
}
else
{
LogUtil
.
info
(
$
"SendStoreState error,posid:{posid}, storeStatus:{storeStatus}"
);
Thread
.
Sleep
(
2000
);
}
}
}
finally
{
Monitor
.
Exit
(
serverLoc
);
}
Operation
resultOperation
=
HttpHelper
.
Post
(
SServerManager
.
GetPostApi
(
server
),
operation
,
false
);
}
return
false
;
}
}
/// <summary>
/// <summary>
/// 获取整个料仓的状态
/// 获取整个料仓的状态
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip_InStore.cs
查看文件 @
1c8a38a
...
@@ -957,7 +957,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -957,7 +957,7 @@ namespace OnlineStore.DeviceLibrary
#
region
出库
B
侧取料
#
region
出库
B
侧取料
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IO11_ReelCheck
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IO11_ReelCheck
))
{
{
if
(
BufferDataManager
.
BOutStoreInfo
!=
null
)
if
(
BufferDataManager
.
BOutStoreInfo
!=
null
)
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IO12_UpdownToP12
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IO12_UpdownToP12
);
MoveLog
(
$
"出库B->{shelf}料串 {MoveInfo.SLog}: 升降轴到P12(B下暂存区取料高点){Config.Updown_P12_BUnderH},旋转轴到P8(B下暂存区取料点){Config.Middle_P8_BUnder}"
);
MoveLog
(
$
"出库B->{shelf}料串 {MoveInfo.SLog}: 升降轴到P12(B下暂存区取料高点){Config.Updown_P12_BUnderH},旋转轴到P8(B下暂存区取料点){Config.Middle_P8_BUnder}"
);
...
@@ -1072,7 +1072,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1072,7 +1072,8 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IO31_ClampRelax
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IO31_ClampRelax
))
{
{
StoreManager
.
XLRStore
.
boxEquip
.
SendStoreState
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
,
DeviceStatus
.
OutStoreEnd
);
if
(!
StoreManager
.
XLRStore
.
boxEquip
.
SendStoreState
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
,
DeviceStatus
.
OutStoreEnd
))
return
;
if
(
shelf
.
Equals
(
1
))
if
(
shelf
.
Equals
(
1
))
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论