Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
Qisda-SO1037-AGVDispatch
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6df6eeae
由
张东亮
编写于
2023-05-15 09:22:59 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
一台车等电梯去充电-返回车遇移远成品-钢网接口地点优化
1 个父辈
75c914d5
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
60 行增加
和
23 行删除
Common/util/HttpHelper.cs
DeviceLibrary/bean/job/Job.cs
DeviceLibrary/bean/job/LiftToLinesJob.cs
DeviceLibrary/bean/job/LineToLiftJob.cs
DeviceLibrary/bean/job/SteelLiftToStorageJob.cs
DeviceLibrary/bean/job/SteelLineToLiftJob.cs
DeviceLibrary/bean/jobType/BackLiftToLineJobType.cs
DeviceLibrary/bean/jobType/SteelLiftToLinesJobType.cs
DeviceLibrary/lift/LiftContext.cs
DeviceLibrary/lift/LiftStatus.cs
DeviceLibrary/service/Service.cs
Common/util/HttpHelper.cs
查看文件 @
6df6eea
...
...
@@ -123,7 +123,7 @@ namespace Common
try
{
var
wc
=
new
MyWebClient
(
1
0000
);
var
wc
=
new
MyWebClient
(
3
0000
);
if
(
string
.
IsNullOrEmpty
(
wc
.
Headers
[
"Content-Type"
]))
wc
.
Headers
.
Add
(
"Content-Type"
,
"application/json;charset=UTF-8"
);
wc
.
Encoding
=
encoding
;
...
...
DeviceLibrary/bean/job/Job.cs
查看文件 @
6df6eea
...
...
@@ -5,6 +5,7 @@ using DeviceLibrary.manager;
using
DeviceLibrary.service.model
;
using
log4net.Util
;
using
System
;
using
System.Runtime.InteropServices.WindowsRuntime
;
using
System.Web.UI.WebControls.WebParts
;
using
System.Windows.Forms
;
...
...
@@ -39,7 +40,7 @@ namespace DeviceLibrary
/// <summary>
/// 等待人员操作超时时间
/// </summary>
public
int
WaitTimeOut
=
AppConfigHelper
.
GetIntValue
(
SettingString
.
WaitTimeout
,
5
);
public
int
WaitTimeOut
=
AppConfigHelper
.
GetIntValue
(
SettingString
.
WaitTimeout
,
5
);
/// <summary>
/// 根据任务状态继续执行任务
/// </summary>
...
...
@@ -384,7 +385,7 @@ namespace DeviceLibrary
{
AllocateTask
(
agv
,
$
"{SettingString.PutShelfOn}"
);
}
else
if
((
JobParam
.
GetMissionInfo
().
projectType
.
Equals
(
ProjectType
.
空台车领用
))
&&
(
JobParam
.
GetMissionInfo
().
shelfType
==
1
))
else
if
((
JobParam
.
GetMissionInfo
().
projectType
.
Equals
(
ProjectType
.
空台车领用
))
&&
(
JobParam
.
GetMissionInfo
().
shelfType
==
1
))
{
AllocateTask
(
agv
,
$
"{SettingString.PutShelfOn}{SettingString._Big}"
);
}
...
...
@@ -425,7 +426,7 @@ namespace DeviceLibrary
{
AllocateTask
(
agv
,
$
"{SettingString.PutShelfOn}{SettingString._Big}"
);
}
else
if
((
missionInfo
.
projectType
.
Equals
(
ProjectType
.
空台车领用
))
&&
(
missionInfo
.
shelfType
==
1
))
else
if
((
missionInfo
.
projectType
.
Equals
(
ProjectType
.
空台车领用
))
&&
(
missionInfo
.
shelfType
==
1
))
{
AllocateTask
(
agv
,
$
"{SettingString.PutShelfOn}{SettingString._Big}"
);
}
...
...
@@ -773,6 +774,18 @@ namespace DeviceLibrary
{
JobParam
.
CallbackJob
=
new
JobCallBack
(
type
,
callbackStep
);
}
protected
bool
HasMultiAgvs
(
AgvInfo
agv
)
{
try
{
var
agvs
=
AGVManager
.
agvInfo
.
FindAll
(
s
=>
s
.
Scope
.
Workshop
.
Equals
(
agv
.
Scope
.
Workshop
));
if
(
agvs
!=
null
&&
agvs
.
Count
>
1
)
return
true
;
}
catch
{
}
return
false
;
}
}
}
DeviceLibrary/bean/job/LiftToLinesJob.cs
查看文件 @
6df6eea
...
...
@@ -371,9 +371,26 @@ namespace DeviceLibrary
{
if
(
LiftContext
.
CheckHasEmptyFinished
(
agv
,
JobParam
.
SrcNode
.
Name
,
out
JobParam
.
LiftStatus
))
{
JobParam
.
CurTargetNode
=
JobParam
.
SrcNode
;
MissionManager
.
SetMissionOccupied
(
JobParam
.
GetMissionInfo
().
missionId
,
agv
);
job
=
new
SwitchShelfJob
(
JobParam
);
MissionInfo
missionInfo
=
MissionManager
.
GetMission
(
JobParam
.
LiftStatus
?.
missionId
??
""
);
if
(
missionInfo
!=
null
)
{
JobRunStep
.
ToNextStep
(
RunStep
.
SD_LiftToLine_23_ToShelfPlace
);
runInfo
=
$
"{JobParam.CurTargetNode.AliceName}已开门,内有成品空料车{missionInfo.missionId},去料架缓存点"
;
//
ToTakeShelfOff
(
agv
,
SettingString
.
ShelfBuff
);
JobRunStep
.
Msg
=
runInfo
;
}
else
{
JobRunStep
.
ToNextStep
(
RunStep
.
SD_LiftToLine_22_ToStandby
);
//设置电梯占用
//SetLiftOccupied(JobParam.CurTargetNode.Name, agv);
runInfo
=
$
"{JobParam.CurTargetNode.AliceName}已开门,内有成品空料车但无工单信息,去待机点,需要手动清空电梯缓存并关闭电梯门"
;
//
ToStandby
(
agv
);
JobRunStep
.
Msg
=
runInfo
;
}
//JobParam.CurTargetNode = JobParam.SrcNode;
//MissionManager.SetMissionOccupied(JobParam.GetMissionInfo().missionId, agv);
//job = new SwitchShelfJob(JobParam);
}
else
if
(
lift
.
LiftContext
.
IsDoorOpen
(
JobParam
.
SrcNode
.
Name
,
JobParam
.
GetMissionInfo
().
destinationFloor
,
agv
))
{
...
...
@@ -395,7 +412,7 @@ namespace DeviceLibrary
return
job
;
}
}
else
if
(
agv
.
Battery
>
50
&&
agv
.
IsInCharge
)
else
if
(
agv
.
Battery
>
50
&&
agv
.
IsInCharge
&&
HasMultiAgvs
(
agv
)
)
{
ChargePileManager
.
StopCharge
(
agv
);
ToStandby
(
agv
);
return
job
;
...
...
DeviceLibrary/bean/job/LineToLiftJob.cs
查看文件 @
6df6eea
...
...
@@ -224,7 +224,7 @@ namespace DeviceLibrary
return
job
;
}
}
else
if
(
agv
.
Battery
>
50
&&
agv
.
IsInCharge
)
else
if
(
agv
.
Battery
>
50
&&
agv
.
IsInCharge
&&
HasMultiAgvs
(
agv
)
)
{
ChargePileManager
.
StopCharge
(
agv
);
ToStandby
(
agv
);
return
job
;
...
...
DeviceLibrary/bean/job/SteelLiftToStorageJob.cs
查看文件 @
6df6eea
...
...
@@ -378,7 +378,7 @@ namespace DeviceLibrary.bean.job
return
job
;
}
}
else
if
(
agv
.
Battery
>
50
&&
agv
.
IsInCharge
)
else
if
(
agv
.
Battery
>
50
&&
agv
.
IsInCharge
&&
HasMultiAgvs
(
agv
)
)
{
ChargePileManager
.
StopCharge
(
agv
);
ToStandby
(
agv
);
return
job
;
...
...
DeviceLibrary/bean/job/SteelLineToLiftJob.cs
查看文件 @
6df6eea
...
...
@@ -208,7 +208,7 @@ namespace DeviceLibrary
return
job
;
}
}
else
if
(
agv
.
Battery
>
50
&&
agv
.
IsInCharge
)
else
if
(
agv
.
Battery
>
50
&&
agv
.
IsInCharge
&&
HasMultiAgvs
(
agv
)
)
{
ChargePileManager
.
StopCharge
(
agv
);
ToStandby
(
agv
);
return
job
;
...
...
DeviceLibrary/bean/jobType/BackLiftToLineJobType.cs
查看文件 @
6df6eea
...
...
@@ -22,16 +22,14 @@ namespace DeviceLibrary.bean.jobType
service
.
model
.
MissionInfo
missionInfo
=
manager
.
MissionManager
.
ShelfBackMission
(
agv
);
if
(
missionInfo
!=
null
)
{
//
if (!liftname.Equals(missionInfo?.liftName))
//
return null;
if
(
CheckHasSameJob
(
agv
,
liftn
ame
))
if
(!
liftname
.
Equals
(
missionInfo
?.
liftName
))
return
null
;
if
(
CheckHasSameJob
(
agv
,
missionInfo
.
liftN
ame
))
{
return
null
;
}
if
(
AgvAtPlace
(
agv
,
liftname
))
return
null
;
//if (service.model.MissionInfo.IsFinishedProdcut(missionInfo))
// return null;
Node
src
=
manager
.
NodeManager
.
GetNode
(
liftname
,
NodeType
.
Lift
);
string
[]
dests
=
lift
.
destinationPoint
.
Split
(
','
);
Node
dest
=
manager
.
NodeManager
.
GetNode
(
dests
.
Length
>
1
?
dests
[
0
]
:
lift
.
destinationPoint
,
NodeType
.
Node
);
...
...
DeviceLibrary/bean/jobType/SteelLiftToLinesJobType.cs
查看文件 @
6df6eea
...
...
@@ -20,6 +20,8 @@ namespace DeviceLibrary.bean.jobType
service
.
model
.
MissionInfo
missionInfo
=
manager
.
MissionManager
.
GetSteelToLinesReceiveMission
(
agv
);
if
(
missionInfo
!=
null
)
{
if
(!
liftname
.
Equals
(
missionInfo
?.
liftName
))
return
null
;
Node
src
=
manager
.
NodeManager
.
GetNode
(
liftname
,
NodeType
.
Lift
);
string
[]
dests
=
missionInfo
.
destinationPoint
.
Split
(
','
);
Node
dest
=
manager
.
NodeManager
.
GetNode
(
dests
.
Length
>
1
?
dests
[
0
]
:
lift
.
destinationPoint
,
NodeType
.
Node
);
...
...
DeviceLibrary/lift/LiftContext.cs
查看文件 @
6df6eea
...
...
@@ -485,7 +485,7 @@ namespace DeviceLibrary.lift
{
if
(
lifts
.
ContainsKey
(
liftId
))
{
return
lifts
[
liftId
].
LiftStatus
;
return
lifts
[
liftId
].
LiftStatus
.
ToCopy
()
;
}
else
return
new
LiftStatus
();
...
...
DeviceLibrary/lift/LiftStatus.cs
查看文件 @
6df6eea
using
System
;
using
Common
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
...
...
@@ -48,5 +49,11 @@ namespace DeviceLibrary.lift
/// 成品空架子标识
/// </summary>
public
bool
HasEmptyFinishedShelf
{
get
;
set
;
}
=
false
;
public
LiftStatus
ToCopy
()
{
string
str
=
JsonHelper
.
SerializeObject
(
this
);
return
JsonHelper
.
DeserializeJsonToObject
<
LiftStatus
>(
str
);
}
}
}
DeviceLibrary/service/Service.cs
查看文件 @
6df6eea
...
...
@@ -214,7 +214,7 @@ namespace DeviceLibrary
StealResult
stealResult
=
new
StealResult
();
stealResult
.
Msg
=
$
"OK,3D"
;
//Place:3D_Enter:3D的⼩车⼊库
if
(
Place
.
Equals
(
"3D_Enter
"
))
//立库出库,呼叫AGV
if
(
Place
.
ToUpper
().
Equals
(
"3D_ENTER
"
))
//立库出库,呼叫AGV
{
MissionInfo
missionInfo
=
new
MissionInfo
()
{
...
...
@@ -237,20 +237,20 @@ namespace DeviceLibrary
return
stealResult
;
}
//DI_On/DI_Off 信号亮DI_On,没信号DI_Off
if
(
Place
.
Equals
(
"DI_Off
"
))
if
(
Place
.
ToUpper
().
Equals
(
"DI_OFF
"
))
{
manager
.
DataBufferManager
.
DockingOk
=
false
;
}
else
if
(
Place
.
Equals
(
"DI_On
"
))
else
if
(
Place
.
ToUpper
().
Equals
(
"DI_ON
"
))
{
manager
.
DataBufferManager
.
DockingOk
=
true
;
}
//Leave 出料架,小车可以接料架离开
else
if
(
Place
.
Equals
(
"Leave
"
))
else
if
(
Place
.
ToUpper
().
Equals
(
"LEAVE
"
))
{
manager
.
DataBufferManager
.
LeaveLiku
=
true
;
}
else
if
(
Place
.
Equals
(
"Detach
"
))
//Detach 脱离架子
else
if
(
Place
.
ToUpper
().
Equals
(
"DETACH
"
))
//Detach 脱离架子
{
if
(!
manager
.
DataBufferManager
.
DetachShelf
)
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论