Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
Laisi_AutoMES2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiawei.su
Laisi_AutoMES2
Commits
3a6bfe74
Commit
3a6bfe74
authored
Feb 06, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixedbug
parent
103712a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+17
-3
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
3a6bfe74
...
...
@@ -241,7 +241,7 @@ namespace Siger.ApiACC.Controllers
//2.更新状态
taskObj
.
status
=
status
;
taskObj
.
completetime
=
DateTime
.
Now
;
_automationTaskList
.
Update
(
taskObj
);
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
taskObj
.
sectionid
);
var
sectionProperty
=
_automationSectionProperty
.
Get
(
f
=>
f
.
sectionid
==
taskObj
.
sectionid
);
...
...
@@ -300,6 +300,14 @@ namespace Siger.ApiACC.Controllers
location
.
route
=
route
.
id
.
ToString
();
location
.
status
=
(
int
)
LocationStatus
.
Out
;
_automationLocation
.
Update
(
location
);
//加工中心做完 下一站清洗机
var
cleanMachine
=
_automationSectionProperty
.
Get
(
f
=>
f
.
propertytype
==
4
);
if
(
cleanMachine
!=
null
)
{
taskObj
.
extend1
=
cleanMachine
.
sectionid
.
ToString
();
}
}
}
//抽检台
...
...
@@ -375,6 +383,8 @@ namespace Siger.ApiACC.Controllers
monitor
.
updatetime
=
DateTime
.
Now
;
_automationFixtureMonitor
.
Update
(
monitor
);
}
_automationTaskList
.
Update
(
taskObj
);
}
}
...
...
@@ -436,9 +446,13 @@ namespace Siger.ApiACC.Controllers
if
(
cleanMachine
.
status
==
(
int
)
Automation
.
MachineStatus
.
Complated
)
{
Logger
.
WriteLineError
(
$"AutoProcess 有清洗机
{
cleanMachine
.
section
}
完成,创建清洗机Task"
);
if
(
tasklist
!=
null
)
//取最近完成的 Task
var
lastTask
=
_automationTaskList
.
GetList
(
f
=>
f
.
extend1
==
cleanMachine
.
section
.
ToString
(),
"id"
,
true
).
FirstOrDefault
();
if
(
lastTask
!=
null
)
{
CreateTask
(
cleanMachine
.
section
,
TaskActionType
.
Unload
,
TaskAction
.
Step_QXJ_LK
,
tasklist
.
fixtureguid
,
tasklist
.
ordercode
,
tasklist
.
sn
,
"无程序"
,
tasklist
.
productid
,
tasklist
.
productcode
,
tasklist
.
locationid
,
tasklist
.
route
);
lastTask
.
extend1
=
string
.
Empty
;
_automationTaskList
.
Update
(
lastTask
)
;
CreateTask
(
cleanMachine
.
section
,
TaskActionType
.
Unload
,
TaskAction
.
Step_QXJ_LK
,
lastTask
.
fixtureguid
,
lastTask
.
ordercode
,
lastTask
.
sn
,
"无程序"
,
lastTask
.
productid
,
lastTask
.
productcode
,
lastTask
.
locationid
,
lastTask
.
route
);
return
;
//完成当前任务 退出
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment