Browse Source

#bug修改

zhongwei
yang_shj 2 years ago
parent
commit
b878505be1
  1. 13
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEntity.java
  2. 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;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
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.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 lombok.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springblade.core.mp.support.QueryField;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springblade.core.tool.utils.DateUtil;
@ -26,7 +24,6 @@ import java.time.LocalDateTime;
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("HZIMS_STATION")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class StationEntity extends TenantEntity implements Serializable {
@ -158,5 +155,5 @@ public class StationEntity extends TenantEntity implements Serializable {
private String secretKey;
@ApiModelProperty("是否发送告警短信: 1-发送短信 0-不发送短信")
private Integer isSendMessage;
private Integer sendMessageFlag;
}

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.hnac.hzims.common.service.UserAuthDataService;
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.main.vo.StationCountVo;
import com.hnac.hzims.operational.station.StationConstants;
@ -276,7 +277,10 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
}).collect(Collectors.toList());
ControlUsersEntity object = codeList.size() > 0 ? codeList.get(0) : null;
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 {
stationEntity.setEnableControl(0);
return stationEntity;

Loading…
Cancel
Save