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
77b1cfff
Commit
77b1cfff
authored
Jan 25, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
someupdate
parent
b0746d2a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
AutomationStateController.cs
...pis/Siger.ApiACC/Controllers/AutomationStateController.cs
+12
-0
ResponseAutomationMachineStatus.cs
...AccRepository/Response/ResponseAutomationMachineStatus.cs
+14
-0
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationStateController.cs
View file @
77b1cfff
...
...
@@ -8,6 +8,8 @@ using Siger.Middlelayer.Repository.Repositories.Interface;
using
Siger.ApiCommon.Filters
;
using
Siger.Middlelayer.AccRepository.Response
;
using
Siger.ApiCommon.Result
;
using
Siger.Middlelayer.Common
;
using
Siger.Middlelayer.Share.Enum.ModuleEnum
;
// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
namespace
Siger.ApiACC.Controllers
...
...
@@ -71,6 +73,16 @@ namespace Siger.ApiACC.Controllers
result
.
Add
(
item
);
}
var
output
=
new
ResponseMachineMonitor
{
sum
=
new
ResponseAutomationMachineStatusTotal
{
waittingTotal
=
result
.
Where
(
f
=>
f
.
status
==(
int
)
Automation
.
MachineStatus
.
Waiting
).
Count
(),
produceTotal
=
result
.
Where
(
f
=>
f
.
status
==
(
int
)
Automation
.
MachineStatus
.
Produce
).
Count
(),
complateTotal
=
result
.
Where
(
f
=>
f
.
status
==
(
int
)
Automation
.
MachineStatus
.
Complated
).
Count
(),
disableTotal
=
result
.
Where
(
f
=>
f
.
enable
==
0
).
Count
(),
},
dts
=
result
};
return
new
ObjectResult
(
result
);
}
[
HttpGet
]
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseAutomationMachineStatus.cs
View file @
77b1cfff
...
...
@@ -18,4 +18,18 @@ namespace Siger.Middlelayer.AccRepository.Response
public
int
status
{
get
;
set
;
}
public
string
lastupdate
{
get
;
set
;
}
}
public
class
ResponseAutomationMachineStatusTotal
{
public
int
waittingTotal
{
get
;
set
;
}
public
int
produceTotal
{
get
;
set
;
}
public
int
complateTotal
{
get
;
set
;
}
public
int
disableTotal
{
get
;
set
;
}
}
public
class
ResponseMachineMonitor
{
public
ResponseAutomationMachineStatusTotal
sum
{
get
;
set
;
}
public
List
<
ResponseAutomationMachineStatus
>
dts
{
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