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
cb792f31
Commit
cb792f31
authored
Feb 04, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://test.siger-data.com:9000/jiawei.su/Laisi_AutoMES2
parents
218d7fcb
21ff333f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
AutomationFixtureToolsAssemblyRepository.cs
.../Repositories/AutomationFixtureToolsAssemblyRepository.cs
+9
-0
AutomationLocationRepository.cs
...ccRepository/Repositories/AutomationLocationRepository.cs
+2
-1
No files found.
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsAssemblyRepository.cs
View file @
cb792f31
...
@@ -186,28 +186,34 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -186,28 +186,34 @@ namespace Siger.Middlelayer.AccRepository.Repositories
if
(
string
.
IsNullOrEmpty
(
item
.
ParentFixtureTool
))
if
(
string
.
IsNullOrEmpty
(
item
.
ParentFixtureTool
))
{
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
PleaseInputParentFixtureCode
}
"
);
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
PleaseInputParentFixtureCode
}
"
);
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
}
if
(
string
.
IsNullOrEmpty
(
item
.
FixtureTool
))
if
(
string
.
IsNullOrEmpty
(
item
.
FixtureTool
))
{
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
PleaseInputSonFixtureCode
}
"
);
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
PleaseInputSonFixtureCode
}
"
);
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
}
if
(
string
.
IsNullOrEmpty
(
item
.
Status
))
if
(
string
.
IsNullOrEmpty
(
item
.
Status
))
{
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
PleaseInputStatus
}
"
);
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
PleaseInputStatus
}
"
);
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
}
if
(
item
.
ParentFixtureTool
==
item
.
FixtureTool
)
if
(
item
.
ParentFixtureTool
==
item
.
FixtureTool
)
{
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
ParentSonSame
}
"
);
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
ParentSonSame
}
"
);
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
}
var
parent
=
_context
.
siger_automation_fixture_tools
.
FirstOrDefault
(
q
=>
q
.
code
==
item
.
ParentFixtureTool
&&
q
.
projectId
==
projectid
);
var
parent
=
_context
.
siger_automation_fixture_tools
.
FirstOrDefault
(
q
=>
q
.
code
==
item
.
ParentFixtureTool
&&
q
.
projectId
==
projectid
);
if
(
parent
==
null
)
if
(
parent
==
null
)
{
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
FixtureToolNotFound
}
"
);
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
FixtureToolNotFound
}
"
);
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
}
var
son
=
_context
.
siger_automation_fixture_tools
.
FirstOrDefault
(
q
=>
q
.
code
==
item
.
FixtureTool
&&
q
.
projectId
==
projectid
);
var
son
=
_context
.
siger_automation_fixture_tools
.
FirstOrDefault
(
q
=>
q
.
code
==
item
.
FixtureTool
&&
q
.
projectId
==
projectid
);
if
(
son
==
null
)
if
(
son
==
null
)
{
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
FixtureToolNotFound
}
"
);
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
FixtureToolNotFound
}
"
);
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
}
var
parentGuid
=
parent
.
guid
;
var
parentGuid
=
parent
.
guid
;
if
(
son
!=
null
&&
parent
!=
null
)
if
(
son
!=
null
&&
parent
!=
null
)
...
@@ -216,16 +222,19 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -216,16 +222,19 @@ namespace Siger.Middlelayer.AccRepository.Repositories
if
(
exsit
!=
null
)
if
(
exsit
!=
null
)
{
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
DataExist
}
"
);
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
DataExist
}
"
);
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
}
}
}
if
(
list
.
Count
(
q
=>
q
.
FixtureTool
==
item
.
FixtureTool
&&
q
.
ParentFixtureTool
==
item
.
ParentFixtureTool
)
>
1
)
if
(
list
.
Count
(
q
=>
q
.
FixtureTool
==
item
.
FixtureTool
&&
q
.
ParentFixtureTool
==
item
.
ParentFixtureTool
)
>
1
)
{
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
DataExist
}
"
);
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
DataExist
}
"
);
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
}
var
parentExsit
=
_context
.
siger_automation_fixture_tools_assembly
.
FirstOrDefault
(
q
=>
q
.
projectId
==
projectid
&&
q
.
son
==
parentGuid
);
var
parentExsit
=
_context
.
siger_automation_fixture_tools_assembly
.
FirstOrDefault
(
q
=>
q
.
projectId
==
projectid
&&
q
.
son
==
parentGuid
);
if
(
parentExsit
!=
null
&&
!
string
.
IsNullOrEmpty
(
parentExsit
.
parent
))
if
(
parentExsit
!=
null
&&
!
string
.
IsNullOrEmpty
(
parentExsit
.
parent
))
{
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
LevelCountError
}
"
);
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
LevelCountError
}
"
);
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
}
if
(
errors
.
Any
())
if
(
errors
.
Any
())
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationLocationRepository.cs
View file @
cb792f31
...
@@ -212,7 +212,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -212,7 +212,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
var
entity
=
new
siger_automation_location
var
entity
=
new
siger_automation_location
{
{
guid
=
Guid
.
NewGuid
().
ToString
(),
guid
=
Guid
.
NewGuid
().
ToString
(),
locationid
=
location
.
id
,
location_cid
=
location
.
id
,
locationid
=
location
.
locationid
,
fixturetools
=
fixturetool
.
guid
,
fixturetools
=
fixturetool
.
guid
,
attachment
=
""
,
attachment
=
""
,
filename
=
""
,
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