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
64d233a9
Commit
64d233a9
authored
Feb 06, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
f4713769
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
FixtureToolsProductController.cs
...Siger.ApiACC/Controllers/FixtureToolsProductController.cs
+8
-8
AutomationFixtureToolsProductRepository.cs
...y/Repositories/AutomationFixtureToolsProductRepository.cs
+3
-3
No files found.
Server/Apis/Siger.ApiACC/Controllers/FixtureToolsProductController.cs
View file @
64d233a9
...
...
@@ -135,12 +135,12 @@ namespace Siger.ApiACC.Controllers
{
throw
new
BadRequestException
(
RequestEnum
.
ProductNotFound
);
}
//var data = _toolsProductRepository.Get(q => q.projectId == ProjectId && q.status == (int)RowState.Valid && (q.fixturetools == fixtureTool.guid ||
// q.productid == req.productid.ToInt()
));
//
if (data != null)
//
{
//
throw new BadRequestException(RequestEnum.DataExist);
//
}
var
data
=
_toolsProductRepository
.
Get
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
fixturetools
==
fixtureTool
.
guid
&&
q
.
productid
==
req
.
productid
.
ToInt
(
));
if
(
data
!=
null
)
{
throw
new
BadRequestException
(
RequestEnum
.
DataExist
);
}
var
entity
=
new
siger_automation_fixture_tools_product
{
...
...
@@ -190,8 +190,8 @@ namespace Siger.ApiACC.Controllers
{
throw
new
BadRequestException
(
RequestEnum
.
ProductNotFound
);
}
var
data
=
_toolsProductRepository
.
Get
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
(
q
.
fixturetools
==
fixtureTool
.
guid
||
q
.
productid
==
req
.
productid
.
ToInt
()
)
&&
q
.
id
!=
req
.
id
);
var
data
=
_toolsProductRepository
.
Get
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
fixturetools
==
fixtureTool
.
guid
&&
q
.
productid
==
req
.
productid
.
ToInt
()
&&
q
.
id
!=
req
.
id
);
if
(
data
!=
null
)
{
throw
new
BadRequestException
(
RequestEnum
.
DataExist
);
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsProductRepository.cs
View file @
64d233a9
...
...
@@ -171,15 +171,15 @@ namespace Siger.Middlelayer.AccRepository.Repositories
}
if
(
fixtureTool
!=
null
&&
product
!=
null
)
{
var
data
=
_context
.
siger_automation_fixture_tools_product
.
FirstOrDefault
(
q
=>
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
(
q
.
fixturetools
==
fixtureTool
.
guid
||
q
.
productid
==
product
.
id
)
)
;
var
data
=
_context
.
siger_automation_fixture_tools_product
.
FirstOrDefault
(
q
=>
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
fixturetools
==
fixtureTool
.
guid
&&
q
.
productid
==
product
.
id
);
if
(
data
!=
null
)
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
DataExist
}
"
);
}
}
if
(
list
.
Count
(
q
=>
q
.
FixtureTool
==
item
.
FixtureTool
||
q
.
Product
==
item
.
Product
)
>
1
)
if
(
list
.
Count
(
q
=>
q
.
FixtureTool
==
item
.
FixtureTool
&&
q
.
Product
==
item
.
Product
)
>
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