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
59f7ab95
Commit
59f7ab95
authored
Apr 19, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):车用气瓶数据查询兼容个人
parent
f16c64a0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
190 additions
and
196 deletions
+190
-196
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+190
-196
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 @
59f7ab95
...
@@ -72,6 +72,9 @@ import static com.alibaba.fastjson.JSON.toJSONString;
...
@@ -72,6 +72,9 @@ import static com.alibaba.fastjson.JSON.toJSONString;
*/
*/
@Service
@Service
public
class
IdxBizJgRegisterInfoServiceImpl
extends
BaseService
<
IdxBizJgRegisterInfoDto
,
IdxBizJgRegisterInfo
,
IdxBizJgRegisterInfoMapper
>
implements
IIdxBizJgRegisterInfoService
{
public
class
IdxBizJgRegisterInfoServiceImpl
extends
BaseService
<
IdxBizJgRegisterInfoDto
,
IdxBizJgRegisterInfo
,
IdxBizJgRegisterInfoMapper
>
implements
IIdxBizJgRegisterInfoService
{
public
final
static
String
USE_TYPE_NAME
=
"使用单位"
;
public
final
static
String
INDIVIDUAL_TYPE_NAME
=
"个人主体"
;
public
final
static
String
MAINTENANCE_TYPE_NAME
=
"安装改造维修单位"
;
// 设备分类表单id
// 设备分类表单id
private
static
final
String
EQUIP_CLASS_FORM_ID
=
"equipClass"
;
private
static
final
String
EQUIP_CLASS_FORM_ID
=
"equipClass"
;
// 设备基本信息表单id
// 设备基本信息表单id
...
@@ -82,17 +85,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -82,17 +85,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private
static
final
String
EQUIP_MAINPARTS_FORM_ID
=
"mainParts"
;
private
static
final
String
EQUIP_MAINPARTS_FORM_ID
=
"mainParts"
;
// 安全附件
// 安全附件
private
static
final
String
EQUIP_PROTECTIONDEVICES_FORM_ID
=
"protectionDevices"
;
private
static
final
String
EQUIP_PROTECTIONDEVICES_FORM_ID
=
"protectionDevices"
;
private
static
final
String
EQUSTATE
=
"EQU_STATE"
;
private
static
final
String
EQUSTATE
=
"EQU_STATE"
;
private
static
final
String
CONSTRUCTIONTYPE
=
"CONSTRUCTION_TYPE"
;
private
static
final
String
CONSTRUCTIONTYPE
=
"CONSTRUCTION_TYPE"
;
private
static
final
String
EQUDEFINE
=
"EQU_DEFINE"
;
private
static
final
String
EQUDEFINE
=
"EQU_DEFINE"
;
private
static
final
String
EQUDEFINECODE
=
"EQU_DEFINE_CODE"
;
private
static
final
String
EQUDEFINECODE
=
"EQU_DEFINE_CODE"
;
// 新增修改标识
// 新增修改标识
private
static
final
String
OPERATESAVE
=
"save"
;
private
static
final
String
OPERATESAVE
=
"save"
;
private
static
final
String
OPERATEEDIT
=
"edit"
;
private
static
final
String
OPERATEEDIT
=
"edit"
;
// 单位办理类型
// 单位办理类型
private
static
final
String
MANAGE_TYPE_UNIT
=
"unit"
;
private
static
final
String
MANAGE_TYPE_UNIT
=
"unit"
;
private
static
final
String
RECORD
=
"RECORD"
;
private
static
final
String
RECORD
=
"RECORD"
;
...
@@ -100,19 +99,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -100,19 +99,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private
static
final
String
EQU_CODE
=
"EQU_CODE"
;
private
static
final
String
EQU_CODE
=
"EQU_CODE"
;
private
static
final
String
SEQUENCE_NBR
=
"SEQUENCE_NBR"
;
private
static
final
String
SEQUENCE_NBR
=
"SEQUENCE_NBR"
;
private
static
final
String
FACTORY_NUM
=
"FACTORY_NUM"
;
private
static
final
String
FACTORY_NUM
=
"FACTORY_NUM"
;
// 新增设备是否复制而来
// 新增设备是否复制而来
private
static
final
String
IS_COPY
=
"isCopy"
;
private
static
final
String
IS_COPY
=
"isCopy"
;
public
static
String
[]
jsonFields
=
{
"insOtherAccessories"
,
"installContractAttachment"
,
"installProxyStatementAttachment"
};
@Autowired
@Autowired
RestHighLevelClient
restHighLevelClient
;
RestHighLevelClient
restHighLevelClient
;
@Autowired
private
RedisUtils
redisUtils
;
@Autowired
@Autowired
RegistrationInfoMapper
tzsJgRegistrationInfoMapper
;
RegistrationInfoMapper
tzsJgRegistrationInfoMapper
;
@Autowired
@Autowired
IIdxBizJgUseInfoService
idxBizJgUseInfoService
;
IIdxBizJgUseInfoService
idxBizJgUseInfoService
;
@Autowired
@Autowired
...
@@ -158,26 +151,48 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -158,26 +151,48 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
@Autowired
@Autowired
DataDictionaryServiceImpl
iDataDictionaryService
;
DataDictionaryServiceImpl
iDataDictionaryService
;
@Autowired
@Autowired
private
RedisUtils
redisUtils
;
@Autowired
private
CategoryOtherInfoMapper
categoryOtherInfoMapper
;
private
CategoryOtherInfoMapper
categoryOtherInfoMapper
;
@Autowired
@Autowired
private
SuperviseInfoMapper
superviseInfoMapper
;
private
SuperviseInfoMapper
superviseInfoMapper
;
@Autowired
@Autowired
private
JgUseRegistrationMapper
jgUseRegistrationMapper
;
private
JgUseRegistrationMapper
jgUseRegistrationMapper
;
@Autowired
@Autowired
private
JgInstallationNoticeServiceImpl
jgInstallationNoticeService
;
private
JgInstallationNoticeServiceImpl
jgInstallationNoticeService
;
public
final
static
String
USE_TYPE_NAME
=
"使用单位"
;
public
final
static
String
INDIVIDUAL_TYPE_NAME
=
"个人主体"
;
public
final
static
String
MAINTENANCE_TYPE_NAME
=
"安装改造维修单位"
;
@Value
(
"${add.equip.dict.code.suffix:CATEGORY_LIST_ADD}"
)
@Value
(
"${add.equip.dict.code.suffix:CATEGORY_LIST_ADD}"
)
private
String
equipAddDictCodeSuffix
;
private
String
equipAddDictCodeSuffix
;
public
static
String
[]
jsonFields
=
{
"insOtherAccessories"
,
"installContractAttachment"
,
"installProxyStatementAttachment"
};
/**
* 将对象的属性由驼峰转为纯大写下划线格式
*
* @param object
* @return
* @throws IllegalAccessException
*/
public
static
Map
<
String
,
Object
>
convertCamelToUnderscore
(
Object
object
,
String
[]
strToJsonArrayFields
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Class
<?>
clazz
=
object
.
getClass
();
for
(
Field
field
:
clazz
.
getDeclaredFields
())
{
field
.
setAccessible
(
true
);
String
fieldName
=
field
.
getName
();
String
underscoreFieldName
=
StringUtils
.
camelToUnderline
(
fieldName
).
toUpperCase
();
Object
value
;
try
{
value
=
field
.
get
(
object
);
// 需要转为jsonArray的字段
if
(!
ValidationUtil
.
isEmpty
(
strToJsonArrayFields
)
&&
Arrays
.
asList
(
strToJsonArrayFields
).
contains
(
underscoreFieldName
))
{
value
=
JSON
.
parseArray
((
String
)
field
.
get
(
object
));
}
}
catch
(
IllegalAccessException
e
)
{
throw
new
RuntimeException
(
e
);
}
if
(!
ValidationUtil
.
isEmpty
(
value
))
{
result
.
put
(
underscoreFieldName
.
toUpperCase
(),
value
);
}
}
return
result
;
}
/**
/**
* 设备注册信息
* 设备注册信息
...
@@ -211,11 +226,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -211,11 +226,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// 编辑校验
// 编辑校验
this
.
checkForEquipEdit
(
equipmentInfoForm
.
get
(
RECORD
));
this
.
checkForEquipEdit
(
equipmentInfoForm
.
get
(
RECORD
));
}
}
//操作类型
//
操作类型
try
{
try
{
//保存数据
//
保存数据
record
=
batchSubmitOrUpdate
(
equipmentClassForm
,
equipmentInfoForm
,
equipmentParamsForm
);
record
=
batchSubmitOrUpdate
(
equipmentClassForm
,
equipmentInfoForm
,
equipmentParamsForm
);
//保存Es数据
//
保存Es数据
if
(!
ObjectUtils
.
isEmpty
(
record
))
{
if
(!
ObjectUtils
.
isEmpty
(
record
))
{
checkEsData
(
record
);
checkEsData
(
record
);
}
}
...
@@ -256,7 +271,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -256,7 +271,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private
void
handleError
(
Exception
e
,
String
record
)
{
private
void
handleError
(
Exception
e
,
String
record
)
{
log
.
error
(
"处理异常: "
+
e
.
getMessage
(),
e
);
log
.
error
(
"处理异常: "
+
e
.
getMessage
(),
e
);
//删除数据库数据和ES数据
//
删除数据库数据和ES数据
if
(!
ObjectUtils
.
isEmpty
(
record
))
{
if
(!
ObjectUtils
.
isEmpty
(
record
))
{
List
<
String
>
records
=
new
ArrayList
<>();
List
<
String
>
records
=
new
ArrayList
<>();
records
.
add
(
record
);
records
.
add
(
record
);
...
@@ -268,9 +283,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -268,9 +283,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private
void
checkForEquipEdit
(
Object
record
)
{
private
void
checkForEquipEdit
(
Object
record
)
{
// 标识编辑
// 标识编辑
if
(
record
!=
null
)
{
if
(
record
!=
null
)
{
Integer
inUseTime
=
commonService
.
countEquipInUseTimesForEdit
(
record
.
toString
());
Integer
inUseTime
=
commonService
.
countEquipInUseTimesForEdit
(
record
.
toString
());
if
(
inUseTime
>
0
)
{
if
(
inUseTime
>
0
)
{
throw
new
BadRequest
(
"此设备在被其他业务引用,不可编辑!"
);
throw
new
BadRequest
(
"此设备在被其他业务引用,不可编辑!"
);
}
}
}
}
...
@@ -292,7 +307,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -292,7 +307,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
Object
recordList
=
map
.
get
(
"recordList"
);
Object
recordList
=
map
.
get
(
"recordList"
);
List
<
String
>
records
=
new
ArrayList
<>();
List
<
String
>
records
=
new
ArrayList
<>();
List
<
ESEquipmentCategoryDto
>
list
=
new
ArrayList
<>();
List
<
ESEquipmentCategoryDto
>
list
=
new
ArrayList
<>();
//删除ES数据
//
删除ES数据
if
(
recordList
.
toString
().
contains
(
"["
))
{
if
(
recordList
.
toString
().
contains
(
"["
))
{
for
(
String
record
:
(
List
<
String
>)
recordList
)
{
for
(
String
record
:
(
List
<
String
>)
recordList
)
{
records
.
add
(
record
);
records
.
add
(
record
);
...
@@ -309,17 +324,17 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -309,17 +324,17 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// 删除校验,被引用时不可删除
// 删除校验,被引用时不可删除
this
.
checkForDelete
(
records
);
this
.
checkForDelete
(
records
);
//删除涉及的19张表的数据
//
删除涉及的19张表的数据
superviseInfoMapper
.
deleteDataAll
(
records
);
superviseInfoMapper
.
deleteDataAll
(
records
);
//删除es中的数据
//
删除es中的数据
esEquipmentCategory
.
deleteAll
(
list
);
esEquipmentCategory
.
deleteAll
(
list
);
return
true
;
return
true
;
}
}
private
void
checkForDelete
(
List
<
String
>
records
)
{
private
void
checkForDelete
(
List
<
String
>
records
)
{
for
(
String
record:
records
)
{
for
(
String
record
:
records
)
{
Integer
useTime
=
commonService
.
countEquipInUseTimesForDel
(
record
);
Integer
useTime
=
commonService
.
countEquipInUseTimesForDel
(
record
);
if
(
useTime
>
0
)
{
if
(
useTime
>
0
)
{
String
msg
=
getTipMsgString
(
record
);
String
msg
=
getTipMsgString
(
record
);
throw
new
BadRequest
(
msg
);
throw
new
BadRequest
(
msg
);
}
}
...
@@ -332,7 +347,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -332,7 +347,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
return
useTime
<=
0
;
return
useTime
<=
0
;
}
}
private
String
getTipMsgString
(
String
record
)
{
private
String
getTipMsgString
(
String
record
)
{
IdxBizJgRegisterInfo
registerInfo
=
this
.
getOne
(
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
eq
(
"RECORD"
,
record
));
IdxBizJgRegisterInfo
registerInfo
=
this
.
getOne
(
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
eq
(
"RECORD"
,
record
));
return
String
.
format
(
"存在被引用的设备,设备代码:%s"
,
registerInfo
.
getEquCode
());
return
String
.
format
(
"存在被引用的设备,设备代码:%s"
,
registerInfo
.
getEquCode
());
...
@@ -356,7 +370,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -356,7 +370,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
ValidationUtil
.
isEmpty
(
equipInfoMap
))
{
if
(!
ValidationUtil
.
isEmpty
(
equipInfoMap
))
{
resultMap
.
put
(
EQUIP_INFO_FORM_ID
,
equipInfoMap
);
resultMap
.
put
(
EQUIP_INFO_FORM_ID
,
equipInfoMap
);
}
}
//设备参数
//
设备参数
if
(
equIpClassMap
.
containsKey
(
"EQU_LIST"
)
&&
!
ValidationUtil
.
isEmpty
(
equIpClassMap
.
get
(
"EQU_LIST"
).
toString
()))
{
if
(
equIpClassMap
.
containsKey
(
"EQU_LIST"
)
&&
!
ValidationUtil
.
isEmpty
(
equIpClassMap
.
get
(
"EQU_LIST"
).
toString
()))
{
Map
<
String
,
Object
>
equipParamsMap
=
this
.
getEquipParamsMap
(
record
,
""
,
equIpClassMap
.
get
(
"EQU_LIST"
).
toString
());
Map
<
String
,
Object
>
equipParamsMap
=
this
.
getEquipParamsMap
(
record
,
""
,
equIpClassMap
.
get
(
"EQU_LIST"
).
toString
());
...
@@ -392,7 +406,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -392,7 +406,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
ValidationUtil
.
isEmpty
(
equipInfoMap
))
{
if
(!
ValidationUtil
.
isEmpty
(
equipInfoMap
))
{
resultMap
.
putAll
(
equipInfoMap
);
resultMap
.
putAll
(
equipInfoMap
);
}
}
//设备参数
//
设备参数
if
(
equIpClassMap
.
containsKey
(
"EQU_LIST"
)
&&
!
ValidationUtil
.
isEmpty
(
equIpClassMap
.
get
(
"EQU_LIST"
).
toString
()))
{
if
(
equIpClassMap
.
containsKey
(
"EQU_LIST"
)
&&
!
ValidationUtil
.
isEmpty
(
equIpClassMap
.
get
(
"EQU_LIST"
).
toString
()))
{
Map
<
String
,
Object
>
equipParamsMap
=
this
.
getEquipParamsMap
(
record
,
""
,
equIpClassMap
.
get
(
"EQU_LIST"
).
toString
());
Map
<
String
,
Object
>
equipParamsMap
=
this
.
getEquipParamsMap
(
record
,
""
,
equIpClassMap
.
get
(
"EQU_LIST"
).
toString
());
...
@@ -417,7 +431,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -417,7 +431,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
ValidationUtil
.
isEmpty
(
equipInfoMap
))
{
if
(!
ValidationUtil
.
isEmpty
(
equipInfoMap
))
{
resultMap
.
putAll
(
equipInfoMap
);
resultMap
.
putAll
(
equipInfoMap
);
}
}
//设备参数
//
设备参数
if
(
equIpClassMap
.
containsKey
(
"equList"
)
&&
!
ValidationUtil
.
isEmpty
(
equIpClassMap
.
get
(
"equList"
).
toString
()))
{
if
(
equIpClassMap
.
containsKey
(
"equList"
)
&&
!
ValidationUtil
.
isEmpty
(
equIpClassMap
.
get
(
"equList"
).
toString
()))
{
Map
<
String
,
Object
>
equipParamsMap
=
this
.
getEquipParamsMap
(
record
,
"CamelCase"
,
equIpClassMap
.
get
(
"equList"
).
toString
());
Map
<
String
,
Object
>
equipParamsMap
=
this
.
getEquipParamsMap
(
record
,
"CamelCase"
,
equIpClassMap
.
get
(
"equList"
).
toString
());
if
(!
ValidationUtil
.
isEmpty
(
equipParamsMap
))
{
if
(!
ValidationUtil
.
isEmpty
(
equipParamsMap
))
{
...
@@ -429,8 +443,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -429,8 +443,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
resultMap
.
put
(
"orgBranchName"
,
superviseInfo
.
getOrgBranchName
());
resultMap
.
put
(
"orgBranchName"
,
superviseInfo
.
getOrgBranchName
());
}
}
resultMap
.
remove
(
"instanceId"
);
resultMap
.
remove
(
"instanceId"
);
for
(
String
field
:
jsonFields
)
{
for
(
String
field
:
jsonFields
)
{
if
(
resultMap
.
get
(
field
)
!=
null
&&
resultMap
.
get
(
field
)
instanceof
String
)
{
if
(
resultMap
.
get
(
field
)
!=
null
&&
resultMap
.
get
(
field
)
instanceof
String
)
{
resultMap
.
put
(
field
,
JSON
.
parse
(
resultMap
.
get
(
field
).
toString
()));
resultMap
.
put
(
field
,
JSON
.
parse
(
resultMap
.
get
(
field
).
toString
()));
}
}
}
}
...
@@ -441,11 +455,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -441,11 +455,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
public
List
<
DictionarieValueModel
>
equCategoryListByCompanyType
(
ReginParams
selectedOrgInfo
,
String
equList
)
{
public
List
<
DictionarieValueModel
>
equCategoryListByCompanyType
(
ReginParams
selectedOrgInfo
,
String
equList
)
{
String
companyType
=
selectedOrgInfo
.
getCompany
().
getCompanyType
();
String
companyType
=
selectedOrgInfo
.
getCompany
().
getCompanyType
();
String
dictCodePrefix
=
getDictCodePrefix
(
companyType
,
equList
);
String
dictCodePrefix
=
getDictCodePrefix
(
companyType
,
equList
);
if
(
StringUtils
.
isEmpty
(
dictCodePrefix
))
{
if
(
StringUtils
.
isEmpty
(
dictCodePrefix
))
{
return
new
ArrayList
<>();
return
new
ArrayList
<>();
}
}
String
dictCode
=
String
.
format
(
"%s_%s"
,
dictCodePrefix
,
equipAddDictCodeSuffix
);
String
dictCode
=
String
.
format
(
"%s_%s"
,
dictCodePrefix
,
equipAddDictCodeSuffix
);
return
FeignUtil
.
remoteCall
(()
->
Systemctl
.
dictionarieClient
.
dictValues
(
dictCode
));
return
FeignUtil
.
remoteCall
(()
->
Systemctl
.
dictionarieClient
.
dictValues
(
dictCode
));
}
}
private
String
getDictCodePrefix
(
String
companyType
,
String
equList
)
{
private
String
getDictCodePrefix
(
String
companyType
,
String
equList
)
{
...
@@ -462,7 +476,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -462,7 +476,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
return
StringUtils
.
isNotEmpty
(
equList
)
?
equList
+
"_"
+
dictCodePrefix
:
dictCodePrefix
;
return
StringUtils
.
isNotEmpty
(
equList
)
?
equList
+
"_"
+
dictCodePrefix
:
dictCodePrefix
;
}
}
/**
/**
* 查询设备种类信息
* 查询设备种类信息
*
*
...
@@ -472,12 +485,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -472,12 +485,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
*/
*/
private
Map
<
String
,
Object
>
getEquIpClassMap
(
String
record
,
String
fieldType
)
{
private
Map
<
String
,
Object
>
getEquIpClassMap
(
String
record
,
String
fieldType
)
{
Map
<
String
,
Object
>
objMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
objMap
=
new
HashMap
<>();
//注册登记
//
注册登记
IdxBizJgRegisterInfo
registerInfo
=
this
.
getOne
(
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
eq
(
"RECORD"
,
record
));
IdxBizJgRegisterInfo
registerInfo
=
this
.
getOne
(
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
eq
(
"RECORD"
,
record
));
if
(!
ValidationUtil
.
isEmpty
(
registerInfo
))
{
if
(!
ValidationUtil
.
isEmpty
(
registerInfo
))
{
String
equList
=
registerInfo
.
getEquList
();
//设备种类
String
equList
=
registerInfo
.
getEquList
();
//
设备种类
String
equCategory
=
registerInfo
.
getEquCategory
();
//设备类别
String
equCategory
=
registerInfo
.
getEquCategory
();
//
设备类别
String
equDefine
=
registerInfo
.
getEquDefine
();
//设备品种
String
equDefine
=
registerInfo
.
getEquDefine
();
//
设备品种
List
<
EquipmentCategory
>
categoryList0
=
commonService
.
getEquipmentCategoryList
(
equList
,
null
);
List
<
EquipmentCategory
>
categoryList0
=
commonService
.
getEquipmentCategoryList
(
equList
,
null
);
List
<
EquipmentCategory
>
categoryList1
=
commonService
.
getEquipmentCategoryList
(
equCategory
,
null
);
List
<
EquipmentCategory
>
categoryList1
=
commonService
.
getEquipmentCategoryList
(
equCategory
,
null
);
List
<
EquipmentCategory
>
categoryList2
=
commonService
.
getEquipmentCategoryList
(
equDefine
,
null
);
List
<
EquipmentCategory
>
categoryList2
=
commonService
.
getEquipmentCategoryList
(
equDefine
,
null
);
...
@@ -511,7 +524,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -511,7 +524,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
registerInfoMap
.
isEmpty
())
{
if
(!
registerInfoMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
registerInfoMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
registerInfoMap
.
entrySet
()
.
stream
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
objMap
.
putAll
(
filterMap
);
}
}
...
@@ -533,7 +546,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -533,7 +546,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String
county
=
""
;
String
county
=
""
;
String
street
=
""
;
String
street
=
""
;
String
fullAddress
=
""
;
String
fullAddress
=
""
;
//使用信息
//
使用信息
IdxBizJgUseInfo
useInfo
=
idxBizJgUseInfoService
.
getOneData
(
record
);
IdxBizJgUseInfo
useInfo
=
idxBizJgUseInfoService
.
getOneData
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
useInfo
))
{
if
(!
ValidationUtil
.
isEmpty
(
useInfo
))
{
...
@@ -576,11 +589,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -576,11 +589,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
useInfoMap
.
put
(
"fullAddress"
,
fullAddress
);
useInfoMap
.
put
(
"fullAddress"
,
fullAddress
);
}
}
useInfoMap
.
put
(
"useinfoSeq"
,
useInfo
.
getSequenceNbr
());
useInfoMap
.
put
(
"useinfoSeq"
,
useInfo
.
getSequenceNbr
());
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getLongitudeLatitude
()))
{
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getLongitudeLatitude
()))
{
useInfoMap
.
put
(
"longitudeLatitude"
,
JSON
.
parseObject
(
useInfo
.
getLongitudeLatitude
()));
useInfoMap
.
put
(
"longitudeLatitude"
,
JSON
.
parseObject
(
useInfo
.
getLongitudeLatitude
()));
useInfoMap
.
put
(
"useLongitudeLatitude"
,
JSON
.
parseObject
(
useInfo
.
getLongitudeLatitude
()));
useInfoMap
.
put
(
"useLongitudeLatitude"
,
JSON
.
parseObject
(
useInfo
.
getLongitudeLatitude
()));
}
}
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getAddress
()))
{
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getAddress
()))
{
useInfoMap
.
put
(
"useAddress"
,
useInfo
.
getAddress
());
useInfoMap
.
put
(
"useAddress"
,
useInfo
.
getAddress
());
}
}
...
@@ -602,23 +615,23 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -602,23 +615,23 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
useInfoMap
.
put
(
"FULLADDRESS"
,
fullAddress
);
useInfoMap
.
put
(
"FULLADDRESS"
,
fullAddress
);
}
}
useInfoMap
.
put
(
"USEINFO_SEQ"
,
useInfo
.
getSequenceNbr
());
useInfoMap
.
put
(
"USEINFO_SEQ"
,
useInfo
.
getSequenceNbr
());
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getLongitudeLatitude
()))
{
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getLongitudeLatitude
()))
{
useInfoMap
.
put
(
"LONGITUDE_LATITUDE"
,
JSON
.
parseObject
(
useInfo
.
getLongitudeLatitude
()));
useInfoMap
.
put
(
"LONGITUDE_LATITUDE"
,
JSON
.
parseObject
(
useInfo
.
getLongitudeLatitude
()));
useInfoMap
.
put
(
"USE_LONGITUDE_LATITUDE"
,
JSON
.
parseObject
(
useInfo
.
getLongitudeLatitude
()));
useInfoMap
.
put
(
"USE_LONGITUDE_LATITUDE"
,
JSON
.
parseObject
(
useInfo
.
getLongitudeLatitude
()));
}
}
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getAddress
()))
{
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getAddress
()))
{
useInfoMap
.
put
(
"USE_ADDRESS"
,
useInfo
.
getAddress
());
useInfoMap
.
put
(
"USE_ADDRESS"
,
useInfo
.
getAddress
());
}
}
}
}
if
(!
useInfoMap
.
isEmpty
())
{
if
(!
useInfoMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
useInfoMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
useInfoMap
.
entrySet
()
.
stream
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
objMap
.
putAll
(
filterMap
);
}
}
}
}
//设计制造
//
设计制造
IdxBizJgDesignInfo
designInfo
=
iIdxBizJgDesignInfoService
.
getOneData
(
record
);
IdxBizJgDesignInfo
designInfo
=
iIdxBizJgDesignInfoService
.
getOneData
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
designInfo
))
{
if
(!
ValidationUtil
.
isEmpty
(
designInfo
))
{
Map
<
String
,
Object
>
designInfoMap
;
Map
<
String
,
Object
>
designInfoMap
;
...
@@ -631,19 +644,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -631,19 +644,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
designInfoMap
.
put
(
"otherAccessoriesDes"
,
JSON
.
parse
(
String
.
valueOf
(
designInfoMap
.
get
(
"otherAccessoriesDes"
))));
designInfoMap
.
put
(
"otherAccessoriesDes"
,
JSON
.
parse
(
String
.
valueOf
(
designInfoMap
.
get
(
"otherAccessoriesDes"
))));
}
}
}
else
{
}
else
{
String
[]
fields
=
{
"DESIGN_DOC"
,
"DESIGN_STANDARD"
,
"OTHER_ACCESSORIES_DES"
};
String
[]
fields
=
{
"DESIGN_DOC"
,
"DESIGN_STANDARD"
,
"OTHER_ACCESSORIES_DES"
};
designInfoMap
=
convertCamelToUnderscore
(
designInfo
,
fields
);
designInfoMap
=
convertCamelToUnderscore
(
designInfo
,
fields
);
designInfoMap
.
put
(
"DESIGNINFO_SEQ"
,
designInfo
.
getSequenceNbr
());
designInfoMap
.
put
(
"DESIGNINFO_SEQ"
,
designInfo
.
getSequenceNbr
());
}
}
if
(!
designInfoMap
.
isEmpty
())
{
if
(!
designInfoMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
designInfoMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
designInfoMap
.
entrySet
()
.
stream
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
objMap
.
putAll
(
filterMap
);
}
}
}
}
//制造信息
//
制造信息
IdxBizJgFactoryInfo
factoryInfo
=
iIdxBizJgFactoryInfoService
.
getOneData
(
record
);
IdxBizJgFactoryInfo
factoryInfo
=
iIdxBizJgFactoryInfoService
.
getOneData
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
factoryInfo
))
{
if
(!
ValidationUtil
.
isEmpty
(
factoryInfo
))
{
Map
<
String
,
Object
>
factoryInfoMap
;
Map
<
String
,
Object
>
factoryInfoMap
;
...
@@ -666,7 +679,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -666,7 +679,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
}
}
else
{
}
else
{
String
[]
fields
=
{
"FACTORY_STANDARD"
,
"PRODUCT_QUALITY_YIELD_PROVE"
,
"INS_USE_MAINTAIN_EXPLAIN"
,
String
[]
fields
=
{
"FACTORY_STANDARD"
,
"PRODUCT_QUALITY_YIELD_PROVE"
,
"INS_USE_MAINTAIN_EXPLAIN"
,
"OTHER_ACCESSORIES_FACT"
,
"FACT_SUPERVISION_INSPECTION_REPORT"
,
"BOILER_ENERGY_EFFICIENCY_CERTIFICATE"
};
"OTHER_ACCESSORIES_FACT"
,
"FACT_SUPERVISION_INSPECTION_REPORT"
,
"BOILER_ENERGY_EFFICIENCY_CERTIFICATE"
};
factoryInfoMap
=
convertCamelToUnderscore
(
factoryInfo
,
fields
);
factoryInfoMap
=
convertCamelToUnderscore
(
factoryInfo
,
fields
);
String
imported
=
factoryInfo
.
getImported
();
String
imported
=
factoryInfo
.
getImported
();
if
(
"0"
.
equals
(
imported
))
{
if
(
"0"
.
equals
(
imported
))
{
...
@@ -679,12 +692,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -679,12 +692,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
factoryInfoMap
.
isEmpty
())
{
if
(!
factoryInfoMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
factoryInfoMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
factoryInfoMap
.
entrySet
()
.
stream
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
objMap
.
putAll
(
filterMap
);
}
}
}
}
//施工信息 【一对多,暂时只取最新一条数据】
//
施工信息 【一对多,暂时只取最新一条数据】
IdxBizJgConstructionInfo
constructionInfo
=
iIdxBizJgConstructionInfoService
.
queryNewestDetailByRecord
(
record
);
IdxBizJgConstructionInfo
constructionInfo
=
iIdxBizJgConstructionInfoService
.
queryNewestDetailByRecord
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
constructionInfo
))
{
if
(!
ValidationUtil
.
isEmpty
(
constructionInfo
))
{
Map
<
String
,
Object
>
constructionInfoMap
;
Map
<
String
,
Object
>
constructionInfoMap
;
...
@@ -698,16 +711,16 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -698,16 +711,16 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
constructionInfoMap
.
isEmpty
())
{
if
(!
constructionInfoMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
constructionInfoMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
constructionInfoMap
.
entrySet
()
.
stream
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
objMap
.
putAll
(
filterMap
);
}
}
}
}
//注册登记
//
注册登记
IdxBizJgRegisterInfo
registerInfo
=
this
.
getOne
(
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
eq
(
"RECORD"
,
record
));
IdxBizJgRegisterInfo
registerInfo
=
this
.
getOne
(
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
eq
(
"RECORD"
,
record
));
if
(!
ValidationUtil
.
isEmpty
(
registerInfo
))
{
if
(!
ValidationUtil
.
isEmpty
(
registerInfo
))
{
String
equCategory
=
registerInfo
.
getEquCategory
();
//设备类别
String
equCategory
=
registerInfo
.
getEquCategory
();
//
设备类别
String
equDefine
=
registerInfo
.
getEquDefine
();
//设备品种
String
equDefine
=
registerInfo
.
getEquDefine
();
//
设备品种
List
<
EquipmentCategory
>
categoryList1
=
commonService
.
getEquipmentCategoryList
(
equCategory
,
null
);
List
<
EquipmentCategory
>
categoryList1
=
commonService
.
getEquipmentCategoryList
(
equCategory
,
null
);
List
<
EquipmentCategory
>
categoryList2
=
commonService
.
getEquipmentCategoryList
(
equDefine
,
null
);
List
<
EquipmentCategory
>
categoryList2
=
commonService
.
getEquipmentCategoryList
(
equDefine
,
null
);
Map
<
String
,
Object
>
registerInfoMap
;
Map
<
String
,
Object
>
registerInfoMap
;
...
@@ -726,7 +739,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -726,7 +739,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
registerInfoMap
.
put
(
"otherAccessoriesReg"
,
JSON
.
parse
(
String
.
valueOf
(
registerInfoMap
.
get
(
"otherAccessoriesReg"
))));
registerInfoMap
.
put
(
"otherAccessoriesReg"
,
JSON
.
parse
(
String
.
valueOf
(
registerInfoMap
.
get
(
"otherAccessoriesReg"
))));
}
}
}
else
{
}
else
{
String
[]
fields
=
{
"PRODUCT_PHOTO"
,
"OTHER_ACCESSORIES_REG"
};
String
[]
fields
=
{
"PRODUCT_PHOTO"
,
"OTHER_ACCESSORIES_REG"
};
registerInfoMap
=
convertCamelToUnderscore
(
registerInfo
,
fields
);
registerInfoMap
=
convertCamelToUnderscore
(
registerInfo
,
fields
);
registerInfoMap
.
put
(
"REGISTERINFO_SEQ"
,
registerInfo
.
getSequenceNbr
());
registerInfoMap
.
put
(
"REGISTERINFO_SEQ"
,
registerInfo
.
getSequenceNbr
());
registerInfoMap
.
put
(
"SEQUENCE_NBR"
,
registerInfo
.
getSequenceNbr
());
registerInfoMap
.
put
(
"SEQUENCE_NBR"
,
registerInfo
.
getSequenceNbr
());
...
@@ -740,12 +753,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -740,12 +753,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
registerInfoMap
.
isEmpty
())
{
if
(!
registerInfoMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
registerInfoMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
registerInfoMap
.
entrySet
()
.
stream
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
objMap
.
putAll
(
filterMap
);
}
}
}
}
//维保备案【一对多,暂时只取最新一条数据】
//
维保备案【一对多,暂时只取最新一条数据】
IdxBizJgMaintenanceRecordInfo
maintenanceRecordInfo
=
iIdxBizJgMaintenanceRecordInfoService
.
queryNewestDetailByRecord
(
record
);
IdxBizJgMaintenanceRecordInfo
maintenanceRecordInfo
=
iIdxBizJgMaintenanceRecordInfoService
.
queryNewestDetailByRecord
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
maintenanceRecordInfo
))
{
if
(!
ValidationUtil
.
isEmpty
(
maintenanceRecordInfo
))
{
Map
<
String
,
Object
>
maintenanceRecordInfoMap
;
Map
<
String
,
Object
>
maintenanceRecordInfoMap
;
...
@@ -762,12 +775,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -762,12 +775,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
maintenanceRecordInfoMap
.
isEmpty
())
{
if
(!
maintenanceRecordInfoMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
maintenanceRecordInfoMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
maintenanceRecordInfoMap
.
entrySet
()
.
stream
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
objMap
.
putAll
(
filterMap
);
}
}
}
}
//监督管理
//
监督管理
IdxBizJgSupervisionInfo
supervisionInfo
=
iIdxBizJgSupervisionInfoService
.
getOneData
(
record
);
IdxBizJgSupervisionInfo
supervisionInfo
=
iIdxBizJgSupervisionInfoService
.
getOneData
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
supervisionInfo
))
{
if
(!
ValidationUtil
.
isEmpty
(
supervisionInfo
))
{
Map
<
String
,
Object
>
supervisionInfoMap
;
Map
<
String
,
Object
>
supervisionInfoMap
;
...
@@ -781,12 +794,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -781,12 +794,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
supervisionInfoMap
.
isEmpty
())
{
if
(!
supervisionInfoMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
supervisionInfoMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
supervisionInfoMap
.
entrySet
()
.
stream
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
objMap
.
putAll
(
filterMap
);
}
}
}
}
//其他信息
//
其他信息
IdxBizJgOtherInfo
otherInfo
=
iIdxBizJgOtherInfoService
.
getOneData
(
record
);
IdxBizJgOtherInfo
otherInfo
=
iIdxBizJgOtherInfoService
.
getOneData
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
otherInfo
))
{
if
(!
ValidationUtil
.
isEmpty
(
otherInfo
))
{
Map
<
String
,
Object
>
otherInfoMap
;
Map
<
String
,
Object
>
otherInfoMap
;
...
@@ -800,12 +813,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -800,12 +813,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
otherInfoMap
.
isEmpty
())
{
if
(!
otherInfoMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
otherInfoMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
otherInfoMap
.
entrySet
()
.
stream
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
objMap
.
putAll
(
filterMap
);
}
}
}
}
//检验检测【一对多,暂时只取最新一条数据】
//
检验检测【一对多,暂时只取最新一条数据】
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
iIdxBizJgInspectionDetectionInfoService
.
queryNewestDetailByRecord
(
record
);
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
iIdxBizJgInspectionDetectionInfoService
.
queryNewestDetailByRecord
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
inspectionDetectionInfo
))
{
if
(!
ValidationUtil
.
isEmpty
(
inspectionDetectionInfo
))
{
Map
<
String
,
Object
>
inspectionDetectionInfoMap
;
Map
<
String
,
Object
>
inspectionDetectionInfoMap
;
...
@@ -821,46 +834,46 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -821,46 +834,46 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
inspectionDetectionInfoMap
.
isEmpty
())
{
if
(!
inspectionDetectionInfoMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
inspectionDetectionInfoMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
inspectionDetectionInfoMap
.
entrySet
()
.
stream
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
objMap
.
putAll
(
filterMap
);
}
}
}
}
objMap
.
put
(
"completedBusinessTypes"
,
judgeTheBusinessAccordingByRecord
(
record
,
objMap
));
objMap
.
put
(
"completedBusinessTypes"
,
judgeTheBusinessAccordingByRecord
(
record
,
objMap
));
// 账号类型(用于车用气瓶流程页面-》监管审核-》打开设备详情 时隐藏保存按钮)
// 账号类型(用于车用气瓶流程页面-》监管审核-》打开设备详情 时隐藏保存按钮)
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
objMap
.
put
(
"accountType"
,
reginParams
.
getCompany
().
getCompanyType
());
objMap
.
put
(
"accountType"
,
reginParams
.
getCompany
().
getCompanyType
());
return
objMap
;
return
objMap
;
}
}
/**
/**
* 根据record判断设备完成了哪些业务(安装告知/维保备案/使用登记)
* 根据record判断设备完成了哪些业务(安装告知/维保备案/使用登记)
*
* @return
* @return
*/
*/
public
String
judgeTheBusinessAccordingByRecord
(
String
record
,
Map
<
String
,
Object
>
objMap
)
{
public
String
judgeTheBusinessAccordingByRecord
(
String
record
,
Map
<
String
,
Object
>
objMap
)
{
String
business
=
""
;
String
business
=
""
;
// 安装告知
// 安装告知
Map
<
String
,
Object
>
installDetail
=
jgUseRegistrationMapper
.
getiInstallDetail
(
record
);
Map
<
String
,
Object
>
installDetail
=
jgUseRegistrationMapper
.
getiInstallDetail
(
record
);
if
(!
ObjectUtils
.
isEmpty
(
installDetail
)){
if
(!
ObjectUtils
.
isEmpty
(
installDetail
))
{
business
=
business
+
",安装告知"
;
business
=
business
+
",安装告知"
;
objMap
.
putAll
(
installDetail
);
objMap
.
putAll
(
installDetail
);
objMap
.
put
(
"insOtherAccessories"
,
JSON
.
parse
(
Optional
.
ofNullable
(
installDetail
.
get
(
"insOtherAccessories"
)).
orElse
(
""
).
toString
()));
objMap
.
put
(
"insOtherAccessories"
,
JSON
.
parse
(
Optional
.
ofNullable
(
installDetail
.
get
(
"insOtherAccessories"
)).
orElse
(
""
).
toString
()));
objMap
.
put
(
"installProxyStatementAttachment"
,
JSON
.
parse
(
Optional
.
ofNullable
(
installDetail
.
get
(
"installProxyStatementAttachment"
)).
orElse
(
""
).
toString
()));
objMap
.
put
(
"installProxyStatementAttachment"
,
JSON
.
parse
(
Optional
.
ofNullable
(
installDetail
.
get
(
"installProxyStatementAttachment"
)).
orElse
(
""
).
toString
()));
objMap
.
put
(
"installContractAttachment"
,
JSON
.
parse
(
Optional
.
ofNullable
(
installDetail
.
get
(
"installContractAttachment"
)).
orElse
(
""
).
toString
()));
objMap
.
put
(
"installContractAttachment"
,
JSON
.
parse
(
Optional
.
ofNullable
(
installDetail
.
get
(
"installContractAttachment"
)).
orElse
(
""
).
toString
()));
}
}
// 维保备案
// 维保备案
Map
<
String
,
Object
>
maintenanceDetail
=
jgUseRegistrationMapper
.
getMaintenanceDetail
(
record
);
Map
<
String
,
Object
>
maintenanceDetail
=
jgUseRegistrationMapper
.
getMaintenanceDetail
(
record
);
if
(!
ObjectUtils
.
isEmpty
(
maintenanceDetail
)){
if
(!
ObjectUtils
.
isEmpty
(
maintenanceDetail
))
{
business
=
business
+
",维保备案"
;
business
=
business
+
",维保备案"
;
objMap
.
putAll
(
maintenanceDetail
);
objMap
.
putAll
(
maintenanceDetail
);
objMap
.
put
(
"maintenanceContract"
,
JSON
.
parse
(
Optional
.
ofNullable
(
maintenanceDetail
.
get
(
"maintenanceContract"
)).
orElse
(
""
).
toString
()));
objMap
.
put
(
"maintenanceContract"
,
JSON
.
parse
(
Optional
.
ofNullable
(
maintenanceDetail
.
get
(
"maintenanceContract"
)).
orElse
(
""
).
toString
()));
objMap
.
put
(
"maintOtherAccessories"
,
JSON
.
parse
(
Optional
.
ofNullable
(
maintenanceDetail
.
get
(
"maintOtherAccessories"
)).
orElse
(
""
).
toString
()));
objMap
.
put
(
"maintOtherAccessories"
,
JSON
.
parse
(
Optional
.
ofNullable
(
maintenanceDetail
.
get
(
"maintOtherAccessories"
)).
orElse
(
""
).
toString
()));
}
}
// 使用登记
// 使用登记
Map
<
String
,
Object
>
useRegistrationDetail
=
jgUseRegistrationMapper
.
getUseRegistrationDetail
(
record
);
Map
<
String
,
Object
>
useRegistrationDetail
=
jgUseRegistrationMapper
.
getUseRegistrationDetail
(
record
);
if
(!
ObjectUtils
.
isEmpty
(
useRegistrationDetail
)){
if
(!
ObjectUtils
.
isEmpty
(
useRegistrationDetail
))
{
business
=
business
+
",使用登记"
;
business
=
business
+
",使用登记"
;
objMap
.
putAll
(
useRegistrationDetail
);
objMap
.
putAll
(
useRegistrationDetail
);
}
}
...
@@ -878,7 +891,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -878,7 +891,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
Map
<
String
,
Object
>
objMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
objMap
=
new
HashMap
<>();
if
(
EquipmentClassifityEnum
.
DT
.
getCode
().
equals
(
equipCode
))
{
if
(
EquipmentClassifityEnum
.
DT
.
getCode
().
equals
(
equipCode
))
{
//电梯
//
电梯
IdxBizJgTechParamsElevator
elevator
=
iIdxBizJgTechParamsElevatorService
.
getOneData
(
record
);
IdxBizJgTechParamsElevator
elevator
=
iIdxBizJgTechParamsElevatorService
.
getOneData
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
elevator
))
{
if
(!
ValidationUtil
.
isEmpty
(
elevator
))
{
Map
<
String
,
Object
>
elevatorMap
;
Map
<
String
,
Object
>
elevatorMap
;
...
@@ -894,13 +907,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -894,13 +907,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
elevatorMap
.
isEmpty
())
{
if
(!
elevatorMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
elevatorMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
elevatorMap
.
entrySet
()
.
stream
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
objMap
.
putAll
(
filterMap
);
}
}
}
}
}
else
if
(
EquipmentClassifityEnum
.
CC
.
getCode
().
equals
(
equipCode
))
{
}
else
if
(
EquipmentClassifityEnum
.
CC
.
getCode
().
equals
(
equipCode
))
{
//厂车
//
厂车
IdxBizJgTechParamsVehicle
vehicle
=
iIdxBizJgTechParamsVehicleService
.
getOneData
(
record
);
IdxBizJgTechParamsVehicle
vehicle
=
iIdxBizJgTechParamsVehicleService
.
getOneData
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
vehicle
))
{
if
(!
ValidationUtil
.
isEmpty
(
vehicle
))
{
Map
<
String
,
Object
>
vehicleMap
;
Map
<
String
,
Object
>
vehicleMap
;
...
@@ -914,7 +927,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -914,7 +927,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
vehicleMap
.
isEmpty
())
{
if
(!
vehicleMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
vehicleMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
vehicleMap
.
entrySet
()
.
stream
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
objMap
.
putAll
(
filterMap
);
}
}
...
@@ -924,7 +937,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -924,7 +937,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
objMap
.
put
(
"subForm_sey164b51a"
,
mainPartsMapsByRecord
);
objMap
.
put
(
"subForm_sey164b51a"
,
mainPartsMapsByRecord
);
objMap
.
put
(
"subForm_tef7yf5fbr"
,
mainPartsMapsByRecord
);
objMap
.
put
(
"subForm_tef7yf5fbr"
,
mainPartsMapsByRecord
);
}
else
if
(
EquipmentClassifityEnum
.
KYSD
.
getCode
().
equals
(
equipCode
))
{
}
else
if
(
EquipmentClassifityEnum
.
KYSD
.
getCode
().
equals
(
equipCode
))
{
//索道
//
索道
IdxBizJgTechParamsRopeway
ropeway
=
iIdxBizJgTechParamsRopewayService
.
getOneData
(
record
);
IdxBizJgTechParamsRopeway
ropeway
=
iIdxBizJgTechParamsRopewayService
.
getOneData
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
ropeway
))
{
if
(!
ValidationUtil
.
isEmpty
(
ropeway
))
{
Map
<
String
,
Object
>
ropewayMap
;
Map
<
String
,
Object
>
ropewayMap
;
...
@@ -938,7 +951,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -938,7 +951,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
ropewayMap
.
isEmpty
())
{
if
(!
ropewayMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
ropewayMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
ropewayMap
.
entrySet
()
.
stream
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
objMap
.
putAll
(
filterMap
);
}
}
...
@@ -947,7 +960,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -947,7 +960,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
List
<
Map
<
String
,
Object
>>
mainPartsMapsByRecord
=
this
.
getMainPartsMapsByRecord
(
record
,
fieldType
);
List
<
Map
<
String
,
Object
>>
mainPartsMapsByRecord
=
this
.
getMainPartsMapsByRecord
(
record
,
fieldType
);
objMap
.
put
(
"subForm_5fi0jewuyh"
,
mainPartsMapsByRecord
);
objMap
.
put
(
"subForm_5fi0jewuyh"
,
mainPartsMapsByRecord
);
}
else
if
(
EquipmentClassifityEnum
.
YLSS
.
getCode
().
equals
(
equipCode
))
{
}
else
if
(
EquipmentClassifityEnum
.
YLSS
.
getCode
().
equals
(
equipCode
))
{
//游乐设施
//
游乐设施
IdxBizJgTechParamsRides
rides
=
iIdxBizJgTechParamsRidesService
.
getOneData
(
record
);
IdxBizJgTechParamsRides
rides
=
iIdxBizJgTechParamsRidesService
.
getOneData
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
rides
))
{
if
(!
ValidationUtil
.
isEmpty
(
rides
))
{
Map
<
String
,
Object
>
ridesMap
;
Map
<
String
,
Object
>
ridesMap
;
...
@@ -961,14 +974,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -961,14 +974,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
ridesMap
.
isEmpty
())
{
if
(!
ridesMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
ridesMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
ridesMap
.
entrySet
()
.
stream
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
objMap
.
putAll
(
filterMap
);
}
}
}
}
}
else
if
(
EquipmentClassifityEnum
.
GL
.
getCode
().
equals
(
equipCode
))
{
}
else
if
(
EquipmentClassifityEnum
.
GL
.
getCode
().
equals
(
equipCode
))
{
//锅炉
//
锅炉
IdxBizJgTechParamsBoiler
boiler
=
iIdxBizJgTechParamsBoilerService
.
getOneData
(
record
);
IdxBizJgTechParamsBoiler
boiler
=
iIdxBizJgTechParamsBoilerService
.
getOneData
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
boiler
))
{
if
(!
ValidationUtil
.
isEmpty
(
boiler
))
{
Map
<
String
,
Object
>
boilerMap
;
Map
<
String
,
Object
>
boilerMap
;
...
@@ -982,7 +995,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -982,7 +995,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
boilerMap
.
isEmpty
())
{
if
(!
boilerMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
boilerMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
boilerMap
.
entrySet
()
.
stream
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
objMap
.
putAll
(
filterMap
);
}
}
...
@@ -991,7 +1004,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -991,7 +1004,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
List
<
Map
<
String
,
Object
>>
protectionDevicesMapsByRecord
=
this
.
getProtectionDevicesMapsByRecord
(
record
,
fieldType
);
List
<
Map
<
String
,
Object
>>
protectionDevicesMapsByRecord
=
this
.
getProtectionDevicesMapsByRecord
(
record
,
fieldType
);
objMap
.
put
(
"subForm_1hh88r4m69"
,
protectionDevicesMapsByRecord
);
objMap
.
put
(
"subForm_1hh88r4m69"
,
protectionDevicesMapsByRecord
);
}
else
if
(
EquipmentClassifityEnum
.
YLRQ
.
getCode
().
equals
(
equipCode
))
{
}
else
if
(
EquipmentClassifityEnum
.
YLRQ
.
getCode
().
equals
(
equipCode
))
{
//压力容器
//
压力容器
IdxBizJgTechParamsVessel
vessel
=
iIdxBizJgTechParamsVesselService
.
getOneData
(
record
);
IdxBizJgTechParamsVessel
vessel
=
iIdxBizJgTechParamsVesselService
.
getOneData
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
vessel
))
{
if
(!
ValidationUtil
.
isEmpty
(
vessel
))
{
Map
<
String
,
Object
>
vesselMap
;
Map
<
String
,
Object
>
vesselMap
;
...
@@ -1005,7 +1018,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1005,7 +1018,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
vesselMap
.
isEmpty
())
{
if
(!
vesselMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
vesselMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
vesselMap
.
entrySet
()
.
stream
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
objMap
.
putAll
(
filterMap
);
}
}
...
@@ -1016,7 +1029,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1016,7 +1029,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
objMap
.
put
(
"subForm_fie04854f2"
,
mainPartsMapsByRecord
);
objMap
.
put
(
"subForm_fie04854f2"
,
mainPartsMapsByRecord
);
objMap
.
put
(
"subForm_d4xdzhsgdj"
,
protectionDevicesMapsByRecord
);
objMap
.
put
(
"subForm_d4xdzhsgdj"
,
protectionDevicesMapsByRecord
);
}
else
if
(
EquipmentClassifityEnum
.
YLGD
.
getCode
().
equals
(
equipCode
))
{
}
else
if
(
EquipmentClassifityEnum
.
YLGD
.
getCode
().
equals
(
equipCode
))
{
//压力管道
//
压力管道
IdxBizJgTechParamsPipeline
pipeline
=
iIdxBizJgTechParamsPipelineService
.
getOneData
(
record
);
IdxBizJgTechParamsPipeline
pipeline
=
iIdxBizJgTechParamsPipelineService
.
getOneData
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
pipeline
))
{
if
(!
ValidationUtil
.
isEmpty
(
pipeline
))
{
Map
<
String
,
Object
>
pipelineMap
;
Map
<
String
,
Object
>
pipelineMap
;
...
@@ -1026,7 +1039,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1026,7 +1039,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
else
{
}
else
{
pipelineMap
=
convertCamelToUnderscore
(
pipeline
,
null
);
pipelineMap
=
convertCamelToUnderscore
(
pipeline
,
null
);
pipelineMap
.
put
(
"PIPELINE_SEQ"
,
pipeline
.
getSequenceNbr
());
pipelineMap
.
put
(
"PIPELINE_SEQ"
,
pipeline
.
getSequenceNbr
());
pipelineMap
.
put
(
"STARTE_POSITION"
,
JSONObject
.
parseObject
(
pipeline
.
getStartePosition
()));
pipelineMap
.
put
(
"STARTE_POSITION"
,
JSONObject
.
parseObject
(
pipeline
.
getStartePosition
()));
}
}
Map
<
String
,
Object
>
filterMap
=
pipelineMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
pipelineMap
.
entrySet
()
.
stream
()
.
stream
()
...
@@ -1038,7 +1051,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1038,7 +1051,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
List
<
Map
<
String
,
Object
>>
mainPartsMapsByRecord
=
this
.
getMainPartsMapsByRecord
(
record
,
fieldType
);
List
<
Map
<
String
,
Object
>>
mainPartsMapsByRecord
=
this
.
getMainPartsMapsByRecord
(
record
,
fieldType
);
objMap
.
put
(
"subForm_9n7nu55z8r"
,
mainPartsMapsByRecord
);
objMap
.
put
(
"subForm_9n7nu55z8r"
,
mainPartsMapsByRecord
);
}
else
if
(
EquipmentClassifityEnum
.
QZJX
.
getCode
().
equals
(
equipCode
))
{
}
else
if
(
EquipmentClassifityEnum
.
QZJX
.
getCode
().
equals
(
equipCode
))
{
//起重机械
//
起重机械
IdxBizJgTechParamsLifting
lifting
=
iIdxBizJgTechParamsLiftingService
.
getOneData
(
record
);
IdxBizJgTechParamsLifting
lifting
=
iIdxBizJgTechParamsLiftingService
.
getOneData
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
lifting
))
{
if
(!
ValidationUtil
.
isEmpty
(
lifting
))
{
Map
<
String
,
Object
>
liftingMap
;
Map
<
String
,
Object
>
liftingMap
;
...
@@ -1052,7 +1065,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1052,7 +1065,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
liftingMap
.
isEmpty
())
{
if
(!
liftingMap
.
isEmpty
())
{
Map
<
String
,
Object
>
filterMap
=
liftingMap
.
entrySet
()
Map
<
String
,
Object
>
filterMap
=
liftingMap
.
entrySet
()
.
stream
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
objMap
.
putAll
(
filterMap
);
}
}
...
@@ -1138,7 +1151,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1138,7 +1151,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
*/
*/
public
Page
<
JSONObject
>
queryForEquipmentRegisterPage
(
JSONObject
map
)
{
public
Page
<
JSONObject
>
queryForEquipmentRegisterPage
(
JSONObject
map
)
{
if
(
map
.
containsKey
(
"flag"
)
&&
!
map
.
containsKey
(
"USE_UNIT_CREDIT_CODE"
))
{
if
(
map
.
containsKey
(
"flag"
)
&&
!
map
.
containsKey
(
"USE_UNIT_CREDIT_CODE"
))
{
return
new
Page
<>();
return
new
Page
<>();
}
}
...
@@ -1152,7 +1165,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1152,7 +1165,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
builder
.
trackTotalHits
(
true
);
builder
.
trackTotalHits
(
true
);
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
//获取当前登录人单位类型
//
获取当前登录人单位类型
JSONObject
company
=
getCompanyType
();
JSONObject
company
=
getCompanyType
();
if
(
ValidationUtil
.
isEmpty
(
company
))
{
if
(
ValidationUtil
.
isEmpty
(
company
))
{
result
.
setRecords
(
new
ArrayList
<>());
result
.
setRecords
(
new
ArrayList
<>());
...
@@ -1164,7 +1177,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1164,7 +1177,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String
type
=
company
.
getString
(
"companyType"
);
String
type
=
company
.
getString
(
"companyType"
);
//根据当前登录人查询
//
根据当前登录人查询
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
EQUSTATE
)))
{
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
EQUSTATE
)))
{
map
.
put
(
EQUSTATE
,
EquimentEnum
.
getCode
.
get
(
map
.
get
(
EQUSTATE
).
toString
()).
toString
());
map
.
put
(
EQUSTATE
,
EquimentEnum
.
getCode
.
get
(
map
.
get
(
EQUSTATE
).
toString
()).
toString
());
}
}
...
@@ -1195,7 +1208,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1195,7 +1208,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// DATA_SOURCE 为“jg”的数据(从监管新加的设备)
// DATA_SOURCE 为“jg”的数据(从监管新加的设备)
// 20240314 提出的监管业务不要让企业用户选到之前一码通认领或补录的设备,让从监管业务中去新增
// 20240314 提出的监管业务不要让企业用户选到之前一码通认领或补录的设备,让从监管业务中去新增
BoolQueryBuilder
dBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
dBuilder
=
QueryBuilders
.
boolQuery
();
dBuilder
.
must
(
QueryBuilders
.
termQuery
(
"DATA_SOURCE"
,
QueryParser
.
escape
(
"jg"
)));
dBuilder
.
must
(
QueryBuilders
.
termQuery
(
"DATA_SOURCE"
,
QueryParser
.
escape
(
"jg"
)));
boolMust
.
must
(
dBuilder
);
boolMust
.
must
(
dBuilder
);
String
queryType
=
map
.
getString
(
"QUERY_TYPE"
);
String
queryType
=
map
.
getString
(
"QUERY_TYPE"
);
...
@@ -1219,7 +1232,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1219,7 +1232,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
}
}
}
//通用匹配规则,其他条件构建
//
通用匹配规则,其他条件构建
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"SEQUENCE_NBR"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"SEQUENCE_NBR"
)))
{
BoolQueryBuilder
seqBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
seqBuilder
=
QueryBuilders
.
boolQuery
();
String
param
=
map
.
getString
(
"SEQUENCE_NBR"
);
String
param
=
map
.
getString
(
"SEQUENCE_NBR"
);
...
@@ -1240,7 +1253,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1240,7 +1253,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
pBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"USE_PLACE"
,
"*"
+
param
+
"*"
));
pBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"USE_PLACE"
,
"*"
+
param
+
"*"
));
boolMust
.
must
(
pBuilder
);
boolMust
.
must
(
pBuilder
);
}
}
//设备状态
//
设备状态
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_STATE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_STATE"
)))
{
BoolQueryBuilder
esBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
esBuilder
=
QueryBuilders
.
boolQuery
();
String
param
=
QueryParser
.
escape
(
map
.
getLong
(
"EQU_STATE"
).
toString
());
String
param
=
QueryParser
.
escape
(
map
.
getLong
(
"EQU_STATE"
).
toString
());
...
@@ -1248,7 +1261,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1248,7 +1261,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
boolMust
.
must
(
esBuilder
);
boolMust
.
must
(
esBuilder
);
}
}
//使用单位 //安装改造维修单位
//
使用单位 //安装改造维修单位
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
))
&&
!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USC_UNIT_CREDIT_CODE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
))
&&
!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USC_UNIT_CREDIT_CODE"
)))
{
BoolQueryBuilder
ubuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
ubuilder
=
QueryBuilders
.
boolQuery
();
String
useCode
=
QueryParser
.
escape
(
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
));
String
useCode
=
QueryParser
.
escape
(
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
));
...
@@ -1276,7 +1289,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1276,7 +1289,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
}
}
}
//监管码
//
监管码
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"SUPERVISORY_CODE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"SUPERVISORY_CODE"
)))
{
BoolQueryBuilder
scBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
scBuilder
=
QueryBuilders
.
boolQuery
();
String
param
=
map
.
getString
(
"SUPERVISORY_CODE"
);
String
param
=
map
.
getString
(
"SUPERVISORY_CODE"
);
...
@@ -1284,21 +1297,21 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1284,21 +1297,21 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
scBuilder
.
must
(
QueryBuilders
.
termsQuery
(
"SUPERVISORY_CODE"
,
strings
));
scBuilder
.
must
(
QueryBuilders
.
termsQuery
(
"SUPERVISORY_CODE"
,
strings
));
boolMust
.
must
(
scBuilder
);
boolMust
.
must
(
scBuilder
);
}
}
//设备种类编码
//
设备种类编码
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_LIST_CODE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_LIST_CODE"
)))
{
BoolQueryBuilder
elcBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
elcBuilder
=
QueryBuilders
.
boolQuery
();
String
test
=
QueryParser
.
escape
(
map
.
getString
(
"EQU_LIST_CODE"
));
String
test
=
QueryParser
.
escape
(
map
.
getString
(
"EQU_LIST_CODE"
));
elcBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"EQU_LIST_CODE"
,
test
));
elcBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"EQU_LIST_CODE"
,
test
));
boolMust
.
must
(
elcBuilder
);
boolMust
.
must
(
elcBuilder
);
}
}
//设备类别编码
//
设备类别编码
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_DEFINE_CODE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_DEFINE_CODE"
)))
{
BoolQueryBuilder
elcBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
elcBuilder
=
QueryBuilders
.
boolQuery
();
String
test
=
QueryParser
.
escape
(
map
.
getString
(
"EQU_DEFINE_CODE"
));
String
test
=
QueryParser
.
escape
(
map
.
getString
(
"EQU_DEFINE_CODE"
));
elcBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"EQU_DEFINE_CODE"
,
test
));
elcBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"EQU_DEFINE_CODE"
,
test
));
boolMust
.
must
(
elcBuilder
);
boolMust
.
must
(
elcBuilder
);
}
}
//设备种类名称
//
设备种类名称
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_LIST"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_LIST"
)))
{
BoolQueryBuilder
elBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
elBuilder
=
QueryBuilders
.
boolQuery
();
String
test
=
QueryParser
.
escape
(
map
.
getString
(
"EQU_LIST"
));
String
test
=
QueryParser
.
escape
(
map
.
getString
(
"EQU_LIST"
));
...
@@ -1310,14 +1323,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1310,14 +1323,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_CATEGORY_CODE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_CATEGORY_CODE"
)))
{
BoolQueryBuilder
pBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
pBuilder
=
QueryBuilders
.
boolQuery
();
String
test
=
QueryParser
.
escape
(
map
.
getString
(
"EQU_CATEGORY_CODE"
));
String
test
=
QueryParser
.
escape
(
map
.
getString
(
"EQU_CATEGORY_CODE"
));
pBuilder
.
must
(
QueryBuilders
.
termQuery
(
"EQU_CATEGORY_CODE"
,
test
));
pBuilder
.
must
(
QueryBuilders
.
termQuery
(
"EQU_CATEGORY_CODE"
,
test
));
boolMust
.
must
(
pBuilder
);
boolMust
.
must
(
pBuilder
);
}
}
// 是否车用气瓶
// 是否车用气瓶
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"WHETHER_VEHICLE_CYLINDER"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"WHETHER_VEHICLE_CYLINDER"
)))
{
BoolQueryBuilder
pBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
pBuilder
=
QueryBuilders
.
boolQuery
();
String
test
=
QueryParser
.
escape
(
map
.
getString
(
"WHETHER_VEHICLE_CYLINDER"
));
String
test
=
QueryParser
.
escape
(
map
.
getString
(
"WHETHER_VEHICLE_CYLINDER"
));
pBuilder
.
must
(
QueryBuilders
.
termQuery
(
"WHETHER_VEHICLE_CYLINDER"
,
test
));
pBuilder
.
must
(
QueryBuilders
.
termQuery
(
"WHETHER_VEHICLE_CYLINDER"
,
test
));
boolMust
.
must
(
pBuilder
);
boolMust
.
must
(
pBuilder
);
}
}
// 设备代码模糊查询
// 设备代码模糊查询
...
@@ -1364,7 +1377,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1364,7 +1377,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
JSONObject
jsonObject
=
(
JSONObject
)
JSONObject
.
toJSON
(
hit
);
JSONObject
jsonObject
=
(
JSONObject
)
JSONObject
.
toJSON
(
hit
);
JSONObject
dto2
=
jsonObject
.
getJSONObject
(
"sourceAsMap"
);
JSONObject
dto2
=
jsonObject
.
getJSONObject
(
"sourceAsMap"
);
if
(!
ValidationUtil
.
isEmpty
(
dto2
.
get
(
CONSTRUCTIONTYPE
)))
{
if
(!
ValidationUtil
.
isEmpty
(
dto2
.
get
(
CONSTRUCTIONTYPE
)))
{
//转化施工类型
//
转化施工类型
Integer
integer
=
Integer
.
valueOf
(
dto2
.
get
(
CONSTRUCTIONTYPE
).
toString
());
Integer
integer
=
Integer
.
valueOf
(
dto2
.
get
(
CONSTRUCTIONTYPE
).
toString
());
String
status
=
ConstructionEnum
.
getName
.
get
(
integer
);
String
status
=
ConstructionEnum
.
getName
.
get
(
integer
);
dto2
.
put
(
CONSTRUCTIONTYPE
,
status
);
dto2
.
put
(
CONSTRUCTIONTYPE
,
status
);
...
@@ -1374,34 +1387,38 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1374,34 +1387,38 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String
status
=
EquimentEnum
.
getName
.
get
(
integer
);
String
status
=
EquimentEnum
.
getName
.
get
(
integer
);
dto2
.
put
(
EQUSTATE
,
status
);
dto2
.
put
(
EQUSTATE
,
status
);
}
}
dto2
.
put
(
"record"
,
dto2
.
get
(
"SEQUENCE_NBR"
));
dto2
.
put
(
"record"
,
dto2
.
get
(
"SEQUENCE_NBR"
));
list
.
add
(
dto2
);
list
.
add
(
dto2
);
}
}
// 获取所有设备的Id
// 获取所有设备的Id
List
<
String
>
equIds
=
null
;
List
<
String
>
equIds
=
null
;
if
(!
ValidationUtil
.
isEmpty
(
list
))
{
if
(!
ValidationUtil
.
isEmpty
(
list
))
{
equIds
=
list
.
stream
().
map
(
item
->
item
.
get
(
"SEQUENCE_NBR"
).
toString
()).
collect
(
Collectors
.
toList
());
equIds
=
list
.
stream
().
map
(
item
->
item
.
get
(
"SEQUENCE_NBR"
).
toString
()).
collect
(
Collectors
.
toList
());
}
}
if
(!
ValidationUtil
.
isEmpty
(
equIds
))
{
if
(!
ValidationUtil
.
isEmpty
(
equIds
))
{
// 查询设备地址
// 查询设备地址
List
<
IdxBizJgUseInfo
>
useInfoListByEquIds
=
idxBizJgUseInfoService
.
getUseInfoListByEquIds
(
equIds
);
List
<
IdxBizJgUseInfo
>
useInfoListByEquIds
=
idxBizJgUseInfoService
.
getUseInfoListByEquIds
(
equIds
);
Map
<
String
,
String
>
equAddressMap
=
new
HashMap
<>();
Map
<
String
,
String
>
equAddressMap
=
new
HashMap
<>();
if
(!
ValidationUtil
.
isEmpty
(
useInfoListByEquIds
))
{
if
(!
ValidationUtil
.
isEmpty
(
useInfoListByEquIds
))
{
equAddressMap
=
useInfoListByEquIds
.
stream
().
collect
(
Collectors
.
toMap
(
IdxBizJgUseInfo:
:
getRecord
,
equAddressMap
=
useInfoListByEquIds
.
stream
().
collect
(
Collectors
.
toMap
(
IdxBizJgUseInfo:
:
getRecord
,
useInfo
->
{
useInfo
->
{
String
fulladdress
=
""
;
String
fulladdress
=
""
;
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getProvinceName
()))
fulladdress
+=
useInfo
.
getProvinceName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getProvinceName
()))
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getCityName
()))
fulladdress
+=
useInfo
.
getCityName
();
fulladdress
+=
useInfo
.
getProvinceName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getCountyName
()))
fulladdress
+=
useInfo
.
getCountyName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getCityName
()))
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getStreetName
()))
fulladdress
+=
useInfo
.
getStreetName
();
fulladdress
+=
useInfo
.
getCityName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getAddress
()))
fulladdress
+=
useInfo
.
getAddress
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getCountyName
()))
fulladdress
+=
useInfo
.
getCountyName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getStreetName
()))
fulladdress
+=
useInfo
.
getStreetName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getAddress
()))
fulladdress
+=
useInfo
.
getAddress
();
return
fulladdress
;
return
fulladdress
;
}
}
)
)
);
);
}
}
// 更新设备使用情况和设备地址
// 更新设备使用情况和设备地址
for
(
JSONObject
item
:
list
)
{
for
(
JSONObject
item
:
list
)
{
String
fullAddress
=
equAddressMap
.
get
(
item
.
getString
(
"SEQUENCE_NBR"
));
String
fullAddress
=
equAddressMap
.
get
(
item
.
getString
(
"SEQUENCE_NBR"
));
item
.
put
(
"ADDRESS"
,
!
ValidationUtil
.
isEmpty
(
fullAddress
)
?
fullAddress
:
""
);
item
.
put
(
"ADDRESS"
,
!
ValidationUtil
.
isEmpty
(
fullAddress
)
?
fullAddress
:
""
);
item
.
put
(
"CAN_EDIT"
,
this
.
checkEquipIsCanEdit
(
item
.
getString
(
"SEQUENCE_NBR"
)));
item
.
put
(
"CAN_EDIT"
,
this
.
checkEquipIsCanEdit
(
item
.
getString
(
"SEQUENCE_NBR"
)));
...
@@ -1443,9 +1460,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1443,9 +1460,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
/**
/**
* 获取类型为ZC的“未注册”的字典值
* 获取类型为ZC的“未注册”的字典值
*
* @return code
* @return code
*/
*/
private
String
getRegCode
(){
private
String
getRegCode
()
{
QueryWrapper
<
DataDictionary
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
DataDictionary
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"type"
,
"ZC"
);
queryWrapper
.
eq
(
"type"
,
"ZC"
);
queryWrapper
.
eq
(
"name"
,
"未注册"
);
queryWrapper
.
eq
(
"name"
,
"未注册"
);
...
@@ -1462,7 +1480,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1462,7 +1480,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
Date
date
=
new
Date
();
Date
date
=
new
Date
();
String
record
=
null
;
String
record
=
null
;
//操作类型
//
操作类型
String
operateType
=
ValidationUtil
.
isEmpty
(
equipmentInfoForm
.
get
(
SEQUENCE_NBR
))
?
OPERATESAVE
:
OPERATEEDIT
;
String
operateType
=
ValidationUtil
.
isEmpty
(
equipmentInfoForm
.
get
(
SEQUENCE_NBR
))
?
OPERATESAVE
:
OPERATEEDIT
;
// 设备是否复制而来,复制来的设备走新增
// 设备是否复制而来,复制来的设备走新增
boolean
isCopy
=
!
ValidationUtil
.
isEmpty
(
equipmentInfoForm
.
get
(
IS_COPY
));
boolean
isCopy
=
!
ValidationUtil
.
isEmpty
(
equipmentInfoForm
.
get
(
IS_COPY
));
...
@@ -1474,29 +1492,29 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1474,29 +1492,29 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
Map
<
String
,
Object
>
companyInfoMap
=
jgInstallationNoticeService
.
getCompanyType
();
Map
<
String
,
Object
>
companyInfoMap
=
jgInstallationNoticeService
.
getCompanyType
();
String
companyTypeStr
=
companyInfoMap
.
get
(
"companyType"
).
toString
();
String
companyTypeStr
=
companyInfoMap
.
get
(
"companyType"
).
toString
();
//使用信息
//
使用信息
IdxBizJgUseInfo
useInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgUseInfo
.
class
);
IdxBizJgUseInfo
useInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgUseInfo
.
class
);
//设计信息
//
设计信息
IdxBizJgDesignInfo
designInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgDesignInfo
.
class
);
IdxBizJgDesignInfo
designInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgDesignInfo
.
class
);
//制造信息
//
制造信息
IdxBizJgFactoryInfo
factoryInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgFactoryInfo
.
class
);
IdxBizJgFactoryInfo
factoryInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgFactoryInfo
.
class
);
//施工信息
//
施工信息
IdxBizJgConstructionInfo
constructionInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgConstructionInfo
.
class
);
IdxBizJgConstructionInfo
constructionInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgConstructionInfo
.
class
);
//注册登记信息
//
注册登记信息
IdxBizJgRegisterInfo
registerInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgRegisterInfo
.
class
);
IdxBizJgRegisterInfo
registerInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgRegisterInfo
.
class
);
//维保备案
//
维保备案
IdxBizJgMaintenanceRecordInfo
maintenanceRecordInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgMaintenanceRecordInfo
.
class
);
IdxBizJgMaintenanceRecordInfo
maintenanceRecordInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgMaintenanceRecordInfo
.
class
);
//监督管理
//
监督管理
IdxBizJgSupervisionInfo
supervisionInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgSupervisionInfo
.
class
);
IdxBizJgSupervisionInfo
supervisionInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgSupervisionInfo
.
class
);
//其他信息
//
其他信息
IdxBizJgOtherInfo
otherInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgOtherInfo
.
class
);
IdxBizJgOtherInfo
otherInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgOtherInfo
.
class
);
//使用信息
//
使用信息
useInfo
.
setRecord
(
record
);
useInfo
.
setRecord
(
record
);
useInfo
.
setRecDate
(
date
);
useInfo
.
setRecDate
(
date
);
useInfo
.
setDataSource
(
"jg"
);
useInfo
.
setDataSource
(
"jg"
);
useInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"USEINFO_SEQ"
)));
useInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"USEINFO_SEQ"
)));
if
(
companyTypeStr
.
contains
(
CompanyTypeEnum
.
USE
.
getCode
())
||
companyTypeStr
.
contains
(
CompanyTypeEnum
.
INDIVIDUAL
.
getCode
()))
{
if
(
companyTypeStr
.
contains
(
CompanyTypeEnum
.
USE
.
getCode
())
||
companyTypeStr
.
contains
(
CompanyTypeEnum
.
INDIVIDUAL
.
getCode
()))
{
useInfo
.
setUseUnitCreditCode
(
companyInfoMap
.
get
(
"creditCode"
).
toString
());
useInfo
.
setUseUnitCreditCode
(
companyInfoMap
.
get
(
"creditCode"
).
toString
());
useInfo
.
setUseUnitName
(
companyInfoMap
.
get
(
"companyTypeName"
).
toString
());
useInfo
.
setUseUnitName
(
companyInfoMap
.
get
(
"companyTypeName"
).
toString
());
}
}
...
@@ -1511,7 +1529,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1511,7 +1529,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
}
// 如果既为安改维单位又是使用单位,则将厂车、起重机械-流动式起重机、压力容器-气瓶安改维单位信息置空
// 如果既为安改维单位又是使用单位,则将厂车、起重机械-流动式起重机、压力容器-气瓶安改维单位信息置空
if
(
companyTypeStr
.
contains
(
CompanyTypeEnum
.
CONSTRUCTION
.
getCode
())
&&
companyTypeStr
.
contains
(
CompanyTypeEnum
.
USE
.
getCode
()))
{
if
(
companyTypeStr
.
contains
(
CompanyTypeEnum
.
CONSTRUCTION
.
getCode
())
&&
companyTypeStr
.
contains
(
CompanyTypeEnum
.
USE
.
getCode
()))
{
if
(!
registerInfo
.
getEquList
().
equals
(
"5000"
)
&&
!
registerInfo
.
getEquCategory
().
equals
(
"4400"
)
&&
!
registerInfo
.
getEquCategory
().
equals
(
"2300"
)){
if
(!
registerInfo
.
getEquList
().
equals
(
"5000"
)
&&
!
registerInfo
.
getEquCategory
().
equals
(
"4400"
)
&&
!
registerInfo
.
getEquCategory
().
equals
(
"2300"
))
{
constructionInfo
.
setUscUnitCreditCode
(
null
);
constructionInfo
.
setUscUnitCreditCode
(
null
);
constructionInfo
.
setUscUnitName
(
null
);
constructionInfo
.
setUscUnitName
(
null
);
}
}
...
@@ -1520,25 +1538,25 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1520,25 +1538,25 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
idxBizJgUseInfoService
.
saveOrUpdateData
(
useInfo
);
idxBizJgUseInfoService
.
saveOrUpdateData
(
useInfo
);
//设计信息
//
设计信息
designInfo
.
setRecord
(
record
);
designInfo
.
setRecord
(
record
);
designInfo
.
setRecDate
(
date
);
designInfo
.
setRecDate
(
date
);
designInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"DESIGNINFO_SEQ"
)));
designInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"DESIGNINFO_SEQ"
)));
iIdxBizJgDesignInfoService
.
saveOrUpdateData
(
designInfo
);
iIdxBizJgDesignInfoService
.
saveOrUpdateData
(
designInfo
);
//制造信息
//
制造信息
factoryInfo
.
setRecord
(
record
);
factoryInfo
.
setRecord
(
record
);
factoryInfo
.
setRecDate
(
date
);
factoryInfo
.
setRecDate
(
date
);
factoryInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"FACTORYINFO_SEQ"
)));
factoryInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"FACTORYINFO_SEQ"
)));
iIdxBizJgFactoryInfoService
.
saveOrUpdateData
(
factoryInfo
);
iIdxBizJgFactoryInfoService
.
saveOrUpdateData
(
factoryInfo
);
//施工信息
//
施工信息
String
companyName
=
companyInfoMap
.
get
(
"companyName"
).
toString
();
String
companyName
=
companyInfoMap
.
get
(
"companyName"
).
toString
();
String
companyCode
=
companyInfoMap
.
get
(
"creditCode"
).
toString
();
String
companyCode
=
companyInfoMap
.
get
(
"creditCode"
).
toString
();
constructionInfo
.
setRecord
(
record
);
constructionInfo
.
setRecord
(
record
);
constructionInfo
.
setRecDate
(
date
);
constructionInfo
.
setRecDate
(
date
);
if
(
companyTypeStr
.
contains
(
CompanyTypeEnum
.
CONSTRUCTION
.
getCode
()))
{
if
(
companyTypeStr
.
contains
(
CompanyTypeEnum
.
CONSTRUCTION
.
getCode
()))
{
constructionInfo
.
setUscUnitCreditCode
(
companyCode
);
constructionInfo
.
setUscUnitCreditCode
(
companyCode
);
constructionInfo
.
setUscUnitName
(
companyName
);
constructionInfo
.
setUscUnitName
(
companyName
);
}
}
...
@@ -1550,7 +1568,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1550,7 +1568,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
}
// 如果既为安改维单位又是使用单位,则将厂车、起重机械-流动式起重机、压力容器-气瓶安改维单位信息置空
// 如果既为安改维单位又是使用单位,则将厂车、起重机械-流动式起重机、压力容器-气瓶安改维单位信息置空
if
(
companyTypeStr
.
contains
(
CompanyTypeEnum
.
CONSTRUCTION
.
getCode
())
&&
companyTypeStr
.
contains
(
CompanyTypeEnum
.
USE
.
getCode
()))
{
if
(
companyTypeStr
.
contains
(
CompanyTypeEnum
.
CONSTRUCTION
.
getCode
())
&&
companyTypeStr
.
contains
(
CompanyTypeEnum
.
USE
.
getCode
()))
{
if
(
registerInfo
.
getEquList
().
equals
(
"5000"
)
||
registerInfo
.
getEquCategory
().
equals
(
"4400"
)
||
registerInfo
.
getEquCategory
().
equals
(
"2300"
)){
if
(
registerInfo
.
getEquList
().
equals
(
"5000"
)
||
registerInfo
.
getEquCategory
().
equals
(
"4400"
)
||
registerInfo
.
getEquCategory
().
equals
(
"2300"
))
{
constructionInfo
.
setUscUnitCreditCode
(
null
);
constructionInfo
.
setUscUnitCreditCode
(
null
);
constructionInfo
.
setUscUnitName
(
null
);
constructionInfo
.
setUscUnitName
(
null
);
}
}
...
@@ -1560,7 +1578,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1560,7 +1578,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
constructionInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"CONSTRUCTIONINFO_SEQ"
)));
constructionInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"CONSTRUCTIONINFO_SEQ"
)));
iIdxBizJgConstructionInfoService
.
saveOrUpdateData
(
constructionInfo
);
iIdxBizJgConstructionInfoService
.
saveOrUpdateData
(
constructionInfo
);
//注册登记
//
注册登记
registerInfo
.
setRecord
(
record
);
registerInfo
.
setRecord
(
record
);
registerInfo
.
setRecDate
(
date
);
registerInfo
.
setRecDate
(
date
);
registerInfo
.
setRegisterState
(
this
.
getRegCode
());
registerInfo
.
setRegisterState
(
this
.
getRegCode
());
...
@@ -1571,19 +1589,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1571,19 +1589,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
}
this
.
saveOrUpdate
(
registerInfo
);
this
.
saveOrUpdate
(
registerInfo
);
//维保备案
//
维保备案
maintenanceRecordInfo
.
setRecord
(
record
);
maintenanceRecordInfo
.
setRecord
(
record
);
maintenanceRecordInfo
.
setRecDate
(
date
);
maintenanceRecordInfo
.
setRecDate
(
date
);
maintenanceRecordInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"MAINTENANCERECORDINFO_SEQ"
)));
maintenanceRecordInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"MAINTENANCERECORDINFO_SEQ"
)));
iIdxBizJgMaintenanceRecordInfoService
.
saveOrUpdateData
(
maintenanceRecordInfo
);
iIdxBizJgMaintenanceRecordInfoService
.
saveOrUpdateData
(
maintenanceRecordInfo
);
//监督管理
//
监督管理
supervisionInfo
.
setRecord
(
record
);
supervisionInfo
.
setRecord
(
record
);
supervisionInfo
.
setRecDate
(
date
);
supervisionInfo
.
setRecDate
(
date
);
supervisionInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"SUPERVISIONINFO_SEQ"
)));
supervisionInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"SUPERVISIONINFO_SEQ"
)));
iIdxBizJgSupervisionInfoService
.
saveOrUpdateData
(
supervisionInfo
);
iIdxBizJgSupervisionInfoService
.
saveOrUpdateData
(
supervisionInfo
);
//其他信息
//
其他信息
otherInfo
.
setRecord
(
record
);
otherInfo
.
setRecord
(
record
);
otherInfo
.
setRecDate
(
date
);
otherInfo
.
setRecDate
(
date
);
otherInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"OTHERINFO_SEQ"
)));
otherInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"OTHERINFO_SEQ"
)));
...
@@ -1594,7 +1612,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1594,7 +1612,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
}
iIdxBizJgOtherInfoService
.
saveOrUpdateData
(
otherInfo
);
iIdxBizJgOtherInfoService
.
saveOrUpdateData
(
otherInfo
);
//检验检测
//
检验检测
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgInspectionDetectionInfo
.
class
);
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgInspectionDetectionInfo
.
class
);
inspectionDetectionInfo
.
setRecord
(
record
);
inspectionDetectionInfo
.
setRecord
(
record
);
inspectionDetectionInfo
.
setRecDate
(
date
);
inspectionDetectionInfo
.
setRecDate
(
date
);
...
@@ -1602,7 +1620,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1602,7 +1620,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
iIdxBizJgInspectionDetectionInfoService
.
saveOrUpdateData
(
inspectionDetectionInfo
);
iIdxBizJgInspectionDetectionInfoService
.
saveOrUpdateData
(
inspectionDetectionInfo
);
//八大类技术参数和主要零部件和安全附件表
//
八大类技术参数和主要零部件和安全附件表
List
<
IdxBizJgMainParts
>
mainPartsList
=
new
ArrayList
<>();
List
<
IdxBizJgMainParts
>
mainPartsList
=
new
ArrayList
<>();
List
<
IdxBizJgProtectionDevices
>
protectionDevicesList
=
new
ArrayList
<>();
List
<
IdxBizJgProtectionDevices
>
protectionDevicesList
=
new
ArrayList
<>();
// 设备种类
// 设备种类
...
@@ -1627,7 +1645,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1627,7 +1645,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
iIdxBizJgTechParamsVehicleService
.
saveOrUpdateData
(
vehicle
);
iIdxBizJgTechParamsVehicleService
.
saveOrUpdateData
(
vehicle
);
}
}
//主要零部件
//
主要零部件
List
<
String
>
subFormMainPartsList
=
new
ArrayList
<>();
List
<
String
>
subFormMainPartsList
=
new
ArrayList
<>();
subFormMainPartsList
.
add
(
"subForm_sey164b51a"
);
subFormMainPartsList
.
add
(
"subForm_sey164b51a"
);
subFormMainPartsList
.
add
(
"subForm_tef7yf5fbr"
);
subFormMainPartsList
.
add
(
"subForm_tef7yf5fbr"
);
...
@@ -1644,7 +1662,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1644,7 +1662,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
iIdxBizJgTechParamsRopewayService
.
saveOrUpdateData
(
ropeway
);
iIdxBizJgTechParamsRopewayService
.
saveOrUpdateData
(
ropeway
);
}
}
//主要零部件
//
主要零部件
List
<
String
>
subFormMainPartsList
=
new
ArrayList
<>();
List
<
String
>
subFormMainPartsList
=
new
ArrayList
<>();
subFormMainPartsList
.
add
(
"subForm_5fi0jewuyh"
);
subFormMainPartsList
.
add
(
"subForm_5fi0jewuyh"
);
mainPartsList
=
this
.
getAccessoryEntity
(
equipmentParamsForm
,
subFormMainPartsList
,
EQUIP_MAINPARTS_FORM_ID
,
record
,
date
,
operateType
);
mainPartsList
=
this
.
getAccessoryEntity
(
equipmentParamsForm
,
subFormMainPartsList
,
EQUIP_MAINPARTS_FORM_ID
,
record
,
date
,
operateType
);
...
@@ -1670,7 +1688,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1670,7 +1688,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
iIdxBizJgTechParamsBoilerService
.
saveOrUpdateData
(
boiler
);
iIdxBizJgTechParamsBoilerService
.
saveOrUpdateData
(
boiler
);
}
}
//主要零部件
//
主要零部件
List
<
String
>
subFormMainPartsList
=
new
ArrayList
<>();
List
<
String
>
subFormMainPartsList
=
new
ArrayList
<>();
subFormMainPartsList
.
add
(
"subForm_1hh88r4m69"
);
subFormMainPartsList
.
add
(
"subForm_1hh88r4m69"
);
mainPartsList
=
this
.
getAccessoryEntity
(
equipmentParamsForm
,
subFormMainPartsList
,
EQUIP_MAINPARTS_FORM_ID
,
record
,
date
,
operateType
);
mainPartsList
=
this
.
getAccessoryEntity
(
equipmentParamsForm
,
subFormMainPartsList
,
EQUIP_MAINPARTS_FORM_ID
,
record
,
date
,
operateType
);
...
@@ -1685,12 +1703,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1685,12 +1703,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
iIdxBizJgTechParamsVesselService
.
saveOrUpdateData
(
vessel
);
iIdxBizJgTechParamsVesselService
.
saveOrUpdateData
(
vessel
);
}
}
//主要零部件
//
主要零部件
List
<
String
>
subFormMainPartsList
=
new
ArrayList
<>();
List
<
String
>
subFormMainPartsList
=
new
ArrayList
<>();
subFormMainPartsList
.
add
(
"subForm_fie04854f2"
);
subFormMainPartsList
.
add
(
"subForm_fie04854f2"
);
mainPartsList
=
this
.
getAccessoryEntity
(
equipmentParamsForm
,
subFormMainPartsList
,
EQUIP_MAINPARTS_FORM_ID
,
record
,
date
,
operateType
);
mainPartsList
=
this
.
getAccessoryEntity
(
equipmentParamsForm
,
subFormMainPartsList
,
EQUIP_MAINPARTS_FORM_ID
,
record
,
date
,
operateType
);
//安全附件
//
安全附件
List
<
String
>
subFormProtectionDevicesList
=
new
ArrayList
<>();
List
<
String
>
subFormProtectionDevicesList
=
new
ArrayList
<>();
subFormProtectionDevicesList
.
add
(
"subForm_d4xdzhsgdj"
);
subFormProtectionDevicesList
.
add
(
"subForm_d4xdzhsgdj"
);
protectionDevicesList
=
this
.
getAccessoryEntity
(
equipmentParamsForm
,
subFormProtectionDevicesList
,
EQUIP_PROTECTIONDEVICES_FORM_ID
,
record
,
date
,
operateType
);
protectionDevicesList
=
this
.
getAccessoryEntity
(
equipmentParamsForm
,
subFormProtectionDevicesList
,
EQUIP_PROTECTIONDEVICES_FORM_ID
,
record
,
date
,
operateType
);
...
@@ -1706,7 +1724,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1706,7 +1724,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
iIdxBizJgTechParamsPipelineService
.
saveOrUpdateData
(
pipeline
);
iIdxBizJgTechParamsPipelineService
.
saveOrUpdateData
(
pipeline
);
}
}
//主要零部件
//
主要零部件
List
<
String
>
subFormMainPartsList
=
new
ArrayList
<>();
List
<
String
>
subFormMainPartsList
=
new
ArrayList
<>();
subFormMainPartsList
.
add
(
"subForm_9n7nu55z8r"
);
subFormMainPartsList
.
add
(
"subForm_9n7nu55z8r"
);
mainPartsList
=
this
.
getAccessoryEntity
(
equipmentParamsForm
,
subFormMainPartsList
,
EQUIP_MAINPARTS_FORM_ID
,
record
,
date
,
operateType
);
mainPartsList
=
this
.
getAccessoryEntity
(
equipmentParamsForm
,
subFormMainPartsList
,
EQUIP_MAINPARTS_FORM_ID
,
record
,
date
,
operateType
);
...
@@ -1722,12 +1740,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1722,12 +1740,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
iIdxBizJgTechParamsLiftingService
.
saveOrUpdateData
(
lifting
);
iIdxBizJgTechParamsLiftingService
.
saveOrUpdateData
(
lifting
);
}
}
//主要零部件
//
主要零部件
List
<
String
>
subFormMainPartsList
=
new
ArrayList
<>();
List
<
String
>
subFormMainPartsList
=
new
ArrayList
<>();
subFormMainPartsList
.
add
(
"subForm_bqirdyvztt"
);
subFormMainPartsList
.
add
(
"subForm_bqirdyvztt"
);
mainPartsList
=
this
.
getAccessoryEntity
(
equipmentParamsForm
,
subFormMainPartsList
,
EQUIP_MAINPARTS_FORM_ID
,
record
,
date
,
operateType
);
mainPartsList
=
this
.
getAccessoryEntity
(
equipmentParamsForm
,
subFormMainPartsList
,
EQUIP_MAINPARTS_FORM_ID
,
record
,
date
,
operateType
);
//安全附件
//
安全附件
List
<
String
>
subFormProtectionDevicesList
=
new
ArrayList
<>();
List
<
String
>
subFormProtectionDevicesList
=
new
ArrayList
<>();
subFormProtectionDevicesList
.
add
(
"subForm_29yy3pdzhl"
);
subFormProtectionDevicesList
.
add
(
"subForm_29yy3pdzhl"
);
subFormProtectionDevicesList
.
add
(
"subForm_h5h4x0zhur"
);
subFormProtectionDevicesList
.
add
(
"subForm_h5h4x0zhur"
);
...
@@ -1735,7 +1753,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1735,7 +1753,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
}
//八大类技术参数和主要零部件和安全附件表
//
八大类技术参数和主要零部件和安全附件表
if
(!
ValidationUtil
.
isEmpty
(
mainPartsList
))
{
if
(!
ValidationUtil
.
isEmpty
(
mainPartsList
))
{
iIdxBizJgMainPartsService
.
saveOrUpdateBatchData
(
mainPartsList
);
iIdxBizJgMainPartsService
.
saveOrUpdateBatchData
(
mainPartsList
);
}
}
...
@@ -1745,7 +1763,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1745,7 +1763,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
return
record
;
return
record
;
}
}
public
void
checkEsData
(
String
id
)
{
public
void
checkEsData
(
String
id
)
{
Map
<
String
,
Object
>
map
=
categoryOtherInfoMapper
.
selectDataById
(
id
);
Map
<
String
,
Object
>
map
=
categoryOtherInfoMapper
.
selectDataById
(
id
);
categoryOtherInfoMapper
.
updateEsStatus
(
id
);
categoryOtherInfoMapper
.
updateEsStatus
(
id
);
...
@@ -1799,48 +1816,21 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1799,48 +1816,21 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
return
null
;
return
null
;
}
}
/**
* 将对象的属性由驼峰转为纯大写下划线格式
*
* @param object
* @return
* @throws IllegalAccessException
*/
public
static
Map
<
String
,
Object
>
convertCamelToUnderscore
(
Object
object
,
String
[]
strToJsonArrayFields
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Class
<?>
clazz
=
object
.
getClass
();
for
(
Field
field
:
clazz
.
getDeclaredFields
())
{
field
.
setAccessible
(
true
);
String
fieldName
=
field
.
getName
();
String
underscoreFieldName
=
StringUtils
.
camelToUnderline
(
fieldName
).
toUpperCase
();
Object
value
;
try
{
value
=
field
.
get
(
object
);
//需要转为jsonArray的字段
if
(!
ValidationUtil
.
isEmpty
(
strToJsonArrayFields
)
&&
Arrays
.
asList
(
strToJsonArrayFields
).
contains
(
underscoreFieldName
))
{
value
=
JSON
.
parseArray
((
String
)
field
.
get
(
object
));
}
}
catch
(
IllegalAccessException
e
)
{
throw
new
RuntimeException
(
e
);
}
if
(!
ValidationUtil
.
isEmpty
(
value
))
{
result
.
put
(
underscoreFieldName
.
toUpperCase
(),
value
);
}
}
return
result
;
}
@Override
@Override
public
Page
<
JSONObject
>
queryForUnitEquipmentPage
(
JSONObject
jsonObject
)
{
public
Page
<
JSONObject
>
queryForUnitEquipmentPage
(
JSONObject
jsonObject
)
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
useUnitCreditCode
=
reginParams
.
getCompany
().
getCompanyCode
();
String
useUnitCreditCode
=
reginParams
.
getCompany
().
getCompanyCode
();
// 使用单位为个人时候 特殊处理
if
(
useUnitCreditCode
.
split
(
"_"
).
length
>
1
)
{
useUnitCreditCode
=
useUnitCreditCode
.
split
(
"_"
)[
1
];
}
jsonObject
.
put
(
"useUnitCreditCode"
,
useUnitCreditCode
);
jsonObject
.
put
(
"useUnitCreditCode"
,
useUnitCreditCode
);
Page
<
JSONObject
>
page
=
new
Page
<>(
jsonObject
.
getLong
(
"number"
),
jsonObject
.
getLong
(
"size"
));
Page
<
JSONObject
>
page
=
new
Page
<>(
jsonObject
.
getLong
(
"number"
),
jsonObject
.
getLong
(
"size"
));
if
(
"8300"
.
equals
(
jsonObject
.
get
(
"EQU_CATEGORY_CODE"
)))
{
if
(
"8300"
.
equals
(
jsonObject
.
get
(
"EQU_CATEGORY_CODE"
)))
{
return
jgUseRegistrationMapper
.
queryForUnitPipelineEquipmentPage
(
page
,
jsonObject
);
return
jgUseRegistrationMapper
.
queryForUnitPipelineEquipmentPage
(
page
,
jsonObject
);
}
else
if
(
"2300"
.
equals
(
jsonObject
.
get
(
"EQU_CATEGORY_CODE"
)))
{
}
else
if
(
"2300"
.
equals
(
jsonObject
.
get
(
"EQU_CATEGORY_CODE"
)))
{
List
<
DictionarieValueModel
>
fillingMedium
=
Systemctl
.
dictionarieClient
.
dictValues
(
"FILLING_MEDIUM"
).
getResult
();
List
<
DictionarieValueModel
>
fillingMedium
=
Systemctl
.
dictionarieClient
.
dictValues
(
"FILLING_MEDIUM"
).
getResult
();
Map
<
String
,
Object
>
fillingMediumMap
=
fillingMedium
.
stream
().
collect
(
Collectors
.
toMap
(
DictionarieValueModel:
:
getDictDataKey
,
DictionarieValueModel:
:
getDictDataValue
));
Map
<
String
,
Object
>
fillingMediumMap
=
fillingMedium
.
stream
().
collect
(
Collectors
.
toMap
(
DictionarieValueModel:
:
getDictDataKey
,
DictionarieValueModel:
:
getDictDataValue
));
Page
<
JSONObject
>
result
=
jgUseRegistrationMapper
.
queryForUnitVesselEquipmentPage
(
page
,
jsonObject
);
Page
<
JSONObject
>
result
=
jgUseRegistrationMapper
.
queryForUnitVesselEquipmentPage
(
page
,
jsonObject
);
result
.
getRecords
().
forEach
(
i
->
{
result
.
getRecords
().
forEach
(
i
->
{
i
.
put
(
"chargingMedium"
,
fillingMediumMap
.
get
(
i
.
get
(
"chargingMedium"
)));
i
.
put
(
"chargingMedium"
,
fillingMediumMap
.
get
(
i
.
get
(
"chargingMedium"
)));
...
@@ -1854,10 +1844,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1854,10 +1844,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
public
Page
<
JSONObject
>
queryEquipCanUsedByVesselPage
(
JSONObject
jsonObject
)
{
public
Page
<
JSONObject
>
queryEquipCanUsedByVesselPage
(
JSONObject
jsonObject
)
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
useUnitCreditCode
=
reginParams
.
getCompany
().
getCompanyCode
();
String
useUnitCreditCode
=
reginParams
.
getCompany
().
getCompanyCode
();
// 使用单位为个人时候 特殊处理
if
(
useUnitCreditCode
.
split
(
"_"
).
length
>
1
)
{
useUnitCreditCode
=
useUnitCreditCode
.
split
(
"_"
)[
1
];
}
jsonObject
.
put
(
"useUnitCreditCode"
,
useUnitCreditCode
);
jsonObject
.
put
(
"useUnitCreditCode"
,
useUnitCreditCode
);
Page
<
JSONObject
>
page
=
new
Page
<>(
jsonObject
.
getLong
(
"number"
),
jsonObject
.
getLong
(
"size"
));
Page
<
JSONObject
>
page
=
new
Page
<>(
jsonObject
.
getLong
(
"number"
),
jsonObject
.
getLong
(
"size"
));
List
<
DictionarieValueModel
>
fillingMedium
=
Systemctl
.
dictionarieClient
.
dictValues
(
"FILLING_MEDIUM"
).
getResult
();
List
<
DictionarieValueModel
>
fillingMedium
=
Systemctl
.
dictionarieClient
.
dictValues
(
"FILLING_MEDIUM"
).
getResult
();
Map
<
String
,
Object
>
fillingMediumMap
=
fillingMedium
.
stream
().
collect
(
Collectors
.
toMap
(
DictionarieValueModel:
:
getDictDataKey
,
DictionarieValueModel:
:
getDictDataValue
));
Map
<
String
,
Object
>
fillingMediumMap
=
fillingMedium
.
stream
().
collect
(
Collectors
.
toMap
(
DictionarieValueModel:
:
getDictDataKey
,
DictionarieValueModel:
:
getDictDataValue
));
Page
<
JSONObject
>
result
=
jgUseRegistrationMapper
.
queryForEquipUsedByVehiclePage
(
page
,
jsonObject
);
Page
<
JSONObject
>
result
=
jgUseRegistrationMapper
.
queryForEquipUsedByVehiclePage
(
page
,
jsonObject
);
result
.
getRecords
().
forEach
(
i
->
{
result
.
getRecords
().
forEach
(
i
->
{
i
.
put
(
"chargingMedium"
,
fillingMediumMap
.
get
(
i
.
get
(
"chargingMedium"
)));
i
.
put
(
"chargingMedium"
,
fillingMediumMap
.
get
(
i
.
get
(
"chargingMedium"
)));
...
...
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