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
96f66c8a
Commit
96f66c8a
authored
Jan 21, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
someupdate
parent
f45b4e53
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
44 deletions
+24
-44
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+21
-12
PositionController.cs
Server/Apis/Siger.ApiConfig/Controller/PositionController.cs
+2
-31
AccDictCost.cs
...er/Common/Siger.Middlelayer.Share/Constant/AccDictCost.cs
+1
-1
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
96f66c8a
...
@@ -39,7 +39,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -39,7 +39,7 @@ namespace Siger.ApiACC.Controllers
return
new
ObjectResult
(
1
);
return
new
ObjectResult
(
1
);
}
}
[
HttpGet
]
[
HttpGet
]
public
IActionResult
GetloadStation
(
int
line
)
public
IActionResult
GetloadStation
(
int
line
,
int
type
)
{
{
var
stationDicts
=
_sigerDict
.
GetDataByCat
(
AccDictCost
.
Automation
,
ProjectId
);
var
stationDicts
=
_sigerDict
.
GetDataByCat
(
AccDictCost
.
Automation
,
ProjectId
);
if
(!
stationDicts
.
Any
())
if
(!
stationDicts
.
Any
())
...
@@ -48,21 +48,30 @@ namespace Siger.ApiACC.Controllers
...
@@ -48,21 +48,30 @@ namespace Siger.ApiACC.Controllers
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
}
var
dictLoad
=
stationDicts
.
Where
(
s
=>
s
.
dkey
==
DictKeyValConst
.
UploadloadStation
);
var
loadStation
=
new
List
<
string
>();
if
(!
dictLoad
.
Any
())
{
Logger
.
WriteLineInfo
(
$"AutoProcess 未配置上下料工站字典"
);
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
var
loadStation
=
dictLoad
.
Select
(
s
=>
s
.
dval
).
ToList
();
var
objs
=
_sigerProjectLevelSection
.
GetAccStationByline
(
ProjectId
,
line
);
if
(
type
==
0
)
if
(!
objs
.
Any
())
{
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
var
dictLoad
=
stationDicts
.
Where
(
s
=>
s
.
dkey
==
DictKeyValConst
.
UploadloadStation
);
if
(!
dictLoad
.
Any
())
{
Logger
.
WriteLineInfo
(
$"AutoProcess 未配置上下料工站字典"
);
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
loadStation
=
dictLoad
.
Select
(
s
=>
s
.
dval
).
ToList
();
}
else
{
var
dictLoad
=
stationDicts
.
Where
(
s
=>
s
.
dkey
==
DictKeyValConst
.
CleanStation
);
if
(!
dictLoad
.
Any
())
{
Logger
.
WriteLineInfo
(
$"AutoProcess 未配置清洗工站字典"
);
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
loadStation
=
dictLoad
.
Select
(
s
=>
s
.
dval
).
ToList
();
}
}
var
data
=
new
List
<
ResponseLoadStation
>();
var
data
=
new
List
<
ResponseLoadStation
>();
foreach
(
var
station
in
loadStation
)
foreach
(
var
station
in
loadStation
)
{
{
...
...
Server/Apis/Siger.ApiConfig/Controller/PositionController.cs
View file @
96f66c8a
...
@@ -38,37 +38,7 @@ namespace Siger.ApiConfig.Controller
...
@@ -38,37 +38,7 @@ namespace Siger.ApiConfig.Controller
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
}
[
HttpGet
]
public
IActionResult
GetloadStation
(
int
line
)
{
var
stationDicts
=
_sigerDict
.
GetDataByCat
(
AccDictCost
.
Automation
,
ProjectId
);
if
(!
stationDicts
.
Any
())
{
Logger
.
WriteLineInfo
(
$"AutoProcess 未配置设备类型字典"
);
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
var
dictLoad
=
stationDicts
.
Where
(
s
=>
s
.
dkey
==
DictKeyValConst
.
UploadloadStation
);
if
(!
dictLoad
.
Any
())
{
Logger
.
WriteLineInfo
(
$"AutoProcess 未配置上下料工站字典"
);
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
var
loadStation
=
dictLoad
.
Select
(
s
=>
s
.
dval
).
ToList
();
var
objs
=
_projectLevelSection
.
GetAccStationByline
(
ProjectId
,
line
);
if
(!
objs
.
Any
())
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
var
data
=
new
List
<
ResponseLoadStation
>();
foreach
(
var
station
in
objs
)
{
}
return
new
ObjectResult
(
data
);
}
}
}
}
}
\ No newline at end of file
Server/Common/Siger.Middlelayer.Share/Constant/AccDictCost.cs
View file @
96f66c8a
...
@@ -67,7 +67,7 @@ namespace Siger.Middlelayer.Common
...
@@ -67,7 +67,7 @@ namespace Siger.Middlelayer.Common
/// <summary>
/// <summary>
/// MES 自动线类型
/// MES 自动线类型
/// </summary>
/// </summary>
public
const
string
Automation
=
"
a
utomation"
;
public
const
string
Automation
=
"
A
utomation"
;
}
}
...
...
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