Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 1 year ago
parent
commit
5a69d8f253
  1. 4
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/schedule/TaskSchedule.java
  2. 2
      hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java
  3. 3
      hzims-service/message/src/main/java/com/hnac/hzims/message/schedule/MessagePushSchedule.java
  4. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java
  5. 2
      pom.xml

4
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/schedule/TaskSchedule.java

@ -94,7 +94,7 @@ public class TaskSchedule {
.taskId(taskEntity.getId())
.businessKey("巡检任务结束提醒")
.businessClassify(MessageConstants.BusinessClassifyEnum.INSPECT.getKey())
.content("您有一条未执行的任务【"+taskEntity.getPlanName()+"】将于"+ DateUtil.format(taskEntity.getPlanEndTime(),DateUtil.PATTERN_DATETIME)+"截止,请及时处理!")
.content("您有巡检工作任务("+taskEntity.getPlanName()+")即将在"+DateUtil.format(taskEntity.getPlanEndTime(),DateUtil.PATTERN_DATETIME)+"结束,请及时处理。")
.subject("巡检任务结束提醒")
.pusher(taskEntity.getUserId().toString())
.createUser(taskEntity.getCreateUser())
@ -111,7 +111,7 @@ public class TaskSchedule {
appMessage.setDeptId(taskEntity.getCreateDept());
appMessage.setBusinessKey("巡检任务结束提醒");
appMessage.setBusinessClassify(MessageConstants.BusinessClassifyEnum.INSPECT.getKey());
appMessage.setContent("您有一条未执行的任务【"+taskEntity.getPlanName()+"】将于"+ DateUtil.format(taskEntity.getPlanEndTime(),DateUtil.PATTERN_DATETIME)+"截止,请及时处理!");
appMessage.setContent("您有巡检工作任务("+taskEntity.getPlanName()+")即将在"+DateUtil.format(taskEntity.getPlanEndTime(),DateUtil.PATTERN_DATETIME)+"结束,请及时处理。");
appMessage.setTaskId(taskEntity.getId());
appMessage.setSubject("巡检任务结束提醒");
appMessage.setUserIds(taskEntity.getUserId().toString());

2
hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java

@ -116,13 +116,13 @@ public class MessageClient extends BladeController implements IMessageClient{
if(Func.isNotEmpty(template.getType())) {
Func.toStrList(",",template.getType()).forEach(type -> {
MessagePushRecordEntity entity = BeanUtil.copy(template,MessagePushRecordEntity.class);
entity.setDeptName(Func.isNotEmpty(entity.getDeptName()) ? entity.getDeptName() : this.getDeptNameById(entity.getDeptId()));
entity.setId(null);
entity.setType(type);
entity.setTaskId(request.getTaskId());
entity.setMessageId(messageId);
entity.setTemplateId(request.getTemplateId());
entity.setDeptId(request.getDeptId());
entity.setDeptName(Func.isNotEmpty(entity.getDeptName()) ? entity.getDeptName() : this.getDeptNameById(entity.getDeptId()));
entity.setCreateUser(request.getCreateUser());
entity.setResourceCode(request.getResourceCode());
entity.setCreateDept(request.getDeptId());

3
hzims-service/message/src/main/java/com/hnac/hzims/message/schedule/MessagePushSchedule.java

@ -133,6 +133,7 @@ public class MessagePushSchedule {
MessagePushRecordEntity request = records.get(0);
// 完善推送内容
request.setContent(this.getPushContent(type,records));
XxlJobLogger.log("推送类型为:"+type+",消息推送内容为:"+request.getContent());
if(MessageConstants.SMS_PUSH.equals(type)) {
request.setSmsParam(request.getContent());
}
@ -159,7 +160,7 @@ public class MessagePushSchedule {
* @return java.lang.String
**/
private String getPushContent(String type,List<MessagePushRecordEntity> list) {
if(MessageConstants.APP_PUSH.equals(type)) {
if(MessageConstants.APP_PUSH.equals(type) || MessageConstants.WS_PUSH.equals(type)) {
return list.stream().map(MessagePushRecordEntity::getContent).collect(Collectors.joining("\r\n"));
}
else if(MessageConstants.SMS_PUSH.equals(type)) {

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.common.collect.Lists;
import com.hnac.hzims.common.service.UserAuthDataService;
import com.hnac.hzims.fdp.feign.IQuestionClient;
import com.hnac.hzims.hzimsweather.response.air.Station;
@ -152,8 +153,8 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
boolean saveFlag = this.removeById(Long.valueOf(id));
if (saveFlag) {
// 删除数据平台项目
Result dataDelete = projectClient.delete(stationEntity.getCode());
if(dataDelete.isSuccess()) {
Result dataDelete = projectClient.cancelGrant(Lists.newArrayList(stationEntity.getCode()));
if(!dataDelete.isSuccess()) {
logger.error("hzims-operational:station:removeStation", stationEntity.getCode() + "删除失败,报错信息为:" + dataDelete.getMsg());
}
// 删除所属机构

2
pom.xml

@ -16,7 +16,7 @@
<properties>
<bladex.project.version>5.0.1.RELEASE</bladex.project.version>
<!--数据平台接口版本-->
<hzinfo.data.sdk.version>5.0.1-SNAPSHOT</hzinfo.data.sdk.version>
<hzinfo.data.sdk.version>5.0.2-SNAPSHOT</hzinfo.data.sdk.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>

Loading…
Cancel
Save