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
82ace874
Commit
82ace874
authored
Jan 22, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some update
parent
3c53163a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
0 deletions
+63
-0
AutomationLocationController.cs
.../Siger.ApiACC/Controllers/AutomationLocationController.cs
+6
-0
AutomationLocationRepository.cs
...ccRepository/Repositories/AutomationLocationRepository.cs
+27
-0
IAutomationLocationRepository.cs
...y/Repositories/Interface/IAutomationLocationRepository.cs
+3
-0
ResponseAutomationLocation.cs
...ayer.AccRepository/Response/ResponseAutomationLocation.cs
+27
-0
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationLocationController.cs
View file @
82ace874
...
@@ -218,5 +218,11 @@ namespace Siger.ApiACC.Controllers
...
@@ -218,5 +218,11 @@ namespace Siger.ApiACC.Controllers
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
}
}
[
HttpGet
]
public
IActionResult
GetLocationList
()
{
return
new
ObjectResult
(
_autoLocationRepository
.
GetDataList
(
ProjectId
).
ToList
());
}
}
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationLocationRepository.cs
View file @
82ace874
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Linq.Expressions
;
using
System.Linq.Expressions
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.EntityFrameworkCore
;
...
@@ -78,5 +79,31 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -78,5 +79,31 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{
{
return
_context
.
siger_wms_storage_location
.
FirstOrDefault
(
q
=>
q
.
locationid
==
id
&&
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
return
_context
.
siger_wms_storage_location
.
FirstOrDefault
(
q
=>
q
.
locationid
==
id
&&
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
}
}
public
IEnumerable
<
ResponseAutomationLocationList
>
GetDataList
(
int
projectid
)
{
var
query
=
from
q
in
_context
.
siger_automation_location
join
t
in
_context
.
siger_automation_fixture_tools
on
q
.
fixturetools
equals
t
.
guid
join
c
in
_context
.
siger_automation_fixture_tools_category
on
t
.
category
equals
c
.
guid
join
l
in
_context
.
siger_wms_storage_location
on
q
.
locationid
equals
l
.
locationid
join
w
in
_context
.
siger_wms_storage
on
l
.
storageid
equals
w
.
id
where
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
select
new
ResponseAutomationLocationList
{
id
=
q
.
id
,
locationid
=
l
.
id
,
location
=
l
.
realname
,
locationcode
=
l
.
serial_number
,
wavehouseid
=
w
.
id
,
wavehouse
=
w
.
name
,
wavehousecode
=
w
.
serial_number
,
fixturetoolid
=
t
.
id
,
code
=
t
.
code
,
name
=
t
.
name
,
materialsn
=
"TestData"
};
var
entities
=
query
.
OrderByDescending
(
q
=>
q
.
id
).
AsNoTracking
().
ToList
();
return
entities
;
}
}
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/Interface/IAutomationLocationRepository.cs
View file @
82ace874
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
using
Siger.Middlelayer.AccRepository.Response
;
using
Siger.Middlelayer.AccRepository.Response
;
using
Siger.Middlelayer.Repository.Data.Acc
;
using
Siger.Middlelayer.Repository.Data.Acc
;
using
Siger.Middlelayer.Repository.Paged
;
using
Siger.Middlelayer.Repository.Paged
;
using
System.Collections.Generic
;
namespace
Siger.Middlelayer.AccRepository.Repositories.Interface
namespace
Siger.Middlelayer.AccRepository.Repositories.Interface
{
{
...
@@ -11,5 +12,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
...
@@ -11,5 +12,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
siger_wms_storage_location
GetLocation
(
int
id
,
int
projectid
);
siger_wms_storage_location
GetLocation
(
int
id
,
int
projectid
);
IEnumerable
<
ResponseAutomationLocationList
>
GetDataList
(
int
projectid
);
}
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseAutomationLocation.cs
View file @
82ace874
...
@@ -53,4 +53,31 @@ namespace Siger.Middlelayer.AccRepository.Response
...
@@ -53,4 +53,31 @@ namespace Siger.Middlelayer.AccRepository.Response
public
int
status
{
get
;
set
;
}
public
int
status
{
get
;
set
;
}
}
}
public
class
ResponseAutomationLocationList
{
public
int
id
{
get
;
set
;
}
/// <summary>
/// 储位位置
/// </summary>
public
int
locationid
{
get
;
set
;
}
/// <summary>
/// 储位
/// </summary>
public
string
location
{
get
;
set
;
}
public
string
locationcode
{
get
;
set
;
}
public
int
wavehouseid
{
get
;
set
;
}
/// <summary>
/// 仓库
/// </summary>
public
string
wavehouse
{
get
;
set
;
}
public
string
wavehousecode
{
get
;
set
;
}
/// <summary>
/// 工装ID
/// </summary>
public
int
fixturetoolid
{
get
;
set
;
}
public
string
code
{
get
;
set
;
}
public
string
name
{
get
;
set
;
}
public
string
materialsn
{
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