Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO908-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 77997491
由
刘韬
编写于
2022-12-20 12:01:17 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
4a5f2091
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
79 行增加
和
9 行删除
source/Common/bean/Bean.cs
source/DeviceLibrary/manager/SServerManager.cs
source/DeviceLibrary/manager/model/DeviceStep.cs
source/DeviceLibrary/manager/model/InOutParam.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean_Partial.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip_InStore.cs
source/Common/bean/Bean.cs
查看文件 @
7799749
...
@@ -211,6 +211,10 @@ namespace OnlineStore.Common
...
@@ -211,6 +211,10 @@ namespace OnlineStore.Common
/// </summary>
/// </summary>
public
static
string
posId
=
"posId"
;
public
static
string
posId
=
"posId"
;
/// <summary>
/// <summary>
/// 需求单号
/// </summary>
public
static
string
hSerial
=
"hSerial"
;
/// <summary>
/// 料盘宽
/// 料盘宽
/// </summary>
/// </summary>
public
static
string
plateW
=
"plateW"
;
public
static
string
plateW
=
"plateW"
;
...
...
source/DeviceLibrary/manager/SServerManager.cs
查看文件 @
7799749
...
@@ -104,7 +104,34 @@ namespace OnlineStore.DeviceLibrary
...
@@ -104,7 +104,34 @@ namespace OnlineStore.DeviceLibrary
return
msg
;
return
msg
;
}
}
public
static
int
GetOutTaskCount
(
string
hSerial
)
{
try
{
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"cid"
,
StoreManager
.
Config
.
CID
);
paramMap
.
Add
(
"hSerial"
,
hSerial
);
string
server
=
GetAddr
(
"/service/store/outTaskCount"
,
paramMap
);
DateTime
startTime
=
DateTime
.
Now
;
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
,
Encoding
.
UTF8
,
10000
,
out
bool
IsTimeOut
);
LogUtil
.
info
(
"GetoutTaskCount "
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
" 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
if
(
IsTimeOut
)
{
return
998
;
}
if
(
int
.
TryParse
(
resultStr
,
out
int
r
))
return
r
;
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"GetoutTaskCount error "
,
ex
);
return
997
;
}
return
999
;
}
/// <summary>
/// <summary>
/// 1 皮带线扫码后调用,用于获取尺寸后升起气缸
/// 1 皮带线扫码后调用,用于获取尺寸后升起气缸
/// 地址: /rest/api/qisda/device/getSize
/// 地址: /rest/api/qisda/device/getSize
...
...
source/DeviceLibrary/manager/model/DeviceStep.cs
查看文件 @
7799749
...
@@ -94,13 +94,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -94,13 +94,13 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
OutStoreBoxEnd
=
10
,
OutStoreBoxEnd
=
10
,
/// <summary>
/// <summary>
///
12=移栽出库移栽过程中(移栽完成后变成OnLine)
///
11=出库完成
/// </summary>
/// </summary>
Out
MoveExecute
=
12
,
Out
StoreEnd
=
11
,
/// <summary>
/// <summary>
///
11=出库失败
///
12=移栽出库移栽过程中(移栽完成后变成OnLine)
/// </summary>
/// </summary>
Out
StoreFaild
=
11
,
Out
MoveExecute
=
12
,
/// <summary>
/// <summary>
/// 重置中(原点返回和重置都发此状态)
/// 重置中(原点返回和重置都发此状态)
/// </summary>
/// </summary>
...
...
source/DeviceLibrary/manager/model/InOutParam.cs
查看文件 @
7799749
...
@@ -91,6 +91,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -91,6 +91,11 @@ namespace OnlineStore.DeviceLibrary
/// 物品二维码
/// 物品二维码
/// </summary>
/// </summary>
public
string
barcode
{
get
;
set
;
}
public
string
barcode
{
get
;
set
;
}
/// <summary>
/// 需求单号
/// </summary>
public
string
hSerial
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 库位号编码
/// 库位号编码
/// </summary>
/// </summary>
...
@@ -129,7 +134,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -129,7 +134,7 @@ namespace OnlineStore.DeviceLibrary
public
bool
singleOut
=
false
;
public
bool
singleOut
=
false
;
public
string
ToStr
()
public
string
ToStr
()
{
{
return
" ["
+
barcode
+
"] ["
+
PosId
+
"] ["
+
PlateW
+
"x"
+
PlateH
+
"],urgentReel ["
+
urgentReel
return
" ["
+
barcode
+
"] ["
+
PosId
+
"] ["
+
hSerial
+
"]["
+
PlateW
+
"x"
+
PlateH
+
"],urgentReel ["
+
urgentReel
+
"],cutReel ["
+
cutReel
+
"],smallReel ["
+
smallReel
+
"],rfid ["
+
rfid
+
"],rfidLoc ["
+
rfidLoc
+
"],singleOut["
+
singleOut
+
"]"
;
+
"],cutReel ["
+
cutReel
+
"],smallReel ["
+
smallReel
+
"],rfid ["
+
rfid
+
"],rfidLoc ["
+
rfidLoc
+
"],singleOut["
+
singleOut
+
"]"
;
}
}
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip.cs
查看文件 @
7799749
...
@@ -207,7 +207,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -207,7 +207,7 @@ namespace OnlineStore.DeviceLibrary
try
try
{
{
foreach
(
var
item
in
cloumnsSig
.
Keys
)
foreach
(
var
item
in
cloumnsSig
.
Keys
.
ToArray
()
)
{
{
bool
preState
=
cloumnsSig
[
item
];
bool
preState
=
cloumnsSig
[
item
];
bool
curState
=
IOValue
(
item
).
Equals
(
IO_VALUE
.
HIGH
);
bool
curState
=
IOValue
(
item
).
Equals
(
IO_VALUE
.
HIGH
);
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
查看文件 @
7799749
...
@@ -24,6 +24,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -24,6 +24,21 @@ namespace OnlineStore.DeviceLibrary
serverConnectTimer
.
Enabled
=
false
;
serverConnectTimer
.
Enabled
=
false
;
serverConnectTimer
.
Elapsed
+=
server_connect_timer_Tick
;
serverConnectTimer
.
Elapsed
+=
server_connect_timer_Tick
;
}
}
public
void
SendStoreState
(
string
posid
,
DeviceStatus
storeStatus
)
{
Operation
operation
=
getLineBoxStatus
();
if
(!
string
.
IsNullOrEmpty
(
posid
))
{
operation
.
boxStatus
[
1
].
data
[
ParamDefine
.
posId
]=
posid
;
}
LogUtil
.
info
(
$
"SendStoreState,posid:{posid}, storeStatus:{storeStatus}"
);
operation
.
boxStatus
[
1
].
status
=
(
int
)
storeStatus
;
LogUtil
.
info
(
JsonHelper
.
SerializeObject
(
operation
));
Operation
resultOperation
=
HttpHelper
.
PostOperation
(
SServerManager
.
GetPostApi
(
server
),
operation
);
}
internal
void
SetConnectServerTimer
(
bool
open
)
internal
void
SetConnectServerTimer
(
bool
open
)
{
{
serverConnectTimer
.
Enabled
=
open
;
serverConnectTimer
.
Enabled
=
open
;
...
@@ -284,6 +299,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -284,6 +299,11 @@ namespace OnlineStore.DeviceLibrary
//string realRfid = data.ContainsKey(ParamDefine.realRfid) ? data[ParamDefine.realRfid] : "";
//string realRfid = data.ContainsKey(ParamDefine.realRfid) ? data[ParamDefine.realRfid] : "";
//int taskCount = FormUtil.GetIntData(data, ParamDefine.taskCount, 0);
//int taskCount = FormUtil.GetIntData(data, ParamDefine.taskCount, 0);
string
hSerials
=
""
;
if
(
data
.
ContainsKey
(
ParamDefine
.
hSerial
))
hSerials
=
data
[
ParamDefine
.
hSerial
];
//urgentReel: true 表示紧急料,需要出到料串上
//urgentReel: true 表示紧急料,需要出到料串上
//cutReel: true 表示分盘料,需要出到料串上
//cutReel: true 表示分盘料,需要出到料串上
//smallReel: true 小料(7x8),放置到小料架上
//smallReel: true 小料(7x8),放置到小料架上
...
@@ -301,6 +321,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -301,6 +321,7 @@ namespace OnlineStore.DeviceLibrary
int
plateH
=
Convert
.
ToInt32
(
plateHArray
[
index
]);
int
plateH
=
Convert
.
ToInt32
(
plateHArray
[
index
]);
InOutParam
inoutParam
=
new
InOutParam
(
new
InOutPosInfo
(
barcode
,
posId
,
plateW
,
plateH
,
urgentReel
));
InOutParam
inoutParam
=
new
InOutParam
(
new
InOutPosInfo
(
barcode
,
posId
,
plateW
,
plateH
,
urgentReel
));
inoutParam
.
PosInfo
.
hSerial
=
hSerials
;
//根据发送的posId获取位置列表
//根据发送的posId获取位置列表
BoxPosition
position
=
CSVPositionReader
<
BoxPosition
>.
GetPositon
(
posId
);
BoxPosition
position
=
CSVPositionReader
<
BoxPosition
>.
GetPositon
(
posId
);
if
(
position
==
null
)
if
(
position
==
null
)
...
...
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean_Partial.cs
查看文件 @
7799749
...
@@ -707,7 +707,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -707,7 +707,13 @@ namespace OnlineStore.DeviceLibrary
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IS14_ReelOK
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IS14_ReelOK
);
WorkLog
(
$
"出库{MoveInfo.SLog} 放料完成"
);
WorkLog
(
$
"出库{MoveInfo.SLog} 放料完成"
);
CheckShelfIsFull
();
if
(
SServerManager
.
GetOutTaskCount
(
MoveInfo
.
MoveParam
.
PosInfo
.
hSerial
)
==
0
)
{
SendOutShelfLeave
(
"工单已结束:"
+
MoveInfo
.
MoveParam
.
PosInfo
.
hSerial
);
}
else
CheckShelfIsFull
();
}
}
else
else
{
{
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip.cs
查看文件 @
7799749
...
@@ -446,11 +446,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -446,11 +446,17 @@ namespace OnlineStore.DeviceLibrary
{
{
foreach
(
BatchMoveBean
moveBean
in
BatchMoveList
)
foreach
(
BatchMoveBean
moveBean
in
BatchMoveList
)
{
{
if
(
moveBean
.
ShelfReadyOut
(
posInfo
,
shelfAutoLeave
))
var
curhSerial
=
moveBean
.
MoveInfo
.
MoveParam
?.
PosInfo
?.
hSerial
;
if
(!
string
.
IsNullOrEmpty
(
curhSerial
)
&&
curhSerial
!=
posInfo
.
hSerial
)
{
LogInfo
(
$
"{posType}当前料串的 hSerial:{curhSerial},与准备出库到料串 hSerial:{posInfo.hSerial} 不符"
);
moveBean
.
ShelfNeedLeave
=
true
;
}
else
if
(
moveBean
.
ShelfReadyOut
(
posInfo
,
shelfAutoLeave
))
{
{
InOutParam
param
=
new
InOutParam
(
posInfo
.
ToCopy
());
InOutParam
param
=
new
InOutParam
(
posInfo
.
ToCopy
());
param
.
ShelfType
=
moveBean
.
ShelfType
;
param
.
ShelfType
=
moveBean
.
ShelfType
;
LogInfo
(
$
"{posType}物料{param.PosInfo.ToStr()},准备出库到料串{param.ShelfType}"
);
LogInfo
(
$
"{posType}物料{param.PosInfo.ToStr()},准备出库到料串{param.ShelfType}
,当前料串的 hSerial:{curhSerial}
"
);
StartOutstore
(
param
);
StartOutstore
(
param
);
return
true
;
return
true
;
break
;
break
;
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip_InStore.cs
查看文件 @
7799749
...
@@ -961,6 +961,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -961,6 +961,7 @@ namespace OnlineStore.DeviceLibrary
BatchMove_B
.
ReelPutOk
();
BatchMove_B
.
ReelPutOk
();
SServerManager
.
ShelfFinish
(
BatchMove_B
.
CurrShelf
.
ShelfRfid
,
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
);
SServerManager
.
ShelfFinish
(
BatchMove_B
.
CurrShelf
.
ShelfRfid
,
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
);
}
}
StoreManager
.
XLRStore
.
boxEquip
.
SendStoreState
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
,
DeviceStatus
.
OutStoreEnd
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IO32_UpdownToP1
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IO32_UpdownToP1
);
MoveLog
(
$
"出库->料串 {MoveInfo.SLog}: 升降轴到P1(待机点){Config.Updown_P1}"
);
MoveLog
(
$
"出库->料串 {MoveInfo.SLog}: 升降轴到P1(待机点){Config.Updown_P1}"
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
Updown_P1
,
Config
.
Updown_P1_Speed
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
Updown_P1
,
Config
.
Updown_P1_Speed
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论