Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 1cf23ae2
由
张东亮
编写于
2020-07-21 23:07:29 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
锁定料架扫码
1 个父辈
65166571
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
221 行增加
和
52 行删除
source/ACPackingStore/FrmBox.Designer.cs
source/ACPackingStore/FrmBox.cs
source/Common/util/HttpHelper.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
source/DeviceLibrary/ACPackingStore/StoreManager.cs
source/DeviceLibrary/store/model/StoreMoveInfo.cs
source/ACPackingStore/FrmBox.Designer.cs
查看文件 @
1cf23ae
此文件的差异被折叠,
点击展开。
source/ACPackingStore/FrmBox.cs
查看文件 @
1cf23ae
...
...
@@ -1081,9 +1081,20 @@ namespace OnlineStore.ACPackingStore
{
if
(
BoxBean
.
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_07_CheckComSig
))
{
LogUtil
.
info
(
"手动忽略料叉信号,BoxBean.MoveInfo.EndStepWait(); 重置BoxBean.IsIgnoreComSig = true "
);
BoxBean
.
IsIgnoreComSig
=
true
;
BoxBean
.
MoveInfo
.
EndStepWait
();
}
}
/// <summary>
/// 锁定的料架扫码
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private
void
chbLockedShelf_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
BoxBean
.
IsScanCodeWithLockedShelf
=
chbLockedShelf
.
Checked
;
}
}
}
source/Common/util/HttpHelper.cs
查看文件 @
1cf23ae
...
...
@@ -21,7 +21,41 @@ namespace OnlineStore.Common
// public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public
static
string
Post
(
string
url
,
string
paramData
)
{
return
Post
(
url
,
paramData
,
Encoding
.
UTF8
);
string
postRes
=
""
;
DateTime
startTime
=
DateTime
.
Now
;
System
.
Threading
.
Tasks
.
Task
postTask
=
new
System
.
Threading
.
Tasks
.
Task
(
delegate
{
while
((
DateTime
.
Now
-
startTime
).
TotalMinutes
<
60
)
{
postRes
=
Post
(
url
,
paramData
,
Encoding
.
UTF8
,
out
bool
isTimeOut
);
ResponseData
data
=
JsonHelper
.
DeserializeJsonToObject
<
ResponseData
>(
postRes
);
if
(
data
!=
null
)
{
if
(
data
.
code
.
Equals
(
99
)
||
data
.
code
.
Equals
(
100
))
{
LogUtil
.
info
(
"Response Code="
+
data
.
code
+
" 系统正在更新。。。3秒后重试"
);
System
.
Threading
.
Thread
.
Sleep
(
3000
);
}
else
if
(
isTimeOut
.
Equals
(
true
))
{
LogUtil
.
info
(
" 从服务器获取信息超时。。。3秒后重试"
);
System
.
Threading
.
Thread
.
Sleep
(
3000
);
}
else
{
break
;
}
}
else
if
(
isTimeOut
.
Equals
(
true
))
{
LogUtil
.
info
(
" 从服务器获取信息超时。。。3秒后重试"
);
System
.
Threading
.
Thread
.
Sleep
(
3000
);
}
}
});
postTask
.
Wait
();
return
postRes
;
}
//public static bool PingURLIP(string url, int ms=100)
//{
...
...
@@ -114,13 +148,13 @@ namespace OnlineStore.Common
}
private
static
int
isLog
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Server_Log_Open
);
public
static
string
LastServerMsg
=
""
;
public
static
string
Post
(
string
url
,
string
paramData
,
Encoding
encoding
)
public
static
string
Post
(
string
url
,
string
paramData
,
Encoding
encoding
,
out
bool
isTimeOut
)
{
//if (PingURLIP(url, 100).Equals(false))
//{
// return null;
//}
isTimeOut
=
false
;
if
(
isLog
==
1
)
{
LogUtil
.
info
(
"给服务器发送数据【"
+
paramData
+
"】 "
);
...
...
@@ -147,10 +181,16 @@ namespace OnlineStore.Common
result
=
wc
.
UploadString
(
url
,
"POST"
,
paramData
);
//LogUtil.info(result);
}
catch
(
Exception
e
)
catch
(
WebException
e
)
{
isTimeOut
=
true
;
LogUtil
.
error
(
"POST TimeOut:"
+
e
.
ToString
(),
1
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"POST ERROR:"
+
e
.
ToString
(),
1
);
LogUtil
.
error
(
"POST ERROR:"
+
e
x
.
ToString
(),
1
);
}
if
(!
result
.
Contains
(
"null"
)
&&
result
.
Length
!=
0
)
{
//LogUtil.debug(LOGGER,"receive << " + result);
...
...
@@ -192,5 +232,15 @@ namespace OnlineStore.Common
}
return
""
;
}
}
internal
class
ResponseData
{
//{"code":0,"msg":"ok","data":"7"}
public
int
code
{
get
;
set
;
}
public
string
msg
{
get
;
set
;
}
public
Dictionary
<
string
,
string
>
data
{
get
;
set
;
}
}
}
\ No newline at end of file
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
查看文件 @
1cf23ae
...
...
@@ -16,6 +16,7 @@ namespace OnlineStore.DeviceLibrary
#
region
出入库结果验证
public
bool
CompressSigTimeOut
=
false
;
public
bool
IsScanCodeWithLockedShelf
=
true
;
//锁定的料架是否扫码
private
void
CheckWait
()
{
List
<
WaitResultInfo
>
list
=
MoveInfo
.
WaitList
;
...
...
@@ -76,6 +77,11 @@ namespace OnlineStore.DeviceLibrary
{
ConfigIO
io
=
Config
.
getWaitIO
(
wait
.
IoType
);
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"] 等待("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
;
if
(
WarnMsg
.
Contains
(
IO_Type
.
Compress_Check
)
&&
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_07_CheckComSig
))
{
CompressSigTimeOut
=
true
;
WarnMsg
+=
"出库时料叉未检测到信号!"
;
}
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
io
.
ElectricalDefinition
,
WarnMsg
,
MoveInfo
.
MoveType
);
LogUtil
.
error
(
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"] 等待("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
,
logType
+
14
);
if
(!
MoveInfo
.
OneWaitCanEndStep
)
...
...
@@ -83,10 +89,6 @@ namespace OnlineStore.DeviceLibrary
isOk
=
false
;
break
;
}
if
(
wait
.
IoType
.
Equals
(
IO_Type
.
Compress_Check
)
&&
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_07_CheckComSig
))
{
CompressSigTimeOut
=
true
;
}
}
}
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W003_Time
))
...
...
@@ -188,10 +190,15 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
span
.
TotalSeconds
>
MoveInfo
.
TimeOutSeconds
)
{
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"]等待"
+
NotOkMsg
if
(
NotOkMsg
.
Contains
(
IO_Type
.
Compress_Check
)
&&
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_07_CheckComSig
))
{
CompressSigTimeOut
=
true
;
NotOkMsg
+=
"出库时料叉未检测到信号!"
;
}
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"]等待 "
+
NotOkMsg
+
"超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
int
second
=
10
;
second
=
(
int
)(
MoveInfo
.
TimeOutSeconds
/
span
.
TotalSeconds
)
*
10
;
if
(
second
>
120
)
{
...
...
@@ -372,7 +379,10 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_71_ToNGDoor
);
InOutStoreLog
(
"送出料盘 "
+
MoveInfo
.
SLog
+
":"
+
str
+
",升降轴到NG门口高点P12,旋转轴到NG门口P11"
);
if
(
MoveInfo
.
IsShelfLocked
)
//锁定料架,扫码失败则清除当前位置
{
StoreManager
.
ClearLockLoc
(
Name
,
CurrShelfID
,
MoveInfo
.
currShelfIndex
);
}
ACAxisMove
(
Config
.
UpDown_Axis
,
MoveInfo
.
MoveParam
.
MoveP
.
UpDown_P12
,
Config
.
UpDownAxis_P1_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
MoveInfo
.
MoveParam
.
MoveP
.
Middle_P11
,
Config
.
MiddleAxis_P1_Speed
);
}
...
...
@@ -503,7 +513,7 @@ namespace OnlineStore.DeviceLibrary
//单盘入库,不需要扫码
StartMoveToBag
();
}
else
if
(
MoveInfo
.
IsShelfLocked
)
else
if
(
MoveInfo
.
IsShelfLocked
&&
!
IsScanCodeWithLockedShelf
)
{
//该料架已锁定库位,不需要扫码,直接查询服务器
GetPosId
();
...
...
@@ -612,11 +622,11 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_30_SetInstoreParam
);
InOutStoreLog
(
"扫码 "
+
MoveInfo
.
SLog
+
": 获取库位号"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
(
int
)
TimeSpan
.
FromMinutes
(
75
).
TotalMilliseconds
));
bool
result
=
GetPosIdByCode
(
MoveInfo
.
currShelfIndex
,
out
CodeResultType
codeResult
);
if
(!
result
)
//获取库位失败
{
if
(
codeResult
==
CodeResultType
.
Not
FoundPos
)
//库位不在该料仓,将该料盘放回料架
if
(
codeResult
==
CodeResultType
.
Not
PosForPutIn
)
//库位不在该料仓,将该料盘放回料架
{
//MoveInfo.MoveParam.PosID = "";
StartMoveTrayBack
(
"此料盘不属于该仓库,放回料架"
);
...
...
@@ -1021,6 +1031,7 @@ namespace OnlineStore.DeviceLibrary
{
IsIgnoreComSig
=
false
;
CompressSigTimeOut
=
false
;
LogUtil
.
info
(
"出库步骤 SO_07_CheckComSig :IsIgnoreComSig = false, CompressSigTimeOut = false"
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SO_08_ToShelfPosition
);
InOutStoreLog
(
"出库 "
+
MoveInfo
.
SLog
+
":走到料架位置,旋转轴至P101,升降轴至P102 "
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_HP102
,
Config
.
UpDownAxis_P102_Speed
);
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
查看文件 @
1cf23ae
...
...
@@ -123,7 +123,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_08_LocationUp
);
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
"停止线体,读取料架"
+
CurrShelfID
+
",设置"
+
Config
.
AgvNodeName
+
"=None"
);
AgvClient
.
SetStatus
(
Config
.
AgvNodeName
);
AgvClient
.
SetStatus
(
Config
.
AgvNodeName
,
mark
);
// CylinderMove(MoveInfo, IO_Type.LocationCylinder_Down, IO_Type.LocationCylinder_Up);
if
(!
instoreShelf
)
...
...
@@ -162,15 +162,18 @@ namespace OnlineStore.DeviceLibrary
if
(
instoreShelf
)
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_10_StartGetTray
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
(
int
)
TimeSpan
.
FromMinutes
(
75
).
TotalMilliseconds
));
//获取料架的锁定状态
bool
lockState
=
StoreManager
.
GetShelfLockInfo
(
Name
,
CID
,
CurrShelfID
,
out
MoveInfo
.
shelfLockDatas
);
bool
lockState
=
StoreManager
.
GetShelfLockInfo
(
Name
,
CID
,
CurrShelfID
,
out
MoveInfo
.
shelfLockDatas
);
if
(
lockState
&&
MoveInfo
.
shelfLockDatas
!=
null
)
{
MoveInfo
.
IsShelfLocked
=
true
;
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
"开始到料架指定位置取料盘 "
);
if
(
MoveInfo
.
shelfLockDatas
.
Count
.
Equals
(
0
))
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
"该锁定料架上的料盘不属于该料仓,即将送出锁定料架"
);
else
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
"开始到料架指定位置取料盘 "
);
}
else
{
...
...
@@ -721,7 +724,7 @@ namespace OnlineStore.DeviceLibrary
//发送扫码内容到服务器进行入库操作
Operation
operation
=
getLineBoxStatus
();
operation
.
op
=
1
;
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
message
},
{
"boxId"
,
1.
ToString
()
},
{
ParamDefine
.
rfid
,
CurrShelfID
}};
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
message
},
{
"boxId"
,
1.
ToString
()
},
{
ParamDefine
.
rfid
,
CurrShelfID
}
};
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
Operation
resultOperation
=
HttpHelper
.
Post
(
StoreManager
.
GetPostApi
(
server
),
operation
,
false
);
if
(
resultOperation
==
null
)
...
...
@@ -784,23 +787,38 @@ namespace OnlineStore.DeviceLibrary
}
/// <summary>
/// 扫码
结果类型
/// 扫码
枪数据接收
/// </summary>
enum
CodeResultType
/// <param name="codeResultType">扫码结果</param>
/// <returns></returns>
public
enum
CodeResultType
{
/// <summary>
/// 未扫到二维码
/// </summary>
NoCode
,
/// <summary>
/// 设备未启动
/// </summary>
DeviceNotOpen
,
/// <summary>
///未收到服务器反馈
/// </summary>
NotResponseFromServer
,
WarnMsg
,
/// <summary>
/// 未找到库位
/// </summary>
NotFoundPos
,
/// <summary>
/// 不属于该仓位
/// </summary>
NotPosForPutIn
,
Error
,
Success
}
/// <summary>
/// 扫码枪数据接收
/// </summary>
/// <param name="codeResultType">扫码结果</param>
/// <returns></returns>
private
bool
GetPosIdByCode
(
int
rfidLoc
,
out
CodeResultType
codeResultType
)
{
try
...
...
@@ -828,14 +846,24 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
Name
+
"二维码【 "
+
message
+
"】,发送给服务器获取入库PosID"
);
//查询该料盘所在料仓以及仓位
bool
checkRelationship
=
StoreManager
.
GetPosForPutIn
(
Name
,
Config
,
message
,
CurrShelfID
,
rfidLoc
);
StoreManager
.
ResultType
resultType
=
StoreManager
.
GetPosForPutIn
(
Name
,
Config
,
message
,
CurrShelfID
,
rfidLoc
,
out
bool
isLockInfoMatch
);
if
(
!
checkRelationship
)
if
(
resultType
==
StoreManager
.
ResultType
.
Error
)
{
codeResultType
=
CodeResultType
.
NotFoundPos
;
codeResultType
=
CodeResultType
.
Error
;
return
false
;
}
else
if
(
resultType
==
StoreManager
.
ResultType
.
NotInThisBox
)
{
codeResultType
=
CodeResultType
.
NotPosForPutIn
;
return
false
;
}
if
(!
isLockInfoMatch
&&
MoveInfo
.
IsShelfLocked
)
//锁定信息不匹配则从第一层开始重新取料,一个料架只重新开始一次
{
MoveInfo
.
IsShelfLocked
=
false
;
MoveInfo
.
currShelfIndex
=
-
1
;
LogUtil
.
info
(
Name
+
"该锁定料架"
+
CurrShelfID
+
"上的料盘信息不匹配,即将从开始位置循环取料"
);
}
//发送扫码内容到服务器进行入库操作
Operation
operation
=
getLineBoxStatus
();
operation
.
op
=
1
;
...
...
source/DeviceLibrary/ACPackingStore/StoreManager.cs
查看文件 @
1cf23ae
...
...
@@ -401,7 +401,6 @@ namespace OnlineStore.DeviceLibrary
string
server
=
GetAddr
(
Addr_clearPutInRfid
,
paramMap
);
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
);
LogUtil
.
info
(
deviceName
+
"clearPutInRfid 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
}
catch
(
Exception
ex
)
{
...
...
@@ -618,9 +617,20 @@ namespace OnlineStore.DeviceLibrary
private
static
string
Addr_PosForPutin
=
"/service/store/emptyPosForPutin"
;
//获取当前料盘属于的料仓编号
public
static
bool
GetPosForPutIn
(
string
deviceName
,
AC_BOX_Config
boxConfig
,
string
barcode
,
string
rfid
,
int
rfidLoc
)
/// <summary>
/// 查询仓位结果
/// </summary>
public
enum
ResultType
{
NotInThisBox
,
Error
,
Success
}
public
static
ResultType
GetPosForPutIn
(
string
deviceName
,
AC_BOX_Config
boxConfig
,
string
barcode
,
string
rfid
,
int
rfidLoc
,
out
bool
IsLockInfoMatch
)
{
string
msg
=
""
;
IsLockInfoMatch
=
true
;
//锁定信息是否匹配
try
{
...
...
@@ -645,15 +655,25 @@ namespace OnlineStore.DeviceLibrary
{
msg
=
deviceName
+
" 【"
+
barcode
+
"】结果:没有收到服务器反馈 "
;
LogUtil
.
info
(
msg
);
return
false
;
return
ResultType
.
Error
;
}
//else if ((!string.IsNullOrEmpty(serverResult.msg)))// || serverResult.result.Equals(0).Equals(false)
//{
// msg = deviceName + " 【" + barcode + "】结果:" + serverResult.msg;
// LogUtil.info(msg);
// // return false;
//}
else
if
(
serverResult
.
result
.
Equals
(-
1
))
{
IsLockInfoMatch
=
false
;
}
else
if
(
(!
string
.
IsNullOrEmpty
(
serverResult
.
msg
))
||
serverResult
.
result
.
Equals
(
0
).
Equals
(
false
))
else
if
(
!
serverResult
.
result
.
Equals
(
0
))
{
msg
=
deviceName
+
" 【"
+
barcode
+
"】结果:"
+
serverResult
.
msg
;
LogUtil
.
info
(
msg
);
return
false
;
return
ResultType
.
Error
;
}
if
(
serverResult
.
cid
.
Equals
(
boxConfig
.
CID
))
//该料盘在此料仓
{
// 仓位命名: 4D01020304
...
...
@@ -666,22 +686,70 @@ namespace OnlineStore.DeviceLibrary
//4D19050208 表示4楼19号料仓(包装料仓)第5列第2行架子上的第8个隔板位置
msg
=
deviceName
+
" 料盘【"
+
barcode
+
"】属于该料仓【"
+
boxConfig
.
CID
+
"】"
;
LogUtil
.
info
(
msg
);
return
true
;
return
ResultType
.
Success
;
}
else
{
msg
=
deviceName
+
" 料盘【"
+
barcode
+
"】不属于该料仓【"
+
boxConfig
.
CID
+
"】"
;
LogUtil
.
info
(
msg
);
return
false
;
return
ResultType
.
NotInThisBox
;
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
deviceName
+
" "
,
ex
);
}
return
ResultType
.
Error
;
}
private
static
string
Addr_clearLockLoc
=
"/rest/api/qisda/device/clearLockLoc"
;
/// <summary>
/// 清除料架指定位置的锁定信息
/// </summary>
/// <param name="rfid"></param>
/// <param name="rfidLoc"></param>
/// <returns></returns>
public
static
bool
ClearLockLoc
(
string
deviceName
,
string
rfid
,
int
rfidLoc
)
{
string
msg
=
""
;
try
{
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
ParamDefine
.
rfid
,
rfid
);
paramMap
.
Add
(
"rfidLoc"
,
rfidLoc
.
ToString
());
string
server
=
GetAddr
(
Addr_clearLockLoc
,
paramMap
);
DateTime
startTime
=
DateTime
.
Now
;
LogUtil
.
info
(
"清除RFID="
+
rfid
+
",rfidLoc="
+
rfidLoc
.
ToString
()+
"的锁定信息"
);
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
);
LogUtil
.
info
(
deviceName
+
" CodeReceived "
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
" 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
RfidData
data
=
JsonHelper
.
DeserializeJsonToObject
<
RfidData
>(
resultStr
);
if
(
data
==
null
)
{
msg
=
deviceName
+
" ClearLockLoc【 "
+
rfid
+
"-"
+
rfidLoc
+
"】 没有收到服务器反馈"
;
LogUtil
.
info
(
msg
);
return
false
;
}
else
if
(
data
.
code
.
Equals
(
0
).
Equals
(
false
))
{
msg
=
deviceName
+
" ClearLockLoc【 "
+
rfid
+
"-"
+
rfidLoc
+
"】:"
+
data
.
msg
;
LogUtil
.
info
(
msg
);
return
false
;
}
return
true
;
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
deviceName
+
" ClearLockLoc "
,
ex
);
}
return
false
;
}
}
public
class
AfterPutData
{
...
...
source/DeviceLibrary/store/model/StoreMoveInfo.cs
查看文件 @
1cf23ae
...
...
@@ -125,6 +125,7 @@ namespace OnlineStore.DeviceLibrary
LastSetpTime
=
DateTime
.
Now
;
WaitList
=
new
List
<
WaitResultInfo
>();
currShelfIndex
=
-
1
;
lockShelfIndex
=
-
1
;
SingleInstore
=
false
;
}
public
void
EndMove
()
...
...
@@ -150,7 +151,7 @@ namespace OnlineStore.DeviceLibrary
public
List
<
string
>
ShelfPositionList
=
new
List
<
string
>();
private
string
currShelfPosId
=
""
;
public
int
currShelfIndex
=
-
1
;
private
int
lockShelfIndex
=
-
1
;
public
bool
NextShelfPos
()
{
currShelfIndex
++;
...
...
@@ -168,26 +169,26 @@ namespace OnlineStore.DeviceLibrary
/// 入库时,料架已锁定库位的位置,无需扫码
/// </summary>
public
bool
IsShelfLocked
=
false
;
//料架是否锁定
/// <summary>
/// 料架锁定位置的料
/// </summary>
public
List
<
ShelfLockData
>
shelfLockDatas
=
null
;
/// <summary>
/// 料架锁定位置的料
/// </summary>
public
List
<
ShelfLockData
>
shelfLockDatas
=
null
;
public
bool
NextLockedShelfPos
()
{
currShelfIndex
++;
if
(
currShelfIndex
>=
shelfLockDatas
.
Count
)
lockShelfIndex
++;
if
(
lockShelfIndex
>=
shelfLockDatas
.
Count
)
{
shelfLockDatas
=
null
;
return
false
;
}
currShelfPosId
=
ShelfPositionList
[
shelfLockDatas
[
currShelfIndex
].
rfidLoc
];
currShelfIndex
=
shelfLockDatas
[
lockShelfIndex
].
rfidLoc
;
currShelfPosId
=
ShelfPositionList
[
currShelfIndex
];
//设置取料位置
MoveParam
.
UpdatePosIdAndShelfId
(
shelfLockDatas
[
curr
ShelfIndex
].
barcode
,
shelfLockDatas
[
curr
ShelfIndex
].
rfid
,
shelfLockDatas
[
curr
ShelfIndex
].
lockPos
,
currShelfPosId
);
MoveParam
.
UpdatePosIdAndShelfId
(
shelfLockDatas
[
lock
ShelfIndex
].
barcode
,
shelfLockDatas
[
lock
ShelfIndex
].
rfid
,
shelfLockDatas
[
lock
ShelfIndex
].
lockPos
,
currShelfPosId
);
return
true
;
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论