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
43f95b8e
Commit
43f95b8e
authored
Jan 25, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
7ca6b796
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
FixtureToolsAssemblyController.cs
...iger.ApiACC/Controllers/FixtureToolsAssemblyController.cs
+2
-2
FixtureToolsController.cs
...r/Apis/Siger.ApiACC/Controllers/FixtureToolsController.cs
+6
-2
No files found.
Server/Apis/Siger.ApiACC/Controllers/FixtureToolsAssemblyController.cs
View file @
43f95b8e
...
...
@@ -116,7 +116,7 @@ namespace Siger.ApiACC.Controllers
throw
new
BadRequestException
(
RequestEnum
.
DataExist
);
}
var
parentExsit
=
_toolsAssemblyRepository
.
Get
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
son
==
parentGuid
);
if
(
parentExsit
!=
null
)
if
(
parentExsit
!=
null
&&
!
string
.
IsNullOrEmpty
(
parentExsit
.
parent
)
)
{
throw
new
BadRequestException
(
RequestEnum
.
LevelCountError
);
}
...
...
@@ -201,7 +201,7 @@ namespace Siger.ApiACC.Controllers
throw
new
BadRequestException
(
RequestEnum
.
DataExist
);
}
var
parentExsit
=
_toolsAssemblyRepository
.
Get
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
son
==
parentGuid
);
if
(
parentExsit
!=
null
)
if
(
parentExsit
!=
null
&&
!
string
.
IsNullOrEmpty
(
parentExsit
.
parent
)
)
{
throw
new
BadRequestException
(
RequestEnum
.
LevelCountError
);
}
...
...
Server/Apis/Siger.ApiACC/Controllers/FixtureToolsController.cs
View file @
43f95b8e
...
...
@@ -320,7 +320,7 @@ namespace Siger.ApiACC.Controllers
var
exsit
=
_toolsCategoryRepository
.
Get
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
id
==
req
.
parentid
.
ToInt
());
if
(
exsit
==
null
)
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
throw
new
BadRequestException
(
RequestEnum
.
ParentTypeError
);
}
else
{
...
...
@@ -352,6 +352,10 @@ namespace Siger.ApiACC.Controllers
public
IActionResult
UpdateCategory
([
FromBody
]
RequestUpdateFixtureToolsCategory
req
)
{
var
entity
=
_toolsCategoryRepository
.
Get
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
id
==
req
.
id
);
if
(
entity
==
null
)
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
var
data
=
_toolsCategoryRepository
.
Get
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
name
==
req
.
name
&&
q
.
id
!=
req
.
id
);
if
(
data
!=
null
)
...
...
@@ -364,7 +368,7 @@ namespace Siger.ApiACC.Controllers
var
exsit
=
_toolsCategoryRepository
.
Get
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
id
==
req
.
parentid
.
ToInt
());
if
(
exsit
==
null
)
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
throw
new
BadRequestException
(
RequestEnum
.
ParentTypeError
);
}
else
{
...
...
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