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
7b653de2
Commit
7b653de2
authored
Jun 21, 2025
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):车用气瓶暂存功能
parent
2c2ad606
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
23 deletions
+31
-23
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+31
-23
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 @
7b653de2
...
@@ -233,34 +233,35 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -233,34 +233,35 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
vehicleInfoDto
.
setUseRegistrationFormUrl
(
String
.
valueOf
(
vehicle
.
get
(
"useRegistrationFormUrl"
)));
vehicleInfoDto
.
setUseRegistrationFormUrl
(
String
.
valueOf
(
vehicle
.
get
(
"useRegistrationFormUrl"
)));
}
}
List
<
Map
<
String
,
Object
>>
equipmentLists
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"equipmentLists"
);
List
<
Map
<
String
,
Object
>>
equipmentLists
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"equipmentLists"
);
if
(
CollectionUtils
.
isEmpty
(
equipmentLists
)
||
equipmentLists
.
stream
().
map
(
v
->
(
String
)
v
.
get
(
"chargingMedium"
)).
distinct
().
count
()
!=
1
)
{
throw
new
BadRequest
(
CollectionUtils
.
isEmpty
(
equipmentLists
)
?
"请选择设备信息!"
:
"请选择相同充装介质设备!"
);
}
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submit
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submit
))
{
if
(
CollectionUtils
.
isEmpty
(
equipmentLists
)
||
equipmentLists
.
stream
().
map
(
v
->
(
String
)
v
.
get
(
"chargingMedium"
)).
distinct
().
count
()
!=
1
)
{
throw
new
BadRequest
(
CollectionUtils
.
isEmpty
(
equipmentLists
)
?
"请选择设备信息!"
:
"请选择相同充装介质设备!"
);
}
// 检查设备是否已经在使用
// 检查设备是否已经在使用
// 个人主体的身份证(6600_620422199903010258) 特殊处理 只取_后的身份证号码
// 个人主体的身份证(6600_620422199903010258) 特殊处理 只取_后的身份证号码
this
.
repeatUsedEquipCheck
(
equipmentLists
,
this
.
repeatUsedEquipCheck
(
equipmentLists
,
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
}
List
<
IdxBizJgInspectionDetectionInfo
>
inspectionDetectionInfoList
=
idxBizJgInspectionDetectionInfoService
.
checkInspectionInfo
(
List
<
IdxBizJgInspectionDetectionInfo
>
inspectionDetectionInfoList
=
idxBizJgInspectionDetectionInfoService
.
checkInspectionInfo
(
equipmentLists
.
stream
()
equipmentLists
.
stream
()
.
map
(
v
->
(
String
)
v
.
get
(
"record"
))
.
map
(
v
->
(
String
)
v
.
get
(
"record"
))
.
collect
(
Collectors
.
toList
())
.
collect
(
Collectors
.
toList
())
);
);
if
(
inspectionDetectionInfoList
.
stream
().
anyMatch
(
info
->
ObjectUtils
.
isEmpty
(
info
)
||
ObjectUtils
.
isEmpty
(
info
.
getInspectType
())
||
ObjectUtils
.
isEmpty
(
info
.
getInspectConclusion
())
||
ObjectUtils
.
isEmpty
(
info
.
getInspectOrgCode
())))
{
throw
new
BadRequest
(
"请补充设备检验检测信息后提交!"
);
}
if
(
inspectionDetectionInfoList
.
stream
().
anyMatch
(
info
->
vehicleInfoDto
.
setNextInspectionDate
(
inspectionDetectionInfoList
.
stream
()
ObjectUtils
.
isEmpty
(
info
)
||
ObjectUtils
.
isEmpty
(
info
.
getInspectType
())
||
.
map
(
IdxBizJgInspectionDetectionInfo:
:
getNextInspectDate
)
ObjectUtils
.
isEmpty
(
info
.
getInspectConclusion
())
||
ObjectUtils
.
isEmpty
(
info
.
getInspectOrgCode
())))
{
.
filter
(
Objects:
:
nonNull
)
throw
new
BadRequest
(
"请补充设备检验检测信息后提交!"
);
.
min
(
Date:
:
compareTo
)
.
orElse
(
null
));
}
}
vehicleInfoDto
.
setNextInspectionDate
(
inspectionDetectionInfoList
.
stream
()
.
map
(
IdxBizJgInspectionDetectionInfo:
:
getNextInspectDate
)
.
filter
(
Objects:
:
nonNull
)
.
min
(
Date:
:
compareTo
)
.
orElse
(
null
));
vehicleInfoDto
.
setCreateDate
(
new
Date
());
vehicleInfoDto
.
setCreateDate
(
new
Date
());
vehicleInfoDto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
vehicleInfoDto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
...
@@ -351,12 +352,19 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -351,12 +352,19 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
vehicleInformation
.
setRegDate
(
new
Date
());
vehicleInformation
.
setRegDate
(
new
Date
());
vehicleInformation
.
setUseDate
(
Optional
.
ofNullable
(
String
.
valueOf
(
map
.
get
(
"useDate"
))).
orElse
(
""
));
vehicleInformation
.
setUseDate
(
Optional
.
ofNullable
(
String
.
valueOf
(
map
.
get
(
"useDate"
))).
orElse
(
""
));
vehicleInformation
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
vehicleInformation
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
vehicleInformation
.
setGasNum
(
equipmentLists
.
size
());
vehicleInformation
.
setGasNum
(
Optional
.
ofNullable
(
equipmentLists
).
map
(
List:
:
size
).
orElse
(
0
));
BigDecimal
totalVolume
=
equipmentLists
.
stream
()
BigDecimal
totalVolume
=
Optional
.
ofNullable
(
equipmentLists
)
.
orElse
(
Collections
.
emptyList
())
.
stream
()
.
map
(
x
->
new
BigDecimal
(
String
.
valueOf
(
x
.
get
(
"singleBottleVolume"
))))
.
map
(
x
->
new
BigDecimal
(
String
.
valueOf
(
x
.
get
(
"singleBottleVolume"
))))
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
vehicleInformation
.
setVolume
(
totalVolume
.
toPlainString
());
vehicleInformation
.
setVolume
(
totalVolume
.
toPlainString
());
vehicleInformation
.
setFillingMedium
(
equipmentLists
.
get
(
0
).
get
(
"chargingMedium"
)
+
""
);
String
fillingMedium
=
Optional
.
ofNullable
(
equipmentLists
)
.
filter
(
list
->
!
list
.
isEmpty
())
.
map
(
list
->
String
.
valueOf
(
list
.
get
(
0
).
get
(
"chargingMedium"
)))
.
orElse
(
""
);
vehicleInformation
.
setFillingMedium
(
fillingMedium
);
boolean
hasId
=
StringUtils
.
isEmpty
(
vehicleInfoDto
.
getSequenceNbr
());
boolean
hasId
=
StringUtils
.
isEmpty
(
vehicleInfoDto
.
getSequenceNbr
());
//新增
//新增
...
...
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