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
6de5b9ce
Commit
6de5b9ce
authored
Dec 26, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):历史有使用登记证的场车设备可以添加车牌号
parent
ab6b10e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
30 deletions
+16
-30
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+16
-30
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/IdxBizJgRegisterInfoServiceImpl.java
View file @
6de5b9ce
...
...
@@ -94,6 +94,7 @@ import java.util.*;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
.
CylinderTypeEnum
.
SPECIAL_CYLINDER
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
.
VehicleApanageEnum
.
XIAN_YANG
;
...
...
@@ -176,6 +177,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private
static
final
String
IS_COPY
=
"isCopy"
;
private
static
final
String
ATTACHMENT_UPLOAD
=
"attachmentUpload"
;
private
static
final
Map
<
String
,
String
>
regionCodeOrgCodeMap
=
new
ConcurrentHashMap
<>();
public
static
final
String
CAR_NUMBER
=
"CAR_NUMBER"
;
// 需要转化成jsonObject的附件字段
public
static
String
[]
jsonFields
=
{
"insOtherAccessories"
,
"installContractAttachment"
,
"installProxyStatementAttachment"
};
private
final
List
<
String
>
resultError
=
new
ArrayList
<>();
...
...
@@ -777,8 +779,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
checkFactoryNumUniqueWithGasCylinder
(
equipmentInfoForm
,
record
);
// 历史(车用气瓶)设备校验使用登记证编号 VIN 全库唯一
hisEquCheckUseRegCodeAndVINUniqueness
(
equipmentInfoForm
,
record
);
//
检测是否三环系统中的车用气瓶数据 不让三环系统数据通过设备新增方式进来
// checkIsSanHanData(equipmentInfoForm
);
//
历史有使用登记证的场车设备校验车牌号的唯一性
checkCarNumberUniquenessWithHisCC
(
equipmentInfoForm
,
record
,
dataSource
);
}
catch
(
Exception
e
)
{
handleError
(
e
,
null
);
}
...
...
@@ -833,35 +835,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
/**
* 检测是否三环系统中的车用气瓶数据 不让三环系统数据通过设备新增方式进来
*
* @param equipmentInfoForm 入参
* 历史有使用登记证的场车设备校验车牌号的唯一性
* @param equipmentInfoForm
* @param record
* @param dataSource
*/
private
void
checkIsSanHanData
(
LinkedHashMap
<?,
?>
equipmentInfoForm
)
{
// 是否车用气瓶
if
(
"2000"
.
equals
(
equipmentInfoForm
.
get
(
EQU_LIST
))
&&
"2300"
.
equals
(
equipmentInfoForm
.
get
(
EQU_CATEGORY
))
&&
"23T0"
.
equals
(
equipmentInfoForm
.
get
(
EQU_DEFINE
))
&&
"1"
.
equals
(
equipmentInfoForm
.
get
(
WHETHER_VEHICLE_CYLINDER
)))
{
String
carNum
=
(
String
)
equipmentInfoForm
.
get
(
"USE_INNER_CODE"
);
String
equCode
=
(
String
)
equipmentInfoForm
.
get
(
"EQU_CODE"
);
// 判断 设备代码EQU_CODE 和 单位内编号(车牌号)USE_INNER_CODE
Integer
carCount
=
shCarService
.
getBaseMapper
()
.
selectCount
(
new
LambdaQueryWrapper
<
ShCar
>()
.
eq
(
ShCar:
:
getCarNumber
,
carNum
)
.
eq
(
ShCar:
:
getClaimedFlag
,
Boolean
.
FALSE
));
Integer
equCount
=
shCarEquService
.
getBaseMapper
()
.
selectList
(
new
LambdaQueryWrapper
<
ShCarEqu
>()
.
eq
(
ShCarEqu:
:
getEquCode
,
equCode
))
.
stream
()
.
findFirst
()
.
map
(
equ
->
shCarService
.
getBaseMapper
().
selectList
(
new
LambdaQueryWrapper
<
ShCar
>()
.
eq
(
ShCar:
:
getSequenceNbr
,
equ
.
getCarId
())
.
eq
(
ShCar:
:
getClaimedFlag
,
Boolean
.
FALSE
))
.
size
()
).
orElse
(
0
);
if
(
carCount
>
0
||
equCount
>
0
)
{
throw
new
BadRequest
(
"原三环系统数据,请直接认领!"
);
private
void
checkCarNumberUniquenessWithHisCC
(
LinkedHashMap
<?,
?>
equipmentInfoForm
,
String
record
,
String
dataSource
)
{
if
(
dataSource
.
contains
(
"his"
)
&&
EquipmentClassifityEnum
.
CC
.
getCode
().
equals
(
equipmentInfoForm
.
get
(
EQU_LIST
))
&&
!
ValidationUtil
.
isEmpty
(
equipmentInfoForm
.
get
(
CAR_NUMBER
)))
{
Integer
count
=
idxBizJgRegisterInfoService
.
lambdaQuery
()
.
eq
(
IdxBizJgRegisterInfo:
:
getCarNumber
,
equipmentInfoForm
.
get
(
CAR_NUMBER
))
.
ne
(!
StringUtils
.
isEmpty
(
record
),
IdxBizJgRegisterInfo:
:
getRecord
,
record
)
.
count
();
if
(
count
>
0
)
{
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