Browse Source

#水电站运行月报

zhongwei
yang_shj 6 months ago
parent
commit
aac30665c7
  1. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/OperationalConstants.java
  2. 44
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/HomeMapStationVo.java
  3. 7
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java
  4. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java
  5. 28
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

2
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/OperationalConstants.java

@ -4,7 +4,7 @@ import lombok.Getter;
public class OperationalConstants {
public final static String APP_NAME = "hzims-operational";
public final static String APP_NAME = "hzims-operational-ysj";

44
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/HomeMapStationVo.java

@ -0,0 +1,44 @@
package com.hnac.hzims.operational.station.vo;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.mp.support.QueryField;
/**
* @author ysj
*/
@Data
public class HomeMapStationVo {
@ApiModelProperty("行政区划")
private String areaCode;
@ApiModelProperty("编号")
private String code;
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("经度(东经)")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Float lgtd;
@ApiModelProperty("纬度(北纬)")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Float lttd;
@ApiModelProperty("所属机构")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Long refDept;
@ApiModelProperty("站点是否为国外 1:是;0:否")
private Boolean isAbroad;
@ApiModelProperty("所属国家")
private String refCountry;
}

7
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java

@ -10,6 +10,7 @@ import com.hnac.hzims.operational.data.service.HzimsDataService;
import com.hnac.hzims.operational.main.service.IMainSystemMonitoringService;
import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.operational.station.service.IStationService;
import com.hnac.hzims.operational.station.vo.HomeMapStationVo;
import com.hnac.hzims.operational.station.vo.StationVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -177,9 +178,9 @@ public class StationController extends BladeController {
@ApiLog
@GetMapping("/getHomeStationList")
@ApiOperationSupport(order = 91)
@ApiOperation(value = "获取首页站点列表", notes = "")
public R<List<StationEntity>> getHomeStationList(@RequestParam(value = "deptId", required = false) Long deptId, @RequestParam(value = "types", required = false) List<Integer> types, @RequestParam(value = "serveType", required = false) Integer serveType) {
return R.data(stationService.getHomeStationList(deptId, types, serveType,true));
@ApiOperation(value = "获取首页地图站点列表", notes = "")
public R<List<HomeMapStationVo>> getHomeStationList() {
return R.data(stationService.homeMapStationVo());
}
@ApiLog

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java

@ -3,6 +3,7 @@ package com.hnac.hzims.operational.station.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.operational.main.vo.StationCountVo;
import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.operational.station.vo.HomeMapStationVo;
import com.hnac.hzims.operational.station.vo.StationAndDeptVo;
import com.hnac.hzims.operational.station.vo.StationVO;
import org.springblade.core.mp.base.BaseService;
@ -136,4 +137,6 @@ public interface IStationService extends BaseService<StationEntity> {
* @return 更新是否成功
*/
boolean updateBatchSort(List<StationEntity> req);
List<HomeMapStationVo> homeMapStationVo();
}

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

@ -25,6 +25,7 @@ import com.hnac.hzims.operational.station.mapper.StationMapper;
import com.hnac.hzims.operational.station.service.IStationAttributeService;
import com.hnac.hzims.operational.station.service.IStationPushConfigService;
import com.hnac.hzims.operational.station.service.IStationService;
import com.hnac.hzims.operational.station.vo.HomeMapStationVo;
import com.hnac.hzims.operational.station.vo.StationAndDeptVo;
import com.hnac.hzims.operational.station.vo.StationPushConfigVO;
import com.hnac.hzims.operational.station.vo.StationVO;
@ -768,4 +769,31 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
}
return this.updateBatchById(stations);
}
/**
* 获取首页地图站点列表
* @return
*/
@Override
public List<HomeMapStationVo> homeMapStationVo() {
List<StationEntity> stations = this.list(Wrappers.<StationEntity>lambdaQuery()
.isNotNull(StationEntity::getRefDept)
.isNotNull(StationEntity::getAreaCode)
);
if(CollectionUtil.isEmpty(stations)){
return new ArrayList<>();
}
return stations.stream().map(o->{
HomeMapStationVo mapStation = new HomeMapStationVo();
mapStation.setAreaCode(o.getAreaCode());
mapStation.setName(o.getName());
mapStation.setCode(o.getCode());
mapStation.setLttd(o.getLttd());
mapStation.setLgtd(o.getLgtd());
mapStation.setRefDept(o.getRefDept());
mapStation.setIsAbroad(o.getIsAbroad());
mapStation.setRefCountry(o.getRefCountry());
return mapStation;
}).collect(Collectors.toList());
}
}

Loading…
Cancel
Save