Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
198ab1a8
Commit
198ab1a8
authored
Apr 17, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):车用气瓶发动机号唯一性校验
parent
b138accd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
5 deletions
+14
-5
JgVehicleInformationDto.java
.../amos/boot/module/jg/api/dto/JgVehicleInformationDto.java
+1
-1
JgVehicleInformation.java
.../amos/boot/module/jg/api/entity/JgVehicleInformation.java
+1
-1
JgVehicleInformationVo.java
...in/amos/boot/module/jg/api/vo/JgVehicleInformationVo.java
+1
-1
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+11
-2
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgVehicleInformationDto.java
View file @
198ab1a8
...
@@ -148,7 +148,7 @@ public class JgVehicleInformationDto extends BaseDto {
...
@@ -148,7 +148,7 @@ public class JgVehicleInformationDto extends BaseDto {
@ApiModelProperty
(
value
=
"号牌号码"
)
@ApiModelProperty
(
value
=
"号牌号码"
)
private
String
carNumber
;
private
String
carNumber
;
@ApiModelProperty
(
value
=
"
识别代
码"
)
@ApiModelProperty
(
value
=
"
车架号
码"
)
private
String
identificationCode
;
private
String
identificationCode
;
@ApiModelProperty
(
value
=
"发动机号"
)
@ApiModelProperty
(
value
=
"发动机号"
)
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgVehicleInformation.java
View file @
198ab1a8
...
@@ -275,7 +275,7 @@ public class JgVehicleInformation extends BaseEntity {
...
@@ -275,7 +275,7 @@ public class JgVehicleInformation extends BaseEntity {
private
String
carNumber
;
private
String
carNumber
;
/**
/**
*
识别代
码
*
车架号
码
*/
*/
@TableField
(
"identification_code"
)
@TableField
(
"identification_code"
)
private
String
identificationCode
;
private
String
identificationCode
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/vo/JgVehicleInformationVo.java
View file @
198ab1a8
...
@@ -138,7 +138,7 @@ public class JgVehicleInformationVo implements Serializable {
...
@@ -138,7 +138,7 @@ public class JgVehicleInformationVo implements Serializable {
@ApiModelProperty
(
value
=
"号牌号码"
)
@ApiModelProperty
(
value
=
"号牌号码"
)
private
String
carNumber
;
private
String
carNumber
;
@ApiModelProperty
(
value
=
"
识别代
码"
)
@ApiModelProperty
(
value
=
"
车架号
码"
)
private
String
identificationCode
;
private
String
identificationCode
;
@ApiModelProperty
(
value
=
"发动机号"
)
@ApiModelProperty
(
value
=
"发动机号"
)
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgVehicleInformationServiceImpl.java
View file @
198ab1a8
...
@@ -145,13 +145,22 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -145,13 +145,22 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
throw
new
LocalBadRequest
(
"车牌号码已存在,请重新输入!"
);
throw
new
LocalBadRequest
(
"车牌号码已存在,请重新输入!"
);
}
}
// 【A109】 车用气瓶登记业务 识别代码 校验唯一性
// 发动机号 字段的唯一性校验
LambdaQueryWrapper
<
JgVehicleInformation
>
engineWrapper
=
new
LambdaQueryWrapper
<>();
engineWrapper
.
eq
(
JgVehicleInformation:
:
getEngineNumber
,
vehicleInfoDto
.
getEngineNumber
());
engineWrapper
.
ne
(!
ValidationUtil
.
isEmpty
(
vehicleInfoDto
.
getSequenceNbr
()),
JgVehicleInformation:
:
getSequenceNbr
,
vehicleInfoDto
.
getSequenceNbr
());
Integer
enginecount
=
this
.
baseMapper
.
selectCount
(
engineWrapper
);
if
(
enginecount
>
0
)
{
throw
new
LocalBadRequest
(
"发动机号已存在,请重新输入!"
);
}
// 【A109】 车用气瓶登记业务 车架号 校验唯一性
LambdaQueryWrapper
<
JgVehicleInformation
>
informationLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
JgVehicleInformation
>
informationLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
informationLambdaQueryWrapper
.
eq
(
JgVehicleInformation:
:
getIdentificationCode
,
vehicleInfoDto
.
getIdentificationCode
());
informationLambdaQueryWrapper
.
eq
(
JgVehicleInformation:
:
getIdentificationCode
,
vehicleInfoDto
.
getIdentificationCode
());
informationLambdaQueryWrapper
.
eq
(
JgVehicleInformation:
:
getIsDelete
,
false
);
informationLambdaQueryWrapper
.
eq
(
JgVehicleInformation:
:
getIsDelete
,
false
);
Integer
identificationCodeCount
=
this
.
baseMapper
.
selectCount
(
informationLambdaQueryWrapper
);
Integer
identificationCodeCount
=
this
.
baseMapper
.
selectCount
(
informationLambdaQueryWrapper
);
if
(
identificationCodeCount
>
0
)
{
if
(
identificationCodeCount
>
0
)
{
throw
new
BadRequest
(
"
识别代码
已存在,请重新输入!"
);
throw
new
BadRequest
(
"
车架号
已存在,请重新输入!"
);
}
}
// 使用单位信息
// 使用单位信息
...
...
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