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
cffdbd97
Commit
cffdbd97
authored
Sep 18, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refeat(jyjc): 报检规则4.0开发
1.锅炉技术参数快捷维护报检 2.报检提交时记录历史表
parent
a61b03b2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
139 additions
and
77 deletions
+139
-77
BizCommonConstant.java
...n/amos/boot/module/jyjc/api/common/BizCommonConstant.java
+16
-0
InspectionEquipInfoModel.java
.../boot/module/jyjc/api/model/InspectionEquipInfoModel.java
+11
-0
EnableRuleDataPreparationService.java
.../event/rule/service/EnableRuleDataPreparationService.java
+68
-70
InspectionOrgRefreshListener.java
...odule/jyjc/biz/listener/InspectionOrgRefreshListener.java
+0
-1
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+44
-6
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/common/BizCommonConstant.java
View file @
cffdbd97
...
...
@@ -63,4 +63,20 @@ public interface BizCommonConstant {
* 固定式压力容器
*/
String
EQU_CATEGORY_CODE_GDYLRQ
=
"2100"
;
/**
* 承压蒸汽锅炉
*/
String
YLRQ_GL_CY
=
"1100"
;
/**
* 额定蒸发量(热功率)
*/
String
TECH_PARAM1
=
"ratedEvaporationCapacityThermalPower"
;
/**
* 额定工作压力
*/
String
TECH_PARAM2
=
"ratedWorkingPressure"
;
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/InspectionEquipInfoModel.java
View file @
cffdbd97
...
...
@@ -3,7 +3,9 @@ package com.yeejoin.amos.boot.module.jyjc.api.model;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
...
...
@@ -52,4 +54,13 @@ public class InspectionEquipInfoModel implements Serializable {
@ApiModelProperty
(
value
=
"设备的使用单位,报检监督检验规则使用"
)
private
String
useUnitCreditCode
;
@ApiModelProperty
(
value
=
"额定蒸发量(热功率)"
)
private
String
ratedEvaporationCapacityThermalPower
;
@ApiModelProperty
(
value
=
"额定工作压力"
)
private
String
ratedWorkingPressure
;
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/event/rule/service/EnableRuleDataPreparationService.java
View file @
cffdbd97
...
...
@@ -7,6 +7,8 @@ import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.yeejoin.amos.boot.module.common.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.common.BizCommonConstant
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplicationNoAcceptLog
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.JYJCTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.RequestTypeEnum
;
...
...
@@ -14,16 +16,13 @@ import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionApplicationNoA
import
com.yeejoin.amos.boot.module.jyjc.api.model.InspectionEquipInfoModel
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionOrgRefreshEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.TouchRuleEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.listener.InspectionApplicationPushEventListener
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.publisher.EventPublisher
;
import
com.yeejoin.amos.boot.module.jyjc.biz.rule.InspectionEquipInfo
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.RuleCommonServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectContraptionMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgUseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -33,6 +32,8 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Component
;
import
javax.annotation.PostConstruct
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.*
;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.ExecutorService
;
...
...
@@ -53,12 +54,9 @@ public class EnableRuleDataPreparationService {
private
final
SnowflakeIdUtil
sequence
;
private
final
IdxBizJgRegisterInfoMapper
registrationInfoMapper
;
private
final
RuleCommonServiceImpl
ruleCommonService
;
private
final
InspectionApplicationPushEventListener
applicationPushEventListener
;
private
final
JyjcInspectionApplicationNoAcceptLogMapper
inspectionApplicationNoAcceptLogMapper
;
private
final
EventPublisher
publisher
;
...
...
@@ -86,11 +84,6 @@ public class EnableRuleDataPreparationService {
*/
private
static
final
List
<
String
>
PRESSURE_EQU_LIST
=
Arrays
.
asList
(
"8000"
,
"1000"
,
"2000"
);
/**
* 需要技术参数匹配报检的设备类别-目的提高执行速度
*/
private
static
final
List
<
String
>
NEED_TECH_PARAM_EQU_CATEGORY
=
Collections
.
singletonList
(
"1100"
);
public
void
onApplicationEvent
(
InspectionOrgRefreshEvent
event
)
{
int
queueIndex
=
Math
.
abs
(
event
.
getInspectionEquipInfoModel
().
getRecord
().
hashCode
())
%
threadNumber
;
...
...
@@ -126,49 +119,14 @@ public class EnableRuleDataPreparationService {
private
void
dealData
(
InspectionEquipInfoModel
equipInfoModel
)
{
InspectionEquipInfo
inspectionEquipInfo
=
new
InspectionEquipInfo
();
if
(
equipInfoModel
.
getEquCategory
()
!=
null
&&
equipInfoModel
.
getEquCategory
().
startsWith
(
"8"
))
{
// 管道逻辑
String
projectContraptionId
=
equipInfoModel
.
getRecord
();
IdxBizJgProjectContraption
projectContraption
=
jgProjectContraptionMapper
.
selectById
(
projectContraptionId
);
if
(
projectContraption
==
null
)
{
log
.
error
(
"未找到装置,报检规则匹配流程结束!"
);
return
;
}
inspectionEquipInfo
.
setEquCategory
(
equipInfoModel
.
getEquCategory
());
inspectionEquipInfo
.
setEquList
(
equipInfoModel
.
getEquList
());
inspectionEquipInfo
.
setEquDefine
(
equipInfoModel
.
getEquDefine
());
inspectionEquipInfo
.
setTechParams
(
new
HashMap
<>());
}
else
{
// 非管道逻辑
IdxBizJgRegisterInfo
registrationInfo
=
fetchRegistrationInfo
(
equipInfoModel
.
getRecord
());
if
(
registrationInfo
==
null
)
{
log
.
error
(
"未找到设备,报检规则匹配流程结束!"
);
return
;
}
inspectionEquipInfo
.
setEquCategory
(
equipInfoModel
.
getEquCategory
());
inspectionEquipInfo
.
setEquList
(
equipInfoModel
.
getEquList
());
inspectionEquipInfo
.
setEquDefine
(
equipInfoModel
.
getEquDefine
());
inspectionEquipInfo
.
setTechParams
(
this
.
getTechParams
(
registrationInfo
,
equipInfoModel
));
// 是否球罐 0 1 转 boolean
inspectionEquipInfo
.
setIsBallValve
(!
"0"
.
equals
(
registrationInfo
.
getWhetherSphericalTank
()));
// 标签
inspectionEquipInfo
.
setEquipTag1
(
equipInfoModel
.
getEquipTag1
());
}
inspectionEquipInfo
.
setEquList
(
equipInfoModel
.
getEquList
());
inspectionEquipInfo
.
setEquCategory
(
equipInfoModel
.
getEquCategory
());
inspectionEquipInfo
.
setEquDefine
(
equipInfoModel
.
getEquDefine
());
inspectionEquipInfo
.
setTechParams
(
new
HashMap
<>());
inspectionEquipInfo
.
setInspectionType
(
equipInfoModel
.
getInspectionType
());
inspectionEquipInfo
.
setBizType
(
getCategoryByType
(
JYJCTypeEnum
.
of
(
inspectionEquipInfo
.
getInspectionType
())));
if
(
PRESSURE_EQU_LIST
.
contains
(
equipInfoModel
.
getEquList
()))
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
equipInfoModel
.
getUserId
(),
equipInfoModel
.
getToken
())).
toString
(),
ReginParams
.
class
);
setCompanyInfo
(
reginParams
,
inspectionEquipInfo
);
// 取设备的useUnitCreditCode(前端已经限制按照使用单位筛选进行报检)
String
useUnitCode
=
this
.
getUseInfo
(
equipInfoModel
.
getRecord
());
TzBaseEnterpriseInfo
enterpriseInfo
=
baseEnterpriseInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>()
.
eq
(
TzBaseEnterpriseInfo:
:
getUseUnitCode
,
useUnitCode
).
select
(
BaseEntity:
:
getSequenceNbr
,
TzBaseEnterpriseInfo:
:
getRegulatoryLabels
));
inspectionEquipInfo
.
setManageLevel
(
StringUtils
.
isNotBlank
(
enterpriseInfo
.
getRegulatoryLabels
())
?
enterpriseInfo
.
getRegulatoryLabels
()
:
defaultRegulatoryLabels
);
}
else
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
equipInfoModel
.
getUserId
(),
equipInfoModel
.
getToken
())).
toString
(),
ReginParams
.
class
);
setCompanyInfo
(
reginParams
,
inspectionEquipInfo
);
}
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
equipInfoModel
.
getUserId
(),
equipInfoModel
.
getToken
())).
toString
(),
ReginParams
.
class
);
setCompanyInfo
(
reginParams
,
inspectionEquipInfo
);
inspectionEquipInfo
.
setAreaCode
(
ruleCommonService
.
getArea
(
equipInfoModel
.
getCity
(),
equipInfoModel
.
getCounty
()));
inspectionEquipInfo
.
setDistrictOrCountyCode
(
equipInfoModel
.
getCounty
());
inspectionEquipInfo
.
setComponentKey
(
equipInfoModel
.
getComponentKey
());
...
...
@@ -178,10 +136,57 @@ public class EnableRuleDataPreparationService {
inspectionEquipInfo
.
setRequestType
(
this
.
buildRequestType
(
equipInfoModel
,
jyjcInspectionApplicationNoAcceptLog
));
inspectionEquipInfo
.
setLastNoAcceptInspectionCode
(
this
.
buildLastNoAcceptInspectionCode
(
jyjcInspectionApplicationNoAcceptLog
));
inspectionEquipInfo
.
setAppSeq
(
equipInfoModel
.
getAppSeq
());
buildInspectionEquipByEquList
(
equipInfoModel
,
inspectionEquipInfo
);
// 触发规则
publisher
.
publish
(
new
TouchRuleEvent
(
this
,
inspectionEquipInfo
));
}
/**
* 设置按照设备种类、类别
*
* @param equipInfoModel 上送数据
* @param inspectionEquipInfo 触发规则的
*/
private
void
buildInspectionEquipByEquList
(
InspectionEquipInfoModel
equipInfoModel
,
InspectionEquipInfo
inspectionEquipInfo
)
{
// 固定时压力容器时需要设置是否球罐
if
(
BizCommonConstant
.
EQU_CATEGORY_CODE_GDYLRQ
.
equals
(
equipInfoModel
.
getEquCategory
()))
{
// 是否球罐 0 1 转 boolean
inspectionEquipInfo
.
setIsBallValve
(!
"0"
.
equals
(
equipInfoModel
.
getEquipTag1
()));
}
// 大型游乐设施需要设置设备分类
if
(
EquipmentClassifityEnum
.
YLSS
.
getCode
().
equals
(
equipInfoModel
.
getEquList
()))
{
// 设备分类
inspectionEquipInfo
.
setEquipTag1
(
equipInfoModel
.
getEquipTag1
());
}
// 锅炉设置技术参数
if
(
EquipmentClassifityEnum
.
GL
.
getCode
().
equals
(
equipInfoModel
.
getEquList
()))
{
inspectionEquipInfo
.
setTechParams
(
this
.
getTechParams
(
equipInfoModel
));
}
// 承压类设置管控级别-非压力管道,取设备的使用单位
if
(
PRESSURE_EQU_LIST
.
contains
(
equipInfoModel
.
getEquList
())
&&
!
EquipmentClassifityEnum
.
YLGD
.
getCode
().
equals
(
equipInfoModel
.
getEquList
()))
{
// 取设备的useUnitCreditCode(前端已经限制按照使用单位筛选进行报检)
String
useUnitCode
=
this
.
getUseInfo
(
equipInfoModel
.
getRecord
());
TzBaseEnterpriseInfo
enterpriseInfo
=
baseEnterpriseInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>()
.
eq
(
TzBaseEnterpriseInfo:
:
getUseUnitCode
,
useUnitCode
).
select
(
BaseEntity:
:
getSequenceNbr
,
TzBaseEnterpriseInfo:
:
getRegulatoryLabels
));
inspectionEquipInfo
.
setManageLevel
(
StringUtils
.
isNotBlank
(
enterpriseInfo
.
getRegulatoryLabels
())
?
enterpriseInfo
.
getRegulatoryLabels
()
:
defaultRegulatoryLabels
);
}
// 承压类设置管控级别-压力管道,取装置的使用单位
if
(
EquipmentClassifityEnum
.
YLGD
.
getCode
().
equals
(
equipInfoModel
.
getEquList
()))
{
// 取设备的useUnitCreditCode(前端已经限制按照使用单位筛选进行报检)
String
useUnitCode
=
this
.
getUseInfoProject
(
equipInfoModel
.
getRecord
());
TzBaseEnterpriseInfo
enterpriseInfo
=
baseEnterpriseInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>()
.
eq
(
TzBaseEnterpriseInfo:
:
getUseUnitCode
,
useUnitCode
).
select
(
BaseEntity:
:
getSequenceNbr
,
TzBaseEnterpriseInfo:
:
getRegulatoryLabels
));
inspectionEquipInfo
.
setManageLevel
(
StringUtils
.
isNotBlank
(
enterpriseInfo
.
getRegulatoryLabels
())
?
enterpriseInfo
.
getRegulatoryLabels
()
:
defaultRegulatoryLabels
);
}
}
private
String
getUseInfoProject
(
String
projectContraptionId
)
{
IdxBizJgProjectContraption
projectContraption
=
jgProjectContraptionMapper
.
selectById
(
projectContraptionId
);
return
projectContraption
.
getUseUnitCreditCode
();
}
private
String
getUseInfo
(
String
record
)
{
IdxBizJgUseInfo
useInfo
=
idxBizJgUseInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>().
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
).
select
(
IdxBizJgUseInfo:
:
getRecord
,
IdxBizJgUseInfo:
:
getUseUnitCreditCode
));
return
useInfo
.
getUseUnitCreditCode
();
...
...
@@ -201,12 +206,17 @@ public class EnableRuleDataPreparationService {
return
""
;
}
private
Map
<
String
,
Object
>
getTechParams
(
IdxBizJgRegisterInfo
registrationInfo
,
InspectionEquipInfoModel
equipInfoModel
)
{
if
(
NEED_TECH_PARAM_EQU_CATEGORY
.
contains
(
equipInfoModel
.
getEquCategory
()))
{
return
applicationPushEventListener
.
populateEquipInfoWithTechParams
(
registrationInfo
.
getEquList
(),
registrationInfo
.
getRecord
());
}
return
new
HashMap
<>();
private
Map
<
String
,
Object
>
getTechParams
(
InspectionEquipInfoModel
equipInfoModel
)
{
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
BigDecimal
capacityThermalPower
=
Optional
.
ofNullable
(
equipInfoModel
.
getRatedEvaporationCapacityThermalPower
())
.
map
(
val
->
new
BigDecimal
(
val
).
setScale
(
0
,
RoundingMode
.
HALF_UP
))
.
orElse
(
BigDecimal
.
ZERO
);
// 默认值
BigDecimal
workingPressure
=
Optional
.
ofNullable
(
equipInfoModel
.
getRatedWorkingPressure
())
.
map
(
val
->
new
BigDecimal
(
val
).
setScale
(
0
,
RoundingMode
.
HALF_UP
))
.
orElse
(
BigDecimal
.
ZERO
);
// 默认值
param
.
put
(
BizCommonConstant
.
TECH_PARAM1
,
capacityThermalPower
);
param
.
put
(
BizCommonConstant
.
TECH_PARAM2
,
workingPressure
);
return
param
;
}
private
String
buildRequestType
(
InspectionEquipInfoModel
equipInfoModel
,
JyjcInspectionApplicationNoAcceptLog
jyjcInspectionApplicationNoAcceptLog
)
{
...
...
@@ -230,17 +240,5 @@ public class EnableRuleDataPreparationService {
wrapper
.
select
(
JyjcInspectionApplicationNoAcceptLog:
:
getApplicationSeq
,
JyjcInspectionApplicationNoAcceptLog:
:
getInspectionUnitCode
);
return
inspectionApplicationNoAcceptLogMapper
.
selectOne
(
wrapper
);
}
private
IdxBizJgRegisterInfo
fetchRegistrationInfo
(
String
record
)
{
return
registrationInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>()
.
select
(
IdxBizJgRegisterInfo:
:
getRecord
,
IdxBizJgRegisterInfo:
:
getEquCategory
,
IdxBizJgRegisterInfo:
:
getEquDefine
,
IdxBizJgRegisterInfo:
:
getEquList
,
IdxBizJgRegisterInfo:
:
getWhetherSphericalTank
,
IdxBizJgRegisterInfo:
:
getTag1
)
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
));
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/listener/InspectionOrgRefreshListener.java
View file @
cffdbd97
...
...
@@ -84,7 +84,6 @@ public class InspectionOrgRefreshListener extends EmqxListener {
}
private
void
processBizMessage
(
BizMessage
bizMessage
)
{
log
.
info
(
"收到前端消息:{}"
,
bizMessage
);
byte
[]
payload
=
bizMessage
.
getMessage
().
getPayload
();
InspectionEquipInfoModel
equipInfoModel
=
parseObject
(
new
String
(
payload
,
StandardCharsets
.
UTF_8
),
InspectionEquipInfoModel
.
class
);
String
componentKey
=
bizMessage
.
getTopic
().
split
(
"/"
)[
0
];
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionApplicationServiceImpl.java
View file @
cffdbd97
...
...
@@ -41,12 +41,14 @@ import com.yeejoin.amos.boot.module.jyjc.biz.service.TaskModelServiceImpl;
import
com.yeejoin.amos.boot.module.jyjc.biz.typeHandler.EquipCategoryTypeHandler
;
import
com.yeejoin.amos.boot.module.jyjc.biz.util.CompareUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipTechParamBoiler
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectConstruction
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipTechParamBoilerMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectContraptionMapper
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieModel
;
...
...
@@ -115,6 +117,9 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
@Autowired
@Lazy
InspectionPlanServiceImpl
inspectionPlanService
;
@Autowired
private
EquipTechParamBoilerMapper
equipTechParamBoilerMapper
;
/**
* 分页查询
*/
...
...
@@ -198,7 +203,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
// 之前有工作流,再次提交
model
.
setOperationType
(
"2"
);
}
ArrayList
<
String
>
roleListAll
=
new
ArrayList
<>();
ArrayList
<
String
>
roleListNext
=
new
ArrayList
<>();
if
(!
"2"
.
equals
(
model
.
getOperationType
()))
{
...
...
@@ -406,9 +410,18 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
commonService
.
saveExecuteFlowData2Redis
(
model
.
getProcessInstanceId
(),
this
.
buildInstanceRuntimeData
(
model
));
this
.
updateWithModel
(
model
);
}
// 暂存页面数据至his表
saveHisData
(
obj
,
model
);
return
this
.
buildRedundancyField
(
model
);
}
private
void
saveHisData
(
JSONObject
obj
,
JyjcInspectionApplicationModel
model
)
{
JyjcInspectionApplication
application
=
new
JyjcInspectionApplication
();
BeanUtils
.
copyProperties
(
model
,
application
);
obj
.
putAll
(
BeanUtil
.
beanToMap
(
application
));
inspectionHistoryService
.
saveBySeq
(
model
.
getSequenceNbr
(),
obj
,
model
.
getInspectionType
());
}
private
String
getAllSupervisoryCode
(
List
<
JyjcInspectionApplicationEquip
>
equipInfos
)
{
return
equipInfos
.
stream
().
map
(
JyjcInspectionApplicationEquip:
:
getSupervisoryCode
).
filter
(
supervisoryCode
->
!
CompareUtils
.
isNullOrEmpty
(
supervisoryCode
)).
collect
(
Collectors
.
joining
(
","
));
}
...
...
@@ -580,9 +593,9 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
Map
<
String
,
Object
>
map
=
BeanUtil
.
beanToMap
(
model
);
// 附件
Map
<
String
,
Object
>
attMap
=
getAttachmentMap
(
sequenceNbr
);
JyjcInspectionHistory
inspectionHistory
=
inspectionHistoryService
.
getBySSeq
(
sequenceNbr
);
// 已完成的显示json数据 需兼容老数据
if
(
model
.
getStatus
().
equals
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
())))
{
JyjcInspectionHistory
inspectionHistory
=
inspectionHistoryService
.
getBySSeq
(
sequenceNbr
);
if
(
inspectionHistory
!=
null
)
{
// 新报检单记录历史数据的逻辑
map
.
putAll
(
inspectionHistory
.
getHistoryData
());
...
...
@@ -597,6 +610,9 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
map
.
put
(
"equip"
,
arrayList
);
}
}
map
.
put
(
"status"
,
model
.
getStatus
());
map
.
put
(
"acceptDate"
,
model
.
getAcceptDate
());
map
.
put
(
"applicationDate"
,
model
.
getApplicationDate
());
}
else
{
// 未审批完成的显示实时数据
if
(
model
.
getEquipClassify
().
equals
(
EquipmentClassifityEnum
.
YLGD
.
getCode
()))
{
...
...
@@ -606,6 +622,8 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
// 其他设备
List
<
Map
<
String
,
Object
>>
arrayList
=
getEquipInfoList
(
sequenceNbr
,
model
);
map
.
put
(
"equip"
,
arrayList
);
map
.
put
(
BizCommonConstant
.
TECH_PARAM1
,
inspectionHistory
.
getHistoryData
().
get
(
BizCommonConstant
.
TECH_PARAM1
));
map
.
put
(
BizCommonConstant
.
TECH_PARAM2
,
inspectionHistory
.
getHistoryData
().
get
(
BizCommonConstant
.
TECH_PARAM2
));
}
}
map
.
putAll
(
attMap
);
...
...
@@ -851,10 +869,18 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
JSONObject
hisData
=
getDeviceListByProjectContraption2
(
model
);
inspectionHistoryService
.
saveBySeq
(
model
.
getSequenceNbr
(),
hisData
,
model
.
getInspectionType
());
}
else
{
List
<
Map
<
String
,
Object
>>
arrayList
=
getEquipInfoList
(
model
.
getSequenceNbr
(),
model
);
JSONObject
hisData
=
new
JSONObject
();
hisData
.
put
(
"equip"
,
arrayList
);
inspectionHistoryService
.
saveBySeq
(
model
.
getSequenceNbr
(),
hisData
,
model
.
getInspectionType
());
JyjcInspectionHistory
inspectionHistory
=
inspectionHistoryService
.
getBySSeq
(
model
.
getSequenceNbr
());
if
(
inspectionHistory
!=
null
)
{
JSONObject
hisData
=
inspectionHistory
.
getHistoryData
();
List
<
Map
<
String
,
Object
>>
arrayList
=
getEquipInfoList
(
model
.
getSequenceNbr
(),
model
);
hisData
.
put
(
"equip"
,
arrayList
);
inspectionHistoryService
.
saveBySeq
(
model
.
getSequenceNbr
(),
hisData
,
model
.
getInspectionType
());
}
else
{
List
<
Map
<
String
,
Object
>>
arrayList
=
getEquipInfoList
(
model
.
getSequenceNbr
(),
model
);
JSONObject
hisData
=
new
JSONObject
();
hisData
.
put
(
"equip"
,
arrayList
);
inspectionHistoryService
.
saveBySeq
(
model
.
getSequenceNbr
(),
hisData
,
model
.
getInspectionType
());
}
}
}
...
...
@@ -1537,6 +1563,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
// 填充地址
fillAddress
(
list
);
fillTechParamForGl
(
map
.
getString
(
"EQU_CATEGORY_CODE"
),
list
);
total
=
response
.
getInternalResponse
().
hits
().
getTotalHits
().
value
;
result
.
setRecords
(
list
);
result
.
setTotal
(
total
);
...
...
@@ -1546,6 +1573,17 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
return
result
;
}
private
void
fillTechParamForGl
(
String
equCategoryCode
,
List
<
JSONObject
>
list
)
{
if
(
BizCommonConstant
.
YLRQ_GL_CY
.
equals
(
equCategoryCode
))
{
for
(
JSONObject
jsonObject
:
list
)
{
String
record
=
jsonObject
.
getString
(
SEQUENCE_NBR
);
EquipTechParamBoiler
paramBoiler
=
equipTechParamBoilerMapper
.
queryTechParamInUse
(
record
);
jsonObject
.
put
(
BizCommonConstant
.
TECH_PARAM1
,
paramBoiler
!=
null
?
paramBoiler
.
getRatedEvaporationCapacityThermalPower
()
:
"0"
);
jsonObject
.
put
(
BizCommonConstant
.
TECH_PARAM2
,
paramBoiler
!=
null
?
paramBoiler
.
getRatedWorkingPressure
()
:
"0"
);
}
}
}
private
static
void
setFilterByIndefinite
(
JSONObject
map
,
String
type
,
String
companyCode
,
BoolQueryBuilder
boolMust
)
{
// 根据当前登录用户类型及管辖机构筛选条件添加对应参数
if
(!
ValidationUtil
.
isEmpty
(
type
)
&&
type
.
contains
(
"使用单位"
))
{
...
...
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