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
8dae8a1b
Commit
8dae8a1b
authored
Jan 29, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
someupdate
parent
09f1d9db
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
2 deletions
+42
-2
AutomationLocationController.cs
.../Siger.ApiACC/Controllers/AutomationLocationController.cs
+11
-1
AutomationLocationRepository.cs
...ccRepository/Repositories/AutomationLocationRepository.cs
+29
-1
IAutomationLocationRepository.cs
...y/Repositories/Interface/IAutomationLocationRepository.cs
+2
-0
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationLocationController.cs
View file @
8dae8a1b
...
...
@@ -361,7 +361,17 @@ namespace Siger.ApiACC.Controllers
[
HttpGet
]
public
IActionResult
GetLocationList
(
string
productcode
,
int
fillsn
=
0
)
{
return
new
ObjectResult
(
_autoLocationRepository
.
GetDataList
(
ProjectId
,
fillsn
,
productcode
).
ToList
());
var
locations
=
_autoLocationRepository
.
GetFulllocation
(
ProjectId
,
fillsn
);
return
new
ObjectResult
(
locations
);
//if (fillsn == 1)
//{
// var locations = _autoLocationRepository.GetFulllocation(ProjectId,fillsn);
// return new ObjectResult(locations);
//}
//else
//{
// return new ObjectResult(_autoLocationRepository.GetDataList(ProjectId, fillsn, productcode).ToList());
//}
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationLocationRepository.cs
View file @
8dae8a1b
...
...
@@ -134,7 +134,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
producExpression
=
q
=>
q
.
productcode
==
productcode
;
}
var
expression
=
locationidExpression
.
And
(
producExpression
);
var
entities
=
query
.
Where
(
expression
)
.
GroupBy
(
g
=>
g
.
typeid
).
Select
(
f
=>
f
.
FirstOrDefault
())
;
var
entities
=
query
.
Where
(
expression
);
return
entities
;
}
...
...
@@ -210,5 +210,33 @@ namespace Siger.Middlelayer.AccRepository.Repositories
throw
;
}
}
public
IEnumerable
<
ResponseAutomationLocationList
>
GetFulllocation
(
int
projectId
,
int
full
)
{
var
query
=
from
q
in
_context
.
siger_automation_location
join
t
in
_context
.
siger_automation_fixture_tools
on
q
.
fixturetools
equals
t
.
guid
where
q
.
projectId
==
projectId
&&
!
string
.
IsNullOrEmpty
(
q
.
sn
)
select
new
ResponseAutomationLocationList
{
id
=
q
.
id
,
typeid
=
t
.
id
,
fixtureguid
=
t
.
guid
,
locationid
=
q
.
locationid
,
fixturetoolid
=
t
.
id
,
code
=
t
.
code
,
name
=
t
.
name
,
materialsn
=
q
.
sn
};
Expression
<
Func
<
ResponseAutomationLocationList
,
bool
>>
locationidExpression
=
f
=>
true
;
if
(
full
!=
0
)
{
locationidExpression
=
q
=>
!
string
.
IsNullOrEmpty
(
q
.
materialsn
);
}
else
{
locationidExpression
=
q
=>
string
.
IsNullOrEmpty
(
q
.
materialsn
);
}
return
query
.
Where
(
locationidExpression
);
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/Interface/IAutomationLocationRepository.cs
View file @
8dae8a1b
...
...
@@ -25,5 +25,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
IEnumerable
<
siger_wms_storage_location
>
GetLocationList
(
int
projectid
);
CommonImportResult
ImportData
(
IEnumerable
<
AutomationLocationTemplate
>
list
,
int
projectid
,
int
userid
);
IEnumerable
<
ResponseAutomationLocationList
>
GetFulllocation
(
int
projectId
,
int
full
);
}
}
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