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
9f5b644a
Commit
9f5b644a
authored
Jan 22, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
fec99e86
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
2 deletions
+61
-2
AutomationLocationController.cs
.../Siger.ApiACC/Controllers/AutomationLocationController.cs
+1
-2
SectionPropertyController.cs
...pis/Siger.ApiACC/Controllers/SectionPropertyController.cs
+60
-0
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationLocationController.cs
View file @
9f5b644a
...
...
@@ -23,7 +23,6 @@ namespace Siger.ApiACC.Controllers
private
readonly
IAutomationFixtureToolsCategoryRepository
_toolsCategoryRepository
;
private
readonly
IAutomationFixtureToolsRepository
_toolsRepository
;
private
readonly
IAutomationLocationRepository
_autoLocationRepository
;
private
readonly
ISigerTrMaterialsRepository
_materialsRepository
;
public
AutomationLocationController
(
IUnitOfWork
unitOfWork
,
IAutomationFixtureToolsCategoryRepository
toolsCategoryRepository
,
IAutomationFixtureToolsRepository
toolsRepository
,
IAutomationLocationRepository
autoLocationRepository
)
...
...
@@ -90,7 +89,7 @@ namespace Siger.ApiACC.Controllers
[
HttpPost
]
public
IActionResult
Update
([
FromBody
]
RequestUpdateAutomationLocation
req
)
{
if
(
string
.
IsNullOrEmpty
(
req
.
locationid
)
||
string
.
IsNullOrEmpty
(
req
.
fixturetoolid
)
||
string
.
IsNullOrEmpty
(
req
.
materialid
)
)
if
(
string
.
IsNullOrEmpty
(
req
.
locationid
)
||
string
.
IsNullOrEmpty
(
req
.
fixturetoolid
))
{
throw
new
BadRequestException
(
RequestEnum
.
ParameterMiss
);
}
...
...
Server/Apis/Siger.ApiACC/Controllers/SectionPropertyController.cs
0 → 100644
View file @
9f5b644a
using
System
;
using
System.Collections.Generic
;
using
System.Linq.Expressions
;
using
Microsoft.AspNetCore.Mvc
;
using
Siger.ApiCommon.Result
;
using
Siger.Middlelayer.AccRepository.Entities
;
using
Siger.Middlelayer.AccRepository.Repositories.Interface
;
using
Siger.Middlelayer.AccRepository.Response
;
using
Siger.Middlelayer.AccRepository.Request
;
using
Siger.Middlelayer.Common
;
using
Siger.Middlelayer.Common.Extensions
;
using
Siger.Middlelayer.Repository.Repositories.Interface
;
using
Siger.Middlelayer.Repository
;
using
Siger.Middlelayer.Repository.Extensions
;
using
System.Linq
;
using
Siger.Middlelayer.Repository.Entities
;
namespace
Siger.ApiACC.Controllers
{
public
class
SectionPropertyController
:
BaseController
{
private
readonly
IUnitOfWork
_unitOfWork
;
private
readonly
IAutomationSectionPropertyRepository
_sectionPropertyRepository
;
private
readonly
ISigerProjectLevelSectionRepository
_levelSectionRepository
;
private
readonly
IProductionBeatSetRepository
_beatSetRepository
;
public
SectionPropertyController
(
IUnitOfWork
unitOfWork
,
IAutomationSectionPropertyRepository
sectionPropertyRepository
,
ISigerProjectLevelSectionRepository
levelSectionRepository
,
IProductionBeatSetRepository
beatSetRepository
)
{
_unitOfWork
=
unitOfWork
;
_sectionPropertyRepository
=
sectionPropertyRepository
;
_levelSectionRepository
=
levelSectionRepository
;
_beatSetRepository
=
beatSetRepository
;
}
[
HttpGet
]
public
IActionResult
GetSections
(
string
line
)
{
var
sectionIds
=
_levelSectionRepository
.
GetLevelSectionIds
(
line
.
ToInt
(),
ProjectId
);
var
sectionids
=
_sectionPropertyRepository
.
GetList
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
sectionIds
.
Contains
(
q
.
sectionid
)).
Select
(
q
=>
q
.
sectionid
).
ToList
();
var
sections
=
_levelSectionRepository
.
GetList
(
q
=>
q
.
projectid
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
sectionids
.
Contains
(
q
.
id
)).
Select
(
q
=>
new
{
q
.
id
,
q
.
title
}).
ToList
();
return
new
ObjectResult
(
sections
);
}
public
IActionResult
GetRouteByProduct
(
string
productid
)
{
var
list
=
_beatSetRepository
.
GetList
(
q
=>
q
.
projectID
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
product_name
.
ToInt
()
==
productid
.
ToInt
()).
Select
(
q
=>
new
{
q
.
id
,
q
.
route_name
,
q
.
route_number
}).
ToList
();
return
new
ObjectResult
(
list
);
}
}
}
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