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
16d27a70
Commit
16d27a70
authored
Jan 23, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some update
parent
429f84ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
0 deletions
+39
-0
FixtureToolsController.cs
...r/Apis/Siger.ApiACC/Controllers/FixtureToolsController.cs
+8
-0
AutomationFixtureToolsRepository.cs
...pository/Repositories/AutomationFixtureToolsRepository.cs
+28
-0
IAutomationFixtureToolsRepository.cs
...positories/Interface/IAutomationFixtureToolsRepository.cs
+3
-0
No files found.
Server/Apis/Siger.ApiACC/Controllers/FixtureToolsController.cs
View file @
16d27a70
...
...
@@ -370,5 +370,13 @@ namespace Siger.ApiACC.Controllers
}
return
resp
;
}
[
HttpGet
]
public
IActionResult
GetFixtureToolList
()
{
var
list
=
_toolsRepository
.
GetDataList
(
ProjectId
);
return
new
ObjectResult
(
list
);
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsRepository.cs
View file @
16d27a70
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq.Expressions
;
using
Microsoft.EntityFrameworkCore
;
...
...
@@ -73,5 +74,32 @@ namespace Siger.Middlelayer.AccRepository.Repositories
var
totalCount
=
query
.
Where
(
expression
).
Count
();
return
new
PagedCollectionResult
<
ResponseFixtureTools
>(
entities
,
totalCount
);
}
public
IEnumerable
<
ResponseFixtureTools
>
GetDataList
(
int
projectid
)
{
var
query
=
from
q
in
_context
.
siger_automation_fixture_tools
join
p
in
_context
.
siger_automation_fixture_tools_category
on
q
.
category
equals
p
.
guid
where
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
select
new
ResponseFixtureTools
{
id
=
q
.
id
,
name
=
q
.
name
,
guid
=
q
.
guid
,
cate_guid
=
p
.
guid
,
categoryid
=
p
.
id
,
category
=
p
.
name
,
managetype
=
q
.
managetype
,
partnumber
=
q
.
partnumber
,
specification
=
q
.
specification
,
number
=
q
.
number
,
remark
=
q
.
remark
,
code
=
q
.
code
,
status
=
q
.
status
,
updatetime
=
q
.
updatetime
.
HasValue
&&
q
.
updatetime
>
DateTime
.
MinValue
?
q
.
updatetime
.
Value
.
ToString
(
ParameterConstant
.
DateTimeFormat
)
:
""
};
var
entities
=
query
.
OrderByDescending
(
q
=>
q
.
id
).
AsNoTracking
().
ToList
();
return
entities
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/Interface/IAutomationFixtureToolsRepository.cs
View file @
16d27a70
...
...
@@ -2,6 +2,7 @@
using
Siger.Middlelayer.AccRepository.Response
;
using
Siger.Middlelayer.Repository.Data.Acc
;
using
Siger.Middlelayer.Repository.Paged
;
using
System.Collections.Generic
;
namespace
Siger.Middlelayer.AccRepository.Repositories.Interface
{
...
...
@@ -9,5 +10,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
IPagedCollectionResult
<
ResponseFixtureTools
>
GetPagedList
(
int
category
,
string
code
,
string
name
,
int
state
,
int
projectid
,
int
page
,
int
pagesize
);
IEnumerable
<
ResponseFixtureTools
>
GetDataList
(
int
projectid
);
}
}
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