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
2724e1c3
Commit
2724e1c3
authored
Jan 26, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
46a1dcee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
LocationController.cs
Server/Apis/Siger.ApiWMS/Controllers/LocationController.cs
+2
-2
FixtureTools.cs
.../Siger.Middlelayer.Utility/ImportEntities/FixtureTools.cs
+2
-0
AutomationLocationRepository.cs
...ccRepository/Repositories/AutomationLocationRepository.cs
+7
-2
No files found.
Server/Apis/Siger.ApiWMS/Controllers/LocationController.cs
View file @
2724e1c3
...
...
@@ -940,7 +940,7 @@ namespace Siger.ApiWMS.Controllers
if
(
Location
.
id
==
locationTypeId
)
{
var
locationIdExist
=
location
.
Get
(
q
=>
q
.
projectid
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
typeid
==
locationTypeId
&&
q
.
locationid
==
req
.
storeID
.
ToInt
());
q
.
locationid
==
req
.
storeID
.
ToInt
()
&&
q
.
storageid
==
req
.
warehouseid
);
if
(
locationIdExist
!=
null
)
{
throw
new
BadRequestException
(
RequestEnum
.
IDExist
);
...
...
@@ -1074,7 +1074,7 @@ namespace Siger.ApiWMS.Controllers
if
(
Location
.
id
==
locationTypeId
)
{
var
locationIdExist
=
location
.
Get
(
q
=>
q
.
projectid
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
typeid
==
locationTypeId
&&
q
.
locationid
==
req
.
storeID
.
ToInt
()
&&
q
.
id
!=
Location
.
locationid
.
ToInt
());
q
.
locationid
==
req
.
storeID
.
ToInt
()
&&
q
.
id
!=
Location
.
locationid
.
ToInt
()
&&
q
.
storageid
==
req
.
warehouseid
);
if
(
locationIdExist
!=
null
)
{
throw
new
BadRequestException
(
RequestEnum
.
IDExist
);
...
...
Server/Common/Siger.Middlelayer.Utility/ImportEntities/FixtureTools.cs
View file @
2724e1c3
...
...
@@ -190,6 +190,8 @@ namespace Siger.Middlelayer.Utility.ImportEntities
public
class
AutomationLocationTemplate
:
ImportBase
{
[
ExcelColumn
(
"*仓库名称"
)]
public
string
Warehouse
{
get
;
set
;
}
[
ExcelColumn
(
"*储位ID"
)]
public
string
LocationId
{
get
;
set
;
}
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationLocationRepository.cs
View file @
2724e1c3
...
...
@@ -142,7 +142,12 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
FixtureToolNotFound
}
"
);
}
var
location
=
_context
.
siger_wms_storage_location
.
FirstOrDefault
(
q
=>
q
.
locationid
==
item
.
LocationId
.
ToInt
()
&&
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
var
warehouse
=
_context
.
siger_wms_storage
.
FirstOrDefault
(
q
=>
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
projectId
==
projectid
&&
q
.
name
==
item
.
Warehouse
);
if
(
warehouse
==
null
)
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
WaveHouseIDNotExist
}
"
);
}
var
location
=
_context
.
siger_wms_storage_location
.
FirstOrDefault
(
q
=>
q
.
locationid
==
item
.
LocationId
.
ToInt
()
&&
q
.
storageid
==
warehouse
.
id
&&
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
if
(
location
==
null
||
item
.
LocationId
.
ToInt
()
<=
0
)
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
LocationNull
}
"
);
...
...
@@ -166,7 +171,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
var
entity
=
new
siger_automation_location
{
guid
=
Guid
.
NewGuid
().
ToString
(),
locationid
=
item
.
LocationId
.
ToInt
()
,
locationid
=
location
.
id
,
fixturetools
=
fixturetool
.
guid
,
attachment
=
""
,
filename
=
""
,
...
...
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