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
46186344
Commit
46186344
authored
Jan 23, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
7a85a3ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
2 deletions
+24
-2
FixtureToolsProductController.cs
...Siger.ApiACC/Controllers/FixtureToolsProductController.cs
+18
-1
AutomationFixtureToolsProductRepository.cs
...y/Repositories/AutomationFixtureToolsProductRepository.cs
+2
-1
FixtureToolsCategory.cs
...iddlelayer.AccRepository/Response/FixtureToolsCategory.cs
+4
-0
No files found.
Server/Apis/Siger.ApiACC/Controllers/FixtureToolsProductController.cs
View file @
46186344
...
...
@@ -39,7 +39,24 @@ namespace Siger.ApiACC.Controllers
public
IActionResult
GetPageList
(
string
category
,
string
tool
,
string
product
,
int
page
,
int
pagesize
)
{
var
data
=
_toolsProductRepository
.
GetPagedList
(
category
.
ToInt
(),
tool
.
ToInt
(),
product
.
ToInt
(),
ProjectId
,
page
,
pagesize
);
return
new
PagedObjectResult
(
data
.
Data
,
data
.
Total
,
page
,
pagesize
);
var
categorys
=
_toolsCategoryRepository
.
GetList
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
).
ToList
();
var
list
=
new
List
<
ResponseAumationFixtureToolsProduct
>();
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
;
list
.
Add
(
item
);
}
return
new
PagedObjectResult
(
list
,
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
)));
}
[
HttpPost
]
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsProductRepository.cs
View file @
46186344
...
...
@@ -61,7 +61,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
filename
=
q
.
filename
,
partnumber
=
t
.
partnumber
,
specfication
=
t
.
specification
,
productcode
=
p
.
code
productcode
=
p
.
code
,
cate_guid
=
c
.
guid
??
""
};
Expression
<
Func
<
ResponseAumationFixtureToolsProduct
,
bool
>>
categoryExpression
=
f
=>
true
;
if
(
category
>
0
)
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/FixtureToolsCategory.cs
View file @
46186344
...
...
@@ -111,6 +111,10 @@ namespace Siger.Middlelayer.AccRepository.Response
public
string
updatetime
{
get
;
set
;
}
public
string
fileurl
{
get
;
set
;
}
public
string
filename
{
get
;
set
;
}
public
string
cate_guid
{
get
;
set
;
}
public
List
<
int
>
categoryids
{
get
;
set
;
}
=
new
List
<
int
>();
}
public
class
ResponseAumationFixtureToolsAssembly
...
...
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