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
fd2ac89b
Commit
fd2ac89b
authored
Dec 05, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg): 车用气瓶历史设备登记限制一证多设备分批次登记情况
parent
f2bf67b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+22
-11
No files found.
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 @
fd2ac89b
...
@@ -1768,6 +1768,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -1768,6 +1768,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
JgVehicleInformation
>
saveOrUpdateHisData
(
JSONObject
map
)
{
public
List
<
JgVehicleInformation
>
saveOrUpdateHisData
(
JSONObject
map
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()))
+
""
,
ReginParams
.
class
);
CompanyBo
company
=
reginParams
.
getCompany
();
// 使用登记证编号
// 使用登记证编号
String
useRegistrationCode
=
String
.
valueOf
(
map
.
get
(
"useRegistrationCode"
)).
trim
();
String
useRegistrationCode
=
String
.
valueOf
(
map
.
get
(
"useRegistrationCode"
)).
trim
();
// 车辆VIN码
// 车辆VIN码
...
@@ -1795,17 +1797,11 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -1795,17 +1797,11 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
})
})
.
orElseThrow
(()
->
new
BadRequest
(
"使用登记证号、车辆VIN码与所选设备不一致,请重新选择设备!"
));
.
orElseThrow
(()
->
new
BadRequest
(
"使用登记证号、车辆VIN码与所选设备不一致,请重新选择设备!"
));
// 校验使用登记证编号的唯一性 ====> 20241202 任务ID 32776 将校验前置到了新增历史设备阶段
// Boolean used = commonService.useRegistrationCertificateAccountUnique(useRegistrationCode, equipId);
// if (used){
// throw new BadRequest("使用登记证编号已存在!");
// }
// 检测是否三环系统中的车用气瓶数据 不让三环系统数据通过设备新增方式进来
// 检测是否三环系统中的车用气瓶数据 不让三环系统数据通过设备新增方式进来
// this.checkIsSanSystemHanData(map);
// this.checkIsSanSystemHanData(map);
//使用登记证编号判断是否使用未来系统生成编号
//使用登记证编号判断是否使用未来系统生成编号
idxBizJgRegisterInfoService
.
checkUseRegistrationCode
(
useRegistrationCode
,
"vehicle"
);
idxBizJgRegisterInfoService
.
checkUseRegistrationCode
(
useRegistrationCode
,
"vehicle"
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()))
+
""
,
ReginParams
.
class
);
JgVehicleInformationDto
vehicleInfoDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
),
JgVehicleInformationDto
.
class
);
JgVehicleInformationDto
vehicleInfoDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
),
JgVehicleInformationDto
.
class
);
List
<
IdxBizJgInspectionDetectionInfo
>
inspectionDetectionInfoList
=
idxBizJgInspectionDetectionInfoService
.
checkInspectionInfo
(
List
<
IdxBizJgInspectionDetectionInfo
>
inspectionDetectionInfoList
=
idxBizJgInspectionDetectionInfoService
.
checkInspectionInfo
(
...
@@ -1825,8 +1821,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -1825,8 +1821,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
.
filter
(
Objects:
:
nonNull
)
.
filter
(
Objects:
:
nonNull
)
.
min
(
Date:
:
compareTo
)
.
min
(
Date:
:
compareTo
)
.
orElse
(
null
));
.
orElse
(
null
));
CompanyBo
company
=
reginParams
.
getCompany
();
vehicleInfoDto
.
setCreateDate
(
new
Date
());
vehicleInfoDto
.
setCreateDate
(
new
Date
());
vehicleInfoDto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
vehicleInfoDto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
...
@@ -1844,14 +1838,31 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -1844,14 +1838,31 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
// 【A109】 车用气瓶登记业务 车辆VIN码 校验唯一性
// 【A109】 车用气瓶登记业务 车辆VIN码 校验唯一性
LambdaQueryWrapper
<
JgVehicleInformation
>
informationLambdaQueryWrapper
=
new
LambdaQueryWrapper
<
JgVehicleInformation
>()
LambdaQueryWrapper
<
JgVehicleInformation
>
informationLambdaQueryWrapper
=
new
LambdaQueryWrapper
<
JgVehicleInformation
>()
.
select
(
JgVehicleInformation:
:
getUseUnitCreditCode
)
.
eq
(
JgVehicleInformation:
:
getIdentificationCode
,
vehicleInfoDto
.
getIdentificationCode
())
.
eq
(
JgVehicleInformation:
:
getIdentificationCode
,
vehicleInfoDto
.
getIdentificationCode
())
.
eq
(
JgVehicleInformation:
:
getIsDelete
,
false
)
.
eq
(
JgVehicleInformation:
:
getIsDelete
,
false
)
.
ne
(
JgVehicleInformation:
:
getStatus
,
"已作废"
)
.
ne
(
JgVehicleInformation:
:
getStatus
,
"已作废"
)
.
ne
(
JgVehicleInformation:
:
getStatus
,
"使用单位待提交"
)
.
ne
(
JgVehicleInformation:
:
getStatus
,
"使用单位待提交"
)
.
ne
(!
ValidationUtil
.
isEmpty
(
vehicleInfoDto
.
getSequenceNbr
()),
JgVehicleInformation:
:
getSequenceNbr
,
vehicleInfoDto
.
getSequenceNbr
());
.
ne
(!
ValidationUtil
.
isEmpty
(
vehicleInfoDto
.
getSequenceNbr
()),
JgVehicleInformation:
:
getSequenceNbr
,
vehicleInfoDto
.
getSequenceNbr
());
Integer
identificationCodeCount
=
this
.
baseMapper
.
selectCount
(
informationLambdaQueryWrapper
);
List
<
JgVehicleInformation
>
vehicleInfoVINs
=
this
.
baseMapper
.
selectList
(
informationLambdaQueryWrapper
);
if
(
identificationCodeCount
>
0
)
{
if
(!
vehicleInfoVINs
.
isEmpty
())
{
throw
new
BadRequest
(
"车辆VIN码已存在,请重新输入!"
);
String
companyCode
=
company
.
getCompanyCode
();
String
errMsg
=
JSON
.
toJSONString
(
vehicleInfoVINs
).
contains
(
companyCode
)
?
"已经发起过相同车辆VIN码的历史登记,不支持重复发起!"
:
"车辆VIN码已存在,请重新输入!"
;
throw
new
BadRequest
(
errMsg
);
}
// 车用气瓶登记业务 使用登记证 校验唯一性
LambdaQueryWrapper
<
JgVehicleInformation
>
vehicleInformationLambdaQueryWrapper
=
new
LambdaQueryWrapper
<
JgVehicleInformation
>()
.
select
(
JgVehicleInformation:
:
getUseUnitCreditCode
)
.
eq
(
JgVehicleInformation:
:
getUseRegistrationCode
,
vehicleInfoDto
.
getUseRegistrationCode
())
.
eq
(
JgVehicleInformation:
:
getIsDelete
,
false
)
.
ne
(
JgVehicleInformation:
:
getStatus
,
"已作废"
)
.
ne
(
JgVehicleInformation:
:
getStatus
,
"使用单位待提交"
)
.
ne
(!
ValidationUtil
.
isEmpty
(
vehicleInfoDto
.
getSequenceNbr
()),
JgVehicleInformation:
:
getSequenceNbr
,
vehicleInfoDto
.
getSequenceNbr
());
List
<
JgVehicleInformation
>
vehicleInfoUseRegs
=
this
.
baseMapper
.
selectList
(
vehicleInformationLambdaQueryWrapper
);
if
(!
vehicleInfoUseRegs
.
isEmpty
())
{
String
companyCode
=
company
.
getCompanyCode
();
String
errMsg
=
JSON
.
toJSONString
(
vehicleInfoUseRegs
).
contains
(
companyCode
)
?
"已经发起过相同使用登记证号的历史登记,不支持重复发起!"
:
"车辆VIN码已存在,请重新输入!"
;
throw
new
BadRequest
(
errMsg
);
}
}
// 使用单位信息
// 使用单位信息
...
...
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