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
a24b590c
Commit
a24b590c
authored
Jan 21, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
f1be7fa1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
FixtureToolsController.cs
...r/Apis/Siger.ApiACC/Controllers/FixtureToolsController.cs
+18
-1
AutomationFixtureToolsRepository.cs
...pository/Repositories/AutomationFixtureToolsRepository.cs
+1
-0
FixtureToolsCategory.cs
...iddlelayer.AccRepository/Response/FixtureToolsCategory.cs
+3
-0
No files found.
Server/Apis/Siger.ApiACC/Controllers/FixtureToolsController.cs
View file @
a24b590c
...
@@ -34,7 +34,24 @@ namespace Siger.ApiACC.Controllers
...
@@ -34,7 +34,24 @@ namespace Siger.ApiACC.Controllers
public
IActionResult
GetPageList
(
string
category
,
string
code
,
string
name
,
string
state
,
int
page
,
int
pagesize
)
public
IActionResult
GetPageList
(
string
category
,
string
code
,
string
name
,
string
state
,
int
page
,
int
pagesize
)
{
{
var
data
=
_toolsRepository
.
GetPagedList
(
category
.
ToInt
(),
code
,
name
,
string
.
IsNullOrEmpty
(
state
)
?
-
1
:
state
.
ToInt
(),
ProjectId
,
page
,
pagesize
);
var
data
=
_toolsRepository
.
GetPagedList
(
category
.
ToInt
(),
code
,
name
,
string
.
IsNullOrEmpty
(
state
)
?
-
1
:
state
.
ToInt
(),
ProjectId
,
page
,
pagesize
);
return
new
PagedObjectResult
(
data
.
Data
,
data
.
Total
,
page
,
pagesize
);
var
list
=
new
List
<
ResponseFixtureTools
>();
var
categorys
=
_toolsCategoryRepository
.
GetList
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
).
ToList
();
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
]
[
HttpPost
]
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsRepository.cs
View file @
a24b590c
...
@@ -33,6 +33,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -33,6 +33,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
id
=
q
.
id
,
id
=
q
.
id
,
name
=
q
.
name
,
name
=
q
.
name
,
guid
=
q
.
guid
,
guid
=
q
.
guid
,
cate_guid
=
p
.
guid
,
categoryid
=
p
.
id
,
categoryid
=
p
.
id
,
category
=
p
.
name
,
category
=
p
.
name
,
managetype
=
q
.
managetype
,
managetype
=
q
.
managetype
,
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/FixtureToolsCategory.cs
View file @
a24b590c
...
@@ -30,6 +30,7 @@ namespace Siger.Middlelayer.AccRepository.Response
...
@@ -30,6 +30,7 @@ namespace Siger.Middlelayer.AccRepository.Response
{
{
public
int
id
{
get
;
set
;
}
public
int
id
{
get
;
set
;
}
public
string
guid
{
get
;
set
;
}
public
string
guid
{
get
;
set
;
}
public
string
cate_guid
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 工装类别ID
/// 工装类别ID
/// </summary>
/// </summary>
...
@@ -77,6 +78,8 @@ namespace Siger.Middlelayer.AccRepository.Response
...
@@ -77,6 +78,8 @@ namespace Siger.Middlelayer.AccRepository.Response
public
int
status
{
get
;
set
;
}
public
int
status
{
get
;
set
;
}
public
string
updatetime
{
get
;
set
;
}
public
string
updatetime
{
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