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
65d8783e
Commit
65d8783e
authored
May 28, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(amos-boot-module-jg): 优化设备信息查询逻辑- 仅对特定设备类型查询施工信息和维保信息
- 厂车、流动式起重机和气瓶不查询施工信息- 仅电梯查询维保信息
parent
f64e6dee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
83 additions
and
60 deletions
+83
-60
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+83
-60
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 @
65d8783e
...
...
@@ -1505,25 +1505,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
objMap
.
putAll
(
filterMap
);
}
}
// 施工信息 【一对多,暂时只取最新一条数据】
IdxBizJgConstructionInfo
constructionInfo
=
iIdxBizJgConstructionInfoService
.
queryNewestDetailByRecord
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
constructionInfo
))
{
Map
<
String
,
Object
>
constructionInfoMap
;
if
(!
ValidationUtil
.
isEmpty
(
fieldType
))
{
constructionInfoMap
=
Bean
.
BeantoMap
(
constructionInfo
);
constructionInfoMap
.
put
(
"constructioninfoSeq"
,
constructionInfo
.
getSequenceNbr
());
}
else
{
constructionInfoMap
=
convertCamelToUnderscore
(
constructionInfo
,
null
);
constructionInfoMap
.
put
(
"CONSTRUCTIONINFO_SEQ"
,
constructionInfo
.
getSequenceNbr
());
}
if
(!
constructionInfoMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
constructionInfoMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
// 注册登记
IdxBizJgRegisterInfo
registerInfo
=
this
.
getOne
(
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
eq
(
"RECORD"
,
record
));
if
(!
ValidationUtil
.
isEmpty
(
registerInfo
))
{
...
...
@@ -1567,27 +1549,57 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
objMap
.
put
(
"useRegistrationCode"
,
registerInfo
.
getUseOrgCode
());
}
// 维保备案【一对多,暂时只取最新一条数据】
IdxBizJgMaintenanceRecordInfo
maintenanceRecordInfo
=
iIdxBizJgMaintenanceRecordInfoService
.
queryNewestDetailByRecord
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
maintenanceRecordInfo
))
{
Map
<
String
,
Object
>
maintenanceRecordInfoMap
;
if
(
fieldType
!=
null
&&
!
fieldType
.
isEmpty
())
{
maintenanceRecordInfoMap
=
Bean
.
BeantoMap
(
maintenanceRecordInfo
);
maintenanceRecordInfoMap
.
put
(
"repairInform"
,
JSON
.
parse
(
maintenanceRecordInfo
.
getRepairInform
()));
maintenanceRecordInfoMap
.
put
(
"maintenancerecordinfoSeq"
,
maintenanceRecordInfo
.
getSequenceNbr
());
}
else
{
String
[]
toArrayFields
=
{
"REPAIR_INFORM"
};
maintenanceRecordInfoMap
=
convertCamelToUnderscore
(
maintenanceRecordInfo
,
toArrayFields
);
maintenanceRecordInfoMap
.
put
(
"MAINTENANCERECORDINFO_SEQ"
,
maintenanceRecordInfo
.
getSequenceNbr
());
String
equListStr
=
(
String
)
objMap
.
get
(
"EQU_LIST"
);
String
equCategoryStr
=
(
String
)
objMap
.
get
(
"EQU_CATEGORY"
);
// 仅做施工告知的设备查询施工信息。厂车=5000、流动式起重机=4400、气瓶=2300不查询施工信息
if
(!(
EquipmentClassifityEnum
.
CC
.
getCode
().
equals
(
equListStr
)
||
"4400"
.
equals
(
equCategoryStr
)
||
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
equCategoryStr
)))
{
// 施工信息 【一对多,暂时只取最新一条数据】
IdxBizJgConstructionInfo
constructionInfo
=
iIdxBizJgConstructionInfoService
.
queryNewestDetailByRecord
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
constructionInfo
))
{
Map
<
String
,
Object
>
constructionInfoMap
;
if
(!
ValidationUtil
.
isEmpty
(
fieldType
))
{
constructionInfoMap
=
Bean
.
BeantoMap
(
constructionInfo
);
constructionInfoMap
.
put
(
"constructioninfoSeq"
,
constructionInfo
.
getSequenceNbr
());
}
else
{
constructionInfoMap
=
convertCamelToUnderscore
(
constructionInfo
,
null
);
constructionInfoMap
.
put
(
"CONSTRUCTIONINFO_SEQ"
,
constructionInfo
.
getSequenceNbr
());
}
if
(!
constructionInfoMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
constructionInfoMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
if
(!
maintenanceRecordInfoMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
maintenanceRecordInfoMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
// 仅电梯查询维保信息
if
(
EquipmentClassifityEnum
.
DT
.
getCode
().
equals
(
equListStr
))
{
// 维保备案【一对多,暂时只取最新一条数据】
IdxBizJgMaintenanceRecordInfo
maintenanceRecordInfo
=
iIdxBizJgMaintenanceRecordInfoService
.
queryNewestDetailByRecord
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
maintenanceRecordInfo
))
{
Map
<
String
,
Object
>
maintenanceRecordInfoMap
;
if
(
fieldType
!=
null
&&
!
fieldType
.
isEmpty
())
{
maintenanceRecordInfoMap
=
Bean
.
BeantoMap
(
maintenanceRecordInfo
);
maintenanceRecordInfoMap
.
put
(
"repairInform"
,
JSON
.
parse
(
maintenanceRecordInfo
.
getRepairInform
()));
maintenanceRecordInfoMap
.
put
(
"maintenancerecordinfoSeq"
,
maintenanceRecordInfo
.
getSequenceNbr
());
}
else
{
String
[]
toArrayFields
=
{
"REPAIR_INFORM"
};
maintenanceRecordInfoMap
=
convertCamelToUnderscore
(
maintenanceRecordInfo
,
toArrayFields
);
maintenanceRecordInfoMap
.
put
(
"MAINTENANCERECORDINFO_SEQ"
,
maintenanceRecordInfo
.
getSequenceNbr
());
}
if
(!
maintenanceRecordInfoMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
maintenanceRecordInfoMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
}
// 监督管理
IdxBizJgSupervisionInfo
supervisionInfo
=
iIdxBizJgSupervisionInfoService
.
getOneData
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
supervisionInfo
))
{
...
...
@@ -1657,7 +1669,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
//处理前端返回特种气瓶(车用气瓶)和特种气瓶(非车用气瓶)
String
equDefineStr
=
(
String
)
objMap
.
get
(
"EQU_DEFINE"
);
String
whetherVehicleCylinderStr
=
(
String
)
objMap
.
get
(
"WHETHER_VEHICLE_CYLINDER"
);
String
equCategoryStr
=
(
String
)
objMap
.
get
(
"EQU_CATEGORY"
);
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
equCategoryStr
)){
if
(
CylinderTypeEnum
.
SPECIAL_CYLINDER
.
getCode
().
equals
(
equDefineStr
)){
if
(
"1"
.
equals
(
whetherVehicleCylinderStr
)){
...
...
@@ -1677,29 +1689,40 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
* @return
*/
public
String
judgeTheBusinessAccordingByRecord
(
String
record
,
Map
<
String
,
Object
>
objMap
)
{
String
equListStr
=
(
String
)
objMap
.
get
(
"EQU_LIST"
);
String
equCategoryStr
=
(
String
)
objMap
.
get
(
"EQU_CATEGORY"
);
String
business
=
""
;
// TODO 兼容历史有证、无证数据,根本原因idx_biz_jg_construction_info施工信息字段不全,字段补全后还是要查idx_biz_jg_construction_info,否则改造告知
// 安装信息,优先查询安装告知信息没有再查设备的施工信息表
// 安装告知信息表查询,做过安装告知的施工信息优先
Map
<
String
,
Object
>
constructInfo
=
jgUseRegistrationMapper
.
getiInstallDetail
(
record
);
if
(
constructInfo
==
null
){
// 施工信息表查询
constructInfo
=
jgUseRegistrationMapper
.
getiInstallDetailByIdx
(
record
);
}
if
(!
ObjectUtils
.
isEmpty
(
constructInfo
))
{
business
=
business
+
",安装告知"
;
objMap
.
putAll
(
constructInfo
);
objMap
.
put
(
"insOtherAccessories"
,
JSON
.
parse
(
Optional
.
ofNullable
(
constructInfo
.
get
(
"insOtherAccessories"
)).
orElse
(
""
).
toString
()));
objMap
.
put
(
"installProxyStatementAttachment"
,
JSON
.
parse
(
Optional
.
ofNullable
(
constructInfo
.
get
(
"installProxyStatementAttachment"
)).
orElse
(
""
).
toString
()));
objMap
.
put
(
"installContractAttachment"
,
JSON
.
parse
(
Optional
.
ofNullable
(
constructInfo
.
get
(
"installContractAttachment"
)).
orElse
(
""
).
toString
()));
}
// 维保备案
Map
<
String
,
Object
>
maintenanceDetail
=
jgUseRegistrationMapper
.
getMaintenanceDetailByIdx
(
record
);
if
(!
ObjectUtils
.
isEmpty
(
maintenanceDetail
))
{
business
=
business
+
",维保合同备案"
;
objMap
.
putAll
(
maintenanceDetail
);
objMap
.
put
(
"maintenanceContract"
,
JSON
.
parse
(
Optional
.
ofNullable
(
maintenanceDetail
.
get
(
"maintenanceContract"
)).
orElse
(
""
).
toString
()));
objMap
.
put
(
"maintOtherAccessories"
,
JSON
.
parse
(
Optional
.
ofNullable
(
maintenanceDetail
.
get
(
"maintOtherAccessories"
)).
orElse
(
""
).
toString
()));
// 仅做施工告知的设备查询施工信息。厂车=5000、流动式起重机=4400、气瓶=2300不查询施工信息
if
(!(
EquipmentClassifityEnum
.
CC
.
getCode
().
equals
(
equListStr
)
||
"4400"
.
equals
(
equCategoryStr
)
||
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
equCategoryStr
)))
{
// TODO 兼容历史有证、无证数据,根本原因idx_biz_jg_construction_info施工信息字段不全,字段补全后还是要查idx_biz_jg_construction_info,否则改造告知
// 安装信息,优先查询安装告知信息没有再查设备的施工信息表
// 安装告知信息表查询,做过安装告知的施工信息优先
Map
<
String
,
Object
>
constructInfo
=
jgUseRegistrationMapper
.
getiInstallDetail
(
record
);
if
(
constructInfo
==
null
){
// 施工信息表查询
constructInfo
=
jgUseRegistrationMapper
.
getiInstallDetailByIdx
(
record
);
}
if
(!
ObjectUtils
.
isEmpty
(
constructInfo
))
{
business
=
business
+
",安装告知"
;
objMap
.
putAll
(
constructInfo
);
objMap
.
put
(
"insOtherAccessories"
,
JSON
.
parse
(
Optional
.
ofNullable
(
constructInfo
.
get
(
"insOtherAccessories"
)).
orElse
(
""
).
toString
()));
objMap
.
put
(
"installProxyStatementAttachment"
,
JSON
.
parse
(
Optional
.
ofNullable
(
constructInfo
.
get
(
"installProxyStatementAttachment"
)).
orElse
(
""
).
toString
()));
objMap
.
put
(
"installContractAttachment"
,
JSON
.
parse
(
Optional
.
ofNullable
(
constructInfo
.
get
(
"installContractAttachment"
)).
orElse
(
""
).
toString
()));
}
}
// 仅电梯查询维保信息
if
(
EquipmentClassifityEnum
.
DT
.
getCode
().
equals
(
equListStr
))
{
// 维保备案
Map
<
String
,
Object
>
maintenanceDetail
=
jgUseRegistrationMapper
.
getMaintenanceDetailByIdx
(
record
);
if
(!
ObjectUtils
.
isEmpty
(
maintenanceDetail
))
{
business
=
business
+
",维保合同备案"
;
objMap
.
putAll
(
maintenanceDetail
);
objMap
.
put
(
"maintenanceContract"
,
JSON
.
parse
(
Optional
.
ofNullable
(
maintenanceDetail
.
get
(
"maintenanceContract"
)).
orElse
(
""
).
toString
()));
objMap
.
put
(
"maintOtherAccessories"
,
JSON
.
parse
(
Optional
.
ofNullable
(
maintenanceDetail
.
get
(
"maintOtherAccessories"
)).
orElse
(
""
).
toString
()));
}
}
// 使用登记
Map
<
String
,
Object
>
useRegistrationDetail
=
jgUseRegistrationMapper
.
getUseRegistrationDetail
(
record
);
...
...
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