Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
Project
Project
Details
Activity
Releases
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
王飞
vehicle-quality-review
Commits
c75d4819
Commit
c75d4819
authored
Feb 28, 2024
by
王飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gaoying' into 'dev'
Gaoying See merge request
!104
parents
7ceda232
6cf8eb48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
SampleManagementServiceImpl.java
...a/com/ruoyi/service/impl/SampleManagementServiceImpl.java
+10
-6
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/SampleManagementServiceImpl.java
View file @
c75d4819
...
...
@@ -71,9 +71,11 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
public
int
insertSampleManagement
(
Sample
sampleManagement
)
{
// 判断车辆识别码是否重复
int
dentificationCode
=
sampleManagementMapper
.
selectIdentificationCodeCount
(
sampleManagement
);
if
(
dentificationCode
>
0
){
throw
new
ServiceException
(
"车辆识别码已存在"
);
if
(
Sample
.
SAMPLE_FLAG_CAR
.
equals
(
sampleManagement
.
getFlag
())){
int
dentificationCode
=
sampleManagementMapper
.
selectIdentificationCodeCount
(
sampleManagement
);
if
(
dentificationCode
>
0
){
throw
new
ServiceException
(
"车辆识别码已存在"
);
}
}
// 判断样品编号是否存在
int
sampleNumber
=
sampleManagementMapper
.
selectSampleNumberCount
(
sampleManagement
);
...
...
@@ -95,9 +97,11 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
public
int
updateSampleManagement
(
Sample
sampleManagement
)
{
// 判断车辆识别码是否重复
int
dentificationCode
=
sampleManagementMapper
.
selectIdentificationCodeCount
(
sampleManagement
);
if
(
dentificationCode
>
0
){
throw
new
ServiceException
(
"车辆识别码已存在"
);
if
(
Sample
.
SAMPLE_FLAG_CAR
.
equals
(
sampleManagement
.
getFlag
())){
int
dentificationCode
=
sampleManagementMapper
.
selectIdentificationCodeCount
(
sampleManagement
);
if
(
dentificationCode
>
0
){
throw
new
ServiceException
(
"车辆识别码已存在"
);
}
}
// 判断样品编号是否存在
int
sampleNumber
=
sampleManagementMapper
.
selectSampleNumberCount
(
sampleManagement
);
...
...
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