Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO1057_XLC_Store
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 84988642
由
张东亮
编写于
2023-04-26 15:35:26 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
11
1 个父辈
3262408c
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
37 行增加
和
25 行删除
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/theMachine/InOutDevice_IN.cs
DeviceLibrary/theMachine/LabelParam.cs
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
8498864
...
@@ -89,21 +89,34 @@ namespace DeviceLibrary
...
@@ -89,21 +89,34 @@ namespace DeviceLibrary
if
(
RobotManage
.
InoutDebugMode
)
if
(
RobotManage
.
InoutDebugMode
)
return
;
return
;
lock
(
serverclock
)
if
(
Monitor
.
TryEnter
(
serverclock
,
2000
)
)
{
{
var
code
=
ProcessCode
(
codelist
,
0
,
0
);
try
Operation
operation
=
getLineBoxStatus
();
operation
.
op
=
1
;
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
code
+
spiltStr
+
weight
},
{
"boxId"
,
StoreID
.
ToString
()
},
{
"doorReelSignal"
,
"1"
}
};
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
operation
,
false
,
printlog
);
if
(
operation
.
seq
!=
resultOperation
.
seq
)
{
{
Thread
.
Sleep
(
500
);
var
code
=
ProcessCode
(
codelist
,
0
,
0
);
SendInStoreRequest
(
codelist
,
inOutDevice
,
printlog
);
while
(
true
)
return
;
{
Operation
operation
=
getLineBoxStatus
();
for
(
int
i
=
0
;
i
<
5
;
i
++)
{
operation
.
op
=
1
;
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
code
+
spiltStr
+
weight
},
{
"boxId"
,
StoreID
.
ToString
()
},
{
"doorReelSignal"
,
"1"
}
};
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
operation
,
false
,
printlog
);
if
(
operation
.
seq
!=
resultOperation
.
seq
)
{
Thread
.
Sleep
(
1000
);
continue
;
}
ResultProcess
(
resultOperation
,
inOutDevice
);
return
;
}
}
}
}
ResultProcess
(
resultOperation
,
inOutDevice
);
finally
{
Monitor
.
Exit
(
serverclock
);
}
}
}
}
}
public
void
SendStoreState
(
string
posid
,
StoreStatus
storeStatus
)
public
void
SendStoreState
(
string
posid
,
StoreStatus
storeStatus
)
...
@@ -530,7 +543,7 @@ namespace DeviceLibrary
...
@@ -530,7 +543,7 @@ namespace DeviceLibrary
HttpHelper
.
Post
<
DoorInfo
>(
GetPostApi
(
"/api/xlc/updateDoorInfo"
),
dev
.
Value
.
DoorInfo
,
false
);
HttpHelper
.
Post
<
DoorInfo
>(
GetPostApi
(
"/api/xlc/updateDoorInfo"
),
dev
.
Value
.
DoorInfo
,
false
);
}
}
}
}
private
static
string
Addr_PosForPutin
=
"/service/store/
robotBox/
emptyPosForPutin"
;
private
static
string
Addr_PosForPutin
=
"/service/store/emptyPosForPutin"
;
/// <summary>
/// <summary>
/// 获取库位号
/// 获取库位号
/// </summary>
/// </summary>
...
@@ -565,28 +578,22 @@ namespace DeviceLibrary
...
@@ -565,28 +578,22 @@ namespace DeviceLibrary
if
(
serverResult
==
null
)
if
(
serverResult
==
null
)
{
{
Thread
.
Sleep
(
500
);
GetPosId
(
codelist
,
inOutDevice
,
weight
);
return
;
return
;
}
}
else
if
(
serverResult
.
result
.
Equals
(
100
).
Equals
(
true
))
if
(
serverResult
.
result
.
Equals
(
0
))
{
{
Thread
.
Sleep
(
500
);
SendInStoreRequest
(
codelist
,
inOutDevice
,
true
,
weight
);
GetPosId
(
codelist
,
inOutDevice
,
weight
);
return
;
return
;
}
}
if
(
serverResult
.
realRfid
.
Equals
(
0
))
else
{
{
SendInStoreRequest
(
codelist
,
inOutDevice
,
true
,
weight
);
return
;
return
;
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
LogUtil
.
error
(
"GetPosId "
,
ex
);
LogUtil
.
error
(
"GetPosId "
,
ex
);
}
}
GetPosId
(
codelist
,
inOutDevice
,
weight
);
}
}
}
}
public
class
ResultData
public
class
ResultData
...
...
DeviceLibrary/theMachine/InOutDevice_IN.cs
查看文件 @
8498864
...
@@ -192,8 +192,9 @@ namespace DeviceLibrary
...
@@ -192,8 +192,9 @@ namespace DeviceLibrary
MoveInfo
.
log
(
$
"已完成扫码,并称重完成 {weight}kg,等待服务器反馈库位 Count={x.Count}"
);
MoveInfo
.
log
(
$
"已完成扫码,并称重完成 {weight}kg,等待服务器反馈库位 Count={x.Count}"
);
MoveInfo
.
MoveParam
.
IsNg
=
false
;
MoveInfo
.
MoveParam
.
IsNg
=
false
;
MoveInfo
.
MoveParam
.
codeInfos
=
x
;
MoveInfo
.
MoveParam
.
codeInfos
=
x
;
var
cc
=
x
.
Select
((
a
)
=>
a
.
CodeStr
);
MoveInfo
.
MoveParam
.
weight
=
weight
;
mainMachine
.
ServerCM
.
GetPosId
(
cc
.
ToArray
(),
this
,
weight
);
//var cc = x.Select((a) => a.CodeStr);
//mainMachine.ServerCM.GetPosId(cc.ToArray(), this,weight);
}
}
}
}
else
//超重
else
//超重
...
@@ -217,8 +218,11 @@ namespace DeviceLibrary
...
@@ -217,8 +218,11 @@ namespace DeviceLibrary
{
{
//Msg.add("等待手动选择入库库位", MsgLevel.info);
//Msg.add("等待手动选择入库库位", MsgLevel.info);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StartInStore
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StartInStore
);
return
;
}
}
else
if
(
MoveInfo
.
IsTimeOut
(
5
))
var
cc
=
MoveInfo
.
MoveParam
.
codeInfos
.
Select
((
a
)
=>
a
.
CodeStr
);
mainMachine
.
ServerCM
.
GetPosId
(
cc
.
ToArray
(),
this
,
MoveInfo
.
MoveParam
.
weight
);
if
(
MoveInfo
.
IsTimeOut
(
5
))
Msg
.
add
(
"等待服务器返回库位"
,
MsgLevel
.
info
);
Msg
.
add
(
"等待服务器返回库位"
,
MsgLevel
.
info
);
else
if
(
MoveInfo
.
IsTimeOut
(
15
))
else
if
(
MoveInfo
.
IsTimeOut
(
15
))
{
{
...
...
DeviceLibrary/theMachine/LabelParam.cs
查看文件 @
8498864
...
@@ -40,6 +40,7 @@ namespace DeviceLibrary
...
@@ -40,6 +40,7 @@ namespace DeviceLibrary
public
string
PosID
{
get
;
set
;
}
public
string
PosID
{
get
;
set
;
}
public
string
bitmapfilename
=
""
;
public
string
bitmapfilename
=
""
;
public
List
<
CodeInfo
>
codeInfos
{
get
;
set
;
}
public
List
<
CodeInfo
>
codeInfos
{
get
;
set
;
}
public
double
weight
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 料盘高度
/// 料盘高度
/// </summary>
/// </summary>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论