Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 65166571
由
张东亮
编写于
2020-06-04 21:44:28 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
包装仓入库逻辑优化
1 个父辈
e8dd2942
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
20 行增加
和
18 行删除
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
source/DeviceLibrary/ACPackingStore/StoreManager.cs
source/LoadCVSLibrary/position/CSVPositionReader.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
查看文件 @
6516657
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
查看文件 @
6516657
...
...
@@ -162,6 +162,7 @@ namespace OnlineStore.DeviceLibrary
if
(
instoreShelf
)
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_10_StartGetTray
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
//获取料架的锁定状态
bool
lockState
=
StoreManager
.
GetShelfLockInfo
(
Name
,
CID
,
CurrShelfID
,
out
MoveInfo
.
shelfLockDatas
);
...
...
@@ -169,14 +170,14 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo
.
IsShelfLocked
=
true
;
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
"开始到料架指定位置取料盘 "
);
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
"开始到料架指定位置取料盘 "
);
}
else
{
MoveInfo
.
IsShelfLocked
=
false
;
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
"开始循环料架取料盘 "
);
}
MoveInfo
.
EndStepWait
();
}
else
{
...
...
@@ -690,7 +691,7 @@ namespace OnlineStore.DeviceLibrary
#
region
扫码获取库位
/// <summary>
///
扫码枪
数据接收
/// 数据接收
/// </summary>
/// <param name="message"></param>
private
bool
GetPosIdByCode
()
...
...
@@ -701,7 +702,8 @@ namespace OnlineStore.DeviceLibrary
{
LastWidth
=
7
;
}
string
message
=
StoreManager
.
ProcessCode
(
LastWidth
,
LastHeight
,
LastScanCodes
);
//string message = StoreManager.ProcessCode(LastWidth, LastHeight, LastScanCodes);
string
message
=
MoveInfo
.
shelfLockDatas
[
MoveInfo
.
currShelfIndex
].
barcode
;
if
(
message
.
Equals
(
""
)
||
string
.
IsNullOrEmpty
(
message
))
{
CodeMsg
=
"未扫到二维码"
;
...
...
@@ -719,7 +721,7 @@ namespace OnlineStore.DeviceLibrary
//发送扫码内容到服务器进行入库操作
Operation
operation
=
getLineBoxStatus
();
operation
.
op
=
1
;
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
message
},
{
"boxId"
,
1.
ToString
()
},
{
ParamDefine
.
rfid
,
CurrShelfID
}
,
{
"cids"
,
Config
.
All_CIDs
.
Replace
(
'#'
,
','
)
}
};
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
)
...
...
source/DeviceLibrary/ACPackingStore/StoreManager.cs
查看文件 @
6516657
...
...
@@ -562,7 +562,7 @@ namespace OnlineStore.DeviceLibrary
private
static
string
Addr_getShelfLockInfo
=
"/rest/api/qisda/device/getShelfLockInfo"
;
//包装仓获取料架锁定状态地址
public
static
bool
GetShelfLockInfo
(
string
deviceName
,
string
cid
,
string
rfid
,
out
List
<
ShelfLockData
>
shelfLockDatas
)
public
static
bool
GetShelfLockInfo
(
string
deviceName
,
string
cid
,
string
rfid
,
out
List
<
ShelfLockData
>
shelfLockDatas
)
{
string
msg
=
""
;
shelfLockDatas
=
null
;
...
...
@@ -576,7 +576,7 @@ namespace OnlineStore.DeviceLibrary
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
);
LogUtil
.
info
(
deviceName
+
"料架锁定状态 "
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
" 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
LogUtil
.
info
(
deviceName
+
"
料架锁定状态 "
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
" 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
ShelfLockInfo
serverResult
=
JsonHelper
.
DeserializeJsonToObject
<
ShelfLockInfo
>(
resultStr
);
if
(
serverResult
==
null
)
{
...
...
@@ -585,9 +585,9 @@ namespace OnlineStore.DeviceLibrary
return
false
;
}
if
(
serverResult
.
data
.
Count
==
0
)
//该料架未锁定
if
(
serverResult
.
data
.
Count
==
0
)
//该料架未锁定
{
msg
=
deviceName
+
" 料架【"
+
rfid
+
"】 没有锁定库位的料
"
;
msg
=
deviceName
+
" 料架【"
+
rfid
+
"】 没有被锁定
"
;
LogUtil
.
info
(
msg
);
return
false
;
}
...
...
@@ -597,14 +597,14 @@ namespace OnlineStore.DeviceLibrary
string
plates
=
""
;
foreach
(
ShelfLockData
item
in
serverResult
.
data
)
{
LogUtil
.
info
(
"锁定的CID="
+
item
.
cid
+
";当前CID="
+
cid
);
if
(
item
.
cid
.
Equals
(
cid
))
//该料盘属于此料仓
LogUtil
.
info
(
"锁定的CID="
+
item
.
cid
+
"; 当前CID="
+
cid
);
if
(
item
.
cid
.
Equals
(
cid
))
//该料盘属于此料仓
{
shelfLockDatas
.
Add
(
item
);
plates
+=
"["
+
item
.
lockPos
+
"]
# "
;
plates
+=
item
.
lockPos
+
"
# "
;
}
}
msg
=
deviceName
+
" 料架【"
+
rfid
+
"】 在该料仓锁定库位的
料:【"
+
plates
+
"】"
;
msg
=
deviceName
+
" 料架【"
+
rfid
+
"】 在该料仓锁定库位的
有:【"
+
plates
+
"】"
;
LogUtil
.
info
(
msg
);
return
true
;
}
...
...
@@ -618,7 +618,7 @@ 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
)
public
static
bool
GetPosForPutIn
(
string
deviceName
,
AC_BOX_Config
boxConfig
,
string
barcode
,
string
rfid
,
int
rfidLoc
)
{
string
msg
=
""
;
try
...
...
@@ -628,7 +628,7 @@ namespace OnlineStore.DeviceLibrary
// 参数:cids: 多个 cid
//code: 条码内容
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"cids"
,
boxConfig
.
All_CIDs
.
Replace
(
'#'
,
','
));
paramMap
.
Add
(
"cids"
,
boxConfig
.
All_CIDs
.
Replace
(
'#'
,
','
));
paramMap
.
Add
(
"code"
,
barcode
);
paramMap
.
Add
(
ParamDefine
.
rfid
,
rfid
);
paramMap
.
Add
(
"rfidLoc"
,
rfidLoc
.
ToString
());
...
...
@@ -647,7 +647,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
msg
);
return
false
;
}
else
if
((!
string
.
IsNullOrEmpty
(
serverResult
.
msg
))
||
serverResult
.
result
.
Equals
(
0
).
Equals
(
false
))
else
if
((!
string
.
IsNullOrEmpty
(
serverResult
.
msg
))
||
serverResult
.
result
.
Equals
(
0
).
Equals
(
false
))
{
msg
=
deviceName
+
" 【"
+
barcode
+
"】结果:"
+
serverResult
.
msg
;
LogUtil
.
info
(
msg
);
...
...
@@ -664,7 +664,7 @@ namespace OnlineStore.DeviceLibrary
//第9和第10位表示隔板位置(04)
//例如: 4D12010124 表示4楼12号料仓第1列第1行架子上的第24个隔板位置
//4D19050208 表示4楼19号料仓(包装料仓)第5列第2行架子上的第8个隔板位置
msg
=
deviceName
+
" 料盘【"
+
barcode
+
"】属于该料仓【"
+
boxConfig
.
CID
+
"】"
;
msg
=
deviceName
+
" 料盘【"
+
barcode
+
"】属于该料仓【"
+
boxConfig
.
CID
+
"】"
;
LogUtil
.
info
(
msg
);
return
true
;
...
...
source/LoadCVSLibrary/position/CSVPositionReader.cs
查看文件 @
6516657
...
...
@@ -134,7 +134,7 @@ namespace OnlineStore.LoadCSVLibrary
}
else
{
LogUtil
.
error
(
"读取
csv
,index="
+
index
+
",数据格式不匹配!,line="
+
line
);
LogUtil
.
error
(
"读取
"
+
filePath
+
"
,index="
+
index
+
",数据格式不匹配!,line="
+
line
);
}
}
catch
(
Exception
ex
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论