Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
ty 11 months ago
parent
commit
ea0024d8c8
  1. 3
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/entity/WorkTaskEntity.java
  2. 6
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmServiceImpl.java
  3. 3
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/ws/alart/AlarmHandler.java

3
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/entity/WorkTaskEntity.java

@ -36,6 +36,9 @@ public class WorkTaskEntity extends TenantEntity {
@ApiModelProperty(value = "班组ID") @ApiModelProperty(value = "班组ID")
private Long groupId; private Long groupId;
@ApiModelProperty(value = "班组名称")
private String groupName;
@ApiModelProperty(value = "班组成员ID : 按 “,”分割") @ApiModelProperty(value = "班组成员ID : 按 “,”分割")
private String member; private String member;

6
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmServiceImpl.java

@ -186,11 +186,11 @@ public class AlarmServiceImpl extends BaseServiceImpl<AlarmMapper, AlarmEntity>
// 站点查询 // 站点查询
List<StationEntity> stations = this.stations(); List<StationEntity> stations = this.stations();
if(CollectionUtil.isEmpty(stations)){ if(CollectionUtil.isEmpty(stations)){
return null; return new TextMessage(new ArrayList().toString());
} }
List<String> effectives = stations.stream().filter(station->depts.contains(station.getRefDept())).map(StationEntity::getCode).collect(Collectors.toList()); List<String> effectives = stations.stream().filter(station->depts.contains(station.getRefDept())).map(StationEntity::getCode).collect(Collectors.toList());
if(CollectionUtil.isEmpty(effectives)){ if(CollectionUtil.isEmpty(effectives)){
return null; return new TextMessage(new ArrayList().toString());
} }
// 条件过滤 // 条件过滤
QueryWrapper<AlarmEntity> queryWrapper = new QueryWrapper<>(); QueryWrapper<AlarmEntity> queryWrapper = new QueryWrapper<>();
@ -205,7 +205,7 @@ public class AlarmServiceImpl extends BaseServiceImpl<AlarmMapper, AlarmEntity>
} }
List<AlarmEntity> alarms = this.list(queryWrapper); List<AlarmEntity> alarms = this.list(queryWrapper);
if(CollectionUtil.isEmpty(alarms)){ if(CollectionUtil.isEmpty(alarms)){
return null; return new TextMessage(new ArrayList().toString());
} }
return new TextMessage(JSONObject.toJSONString(alarms.stream().sorted(Comparator.comparing(AlarmEntity::getAlarmTime).reversed()).collect(Collectors.toList()))); return new TextMessage(JSONObject.toJSONString(alarms.stream().sorted(Comparator.comparing(AlarmEntity::getAlarmTime).reversed()).collect(Collectors.toList())));
} }

3
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/ws/alart/AlarmHandler.java

@ -62,9 +62,6 @@ public class AlarmHandler extends TextWebSocketHandler {
return; return;
} }
TextMessage sendMessage = alarmService.majorAlarm(depts); TextMessage sendMessage = alarmService.majorAlarm(depts);
if(ObjectUtil.isEmpty(sendMessage)){
return;
}
session.sendMessage(sendMessage); session.sendMessage(sendMessage);
} }
} }

Loading…
Cancel
Save