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
7b8adb92
Commit
7b8adb92
authored
Jan 28, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
someupdate
parent
b9dcda6c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
+18
-3
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+6
-2
AutoMES.cs
Server/Apis/Siger.ApiACC/Tasks/AutoMES.cs
+7
-1
DBhelper.cs
Server/Apis/Siger.ApiACC/Tasks/DBhelper.cs
+5
-0
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
7b8adb92
...
@@ -193,7 +193,11 @@ namespace Siger.ApiACC.Controllers
...
@@ -193,7 +193,11 @@ namespace Siger.ApiACC.Controllers
{
{
throw
new
BadRequestException
(
AccEnum
.
LineIsAutoMode
);
throw
new
BadRequestException
(
AccEnum
.
LineIsAutoMode
);
}
}
var
attr
=
_sigerProjectMachineAttribution
.
Get
(
f
=>
f
.
station
==
taskobj
.
sectionid
&&
f
.
status
==
1
);
if
(
attr
==
null
)
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
var
host
=
GetHost
();
var
host
=
GetHost
();
if
(
string
.
IsNullOrEmpty
(
host
))
if
(
string
.
IsNullOrEmpty
(
host
))
{
{
...
@@ -202,7 +206,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -202,7 +206,7 @@ namespace Siger.ApiACC.Controllers
var
sendToPLC
=
new
RequestPLC
var
sendToPLC
=
new
RequestPLC
{
{
LineID
=
levelsection
.
parentid
,
LineID
=
levelsection
.
parentid
,
RStation
=
taskobj
.
sectionid
,
RStation
=
attr
.
machine
,
Fixture
=
taskobj
.
fixtureguid
,
Fixture
=
taskobj
.
fixtureguid
,
RequestForm
=
taskobj
.
no
,
RequestForm
=
taskobj
.
no
,
RobotStep
=
(
int
)
taskobj
.
action
,
RobotStep
=
(
int
)
taskobj
.
action
,
...
...
Server/Apis/Siger.ApiACC/Tasks/AutoMES.cs
View file @
7b8adb92
...
@@ -38,10 +38,16 @@ namespace Siger.ApiACC.Tasks
...
@@ -38,10 +38,16 @@ namespace Siger.ApiACC.Tasks
var
tasks
=
tasklist
.
OrderBy
(
s
=>
s
.
actiontype
);
var
tasks
=
tasklist
.
OrderBy
(
s
=>
s
.
actiontype
);
var
task
=
tasks
.
FirstOrDefault
();
var
task
=
tasks
.
FirstOrDefault
();
var
levelsction
=
dbhelper
.
GetLevelsection
(
task
.
sectionid
);
var
levelsction
=
dbhelper
.
GetLevelsection
(
task
.
sectionid
);
if
(
levelsction
==
null
)
return
;
var
attr
=
dbhelper
.
GetAttribution
(
task
.
sectionid
);
if
(
attr
==
null
)
return
;
var
sendToPLC
=
new
RequestPLC
var
sendToPLC
=
new
RequestPLC
{
{
LineID
=
levelsction
.
parentid
,
LineID
=
levelsction
.
parentid
,
RStation
=
task
.
sectionid
,
RStation
=
attr
.
machine
,
Fixture
=
task
.
fixtureguid
,
Fixture
=
task
.
fixtureguid
,
RequestForm
=
task
.
no
,
RequestForm
=
task
.
no
,
RobotStep
=
(
int
)
task
.
action
,
RobotStep
=
(
int
)
task
.
action
,
...
...
Server/Apis/Siger.ApiACC/Tasks/DBhelper.cs
View file @
7b8adb92
...
@@ -57,6 +57,11 @@ namespace Siger.ApiACC.Tasks
...
@@ -57,6 +57,11 @@ namespace Siger.ApiACC.Tasks
{
{
return
AccDbContext
.
siger_project_level_section
.
FirstOrDefault
(
f
=>
f
.
id
==
id
);
return
AccDbContext
.
siger_project_level_section
.
FirstOrDefault
(
f
=>
f
.
id
==
id
);
}
}
public
siger_project_machine_attribution
GetAttribution
(
int
section
)
{
return
AccDbContext
.
siger_project_machine_attribution
.
FirstOrDefault
(
f
=>
f
.
station
==
section
&&
f
.
status
==
1
);
}
public
void
Dispose
()
public
void
Dispose
()
{
{
CncDbContext
?.
Dispose
();
CncDbContext
?.
Dispose
();
...
...
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