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
6a8239cd
Commit
6a8239cd
authored
Mar 26, 2025
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):超设计使用年限完成发送消息功能开发
parent
7eaabac8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
JgOverDesignServiceLifeServiceImpl.java
.../biz/service/impl/JgOverDesignServiceLifeServiceImpl.java
+24
-0
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/JgOverDesignServiceLifeServiceImpl.java
View file @
6a8239cd
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -19,6 +20,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.*;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgOverDesignServiceLifeEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgOverDesignServiceLifeMapper
;
...
...
@@ -44,6 +46,7 @@ import com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.redisson.api.RLock
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -55,6 +58,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
...
@@ -63,6 +67,7 @@ import org.springframework.stereotype.Service;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.nio.charset.StandardCharsets
;
import
java.time.ZoneId
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
...
...
@@ -121,6 +126,8 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
private
SnowflakeIdUtil
sequence
;
@Autowired
private
EventPublisher
eventPublisher
;
@Autowired
private
EmqKeeper
emqKeeper
;
/**
* 分页查询
...
...
@@ -654,6 +661,7 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
));
}
}
this
.
sendOverDesignMessage
(
equipmentLists
);
}
private
void
updateDesignInfo
(
TaskV2Model
taskV2Model
,
JgOverDesignServiceLife
jgOverDesignServiceLife
,
List
<
Map
<
String
,
Object
>>
equipmentLists
,
List
<
IdxBizJgDesignInfo
>
designInfoList
)
{
...
...
@@ -677,6 +685,22 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
});
}
/**
* 发送超设计使用年限消息
* @param equipmentLists 设备信息
*/
private
void
sendOverDesignMessage
(
List
<
Map
<
String
,
Object
>>
equipmentLists
)
{
JSONArray
jsonArray
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
equipmentLists
));
if
(
CollectionUtil
.
isNotEmpty
(
jsonArray
)){
// try {
// emqKeeper.getMqttClient().publish(SafetyProblemTypeEnum.JYCQ.getTopic(), jsonArray.toString().getBytes(StandardCharsets.UTF_8), 2, false);
// } catch (MqttException e) {
// log.error("发送超设计使用年限消息失败---->{}" + e.getMessage());
// throw new RuntimeException(e);
// }
}
}
private
void
updateRegistrationManage
(
List
<
String
>
useOrgCodes
)
{
List
<
JgUseRegistrationManage
>
registrationList
=
useRegistrationManageService
.
lambdaQuery
()
.
in
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
useOrgCodes
).
list
();
...
...
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