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
9d78ae09
Commit
9d78ae09
authored
Jan 23, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some update
parent
96fead29
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
FixtureToolsAssemblyController.cs
...iger.ApiACC/Controllers/FixtureToolsAssemblyController.cs
+23
-0
AutomationFixtureToolsAssemblyRepository.cs
.../Repositories/AutomationFixtureToolsAssemblyRepository.cs
+3
-1
FixtureToolsCategory.cs
...iddlelayer.AccRepository/Response/FixtureToolsCategory.cs
+5
-0
No files found.
Server/Apis/Siger.ApiACC/Controllers/FixtureToolsAssemblyController.cs
View file @
9d78ae09
...
...
@@ -37,9 +37,32 @@ namespace Siger.ApiACC.Controllers
public
IActionResult
GetPageList
(
string
category
,
string
code
,
string
name
,
int
page
,
int
pagesize
)
{
var
data
=
_toolsAssemblyRepository
.
GetPagedList
(
category
.
ToInt
(),
code
,
name
,
ProjectId
,
page
,
pagesize
);
var
categorys
=
_toolsCategoryRepository
.
GetList
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
).
ToList
();
var
list
=
new
List
<
ResponseAumationFixtureToolsAssembly
>();
foreach
(
var
item
in
data
.
Data
)
{
var
cates
=
GetParentCategoryList
(
item
.
cate_guid
,
categorys
);
var
cateIds
=
cates
.
Select
(
q
=>
q
.
id
).
ToList
();
cateIds
.
Reverse
();
item
.
categoryids
=
cateIds
;
var
parentcates
=
GetParentCategoryList
(
item
.
parentcate_guid
,
categorys
);
var
parentcateIds
=
parentcates
.
Select
(
q
=>
q
.
id
).
ToList
();
parentcateIds
.
Reverse
();
item
.
parentcategoryids
=
parentcateIds
;
list
.
Add
(
item
);
}
return
new
PagedObjectResult
(
data
.
Data
,
data
.
Total
,
page
,
pagesize
);
}
private
IEnumerable
<
siger_automation_fixture_tools_category
>
GetParentCategoryList
(
string
parentId
,
List
<
siger_automation_fixture_tools_category
>
sections
)
{
var
query
=
from
c
in
sections
where
c
.
guid
==
parentId
select
c
;
return
query
.
ToList
().
Concat
(
query
.
ToList
().
SelectMany
(
t
=>
GetParentCategoryList
(
t
.
parent
,
sections
)));
}
[
HttpGet
]
public
IActionResult
GetDetail
(
string
id
)
{
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsAssemblyRepository.cs
View file @
9d78ae09
...
...
@@ -48,7 +48,9 @@ namespace Siger.Middlelayer.AccRepository.Repositories
filename
=
q
.
filename
,
categoryid
=
c2
.
id
,
category
=
c2
.
name
,
updatetime
=
q
.
updatetime
.
HasValue
&&
q
.
updatetime
>
DateTime
.
MinValue
?
q
.
updatetime
.
Value
.
ToString
(
ParameterConstant
.
DateTimeFormat
)
:
""
updatetime
=
q
.
updatetime
.
HasValue
&&
q
.
updatetime
>
DateTime
.
MinValue
?
q
.
updatetime
.
Value
.
ToString
(
ParameterConstant
.
DateTimeFormat
)
:
""
,
cate_guid
=
t2
.
guid
,
parentcate_guid
=
t1
.
guid
};
Expression
<
Func
<
ResponseAumationFixtureToolsAssembly
,
bool
>>
categoryExpression
=
f
=>
true
;
if
(
category
>
0
)
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/FixtureToolsCategory.cs
View file @
9d78ae09
...
...
@@ -130,5 +130,10 @@ namespace Siger.Middlelayer.AccRepository.Response
public
int
status
{
get
;
set
;
}
public
string
fileurl
{
get
;
set
;
}
public
string
filename
{
get
;
set
;
}
public
string
parentcate_guid
{
get
;
set
;
}
public
List
<
int
>
parentcategoryids
{
get
;
set
;
}
=
new
List
<
int
>();
public
string
cate_guid
{
get
;
set
;
}
public
List
<
int
>
categoryids
{
get
;
set
;
}
=
new
List
<
int
>();
}
}
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