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
66e4fc02
Commit
66e4fc02
authored
Jan 23, 2021
by
yiyu.li
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://test.siger-data.com:9000/jiawei.su/Laisi_AutoMES2
parents
310a784f
44a59eea
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
8 deletions
+37
-8
FixtureToolsAssemblyController.cs
...iger.ApiACC/Controllers/FixtureToolsAssemblyController.cs
+19
-2
AutomationFixtureToolsAssemblyRepository.cs
.../Repositories/AutomationFixtureToolsAssemblyRepository.cs
+10
-4
AutomationFixtureToolsRepository.cs
...pository/Repositories/AutomationFixtureToolsRepository.cs
+1
-1
IAutomationFixtureToolsAssemblyRepository.cs
...es/Interface/IAutomationFixtureToolsAssemblyRepository.cs
+1
-1
FixtureToolsCategory.cs
...iddlelayer.AccRepository/Response/FixtureToolsCategory.cs
+6
-0
No files found.
Server/Apis/Siger.ApiACC/Controllers/FixtureToolsAssemblyController.cs
View file @
66e4fc02
...
@@ -51,6 +51,23 @@ namespace Siger.ApiACC.Controllers
...
@@ -51,6 +51,23 @@ namespace Siger.ApiACC.Controllers
parentcateIds
.
Reverse
();
parentcateIds
.
Reverse
();
item
.
parentcategoryids
=
parentcateIds
;
item
.
parentcategoryids
=
parentcateIds
;
var
models
=
new
List
<
ResponseAumationFixtureToolsAssembly
>();
var
details
=
_toolsAssemblyRepository
.
GetDetailList
(
item
.
fixtureguid
,
ProjectId
);
foreach
(
var
model
in
details
)
{
var
cates1
=
GetParentCategoryList
(
model
.
cate_guid
,
categorys
);
var
cateIds1
=
cates1
.
Select
(
q
=>
q
.
id
).
ToList
();
cateIds1
.
Reverse
();
model
.
categoryids
=
cateIds1
;
var
parentcates1
=
GetParentCategoryList
(
model
.
parentcate_guid
,
categorys
);
var
parentcateIds1
=
parentcates1
.
Select
(
q
=>
q
.
id
).
ToList
();
parentcateIds1
.
Reverse
();
model
.
parentcategoryids
=
parentcateIds1
;
models
.
Add
(
model
);
}
item
.
children
=
models
;
list
.
Add
(
item
);
list
.
Add
(
item
);
}
}
return
new
PagedObjectResult
(
list
,
data
.
Total
,
page
,
pagesize
);
return
new
PagedObjectResult
(
list
,
data
.
Total
,
page
,
pagesize
);
...
@@ -64,9 +81,9 @@ namespace Siger.ApiACC.Controllers
...
@@ -64,9 +81,9 @@ namespace Siger.ApiACC.Controllers
}
}
[
HttpGet
]
[
HttpGet
]
public
IActionResult
GetDetail
(
string
id
)
public
IActionResult
GetDetail
(
string
gu
id
)
{
{
var
data
=
_toolsAssemblyRepository
.
GetDetailList
(
id
.
ToInt
()
,
ProjectId
);
var
data
=
_toolsAssemblyRepository
.
GetDetailList
(
guid
,
ProjectId
);
return
new
ObjectResult
(
data
);
return
new
ObjectResult
(
data
);
}
}
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsAssemblyRepository.cs
View file @
66e4fc02
...
@@ -51,7 +51,9 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -51,7 +51,9 @@ namespace Siger.Middlelayer.AccRepository.Repositories
category
=
c2
.
name
,
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
,
cate_guid
=
t2
.
guid
,
parentcate_guid
=
t1
.
guid
parentcate_guid
=
t1
.
guid
,
parentguid
=
q
.
parent
,
fixtureguid
=
q
.
son
};
};
Expression
<
Func
<
ResponseAumationFixtureToolsAssembly
,
bool
>>
categoryExpression
=
f
=>
true
;
Expression
<
Func
<
ResponseAumationFixtureToolsAssembly
,
bool
>>
categoryExpression
=
f
=>
true
;
if
(
category
>
0
)
if
(
category
>
0
)
...
@@ -74,7 +76,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -74,7 +76,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
return
new
PagedCollectionResult
<
ResponseAumationFixtureToolsAssembly
>(
entities
,
totalCount
);
return
new
PagedCollectionResult
<
ResponseAumationFixtureToolsAssembly
>(
entities
,
totalCount
);
}
}
public
IEnumerable
<
ResponseAumationFixtureToolsAssembly
>
GetDetailList
(
int
id
,
int
projectid
)
public
IEnumerable
<
ResponseAumationFixtureToolsAssembly
>
GetDetailList
(
string
parent
,
int
projectid
)
{
{
var
query
=
from
q
in
_context
.
siger_automation_fixture_tools_assembly
var
query
=
from
q
in
_context
.
siger_automation_fixture_tools_assembly
join
t1
in
_context
.
siger_automation_fixture_tools
on
q
.
parent
equals
t1
.
guid
into
tt1
join
t1
in
_context
.
siger_automation_fixture_tools
on
q
.
parent
equals
t1
.
guid
into
tt1
...
@@ -84,7 +86,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -84,7 +86,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
join
c2
in
_context
.
siger_automation_fixture_tools_category
on
t2
.
category
equals
c2
.
guid
join
c2
in
_context
.
siger_automation_fixture_tools_category
on
t2
.
category
equals
c2
.
guid
join
u
in
_context
.
siger_project_user
on
q
.
updator
equals
u
.
mid
into
uu
join
u
in
_context
.
siger_project_user
on
q
.
updator
equals
u
.
mid
into
uu
from
u
in
uu
.
DefaultIfEmpty
()
from
u
in
uu
.
DefaultIfEmpty
()
where
q
.
projectId
==
projectid
&&
q
.
id
==
id
where
q
.
projectId
==
projectid
&&
q
.
parent
==
parent
select
new
ResponseAumationFixtureToolsAssembly
select
new
ResponseAumationFixtureToolsAssembly
{
{
id
=
q
.
id
,
id
=
q
.
id
,
...
@@ -101,7 +103,11 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -101,7 +103,11 @@ namespace Siger.Middlelayer.AccRepository.Repositories
filename
=
q
.
filename
,
filename
=
q
.
filename
,
categoryid
=
c2
.
id
,
categoryid
=
c2
.
id
,
category
=
c2
.
name
,
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
,
parentguid
=
q
.
parent
,
fixtureguid
=
q
.
son
};
};
var
entities
=
query
.
OrderByDescending
(
q
=>
q
.
id
).
AsNoTracking
().
ToList
();
var
entities
=
query
.
OrderByDescending
(
q
=>
q
.
id
).
AsNoTracking
().
ToList
();
return
entities
;
return
entities
;
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsRepository.cs
View file @
66e4fc02
...
@@ -118,7 +118,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -118,7 +118,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
public
ResponseProductFixtureInfo
GetProductFixtureLocation
(
int
projectId
,
string
guid
)
public
ResponseProductFixtureInfo
GetProductFixtureLocation
(
int
projectId
,
string
guid
)
{
{
var
query
=
from
q
in
_context
.
siger_automation_fixture_tools
var
query
=
from
q
in
_context
.
siger_automation_fixture_tools
join
l
in
_context
.
siger_automation_location
on
q
.
guid
equals
l
.
guid
join
l
in
_context
.
siger_automation_location
on
q
.
guid
equals
l
.
fixturetools
select
new
ResponseProductFixtureInfo
select
new
ResponseProductFixtureInfo
{
{
FixtureGuid
=
q
.
guid
,
FixtureGuid
=
q
.
guid
,
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/Interface/IAutomationFixtureToolsAssemblyRepository.cs
View file @
66e4fc02
...
@@ -10,6 +10,6 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
...
@@ -10,6 +10,6 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
{
IPagedCollectionResult
<
ResponseAumationFixtureToolsAssembly
>
GetPagedList
(
int
category
,
string
code
,
string
name
,
int
projectid
,
int
page
,
int
pagesize
);
IPagedCollectionResult
<
ResponseAumationFixtureToolsAssembly
>
GetPagedList
(
int
category
,
string
code
,
string
name
,
int
projectid
,
int
page
,
int
pagesize
);
IEnumerable
<
ResponseAumationFixtureToolsAssembly
>
GetDetailList
(
int
id
,
int
projectid
);
IEnumerable
<
ResponseAumationFixtureToolsAssembly
>
GetDetailList
(
string
parent
,
int
projectid
);
}
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/FixtureToolsCategory.cs
View file @
66e4fc02
...
@@ -139,5 +139,11 @@ namespace Siger.Middlelayer.AccRepository.Response
...
@@ -139,5 +139,11 @@ namespace Siger.Middlelayer.AccRepository.Response
public
List
<
int
>
parentcategoryids
{
get
;
set
;
}
=
new
List
<
int
>();
public
List
<
int
>
parentcategoryids
{
get
;
set
;
}
=
new
List
<
int
>();
public
string
cate_guid
{
get
;
set
;
}
public
string
cate_guid
{
get
;
set
;
}
public
List
<
int
>
categoryids
{
get
;
set
;
}
=
new
List
<
int
>();
public
List
<
int
>
categoryids
{
get
;
set
;
}
=
new
List
<
int
>();
public
string
parentguid
{
get
;
set
;
}
public
string
fixtureguid
{
get
;
set
;
}
public
List
<
ResponseAumationFixtureToolsAssembly
>
children
{
get
;
set
;
}
}
}
}
}
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