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
39a5a130
Commit
39a5a130
authored
Apr 18, 2024
by
Lambertliu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):车用气瓶修改
parent
bc3b6040
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
5 deletions
+67
-5
JgVehicleInformationDto.java
.../amos/boot/module/jg/api/dto/JgVehicleInformationDto.java
+12
-0
JgVehicleInformation.java
.../amos/boot/module/jg/api/entity/JgVehicleInformation.java
+12
-0
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+43
-5
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 @
39a5a130
...
...
@@ -213,4 +213,16 @@ public class JgVehicleInformationDto extends BaseDto {
@ApiModelProperty
(
value
=
"下次检验日期"
)
private
Date
nextInspectionDate
;
@ApiModelProperty
(
value
=
"安全员ID"
)
private
String
safetyManagerId
;
@ApiModelProperty
(
value
=
"安全员名称"
)
private
String
safetyManagerName
;
@ApiModelProperty
(
value
=
"产权单位Code"
)
private
String
estateUnitCreditCode
;
@ApiModelProperty
(
value
=
"产权单位名称"
)
private
String
estateUnitName
;
}
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 @
39a5a130
...
...
@@ -393,4 +393,16 @@ public class JgVehicleInformation extends BaseEntity {
*/
@TableField
(
"next_inspection_date"
)
private
Date
nextInspectionDate
;
@TableField
(
value
=
"safety_manager_id"
)
private
String
safetyManagerId
;
@TableField
(
value
=
"safety_manager_name"
)
private
String
safetyManagerName
;
@TableField
(
value
=
"estate_unit_credit_code"
)
private
String
estateUnitCreditCode
;
@TableField
(
value
=
"estate_unit_name"
)
private
String
estateUnitName
;
}
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 @
39a5a130
...
...
@@ -125,11 +125,21 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
JgVehicleInformationDto
vehicleInfoDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
),
JgVehicleInformationDto
.
class
);
List
<
Map
<
String
,
Object
>>
equipmentLists
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"equipmentLists"
);
if
(
CollectionUtils
.
isEmpty
(
equipmentLists
)
||
equipmentLists
.
stream
()
.
map
(
v
->
(
String
)
v
.
get
(
"EQU_DEFINE_CODE"
))
.
distinct
()
.
count
()
!=
1
)
{
throw
new
BadRequest
(
CollectionUtils
.
isEmpty
(
equipmentLists
)
?
"请选择设备信息!"
:
"请选择相同设备种类!"
);
if
(
CollectionUtils
.
isEmpty
(
equipmentLists
)
||
equipmentLists
.
stream
().
map
(
v
->
(
String
)
v
.
get
(
"chargingMedium"
)).
distinct
().
count
()
!=
1
)
{
throw
new
BadRequest
(
CollectionUtils
.
isEmpty
(
equipmentLists
)
?
"请选择设备信息!"
:
"请选择相同充装介质设备!"
);
}
List
<
IdxBizJgInspectionDetectionInfo
>
inspectionDetectionInfoList
=
idxBizJgInspectionDetectionInfoService
.
checkInspectionInfo
(
equipmentLists
.
stream
()
.
map
(
v
->
(
String
)
v
.
get
(
"record"
))
.
collect
(
Collectors
.
toList
())
);
if
(!
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
map
.
get
(
"equCategory"
))
&&
inspectionDetectionInfoList
.
stream
().
anyMatch
(
info
->
ObjectUtils
.
isEmpty
(
info
)
||
ObjectUtils
.
isEmpty
(
info
.
getInspectType
())
||
ObjectUtils
.
isEmpty
(
info
.
getInspectConclusion
())
||
ObjectUtils
.
isEmpty
(
info
.
getInspectOrgCode
())
||
ObjectUtils
.
isEmpty
(
info
.
getInspectOrgName
())))
{
throw
new
BadRequest
(
"请补充设备检验检测信息后提交!"
);
}
CompanyBo
company
=
reginParams
.
getCompany
();
...
...
@@ -195,6 +205,34 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
vehicleInfoDto
.
setOrgBranchName
(
splitOrgBranchCode
[
1
]);
}
// 安全管理员
Optional
.
ofNullable
(
map
.
getString
(
"safetyManager"
))
.
filter
(
manager
->
manager
.
contains
(
"_"
))
.
map
(
manager
->
manager
.
split
(
"_"
))
.
ifPresent
(
data
->
{
vehicleInfoDto
.
setSafetyManagerId
(
data
[
0
]);
vehicleInfoDto
.
setSafetyManagerName
(
data
[
1
]);
});
//属地监管部门
if
(!
StringUtils
.
isEmpty
(
vehicleInfoDto
.
getOrgBranchCode
()))
{
String
[]
splitOrgBranchCode
=
vehicleInfoDto
.
getOrgBranchCode
().
split
(
"_"
);
vehicleInfoDto
.
setOrgBranchCode
(
splitOrgBranchCode
[
0
]);
vehicleInfoDto
.
setOrgBranchName
(
splitOrgBranchCode
[
1
]);
}
// 产权单位信息
if
(!
StringUtils
.
isEmpty
(
vehicleInfoDto
.
getEstateUnitName
()))
{
String
[]
data
=
String
.
valueOf
(
map
.
getString
(
"estateUnitName"
)).
split
(
"_"
);
vehicleInfoDto
.
setEstateUnitCreditCode
(
data
[
0
]);
vehicleInfoDto
.
setEstateUnitName
(
data
[
1
]);
}
// 其他附件
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"otherAccessories"
)))
{
vehicleInfoDto
.
setOtherAccessories
(
JSONObject
.
toJSONString
(
map
.
get
(
"otherAccessories"
)));
}
JgVehicleInformation
vehicleInformation
=
new
JgVehicleInformation
();
BeanUtils
.
copyProperties
(
vehicleInfoDto
,
vehicleInformation
);
vehicleInformation
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
...
...
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