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
e106c4a7
Commit
e106c4a7
authored
Jan 30, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
91fb464c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
5 deletions
+39
-5
RequestEnum.cs
Server/Common/Siger.Middlelayer.Share/Enum/RequestEnum.cs
+8
-2
FixtureTools.cs
.../Siger.Middlelayer.Utility/ImportEntities/FixtureTools.cs
+3
-0
AutomationLocationRepository.cs
...ccRepository/Repositories/AutomationLocationRepository.cs
+28
-3
No files found.
Server/Common/Siger.Middlelayer.Share/Enum/RequestEnum.cs
View file @
e106c4a7
...
...
@@ -1500,10 +1500,10 @@ namespace Siger.Middlelayer.Common
PleaseInputFixtureName
,
[
Description
(
"请填写工装料号"
)]
PleaseInput
FixtureCode
,
PleaseInput
PartNumber
,
[
Description
(
"请填写工装编号"
)]
PleaseInput
PartNumber
,
PleaseInput
FixtureCode
,
[
Description
(
"请填写规格型号"
)]
PleaseInputSpecfication
,
...
...
@@ -1538,5 +1538,11 @@ namespace Siger.Middlelayer.Common
[
Description
(
"请填写子工装编号"
)]
PleaseInputSonFixtureCode
,
[
Description
(
"请填写储位ID"
)]
PleaseInputLocationID
,
[
Description
(
"请填写仓库名称"
)]
PleaseInputWarehouseName
,
}
}
Server/Common/Siger.Middlelayer.Utility/ImportEntities/FixtureTools.cs
View file @
e106c4a7
...
...
@@ -195,6 +195,9 @@ namespace Siger.Middlelayer.Utility.ImportEntities
[
ExcelColumn
(
"*储位ID"
)]
public
string
LocationId
{
get
;
set
;
}
[
ExcelColumn
(
"*工装类型"
)]
public
string
Category
{
get
;
set
;
}
[
ExcelColumn
(
"*工装编号"
)]
public
string
FixtureTool
{
get
;
set
;
}
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationLocationRepository.cs
View file @
e106c4a7
...
...
@@ -148,31 +148,56 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{
rowIndex
++;
if
(
string
.
IsNullOrEmpty
(
item
.
LocationId
)
||
string
.
IsNullOrEmpty
(
item
.
FixtureTool
))
if
(
string
.
IsNullOrEmpty
(
item
.
Warehouse
))
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
ParameterMiss
}
"
);
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
PleaseInputWarehouseName
}
"
);
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
if
(
string
.
IsNullOrEmpty
(
item
.
LocationId
))
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
PleaseInputLocationID
}
"
);
}
if
(
item
.
LocationId
.
ToInt
()
<=
0
)
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
PleaseInputNotZeroIntID
}
"
);
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
if
(
string
.
IsNullOrEmpty
(
item
.
Category
))
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
PleaseInputFixtureCategory
}
"
);
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
if
(
string
.
IsNullOrEmpty
(
item
.
FixtureTool
))
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
PleaseInputFixtureCode
}
"
);
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
var
fixturetool
=
_context
.
siger_automation_fixture_tools
.
FirstOrDefault
(
q
=>
q
.
code
==
item
.
FixtureTool
&&
q
.
projectId
==
projectid
);
if
(
fixturetool
==
null
)
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
FixtureToolNotFound
}
"
);
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
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
}
"
);
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
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
)
if
(
location
==
null
)
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
LocationNull
}
"
);
}
if
(
fixturetool
!=
null
)
{
var
exsit
=
_context
.
siger_automation_location
.
FirstOrDefault
(
q
=>
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
(
q
.
fixturetools
==
fixturetool
.
guid
||
q
.
locationid
==
item
.
LocationId
.
ToInt
()));
if
(
exsit
!=
null
)
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
DataExist
}
"
);
}
}
if
(
list
.
Count
(
q
=>
q
.
FixtureTool
==
item
.
FixtureTool
||
q
.
LocationId
==
item
.
LocationId
)
>
1
)
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
DataExist
}
"
);
...
...
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