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
1073396e
Commit
1073396e
authored
Jan 20, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
c5c2e4f3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
LocationController.cs
Server/Apis/Siger.ApiWMS/Controllers/LocationController.cs
+20
-7
No files found.
Server/Apis/Siger.ApiWMS/Controllers/LocationController.cs
View file @
1073396e
...
@@ -349,9 +349,11 @@ namespace Siger.ApiWMS.Controllers
...
@@ -349,9 +349,11 @@ namespace Siger.ApiWMS.Controllers
private
List
<
ResponseLocationList
>
SearchLocation
(
int
page
,
int
pageSize
,
out
int
totalCount
,
bool
paged
=
true
,
int
id
=
0
,
int
isWavehouse
=
0
)
private
List
<
ResponseLocationList
>
SearchLocation
(
int
page
,
int
pageSize
,
out
int
totalCount
,
bool
paged
=
true
,
int
id
=
0
,
int
isWavehouse
=
0
)
{
{
var
locationData
=
new
List
<
siger_wms_storage_location
>();
var
locationData
=
new
List
<
siger_wms_storage_location
>();
var
parentid
=
locationtype
.
GetList
(
f
=>
f
.
status
==
(
int
)
RowState
.
Valid
&&
f
.
projectid
==
ProjectId
).
Select
(
f
=>
f
.
parentid
).
ToList
();
var
locationType
=
locationtype
.
GetList
(
f
=>
f
.
status
==
(
int
)
RowState
.
Valid
&&
f
.
projectid
==
ProjectId
).
ToList
();
var
parentid
=
locationType
.
Select
(
f
=>
f
.
parentid
).
ToList
();
var
typeids
=
locationtype
.
GetList
(
f
=>
f
.
status
==
(
int
)
RowState
.
Valid
&&
!
parentid
.
Contains
(
f
.
id
)
&&
f
.
projectid
==
ProjectId
).
Select
(
f
=>
f
.
id
).
ToList
();
var
typeids
=
locationtype
.
GetList
(
f
=>
f
.
status
==
(
int
)
RowState
.
Valid
&&
!
parentid
.
Contains
(
f
.
id
)
&&
f
.
projectid
==
ProjectId
).
Select
(
f
=>
f
.
id
).
ToList
();
var
sonLocationTyps
=
GetSonTypes
(
0
,
locationType
);
var
LastTypeId
=
sonLocationTyps
.
Any
()
?
sonLocationTyps
.
LastOrDefault
()?.
id
??
0
:
0
;
var
locationAllData
=
location
.
GetList
(
f
=>
f
.
status
==
(
int
)
RowState
.
Valid
&&
f
.
projectid
==
ProjectId
);
var
locationAllData
=
location
.
GetList
(
f
=>
f
.
status
==
(
int
)
RowState
.
Valid
&&
f
.
projectid
==
ProjectId
);
...
@@ -416,18 +418,29 @@ namespace Siger.ApiWMS.Controllers
...
@@ -416,18 +418,29 @@ namespace Siger.ApiWMS.Controllers
storageName
=
waveHouseDic
[
item
.
storageid
],
storageName
=
waveHouseDic
[
item
.
storageid
],
serialNumber
=
item
.
serial_number
,
serialNumber
=
item
.
serial_number
,
state
=
item
.
status
,
state
=
item
.
status
,
field
=
new
List
<
string
>(),
field
=
new
List
<
FiledName
>(),
storeID
=
item
.
locationid
};
};
int
i
=
1
;
int
i
=
1
;
tmp
.
field
.
Insert
(
0
,
item
.
realname
);
tmp
.
field
.
Add
(
new
FiledName
{
id
=
item
.
id
,
name
=
item
.
realname
});
while
(
pid
!=
0
)
while
(
pid
!=
0
)
{
{
var
entity
=
location
.
Get
(
pid
);
var
entity
=
location
.
Get
(
pid
);
if
(
entity
==
null
)
if
(
entity
==
null
)
break
;
break
;
if
(
entity
.
typeid
==
LastTypeId
)
{
tmp
.
storeID
=
entity
.
locationid
;
//赋值前端填写的储位ID
}
//处理顺序问题
//处理顺序问题
tmp
.
field
.
Insert
(
0
,
entity
.
realname
);
tmp
.
field
.
Add
(
new
FiledName
{
id
=
entity
.
id
,
name
=
entity
.
realname
});
pid
=
entity
.
parentid
;
pid
=
entity
.
parentid
;
//避免因为数据异常导致死循环
//避免因为数据异常导致死循环
...
@@ -671,7 +684,7 @@ namespace Siger.ApiWMS.Controllers
...
@@ -671,7 +684,7 @@ namespace Siger.ApiWMS.Controllers
var
tmp
=
new
List
<
string
>();
var
tmp
=
new
List
<
string
>();
tmp
.
Add
(
id
++.
ToString
());
tmp
.
Add
(
id
++.
ToString
());
tmp
.
Add
(
item
.
storageName
);
tmp
.
Add
(
item
.
storageName
);
tmp
.
AddRange
(
item
.
field
);
tmp
.
AddRange
(
item
.
field
.
Select
(
q
=>
q
.
name
)
);
tmp
.
Add
(
item
.
state
==
(
int
)
RowState
.
Valid
?
"否"
:
"是"
);
tmp
.
Add
(
item
.
state
==
(
int
)
RowState
.
Valid
?
"否"
:
"是"
);
tmp
.
Add
(
item
.
serialNumber
);
tmp
.
Add
(
item
.
serialNumber
);
excelData
.
Add
(
tmp
);
excelData
.
Add
(
tmp
);
...
...
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