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
ee0f5d9d
Commit
ee0f5d9d
authored
Jan 23, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
9d78ae09
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
15 deletions
+13
-15
AutomationLocationController.cs
.../Siger.ApiACC/Controllers/AutomationLocationController.cs
+1
-12
AutomationLocationRepository.cs
...ccRepository/Repositories/AutomationLocationRepository.cs
+12
-3
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationLocationController.cs
View file @
ee0f5d9d
...
...
@@ -38,6 +38,7 @@ namespace Siger.ApiACC.Controllers
_routeRepository
=
routeRepository
;
}
[
HttpGet
]
public
IActionResult
GetPageList
(
string
wavehouseid
,
string
locationid
,
int
page
,
int
pagesize
)
{
var
data
=
_autoLocationRepository
.
GetPagedList
(
wavehouseid
.
ToInt
(),
locationid
.
ToInt
(),
ProjectId
,
page
,
pagesize
);
...
...
@@ -61,18 +62,6 @@ namespace Siger.ApiACC.Controllers
{
item
.
materialstate
=
4
;
//无工装有工件
}
var
monitor
=
_fixtureMonitor
.
GetList
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
locationId
==
item
.
locationid
).
OrderByDescending
(
q
=>
q
.
updatetime
).
FirstOrDefault
();
if
(
monitor
!=
null
)
{
item
.
sn
=
monitor
.
sn
;
var
route
=
_routeRepository
.
Get
(
q
=>
q
.
id
==
monitor
.
route
&&
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
if
(
route
!=
null
)
{
item
.
route
=
route
.
name
;
item
.
routenumber
=
route
.
serialNumber
.
ToString
();
}
}
var
loca
=
locations
.
FirstOrDefault
(
q
=>
q
.
locationid
==
item
.
locaid
);
if
(
loca
!=
null
)
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationLocationRepository.cs
View file @
ee0f5d9d
...
...
@@ -30,6 +30,10 @@ namespace Siger.Middlelayer.AccRepository.Repositories
join
w
in
_context
.
siger_wms_storage
on
l
.
storageid
equals
w
.
id
join
u
in
_context
.
siger_project_user
on
q
.
updator
equals
u
.
mid
into
uu
from
u
in
uu
.
DefaultIfEmpty
()
join
m
in
_context
.
siger_automation_fixture_tools_moniter
on
q
.
fixturetools
equals
m
.
fixtureguid
into
mm
from
m
in
mm
.
DefaultIfEmpty
()
join
r
in
_context
.
siger_project_product_route
on
m
.
route
equals
r
.
id
into
rr
from
r
in
rr
.
DefaultIfEmpty
()
where
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
select
new
ResponseAutomationLocation
{
...
...
@@ -49,7 +53,10 @@ namespace Siger.Middlelayer.AccRepository.Repositories
remark
=
q
.
remark
,
updator
=
u
.
name
??
""
,
status
=
q
.
status
,
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
)
:
""
,
sn
=
m
.
sn
??
""
,
route
=
r
.
name
??
""
,
routenumber
=
r
==
null
?
""
:
r
.
serialNumber
.
ToString
()
};
Expression
<
Func
<
ResponseAutomationLocation
,
bool
>>
wavehouseidExpression
=
f
=>
true
;
if
(
wavehouseid
>
0
)
...
...
@@ -84,6 +91,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
join
c
in
_context
.
siger_automation_fixture_tools_category
on
t
.
category
equals
c
.
guid
join
l
in
_context
.
siger_wms_storage_location
on
q
.
locationid
equals
l
.
locationid
join
w
in
_context
.
siger_wms_storage
on
l
.
storageid
equals
w
.
id
join
m
in
_context
.
siger_automation_fixture_tools_moniter
on
q
.
fixturetools
equals
m
.
fixtureguid
into
mm
from
m
in
mm
.
DefaultIfEmpty
()
where
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
select
new
ResponseAutomationLocationList
{
...
...
@@ -97,9 +106,9 @@ namespace Siger.Middlelayer.AccRepository.Repositories
fixturetoolid
=
t
.
id
,
code
=
t
.
code
,
name
=
t
.
name
,
materialsn
=
"TestData
"
materialsn
=
m
.
sn
??
"
"
};
var
entities
=
query
.
OrderByDescending
(
q
=>
q
.
id
).
AsNoTracking
().
ToList
();
var
entities
=
query
.
AsNoTracking
().
ToList
();
return
entities
;
}
}
...
...
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