Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
tyty 2 years ago
parent
commit
29d50cc603
  1. 13
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEntity.java
  2. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AbnormalAlarmMapper.xml
  3. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java
  4. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

13
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEntity.java

@ -1,18 +1,16 @@
package com.hnac.hzims.operational.station.entity; package com.hnac.hzims.operational.station.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.SqlCondition; import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer; import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.*; import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springblade.core.mp.support.QueryField; import org.springblade.core.mp.support.QueryField;
import org.springblade.core.tenant.mp.TenantEntity; import org.springblade.core.tenant.mp.TenantEntity;
import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.DateUtil;
@ -26,7 +24,6 @@ import java.time.LocalDateTime;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
@TableName("HZIMS_STATION") @TableName("HZIMS_STATION")
@Builder
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
public class StationEntity extends TenantEntity implements Serializable { public class StationEntity extends TenantEntity implements Serializable {
@ -158,5 +155,5 @@ public class StationEntity extends TenantEntity implements Serializable {
private String secretKey; private String secretKey;
@ApiModelProperty("是否发送告警短信: 1-发送短信 0-不发送短信") @ApiModelProperty("是否发送告警短信: 1-发送短信 0-不发送短信")
private Integer isSendMessage; private Integer sendMessageFlag;
} }

1
hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AbnormalAlarmMapper.xml

@ -11,6 +11,7 @@
<select id="getAbnormalAlarmList" resultType="java.lang.String"> <select id="getAbnormalAlarmList" resultType="java.lang.String">
select distinct station_id from hzims_abnormal_alarm select distinct station_id from hzims_abnormal_alarm
where is_deleted = 0 where is_deleted = 0
and type in (13,14)
and `STATUS` = 0 and `STATUS` = 0
</select> </select>
</mapper> </mapper>

6
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java

@ -178,12 +178,6 @@ public class RealMonitorServiceImpl implements IRealMonitorService {
List<String> objects = redisClient.getBatchRealDataByRealId(stationReal.getStation(),realIds); List<String> objects = redisClient.getBatchRealDataByRealId(stationReal.getStation(),realIds);
for(int i = 0; i < realIds.size() ;i++){ for(int i = 0; i < realIds.size() ;i++){
if(ObjectUtil.isEmpty(objects.get(i))){ if(ObjectUtil.isEmpty(objects.get(i))){
Map<String,String> attribute = new ConcurrentHashMap<>();
attribute.put("realId",realIds.get(i));
attribute.put("value","0");
attribute.put("time",DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss.s"));
valueMap.put(realIdArr[i],attribute.get("value"));
keyMap.put(realIdArr[i],attribute);
log.error(realIds.get(i) + "is null"); log.error(realIds.get(i) + "is null");
}else{ }else{
Map<String,String> attribute = (Map<String, String>) JSONObject.parse(objects.get(i)); Map<String,String> attribute = (Map<String, String>) JSONObject.parse(objects.get(i));

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

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hnac.hzims.common.service.UserAuthDataService; import com.hnac.hzims.common.service.UserAuthDataService;
import com.hnac.hzims.fdp.feign.IQuestionClient; import com.hnac.hzims.fdp.feign.IQuestionClient;
import com.hnac.hzims.hzimsweather.response.air.Station;
import com.hnac.hzims.operational.OperationalConstants; import com.hnac.hzims.operational.OperationalConstants;
import com.hnac.hzims.operational.main.vo.StationCountVo; import com.hnac.hzims.operational.main.vo.StationCountVo;
import com.hnac.hzims.operational.station.StationConstants; import com.hnac.hzims.operational.station.StationConstants;
@ -276,7 +277,10 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
}).collect(Collectors.toList()); }).collect(Collectors.toList());
ControlUsersEntity object = codeList.size() > 0 ? codeList.get(0) : null; ControlUsersEntity object = codeList.size() > 0 ? codeList.get(0) : null;
if (ObjectUtil.isNotEmpty(object)) { if (ObjectUtil.isNotEmpty(object)) {
return StationEntity.builder().code(stationId).enableControl(2).build(); StationEntity result = new StationEntity();
result.setCode(stationId);
result.setEnableControl(2);
return result;
} else { } else {
stationEntity.setEnableControl(0); stationEntity.setEnableControl(0);
return stationEntity; return stationEntity;

Loading…
Cancel
Save