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
a2f3a42b
Commit
a2f3a42b
authored
May 27, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.检验检验过滤技术参数核对
2.安全追溯检验结果信息发送
parent
a5d7fe7e
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
266 additions
and
198 deletions
+266
-198
EquipTechParamBoiler.java
...mos/api/openapi/face/orm/entity/EquipTechParamBoiler.java
+181
-185
InspectionApplicationPushEventListener.java
...vent/listener/InspectionApplicationPushEventListener.java
+6
-6
InspectionDetectionSaveToDbEventListener.java
...nt/listener/InspectionDetectionSaveToDbEventListener.java
+16
-3
BizEmqPublisher.java
...boot/module/jyjc/biz/event/publisher/BizEmqPublisher.java
+39
-0
TaskModelServiceImpl.java
...os/boot/module/jyjc/biz/service/TaskModelServiceImpl.java
+1
-1
JyjcInspectionResultParamServiceImpl.java
...iz/service/impl/JyjcInspectionResultParamServiceImpl.java
+1
-1
JyjcInspectionResultServiceImpl.java
...yjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
+9
-1
JsonUtils.java
...com/yeejoin/amos/boot/module/jyjc/biz/util/JsonUtils.java
+1
-1
JyjcConstant.java
.../yeejoin/amos/boot/module/jyjc/biz/util/JyjcConstant.java
+12
-0
No files found.
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/orm/entity/EquipTechParamBoiler.java
View file @
a2f3a42b
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
orm
.
entity
;
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
orm
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.math.BigDecimal
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity
;
import
java.math.BigDecimal
;
/**
/**
* 安全追溯-锅炉
* 安全追溯-锅炉
*
*
* @author cpp
* @author cpp
* @date 2023-04-06 15:21:22
* @date 2023-04-06 15:21:22
*/
*/
...
@@ -23,182 +19,182 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
...
@@ -23,182 +19,182 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"mid_equip_tech_param_boiler"
)
@TableName
(
"mid_equip_tech_param_boiler"
)
public
class
EquipTechParamBoiler
extends
AbstractEquipBaseEntity
{
public
class
EquipTechParamBoiler
extends
AbstractEquipBaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
/**
*
* $column.comments
*
* $column.comments
*
*
/
*/
@TableField
(
value
=
"\"SUPERVISORY_CODE\""
)
@TableField
(
value
=
"\"SUPERVISORY_CODE\""
)
private
String
supervisoryCode
;
private
String
supervisoryCode
;
/**
/**
* * $column.comments
* * $column.comments
* */
* */
/**
/**
*
* $column.comments
*
* $column.comments
*
*
/
*/
@TableField
(
value
=
"\"INSTANCE_ID\""
)
@TableField
(
value
=
"\"INSTANCE_ID\""
)
private
String
instanceId
;
private
String
instanceId
;
/**
/**
*
* $column.comments
*
* $column.comments
*
*
/
*/
@TableField
(
value
=
"\"STATUS\""
)
@TableField
(
value
=
"\"STATUS\""
)
private
String
status
;
private
String
status
;
/**
/**
*
* 设备等级
*
* 设备等级
*
*
/
*/
@TableField
(
value
=
"\"DEVICE_LEVEL\""
)
@TableField
(
value
=
"\"DEVICE_LEVEL\""
)
private
String
deviceLevel
;
private
String
deviceLevel
;
/**
/**
*
* 额定蒸发量(热功率)
*
* 额定蒸发量(热功率)
*
*
/
*/
@TableField
(
value
=
"\"RATED_EVAPORATION_CAPACITY_THERMAL_POWER\""
)
@TableField
(
value
=
"\"RATED_EVAPORATION_CAPACITY_THERMAL_POWER\""
)
private
BigDecimal
ratedEvaporationCapacityThermalPower
;
private
BigDecimal
ratedEvaporationCapacityThermalPower
;
/**
/**
*
* 额定工作压力
*
* 额定工作压力
*
*
/
*/
@TableField
(
value
=
"\"RATED_WORKING_PRESSURE\""
)
@TableField
(
value
=
"\"RATED_WORKING_PRESSURE\""
)
private
BigDecimal
ratedWorkingPressure
;
private
BigDecimal
ratedWorkingPressure
;
/**
/**
*
* 额定工作温度
*
* 额定工作温度
*
*
/
*/
@TableField
(
value
=
"\"RATED_OPERATING_TEMPERATURE\""
)
@TableField
(
value
=
"\"RATED_OPERATING_TEMPERATURE\""
)
private
BigDecimal
ratedOperatingTemperature
;
private
BigDecimal
ratedOperatingTemperature
;
/**
/**
*
* 设计热效率
*
* 设计热效率
*
*
/
*/
@TableField
(
value
=
"\"DESIGN_THERMAL_EFFICIENCY\""
)
@TableField
(
value
=
"\"DESIGN_THERMAL_EFFICIENCY\""
)
private
BigDecimal
designThermalEfficiency
;
private
BigDecimal
designThermalEfficiency
;
/**
/**
*
* 给水温度
*
* 给水温度
*
*
/
*/
@TableField
(
value
=
"\"FEEDWATER_TEMPERATURE\""
)
@TableField
(
value
=
"\"FEEDWATER_TEMPERATURE\""
)
private
BigDecimal
feedwaterTemperature
;
private
BigDecimal
feedwaterTemperature
;
/**
/**
*
* 额定出/回水(油)温度
*
* 额定出/回水(油)温度
*
*
/
*/
@TableField
(
value
=
"\"RATED_OUTLET_RETURN_WATER_OIL_TEMPERATURE\""
)
@TableField
(
value
=
"\"RATED_OUTLET_RETURN_WATER_OIL_TEMPERATURE\""
)
private
BigDecimal
ratedOutletReturnWaterOilTemperature
;
private
BigDecimal
ratedOutletReturnWaterOilTemperature
;
/**
/**
*
* 锅炉本体水(油)容积
*
* 锅炉本体水(油)容积
*
*
/
*/
@TableField
(
value
=
"\"WATER_OIL_VOLUME_OF_BOILER_PROPER\""
)
@TableField
(
value
=
"\"WATER_OIL_VOLUME_OF_BOILER_PROPER\""
)
private
BigDecimal
waterOilVolumeOfBoilerProper
;
private
BigDecimal
waterOilVolumeOfBoilerProper
;
/**
/**
*
* 整装锅炉本体液压试验介质/压力
*
* 整装锅炉本体液压试验介质/压力
*
*
/
*/
@TableField
(
value
=
"\"HYDRAULIC_TEST_MEDIUM_PRESSURE_OF_PACKAGED_BOILER_BODY\""
)
@TableField
(
value
=
"\"HYDRAULIC_TEST_MEDIUM_PRESSURE_OF_PACKAGED_BOILER_BODY\""
)
private
BigDecimal
hydraulicTestMediumPressureOfPackagedBoilerBody
;
private
BigDecimal
hydraulicTestMediumPressureOfPackagedBoilerBody
;
/**
/**
*
* 再热器进(出)口温度
*
* 再热器进(出)口温度
*
*
/
*/
@TableField
(
value
=
"\"INLET_OUTLET_TEMPERATURE_OF_REHEATER\""
)
@TableField
(
value
=
"\"INLET_OUTLET_TEMPERATURE_OF_REHEATER\""
)
private
BigDecimal
inletOutletTemperatureOfReheater
;
private
BigDecimal
inletOutletTemperatureOfReheater
;
/**
/**
*
* 再热器进(出)口压力
*
* 再热器进(出)口压力
*
*
/
*/
@TableField
(
value
=
"\"REHEATER_INLET_OUTLET_PRESSURE\""
)
@TableField
(
value
=
"\"REHEATER_INLET_OUTLET_PRESSURE\""
)
private
BigDecimal
reheaterInletOutletPressure
;
private
BigDecimal
reheaterInletOutletPressure
;
/**
/**
*
* 再热蒸汽流量
*
* 再热蒸汽流量
*
*
/
*/
@TableField
(
value
=
"\"REHEAT_STEAM_FLOW\""
)
@TableField
(
value
=
"\"REHEAT_STEAM_FLOW\""
)
private
BigDecimal
reheatSteamFlow
;
private
BigDecimal
reheatSteamFlow
;
/**
/**
*
* 燃料(热源)种类
*
* 燃料(热源)种类
*
*
/
*/
@TableField
(
value
=
"\"FUEL_TYPE\""
)
@TableField
(
value
=
"\"FUEL_TYPE\""
)
private
String
fuelType
;
private
String
fuelType
;
/**
/**
*
* 受压部件名称
*
* 受压部件名称
*
*
/
*/
@TableField
(
value
=
"\"NAME_OF_PRESSURE_PARTS\""
)
@TableField
(
value
=
"\"NAME_OF_PRESSURE_PARTS\""
)
private
String
nameOfPressureParts
;
private
String
nameOfPressureParts
;
/**
/**
*
* 受压部件材料
*
* 受压部件材料
*
*
/
*/
@TableField
(
value
=
"\"MATERIAL_OF_PRESSURE_PARTS\""
)
@TableField
(
value
=
"\"MATERIAL_OF_PRESSURE_PARTS\""
)
private
String
materialOfPressureParts
;
private
String
materialOfPressureParts
;
/**
/**
*
* 受压部件壁厚
*
* 受压部件壁厚
*
*
/
*/
@TableField
(
value
=
"\"WALL_THICKNESS_OF_PRESSURE_PARTS\""
)
@TableField
(
value
=
"\"WALL_THICKNESS_OF_PRESSURE_PARTS\""
)
private
BigDecimal
wallThicknessOfPressureParts
;
private
BigDecimal
wallThicknessOfPressureParts
;
/**
/**
*
* 受压部件无损检测方法
*
* 受压部件无损检测方法
*
*
/
*/
@TableField
(
value
=
"\"NON_DESTRUCTIVE_TESTING_METHODS_FOR_PRESSURE_PARTS\""
)
@TableField
(
value
=
"\"NON_DESTRUCTIVE_TESTING_METHODS_FOR_PRESSURE_PARTS\""
)
private
String
nonDestructiveTestingMethodsForPressureParts
;
private
String
nonDestructiveTestingMethodsForPressureParts
;
/**
/**
*
* 受压部件无损检测比例
*
* 受压部件无损检测比例
*
*
/
*/
@TableField
(
value
=
"\"PROPORTION_OF_NDT_FOR_PRESSURE_PARTS\""
)
@TableField
(
value
=
"\"PROPORTION_OF_NDT_FOR_PRESSURE_PARTS\""
)
private
BigDecimal
proportionOfNdtForPressureParts
;
private
BigDecimal
proportionOfNdtForPressureParts
;
/**
/**
*
* 受压部件热处理温度
*
* 受压部件热处理温度
*
*
/
*/
@TableField
(
value
=
"\"HEAT_TREATMENT_TEMPERATURE_OF_PRESSURE_PARTS\""
)
@TableField
(
value
=
"\"HEAT_TREATMENT_TEMPERATURE_OF_PRESSURE_PARTS\""
)
private
BigDecimal
heatTreatmentTemperatureOfPressureParts
;
private
BigDecimal
heatTreatmentTemperatureOfPressureParts
;
/**
/**
*
* 受压部件热处理时间
*
* 受压部件热处理时间
*
*
/
*/
@TableField
(
value
=
"\"HEAT_TREATMENT_TIME_OF_PRESSURE_PARTS\""
)
@TableField
(
value
=
"\"HEAT_TREATMENT_TIME_OF_PRESSURE_PARTS\""
)
private
BigDecimal
heatTreatmentTimeOfPressureParts
;
private
BigDecimal
heatTreatmentTimeOfPressureParts
;
/**
/**
*
* 受压部件水(耐)压试验介质
*
* 受压部件水(耐)压试验介质
*
*
/
*/
@TableField
(
value
=
"\"HYDROSTATIC_TEST_MEDIUM\""
)
@TableField
(
value
=
"\"HYDROSTATIC_TEST_MEDIUM\""
)
private
String
hydrostaticTestMedium
;
private
String
hydrostaticTestMedium
;
/**
/**
*
* 受压部件水(耐)压试验压力
*
* 受压部件水(耐)压试验压力
*
*
/
*/
@TableField
(
value
=
"\"HYDROSTATIC_TEST_PRESSURE\""
)
@TableField
(
value
=
"\"HYDROSTATIC_TEST_PRESSURE\""
)
private
BigDecimal
hydrostaticTestPressure
;
private
BigDecimal
hydrostaticTestPressure
;
/**
/**
*
* 燃烧方式
*
* 燃烧方式
*
*
/
*/
@TableField
(
value
=
"\"COMBUSTION_MODE\""
)
@TableField
(
value
=
"\"COMBUSTION_MODE\""
)
private
String
combustionMode
;
private
String
combustionMode
;
/**
/**
*
* 有机热载体锅炉气密试验介质/压力
*
* 有机热载体锅炉气密试验介质/压力
*
*
/
*/
@TableField
(
value
=
"\"GL_AIRTIGHT_TEST\""
)
@TableField
(
value
=
"\"GL_AIRTIGHT_TEST\""
)
private
BigDecimal
glAirtightTest
;
private
BigDecimal
glAirtightTest
;
/**
/**
*
* 安装附件与有关装置
*
* 安装附件与有关装置
*
*
/
*/
@TableField
(
value
=
"\"SAFETY_ACCESSORIES_AND_RELATED_DEVICES\""
)
@TableField
(
value
=
"\"SAFETY_ACCESSORIES_AND_RELATED_DEVICES\""
)
private
String
safetyAccessoriesAndRelatedDevices
;
private
String
safetyAccessoriesAndRelatedDevices
;
}
}
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/InspectionApplicationPushEventListener.java
View file @
a2f3a42b
...
@@ -143,12 +143,6 @@ public class InspectionApplicationPushEventListener implements ApplicationListen
...
@@ -143,12 +143,6 @@ public class InspectionApplicationPushEventListener implements ApplicationListen
}
}
}
}
private
List
<
String
>
getCanDealInspectionType
()
{
List
<
String
>
canDealInspectionTypes
=
new
ArrayList
<>(
JDJY_ARRAY
);
canDealInspectionTypes
.
addAll
(
DSJ_ARRAY
);
return
canDealInspectionTypes
;
}
private
void
pushData2Kafka
(
String
dockingUnitCode
,
JyjcInspectionApplicationPushLog
pushLog
)
{
private
void
pushData2Kafka
(
String
dockingUnitCode
,
JyjcInspectionApplicationPushLog
pushLog
)
{
// 发送kafka指定的主题
// 发送kafka指定的主题
String
topic
=
String
.
format
(
INSPECTION_APPLICATION_PUSH_TOPIC
,
dockingUnitCode
);
String
topic
=
String
.
format
(
INSPECTION_APPLICATION_PUSH_TOPIC
,
dockingUnitCode
);
...
@@ -171,6 +165,12 @@ public class InspectionApplicationPushEventListener implements ApplicationListen
...
@@ -171,6 +165,12 @@ public class InspectionApplicationPushEventListener implements ApplicationListen
return
pushLog
;
return
pushLog
;
}
}
private
List
<
String
>
getCanDealInspectionType
()
{
List
<
String
>
canDealInspectionTypes
=
new
ArrayList
<>(
JDJY_ARRAY
);
canDealInspectionTypes
.
addAll
(
DSJ_ARRAY
);
return
canDealInspectionTypes
;
}
private
String
buildData
(
long
traceId
,
JyjcInspectionApplicationModel
applicationModel
)
{
private
String
buildData
(
long
traceId
,
JyjcInspectionApplicationModel
applicationModel
)
{
InspectionApplicationPushData
pushData
=
new
InspectionApplicationPushData
();
InspectionApplicationPushData
pushData
=
new
InspectionApplicationPushData
();
BeanUtil
.
copyProperties
(
applicationModel
,
pushData
);
BeanUtil
.
copyProperties
(
applicationModel
,
pushData
);
...
...
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 @
a2f3a42b
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResult
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResult
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionDetectionSaveToDbEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionDetectionSaveToDbEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.publisher.BizEmqPublisher
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CommonserviceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CommonserviceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo
;
...
@@ -44,8 +45,14 @@ public class InspectionDetectionSaveToDbEventListener implements ApplicationList
...
@@ -44,8 +45,14 @@ public class InspectionDetectionSaveToDbEventListener implements ApplicationList
@Autowired
@Autowired
InspectionDetectionInfoMapper
inspectionDetectionInfoMapper
;
InspectionDetectionInfoMapper
inspectionDetectionInfoMapper
;
@Autowired
BizEmqPublisher
bizEmqPublisher
;
private
BlockingQueue
<
JyjcInspectionResult
>
blockingQueue
=
new
LinkedBlockingQueue
<>();
private
BlockingQueue
<
JyjcInspectionResult
>
blockingQueue
=
new
LinkedBlockingQueue
<>();
@Override
@Override
public
void
onApplicationEvent
(
InspectionDetectionSaveToDbEvent
event
)
{
public
void
onApplicationEvent
(
InspectionDetectionSaveToDbEvent
event
)
{
log
.
info
(
"收到检验检测信息插入或者更新消息:{}"
,
JSONObject
.
toJSONString
(
event
.
getJyjcInspectionResultList
()));
log
.
info
(
"收到检验检测信息插入或者更新消息:{}"
,
JSONObject
.
toJSONString
(
event
.
getJyjcInspectionResultList
()));
...
@@ -65,13 +72,15 @@ public class InspectionDetectionSaveToDbEventListener implements ApplicationList
...
@@ -65,13 +72,15 @@ public class InspectionDetectionSaveToDbEventListener implements ApplicationList
wrapper
.
lambda
().
eq
(
InspectionDetectionInfo:
:
getInspectReportNo
,
jyjcInspectionResult
.
getResultNo
());
wrapper
.
lambda
().
eq
(
InspectionDetectionInfo:
:
getInspectReportNo
,
jyjcInspectionResult
.
getResultNo
());
List
<
InspectionDetectionInfo
>
list
=
inspectionDetectionInfoMapper
.
selectList
(
wrapper
);
List
<
InspectionDetectionInfo
>
list
=
inspectionDetectionInfoMapper
.
selectList
(
wrapper
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
if
(
CollectionUtils
.
isEmpty
(
list
))
{
extracted
(
jyjcInspectionResult
,
info
);
fillInspectionFields
(
jyjcInspectionResult
,
info
);
info
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
info
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
inspectionDetectionInfoMapper
.
insert
(
info
);
inspectionDetectionInfoMapper
.
insert
(
info
);
bizEmqPublisher
.
sendInspectionMsgAfterSave
(
info
,
"insert"
);
}
else
{
}
else
{
info
=
list
.
get
(
0
);
info
=
list
.
get
(
0
);
extracted
(
jyjcInspectionResult
,
info
);
fillInspectionFields
(
jyjcInspectionResult
,
info
);
inspectionDetectionInfoMapper
.
updateById
(
info
);
inspectionDetectionInfoMapper
.
updateById
(
info
);
bizEmqPublisher
.
sendInspectionMsgAfterSave
(
info
,
"update"
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
...
@@ -82,7 +91,11 @@ public class InspectionDetectionSaveToDbEventListener implements ApplicationList
...
@@ -82,7 +91,11 @@ public class InspectionDetectionSaveToDbEventListener implements ApplicationList
}
}
}
}
private
void
extracted
(
JyjcInspectionResult
jyjcInspectionResult
,
InspectionDetectionInfo
info
)
{
private
void
fillInspectionFields
(
JyjcInspectionResult
jyjcInspectionResult
,
InspectionDetectionInfo
info
)
{
info
.
setInspectOrgName
(
jyjcInspectionResult
.
getInspectionTypeName
());
info
.
setInspectOrgName
(
jyjcInspectionResult
.
getInspectionTypeName
());
info
.
setInspectType
(
jyjcInspectionResult
.
getInspectionType
());
info
.
setInspectType
(
jyjcInspectionResult
.
getInspectionType
());
info
.
setRecord
(
jyjcInspectionResult
.
getEquipUnicode
());
info
.
setRecord
(
jyjcInspectionResult
.
getEquipUnicode
());
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/event/publisher/BizEmqPublisher.java
0 → 100644
View file @
a2f3a42b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
event
.
publisher
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
/**
* @author Administrator
*/
@Component
@Slf4j
public
class
BizEmqPublisher
{
private
EmqKeeper
emqKeeper
;
public
BizEmqPublisher
(
EmqKeeper
emqKeeper
)
{
this
.
emqKeeper
=
emqKeeper
;
}
/**
* 检验检测结果入库消息
*/
private
static
final
String
INSPECTION_DETECTION_SAVE_TO_DB_TOPIC_PREFIX
=
"safetyProblemTracing/jy/bj"
;
public
void
sendInspectionMsgAfterSave
(
InspectionDetectionInfo
info
,
String
type
)
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
this
.
buildSave2DbEmqTopic
(
type
),
JSON
.
toJSONBytes
(
info
),
2
,
false
);
}
catch
(
MqttException
e
)
{
log
.
error
(
"发送检验检测信息入库消息失败"
,
e
);
}
}
private
String
buildSave2DbEmqTopic
(
String
type
)
{
return
String
.
format
(
"%s/%s"
,
INSPECTION_DETECTION_SAVE_TO_DB_TOPIC_PREFIX
,
type
);
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/TaskModelServiceImpl.java
View file @
a2f3a42b
...
@@ -14,7 +14,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper;
...
@@ -14,7 +14,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper;
import
com.yeejoin.amos.boot.module.jyjc.api.model.TaskModelDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.TaskModelDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.WorkflowResultDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.WorkflowResultDto
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CmWorkflowServiceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CmWorkflowServiceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.util
s
.JsonUtils
;
import
com.yeejoin.amos.boot.module.jyjc.biz.util.JsonUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
...
...
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/JyjcInspectionResultParamServiceImpl.java
View file @
a2f3a42b
...
@@ -6,7 +6,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResultParam;
...
@@ -6,7 +6,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResultParam;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionResultParamMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionResultParamMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultParamService
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultParamService
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultParamModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultParamModel
;
import
com.yeejoin.amos.boot.module.jyjc.biz.util
s
.JsonUtils
;
import
com.yeejoin.amos.boot.module.jyjc.biz.util.JsonUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
...
...
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 @
a2f3a42b
...
@@ -26,8 +26,9 @@ import com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultParamS
...
@@ -26,8 +26,9 @@ import com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultParamS
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultService
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultService
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionDetectionSaveToDbEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionDetectionSaveToDbEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.UseInfoSaveToDbEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.UseInfoSaveToDbEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.publisher.BizEmqPublisher
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.publisher.EventPublisher
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.publisher.EventPublisher
;
import
com.yeejoin.amos.boot.module.jyjc.biz.util
s
.JsonUtils
;
import
com.yeejoin.amos.boot.module.jyjc.biz.util.JsonUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
...
@@ -108,6 +109,9 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -108,6 +109,9 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
@Autowired
@Autowired
EventPublisher
eventPublisher
;
EventPublisher
eventPublisher
;
@Autowired
BizEmqPublisher
bizEmqPublisher
;
/**
/**
* 检验检测单位分页查询
* 检验检测单位分页查询
*/
*/
...
@@ -264,10 +268,14 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -264,10 +268,14 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
extracted
(
model
,
info
,
jybgFile
);
extracted
(
model
,
info
,
jybgFile
);
info
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
info
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
inspectionDetectionInfoMapper
.
insert
(
info
);
inspectionDetectionInfoMapper
.
insert
(
info
);
// 对方不查询库 所以无事务操作
bizEmqPublisher
.
sendInspectionMsgAfterSave
(
info
,
"insert"
);
}
else
{
}
else
{
info
=
list
.
get
(
0
);
info
=
list
.
get
(
0
);
extracted
(
model
,
info
,
jybgFile
);
extracted
(
model
,
info
,
jybgFile
);
inspectionDetectionInfoMapper
.
updateById
(
info
);
inspectionDetectionInfoMapper
.
updateById
(
info
);
// 对方不查询库 所以无事务操作
bizEmqPublisher
.
sendInspectionMsgAfterSave
(
info
,
"update"
);
}
}
//更新使用信息表
//更新使用信息表
useInfoMapper
.
updateByRecord
(
model
.
getEquipUnicode
(),
model
.
getNextInspectionDate
(),
model
.
getInspectionType
(),
model
.
getApplicationNo
());
useInfoMapper
.
updateByRecord
(
model
.
getEquipUnicode
(),
model
.
getNextInspectionDate
(),
model
.
getInspectionType
(),
model
.
getApplicationNo
());
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/util
s
/JsonUtils.java
→
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/util/JsonUtils.java
View file @
a2f3a42b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
util
s
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
util
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.io.IOUtils
;
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/util/JyjcConstant.java
0 → 100644
View file @
a2f3a42b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
util
;
/**
* @author Administrator
*/
public
class
JyjcConstant
{
/**
* 技术参数json类型字段
*/
public
static
final
String
[]
TECH_PARAM_JSON_FIELDS
=
{
"safetyAccessoriesAndRelatedDevices"
,
"gasCylinderAccessories"
};
}
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