Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 39e3851f
由
几米阳光
编写于
2018-11-07 16:14:54 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
出库等待10分或者height=0
1 个父辈
8d0aa236
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
61 行增加
和
12 行删除
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/store/model/StoreMoveInfo.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
39e3851
...
@@ -1257,6 +1257,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1257,6 +1257,7 @@ namespace OnlineStore.DeviceLibrary
{
{
IsNotScanCode
=
true
;
IsNotScanCode
=
true
;
IsScanCode
=
false
;
IsScanCode
=
false
;
CodeMsg
=
"没有收到二维码信息,请重新放入料盘"
;
LogUtil
.
info
(
LOGGER
,
StoreName
+
"没有收到二维码信息,请重新放入料盘"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"没有收到二维码信息,请重新放入料盘"
);
return
;
return
;
}
}
...
@@ -1264,10 +1265,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1264,10 +1265,12 @@ namespace OnlineStore.DeviceLibrary
IsNotScanCode
=
false
;
IsNotScanCode
=
false
;
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Wait
))
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Wait
))
{
{
CodeMsg
=
"收到二维码【 "
+
message
+
"】,设备未启动,不需要发送服务器"
;
LogUtil
.
info
(
LOGGER
,
StoreName
+
"收到二维码【 "
+
message
+
"】,设备未启动,不需要发送服务器"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"收到二维码【 "
+
message
+
"】,设备未启动,不需要发送服务器"
);
IsScanCode
=
false
;
IsScanCode
=
false
;
return
;
return
;
}
}
CodeMsg
=
"收到二维码【 "
+
message
+
"】,发送给服务器获取入库PosID"
;
LogUtil
.
info
(
LOGGER
,
StoreName
+
"收到二维码【 "
+
message
+
"】,发送给服务器获取入库PosID"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"收到二维码【 "
+
message
+
"】,发送给服务器获取入库PosID"
);
//发送扫码内容到服务器进行入库操作
//发送扫码内容到服务器进行入库操作
Operation
operation
=
getLineBoxStatus
();
Operation
operation
=
getLineBoxStatus
();
...
@@ -1277,6 +1280,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1277,6 +1280,7 @@ namespace OnlineStore.DeviceLibrary
Operation
resultOperation
=
HttpHelper
.
Post
(
StoreManager
.
GetPostApi
(
server
),
operation
,
false
);
Operation
resultOperation
=
HttpHelper
.
Post
(
StoreManager
.
GetPostApi
(
server
),
operation
,
false
);
if
(
resultOperation
==
null
)
if
(
resultOperation
==
null
)
{
{
CodeMsg
=
"二维码【"
+
message
+
"】没有收到服务器反馈"
;
LogUtil
.
info
(
LOGGER
,
StoreName
+
"二维码【"
+
message
+
"】没有收到服务器反馈!"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"二维码【"
+
message
+
"】没有收到服务器反馈!"
);
IsScanCode
=
false
;
IsScanCode
=
false
;
return
;
return
;
...
@@ -1385,6 +1389,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1385,6 +1389,7 @@ namespace OnlineStore.DeviceLibrary
}
}
if
(!
outMsg
.
Equals
(
""
))
if
(!
outMsg
.
Equals
(
""
))
{
{
CodeMsg
=
"盘尺寸错误,清理二维码【"
+
message
+
"】"
;
LogUtil
.
error
(
"盘尺寸错误,清理二维码【"
+
message
+
"】"
);
LogUtil
.
error
(
"盘尺寸错误,清理二维码【"
+
message
+
"】"
);
message
=
""
;
message
=
""
;
}
}
...
@@ -1598,9 +1603,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1598,9 +1603,11 @@ namespace OnlineStore.DeviceLibrary
{
{
LOGGER
.
Error
(
StoreName
+
"HumidityProcess出错:"
+
ex
.
ToString
());
LOGGER
.
Error
(
StoreName
+
"HumidityProcess出错:"
+
ex
.
ToString
());
}
}
}
}
#
endregion
#
endregion
#
region
与服务器通信定时器,每
1
秒向服务器通知一次状态
,
同时执行出库操作
#
region
与服务器通信定时器,每
1
秒向服务器通知一次状态
,
同时执行出库操作
private
string
CodeMsg
=
""
;
private
bool
isInProcess
=
false
;
private
bool
isInProcess
=
false
;
public
void
server_connect_timer_Tick
(
object
sender
,
EventArgs
e
)
public
void
server_connect_timer_Tick
(
object
sender
,
EventArgs
e
)
{
{
...
@@ -1663,6 +1670,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1663,6 +1670,13 @@ namespace OnlineStore.DeviceLibrary
}
}
boxStatus
.
msg
=
WarnMsg
;
boxStatus
.
msg
=
WarnMsg
;
lineOperation
.
msg
=
WarnMsg
;
lineOperation
.
msg
=
WarnMsg
;
if
(
WarnMsg
.
Equals
(
""
))
{
boxStatus
.
msg
=
CodeMsg
;
lineOperation
.
msg
=
CodeMsg
;
CodeMsg
=
""
;
}
//WarnMsg = "";
//WarnMsg = "";
//状态
//状态
boxStatus
.
status
=
(
int
)
storeStatus
;
boxStatus
.
status
=
(
int
)
storeStatus
;
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
39e3851
...
@@ -112,6 +112,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -112,6 +112,10 @@ namespace OnlineStore.DeviceLibrary
return
;
return
;
}
}
bool
isOk
=
true
;
bool
isOk
=
true
;
if
(
StoreMove
.
OneWaitCanEndStep
)
{
isOk
=
false
;
}
foreach
(
WaitResultInfo
wait
in
list
)
foreach
(
WaitResultInfo
wait
in
list
)
{
{
if
(
wait
.
IsEnd
)
if
(
wait
.
IsEnd
)
...
@@ -144,7 +148,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -144,7 +148,7 @@ namespace OnlineStore.DeviceLibrary
int
timeOutMs
=
Config
.
IOSingle_TimerOut
;
int
timeOutMs
=
Config
.
IOSingle_TimerOut
;
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_14_WaitTake
)
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_14_WaitTake
)
{
{
timeOutMs
=
35
000
;
timeOutMs
=
650
000
;
}
}
if
((!
wait
.
IsEnd
)
&&
span
.
TotalMilliseconds
>
timeOutMs
)
if
((!
wait
.
IsEnd
)
&&
span
.
TotalMilliseconds
>
timeOutMs
)
{
{
...
@@ -159,6 +163,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -159,6 +163,13 @@ namespace OnlineStore.DeviceLibrary
else
if
(
wait
.
WaitType
==
3
)
else
if
(
wait
.
WaitType
==
3
)
{
{
wait
.
IsEnd
=
(
span
.
TotalMilliseconds
>=
wait
.
TimeMSeconds
);
wait
.
IsEnd
=
(
span
.
TotalMilliseconds
>=
wait
.
TimeMSeconds
);
}
else
if
(
wait
.
WaitType
==
7
)
{
wait
.
IsEnd
=
(
wait
.
HeightValue
.
Equals
(
GetHeight
()));
if
(
wait
.
IsEnd
)
{
LogUtil
.
info
(
"等待height="
+
wait
.
HeightValue
+
"完成"
);
}
}
}
else
if
(
wait
.
WaitType
==
5
)
else
if
(
wait
.
WaitType
==
5
)
{
{
...
@@ -175,15 +186,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -175,15 +186,21 @@ namespace OnlineStore.DeviceLibrary
ShuoKeControls
.
GetStatus
(
wait
.
SlvAddr
);
ShuoKeControls
.
GetStatus
(
wait
.
SlvAddr
);
}
}
}
}
if
(
wait
.
IsEnd
&&
StoreMove
.
OneWaitCanEndStep
)
if
(
wait
.
IsEnd
)
{
{
isOk
=
true
;
if
(
StoreMove
.
OneWaitCanEndStep
)
break
;
{
isOk
=
true
;
break
;
}
}
}
else
if
(
wait
.
IsEnd
.
Equals
(
false
)
&&
StoreMove
.
OneWaitCanEndStep
.
Equals
(
false
))
else
{
{
isOk
=
false
;
if
(!
StoreMove
.
OneWaitCanEndStep
)
break
;
{
isOk
=
false
;
break
;
}
}
}
}
}
if
(
isOk
)
if
(
isOk
)
...
@@ -669,9 +686,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -669,9 +686,10 @@ namespace OnlineStore.DeviceLibrary
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_13_GoBack
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_13_GoBack
)
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_14_WaitTake
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_14_WaitTake
);
OutStoreLog
(
"出库:SO_14_WaitTake 等待拿走物品,最多等待30秒"
);
OutStoreLog
(
"出库:SO_14_WaitTake 等待拿走物品,最多等待600000"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
30000
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
600000
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
LOW
));
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitHeight
(
0
));
StoreMove
.
OneWaitCanEndStep
=
true
;
StoreMove
.
OneWaitCanEndStep
=
true
;
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_14_WaitTake
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_14_WaitTake
)
...
...
source/DeviceLibrary/store/model/StoreMoveInfo.cs
查看文件 @
39e3851
...
@@ -232,6 +232,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -232,6 +232,15 @@ namespace OnlineStore.DeviceLibrary
wait
.
IsEnd
=
false
;
wait
.
IsEnd
=
false
;
return
wait
;
return
wait
;
}
}
public
static
WaitResultInfo
WaitHeight
(
int
height
)
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
WaitType
=
7
;
wait
.
HeightValue
=
height
;
wait
.
IsEnd
=
false
;
return
wait
;
}
public
string
ToStr
()
public
string
ToStr
()
{
{
if
(
WaitType
==
1
)
if
(
WaitType
==
1
)
...
@@ -264,7 +273,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -264,7 +273,11 @@ namespace OnlineStore.DeviceLibrary
else
if
(
WaitType
==
6
)
else
if
(
WaitType
==
6
)
{
{
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】ORG信号:【"
+
IoValue
+
"】 "
;
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】ORG信号:【"
+
IoValue
+
"】 "
;
}
else
if
(
WaitType
==
7
)
{
return
"料盘高度【"
+
HeightValue
+
"】 "
;
}
}
else
{
{
return
"Wait位置类型:WaitType=【"
+
WaitType
+
"】"
;
return
"Wait位置类型:WaitType=【"
+
WaitType
+
"】"
;
}
}
...
@@ -314,6 +327,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -314,6 +327,10 @@ namespace OnlineStore.DeviceLibrary
/// 是否已经结束
/// 是否已经结束
/// </summary>
/// </summary>
public
bool
IsEnd
{
get
;
set
;
}
public
bool
IsEnd
{
get
;
set
;
}
/// <summary>
/// 高度
/// </summary>
public
int
HeightValue
{
get
;
set
;
}
}
}
public
enum
StoreMoveType
public
enum
StoreMoveType
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论