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
e565bb4a
Commit
e565bb4a
authored
Mar 10, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
someupdate
parent
a8725391
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
11 deletions
+25
-11
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+25
-11
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
e565bb4a
...
...
@@ -597,17 +597,7 @@ namespace Siger.ApiACC.Controllers
throw
new
BadRequestException
(
AccEnum
.
LineModeNotfound
);
}
var
machineAttr
=
_sigerProjectMachineAttribution
.
Get
(
f
=>
f
.
station
==
unloading
.
section
&&
f
.
status
==
(
int
)
RowState
.
Valid
);
if
(
machineAttr
==
null
)
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
var
machineStatus
=
_automationMachineStatus
.
Get
(
f
=>
f
.
machineid
==
machineAttr
.
machine
);
if
(
machineStatus
.
status
!=
(
int
)
Automation
.
MachineStatus
.
Waiting
)
{
throw
new
BadRequestException
(
AccEnum
.
MachineBusy
);
}
var
unixtime
=
UnixTimeHelper
.
GetNow
();
//TODO
...
...
@@ -624,16 +614,40 @@ namespace Siger.ApiACC.Controllers
var
toSection
=
upload
.
sectionid
;
if
(
lineMode
.
inspect
==
1
)
{
//下料 去抽检台
var
QcProperty
=
_sectionPropertyRepository
.
Get
(
f
=>
f
.
propertytype
==
3
);
if
(
QcProperty
==
null
)
{
throw
new
BadRequestException
(
AccEnum
.
SectionPropertyNull
);
}
toSection
=
QcProperty
.
sectionid
;
var
machineQCAttr
=
_sigerProjectMachineAttribution
.
Get
(
f
=>
f
.
station
==
toSection
&&
f
.
status
==
(
int
)
RowState
.
Valid
);
if
(
machineQCAttr
==
null
)
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
var
machineQCStatus
=
_automationMachineStatus
.
Get
(
f
=>
f
.
machineid
==
machineQCAttr
.
machine
);
if
(
machineQCStatus
.
status
!=
(
int
)
Automation
.
MachineStatus
.
Waiting
)
{
Logger
.
WriteLineError
(
$"抽检台正在生产中"
);
throw
new
BadRequestException
(
AccEnum
.
MachineBusy
);
}
}
else
// 正常下料
{
var
machineAttr
=
_sigerProjectMachineAttribution
.
Get
(
f
=>
f
.
station
==
unloading
.
section
&&
f
.
status
==
(
int
)
RowState
.
Valid
);
if
(
machineAttr
==
null
)
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
var
machineStatus
=
_automationMachineStatus
.
Get
(
f
=>
f
.
machineid
==
machineAttr
.
machine
);
if
(
machineStatus
.
status
!=
(
int
)
Automation
.
MachineStatus
.
Waiting
)
{
Logger
.
WriteLineError
(
$"上下料位正在生产中"
);
throw
new
BadRequestException
(
AccEnum
.
MachineBusy
);
}
}
var
tasklst
=
_automationTaskList
.
GetList
(
f
=>
f
.
sectionid
==
unloading
.
section
&&
f
.
action
==
action
&&
f
.
status
!=(
int
)
TaskResultStatus
.
Complated
);
if
(
tasklst
.
Any
())
...
...
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