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
6265e4e7
Commit
6265e4e7
authored
Jan 23, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
99b73ad8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
5 deletions
+23
-5
AutomationLocationController.cs
.../Siger.ApiACC/Controllers/AutomationLocationController.cs
+18
-3
FixtureToolsAssemblyController.cs
...iger.ApiACC/Controllers/FixtureToolsAssemblyController.cs
+1
-1
AutomationLocationRepository.cs
...ccRepository/Repositories/AutomationLocationRepository.cs
+2
-1
ResponseAutomationLocation.cs
...ayer.AccRepository/Response/ResponseAutomationLocation.cs
+2
-0
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationLocationController.cs
View file @
6265e4e7
...
...
@@ -44,7 +44,8 @@ namespace Siger.ApiACC.Controllers
var
data
=
_autoLocationRepository
.
GetPagedList
(
wavehouseid
.
ToInt
(),
locationid
.
ToInt
(),
ProjectId
,
page
,
pagesize
);
var
list
=
new
List
<
ResponseAutomationLocation
>();
var
locations
=
_autoLocationRepository
.
GetLocationList
(
ProjectId
);
foreach
(
var
item
in
data
.
Data
)
var
categorys
=
_toolsCategoryRepository
.
GetList
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
).
ToList
();
foreach
(
var
item
in
data
.
Data
)
{
if
(
item
.
fixturetoolid
>
0
&&
string
.
IsNullOrEmpty
(
item
.
sn
))
{
...
...
@@ -70,9 +71,23 @@ namespace Siger.ApiACC.Controllers
var
locationIds
=
locas
.
Select
(
q
=>
q
.
id
).
ToList
();
locationIds
.
Distinct
().
Reverse
();
item
.
locationIds
=
locationIds
;
}
}
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
(
data
.
Data
,
data
.
Total
,
page
,
pagesize
);
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
)));
}
private
IEnumerable
<
siger_wms_storage_location
>
GetParentLocations
(
int
pid
,
IEnumerable
<
siger_wms_storage_location
>
types
)
...
...
Server/Apis/Siger.ApiACC/Controllers/FixtureToolsAssemblyController.cs
View file @
6265e4e7
...
...
@@ -53,7 +53,7 @@ namespace Siger.ApiACC.Controllers
list
.
Add
(
item
);
}
return
new
PagedObjectResult
(
data
.
Data
,
data
.
Total
,
page
,
pagesize
);
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
)
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationLocationRepository.cs
View file @
6265e4e7
...
...
@@ -56,7 +56,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
updatetime
=
q
.
updatetime
.
HasValue
&&
q
.
updatetime
>
DateTime
.
MinValue
?
q
.
updatetime
.
Value
.
ToString
(
ParameterConstant
.
DateTimeFormat
)
:
""
,
sn
=
m
.
sn
??
""
,
route
=
r
.
name
??
""
,
routenumber
=
r
==
null
?
""
:
r
.
serialNumber
.
ToString
()
routenumber
=
r
==
null
?
""
:
r
.
serialNumber
.
ToString
(),
cate_guid
=
c
.
guid
??
""
};
Expression
<
Func
<
ResponseAutomationLocation
,
bool
>>
wavehouseidExpression
=
f
=>
true
;
if
(
wavehouseid
>
0
)
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseAutomationLocation.cs
View file @
6265e4e7
...
...
@@ -50,6 +50,8 @@ namespace Siger.Middlelayer.AccRepository.Response
public
int
status
{
get
;
set
;
}
public
List
<
int
>
locationIds
{
get
;
set
;
}
=
new
List
<
int
>();
public
List
<
int
>
categoryIds
{
get
;
set
;
}
=
new
List
<
int
>();
public
string
cate_guid
{
get
;
set
;
}
}
public
class
ResponseAutomationLocationList
...
...
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