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
fff3c83c
Commit
fff3c83c
authored
Sep 26, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jyjc): 技术参数调整
1.锅炉增加技术参数 2.结果接收同步调整
parent
e1349b45
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
21 deletions
+61
-21
InspectionDetectionSaveToDbEventListener.java
...nt/listener/InspectionDetectionSaveToDbEventListener.java
+3
-3
SingleEquipResultDataProcessor.java
.../biz/result/processor/SingleEquipResultDataProcessor.java
+5
-1
CommonServiceImpl.java
.../boot/module/jyjc/biz/service/impl/CommonServiceImpl.java
+2
-2
JyjcInspectionResultServiceImpl.java
...yjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
+19
-15
IdxBizJgTechParamsBoiler.java
.../boot/module/ymt/api/entity/IdxBizJgTechParamsBoiler.java
+32
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/event/listener/InspectionDetectionSaveToDbEventListener.java
View file @
fff3c83c
...
@@ -7,8 +7,8 @@ import com.yeejoin.amos.boot.module.jyjc.biz.event.listener.service.InspectionRe
...
@@ -7,8 +7,8 @@ import com.yeejoin.amos.boot.module.jyjc.biz.event.listener.service.InspectionRe
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.event.TransactionalEventListener
;
import
javax.annotation.PostConstruct
;
import
javax.annotation.PostConstruct
;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.BlockingQueue
;
...
@@ -22,7 +22,7 @@ import java.util.concurrent.LinkedBlockingQueue;
...
@@ -22,7 +22,7 @@ import java.util.concurrent.LinkedBlockingQueue;
@Component
@Component
@Slf4j
@Slf4j
@RequiredArgsConstructor
@RequiredArgsConstructor
public
class
InspectionDetectionSaveToDbEventListener
implements
ApplicationListener
<
InspectionDetectionSaveToDbEvent
>
{
public
class
InspectionDetectionSaveToDbEventListener
{
@Value
(
"${inspect.info.save.thread.number:3}"
)
@Value
(
"${inspect.info.save.thread.number:3}"
)
private
int
threadNumber
;
private
int
threadNumber
;
...
@@ -32,7 +32,7 @@ public class InspectionDetectionSaveToDbEventListener implements ApplicationList
...
@@ -32,7 +32,7 @@ public class InspectionDetectionSaveToDbEventListener implements ApplicationList
private
final
InspectionResultProcessor
updateService
;
private
final
InspectionResultProcessor
updateService
;
@
Override
@
TransactionalEventListener
(
value
=
InspectionDetectionSaveToDbEvent
.
class
)
public
void
onApplicationEvent
(
InspectionDetectionSaveToDbEvent
event
)
{
public
void
onApplicationEvent
(
InspectionDetectionSaveToDbEvent
event
)
{
log
.
info
(
"收到检验检测信息插入或者更新消息:{}"
,
JSONObject
.
toJSONString
(
event
.
getJyjcInspectionResultList
()));
log
.
info
(
"收到检验检测信息插入或者更新消息:{}"
,
JSONObject
.
toJSONString
(
event
.
getJyjcInspectionResultList
()));
blockingQueue
.
addAll
(
event
.
getJyjcInspectionResultList
());
blockingQueue
.
addAll
(
event
.
getJyjcInspectionResultList
());
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/result/processor/SingleEquipResultDataProcessor.java
View file @
fff3c83c
...
@@ -60,9 +60,10 @@ public class SingleEquipResultDataProcessor implements SupportableResultDataProc
...
@@ -60,9 +60,10 @@ public class SingleEquipResultDataProcessor implements SupportableResultDataProc
public
void
process
(
JyjcInspectionResult
jyjcInspectionResult
)
{
public
void
process
(
JyjcInspectionResult
jyjcInspectionResult
)
{
IdxBizJgInspectionDetectionInfo
info
=
new
IdxBizJgInspectionDetectionInfo
();
IdxBizJgInspectionDetectionInfo
info
=
new
IdxBizJgInspectionDetectionInfo
();
QueryWrapper
<
IdxBizJgInspectionDetectionInfo
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
IdxBizJgInspectionDetectionInfo
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
lambda
().
eq
(
IdxBizJgInspectionDetectionInfo:
:
get
InspectReportNo
,
jyjcInspectionResult
.
getSequenceNbr
());
wrapper
.
lambda
().
eq
(
IdxBizJgInspectionDetectionInfo:
:
get
ResultSeq
,
jyjcInspectionResult
.
getSequenceNbr
());
List
<
IdxBizJgInspectionDetectionInfo
>
list
=
inspectionDetectionInfoMapper
.
selectList
(
wrapper
);
List
<
IdxBizJgInspectionDetectionInfo
>
list
=
inspectionDetectionInfoMapper
.
selectList
(
wrapper
);
String
record
;
String
record
;
//1.检验信息插入或者高新
if
(
CollectionUtils
.
isEmpty
(
list
))
{
if
(
CollectionUtils
.
isEmpty
(
list
))
{
fillInspectionFields
(
jyjcInspectionResult
,
info
);
fillInspectionFields
(
jyjcInspectionResult
,
info
);
info
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
info
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
...
@@ -76,6 +77,8 @@ public class SingleEquipResultDataProcessor implements SupportableResultDataProc
...
@@ -76,6 +77,8 @@ public class SingleEquipResultDataProcessor implements SupportableResultDataProc
record
=
info
.
getRecord
();
record
=
info
.
getRecord
();
bizEmqPublisher
.
sendInspectionMsgAfterSave
(
info
,
"update"
);
bizEmqPublisher
.
sendInspectionMsgAfterSave
(
info
,
"update"
);
}
}
// 2.设备技术参数更新
inspectionResultService
.
updateTechParam
(
jyjcInspectionResult
.
getSequenceNbr
(),
record
);
// 3.更新使用信息表最新的检验信息
// 3.更新使用信息表最新的检验信息
useInfoMapper
.
updateByRecord
(
jyjcInspectionResult
.
getEquipUnicode
(),
jyjcInspectionResult
.
getNextInspectionDate
(),
jyjcInspectionResult
.
getInspectionType
(),
jyjcInspectionResult
.
getApplicationNo
());
useInfoMapper
.
updateByRecord
(
jyjcInspectionResult
.
getEquipUnicode
(),
jyjcInspectionResult
.
getNextInspectionDate
(),
jyjcInspectionResult
.
getInspectionType
(),
jyjcInspectionResult
.
getApplicationNo
());
// 4.es更新下次检验日期
// 4.es更新下次检验日期
...
@@ -95,6 +98,7 @@ public class SingleEquipResultDataProcessor implements SupportableResultDataProc
...
@@ -95,6 +98,7 @@ public class SingleEquipResultDataProcessor implements SupportableResultDataProc
info
.
setProblemRemark
(
jyjcInspectionResult
.
getNonConformance
());
info
.
setProblemRemark
(
jyjcInspectionResult
.
getNonConformance
());
info
.
setNextInspectDate
(
jyjcInspectionResult
.
getNextInspectionDate
());
info
.
setNextInspectDate
(
jyjcInspectionResult
.
getNextInspectionDate
());
info
.
setSequenceCode
(
jyjcInspectionResult
.
getEquipUnicode
());
info
.
setSequenceCode
(
jyjcInspectionResult
.
getEquipUnicode
());
info
.
setResultSeq
(
jyjcInspectionResult
.
getSequenceNbr
()
+
""
);
info
.
setInspectOrgCode
(
jyjcInspectionResult
.
getInspectionUnitCode
());
info
.
setInspectOrgCode
(
jyjcInspectionResult
.
getInspectionUnitCode
());
info
.
setInspectReportNo
(
jyjcInspectionResult
.
getResultNo
());
info
.
setInspectReportNo
(
jyjcInspectionResult
.
getResultNo
());
info
.
setRecDate
(
new
Date
());
info
.
setRecDate
(
new
Date
());
...
...
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/CommonServiceImpl.java
View file @
fff3c83c
...
@@ -437,8 +437,8 @@ public class CommonServiceImpl {
...
@@ -437,8 +437,8 @@ public class CommonServiceImpl {
info
.
setInspectStaffCode
(
model
.
getInspector
());
info
.
setInspectStaffCode
(
model
.
getInspector
());
info
.
setInspectReport
(
jybgFile
.
getAttachmentUrl
());
info
.
setInspectReport
(
jybgFile
.
getAttachmentUrl
());
info
.
setInspectConclusion
(
model
.
getInspectionConclusion
());
info
.
setInspectConclusion
(
model
.
getInspectionConclusion
());
// json字段暂时注释
info
.
setResultSeq
(
model
.
getSequenceNbr
()
+
""
);
//
info.setProblemRemark(model.getNonConformance());
info
.
setProblemRemark
(
model
.
getNonConformance
());
info
.
setNextInspectDate
(
model
.
getNextInspectionDate
());
info
.
setNextInspectDate
(
model
.
getNextInspectionDate
());
info
.
setSequenceCode
(
record
);
info
.
setSequenceCode
(
record
);
info
.
setInspectOrgCode
(
model
.
getInspectionUnitCode
());
info
.
setInspectOrgCode
(
model
.
getInspectionUnitCode
());
...
...
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/JyjcInspectionResultServiceImpl.java
View file @
fff3c83c
...
@@ -380,21 +380,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -380,21 +380,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
}
else
{
}
else
{
// 台套逻辑: 单条更新技术参数、检验信息更新或者插入、使用信息更新(数据库及es)
// 台套逻辑: 单条更新技术参数、检验信息更新或者插入、使用信息更新(数据库及es)
// 1.动态更新技术参数
// 1.动态更新技术参数
List
<
DynamicColumnDto
>
columns
=
new
ArrayList
<>();
updateTechParam
(
model
.
getSequenceNbr
(),
model
.
getEquipUnicode
());
JyjcInspectionResultParam
param
=
iJyjcInspectionResultParamService
.
getOneParamByResultSeq
(
model
.
getSequenceNbr
());
if
(
param
!=
null
)
{
if
(!
ObjectUtils
.
isEmpty
(
param
.
getParamJson
()))
{
JSONObject
paramObj
=
JSON
.
parseObject
(
param
.
getParamJson
());
paramObj
.
forEach
((
k
,
v
)
->
{
DynamicColumnDto
columnDto
=
new
DynamicColumnDto
();
columnDto
.
setColumnName
(
String
.
format
(
"\"%s\""
,
StrUtil
.
toUnderlineCase
(
k
).
toUpperCase
()));
columnDto
.
setColumnValue
(
v
==
null
?
null
:
String
.
valueOf
(
v
));
columns
.
add
(
columnDto
);
});
String
tableName
=
this
.
getTableName
(
param
.
getParamType
());
jgCommonMapper
.
updateTechParamDynamic
(
tableName
,
model
.
getEquipUnicode
(),
columns
);
}
}
// 2.检验信息更新或者插入
// 2.检验信息更新或者插入
IdxBizJgInspectionDetectionInfo
info
=
new
IdxBizJgInspectionDetectionInfo
();
IdxBizJgInspectionDetectionInfo
info
=
new
IdxBizJgInspectionDetectionInfo
();
QueryWrapper
<
IdxBizJgInspectionDetectionInfo
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
IdxBizJgInspectionDetectionInfo
>
wrapper
=
new
QueryWrapper
<>();
...
@@ -422,6 +408,24 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -422,6 +408,24 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
return
records
;
return
records
;
}
}
public
void
updateTechParam
(
Long
resultSeq
,
String
record
)
{
List
<
DynamicColumnDto
>
columns
=
new
ArrayList
<>();
JyjcInspectionResultParam
param
=
iJyjcInspectionResultParamService
.
getOneParamByResultSeq
(
resultSeq
);
if
(
param
!=
null
)
{
if
(!
ObjectUtils
.
isEmpty
(
param
.
getParamJson
()))
{
JSONObject
paramObj
=
JSON
.
parseObject
(
param
.
getParamJson
());
paramObj
.
forEach
((
k
,
v
)
->
{
DynamicColumnDto
columnDto
=
new
DynamicColumnDto
();
columnDto
.
setColumnName
(
String
.
format
(
"\"%s\""
,
StrUtil
.
toUnderlineCase
(
k
).
toUpperCase
()));
columnDto
.
setColumnValue
(
v
==
null
?
null
:
String
.
valueOf
(
v
));
columns
.
add
(
columnDto
);
});
String
tableName
=
this
.
getTableName
(
param
.
getParamType
());
jgCommonMapper
.
updateTechParamDynamic
(
tableName
,
record
,
columns
);
}
}
}
private
String
getTableName
(
String
paramType
)
{
private
String
getTableName
(
String
paramType
)
{
return
String
.
format
(
"\"%s\""
,
StrUtil
.
toUnderlineCase
(
paramType
));
return
String
.
format
(
"\"%s\""
,
StrUtil
.
toUnderlineCase
(
paramType
));
}
}
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/IdxBizJgTechParamsBoiler.java
View file @
fff3c83c
...
@@ -189,4 +189,36 @@ public class IdxBizJgTechParamsBoiler extends TzsBaseEntity {
...
@@ -189,4 +189,36 @@ public class IdxBizJgTechParamsBoiler extends TzsBaseEntity {
@TableField
(
value
=
"\"SAFETY_ACCESSORIES_AND_RELATED_DEVICES\""
)
@TableField
(
value
=
"\"SAFETY_ACCESSORIES_AND_RELATED_DEVICES\""
)
private
String
safetyAccessoriesAndRelatedDevices
;
private
String
safetyAccessoriesAndRelatedDevices
;
/**
*安全阀校验报告编号
*/
@TableField
(
"\"SAFETY_VALVE_VERIFICATION_REPORT_NO\""
)
private
String
safetyValveVerificationReportNo
;
/**
*安全阀整定压力
*/
@TableField
(
"\"SAFETY_VALVE_SETTING_PRESSURE\""
)
private
String
safetyValveSettingPressure
;
/**
*水处理定期检验报告编号
*/
@TableField
(
"\"WATER_TREATMENT_REGULAR_INSPECTION_REPORT_NO\""
)
private
String
waterTreatmentRegularInspectionReportNo
;
/**
*水处理定期检验结论
*/
@TableField
(
"\"WATER_TREATMENT_REGULAR_INSPECTION_RESULT\""
)
private
String
waterTreatmentRegularInspectionResult
;
/**
*能效测试报告编号
*/
@TableField
(
"\"ENERGY_EFFICIENCY_TEST_REPORT_NO\""
)
private
String
energyEfficiencyTestReportNo
;
}
}
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