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
ae802d94
Commit
ae802d94
authored
Feb 02, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixedbug
parent
4347f924
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
16 deletions
+27
-16
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+15
-12
AutomationStateController.cs
...pis/Siger.ApiACC/Controllers/AutomationStateController.cs
+5
-4
ResponseAutomationMachineStatus.cs
...AccRepository/Response/ResponseAutomationMachineStatus.cs
+7
-0
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
ae802d94
...
...
@@ -243,6 +243,7 @@ namespace Siger.ApiACC.Controllers
Logger
.
WriteLineInfo
(
$"AutoProcess 未配置设备类型字典"
);
throw
new
BadRequestException
(
AccEnum
.
AutomationDictNotfound
);
}
//更新Tasklist
PlCfeeback
(
taskObj
,
request
.
status
,
stationDicts
);
...
...
@@ -295,6 +296,7 @@ namespace Siger.ApiACC.Controllers
taskObj
.
completetime
=
DateTime
.
Now
;
_automationTaskList
.
Update
(
taskObj
);
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
taskObj
.
sectionid
);
//PLC 反馈结束.
if
(
status
==
(
int
)
TaskResultStatus
.
Complated
)
{
...
...
@@ -320,18 +322,19 @@ namespace Siger.ApiACC.Controllers
location
.
routeid
=
taskObj
.
route
;
location
.
sn
=
taskObj
.
sn
;
_automationLocation
.
Update
(
location
);
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
taskObj
.
sectionid
);
if
(
monitor
!=
null
)
{
monitor
.
section
=
0
;
_automationFixtureMonitor
.
Update
(
monitor
);
}
}
}
if
(
monitor
!=
null
)
{
monitor
.
section
=
0
;
}
}
if
(
monitor
!=
null
)
{
monitor
.
status
=
status
;
_automationFixtureMonitor
.
Update
(
monitor
);
}
}
...
...
@@ -440,7 +443,7 @@ namespace Siger.ApiACC.Controllers
}
// * 更新下一个工序到储位
var
locationObj
=
_automationLocation
.
Get
(
f
=>
f
.
location
id
==
location
.
lid
);
var
locationObj
=
_automationLocation
.
Get
(
f
=>
f
.
id
==
location
.
lid
);
if
(
locationObj
!=
null
)
{
var
doneRoute
=
_productRoute
.
Get
(
f
=>
f
.
id
==
location
.
route
);
...
...
@@ -554,7 +557,7 @@ namespace Siger.ApiACC.Controllers
Machine
=
b
.
machineID
,
Pn
=
b
.
process_number
,
ProductId
=
b
.
product_name
.
ToInt
(),
ProductName
=
b
.
product_name
,
ProductName
=
b
.
product_name
_text
,
Location
=
autoLocation
.
locationid
,
Route
=
b
.
route_number
.
ToInt
(),
RouteName
=
b
.
route_name
,
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationStateController.cs
View file @
ae802d94
...
...
@@ -58,7 +58,7 @@ namespace Siger.ApiACC.Controllers
fixtureCode
=
""
,
fixtureName
=
""
,
lastupdate
=
""
,
status
=(
int
)
Automation
.
MachineStatus
.
Waiting
,
machineStatus
=
d
.
status
,
linemode
=
d
.
linemode
};
...
...
@@ -71,6 +71,7 @@ namespace Siger.ApiACC.Controllers
item
.
fixtureCode
=
fixture
.
fixtureguid
;
item
.
fixtureName
=
fixture
.
fixturename
;
item
.
machineStatus
=
d
.
status
;
item
.
status
=
fixture
.
status
;
}
result
.
Add
(
item
);
...
...
@@ -80,9 +81,9 @@ namespace Siger.ApiACC.Controllers
{
sum
=
new
ResponseAutomationMachineStatusTotal
{
waittingTotal
=
result
.
Where
(
f
=>
f
.
status
==
(
int
)
Automation
.
MachineStatus
.
Waiting
).
Count
(),
produceTotal
=
result
.
Where
(
f
=>
f
.
s
tatus
==
(
int
)
Automation
.
MachineStatus
.
Produce
).
Count
(),
complateTotal
=
result
.
Where
(
f
=>
f
.
s
tatus
==
(
int
)
Automation
.
MachineStatus
.
Complated
).
Count
(),
waittingTotal
=
result
.
Where
(
f
=>
f
.
machineStatus
==
(
int
)
Automation
.
MachineStatus
.
Waiting
).
Count
(),
produceTotal
=
result
.
Where
(
f
=>
f
.
machineS
tatus
==
(
int
)
Automation
.
MachineStatus
.
Produce
).
Count
(),
complateTotal
=
result
.
Where
(
f
=>
f
.
machineS
tatus
==
(
int
)
Automation
.
MachineStatus
.
Complated
).
Count
(),
disableTotal
=
result
.
Where
(
f
=>
f
.
enable
==
0
).
Count
(),
},
dts
=
result
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseAutomationMachineStatus.cs
View file @
ae802d94
...
...
@@ -15,6 +15,13 @@ namespace Siger.Middlelayer.AccRepository.Response
public
int
location
{
get
;
set
;
}
public
string
sn
{
get
;
set
;
}
public
int
enable
{
get
;
set
;
}
/// <summary>
/// 设备状态
/// </summary>
public
int
machineStatus
{
get
;
set
;
}
/// <summary>
/// 任务状态
/// </summary>
public
int
status
{
get
;
set
;
}
public
string
lastupdate
{
get
;
set
;
}
public
string
linemode
{
get
;
set
;
}
...
...
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