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
103712a9
Commit
103712a9
authored
Feb 06, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixedbug
parent
af2ec884
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+21
-21
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
103712a9
...
...
@@ -452,32 +452,32 @@ namespace Siger.ApiACC.Controllers
if
(
location
!=
null
)
{
// * 更新下一个工序到储位
var
locationObj
=
_automationLocation
.
Get
(
f
=>
f
.
id
==
location
.
lid
);
if
(
locationObj
!=
null
)
{
var
doneRoute
=
_productRoute
.
Get
(
f
=>
f
.
id
==
location
.
route
);
if
(
doneRoute
==
null
)
return
;
//
var locationObj = _automationLocation.Get(f => f.id == location.lid);
//
if (locationObj != null)
//
{
//
var doneRoute = _productRoute.Get(f => f.id == location.route);
//
if (doneRoute == null)
//
return;
var
productRoutes
=
_productRoute
.
GetList
(
f
=>
f
.
projectId
==
PID
&&
f
.
productId
==
location
.
productId
&&
f
.
status
==
(
int
)
RowState
.
Valid
&&
f
.
serialNumber
>
doneRoute
.
serialNumber
);
if
(!
productRoutes
.
Any
())
{
locationObj
.
route
=
string
.
Empty
;
}
else
{
var
nextRoute
=
productRoutes
.
OrderBy
(
d
=>
d
.
serialNumber
).
FirstOrDefault
();
//
var productRoutes = _productRoute.GetList(f => f.projectId == PID && f.productId == location.productId && f.status == (int)RowState.Valid && f.serialNumber > doneRoute.serialNumber);
//
if (!productRoutes.Any())
//
{
//
locationObj.route = string.Empty;
//
}
//
else
//
{
//
var nextRoute = productRoutes.OrderBy(d => d.serialNumber).FirstOrDefault();
locationObj
.
routeid
=
nextRoute
!=
null
?
nextRoute
.
id
:
0
;
locationObj
.
route
=
nextRoute
!=
null
?
nextRoute
.
name
:
""
;
}
//工件已出立库
locationObj
.
status
=
(
int
)
LocationStatus
.
Out
;
_automationLocation
.
Update
(
locationObj
);
//
locationObj.routeid = nextRoute != null ? nextRoute.id : 0;
//
locationObj.route = nextRoute != null ? nextRoute.name : "";
//
}
//
//
工件已出立库
//
locationObj.status = (int)LocationStatus.Out;
//
_automationLocation.Update(locationObj);
CreateTask
(
location
.
section
,
TaskActionType
.
Load
,
TaskAction
.
Step_LK_JGZX
,
location
.
fixture
,
location
.
ordernumber
,
location
.
sn
,
location
.
pn
,
location
.
productId
,
location
.
productCode
,
location
.
location
,
location
.
route
);
return
;
//完成当前任务 退出
}
//
}
}
}
//优先级3:其他设备下料 (加工中心 ->清洗机)
...
...
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