Browse Source

#风电

zhongwei
yang_shj 1 year ago
parent
commit
69eb41b08e
  1. 64
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/WindScoreVo.java
  2. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/ReportServiceImpl.java
  3. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AlarmHandleServiceImpl.java
  4. 37
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/WindHomeController.java
  5. 12
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/WindHomeService.java
  6. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java
  7. 21
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WindHomeServiceImpl.java

64
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/WindScoreVo.java

@ -0,0 +1,64 @@
package com.hnac.hzims.operational.main.vo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author ysj
*/
@Data
@ApiModel(value = "水电站分计对象")
public class WindScoreVo {
@ApiModelProperty(value = "机构Id")
private Long departId;
@ApiModelProperty(value = "机构名称")
private String departName;
@ApiModelProperty(value = "站点数量")
private Integer stationCount;
@ApiModelProperty(value = "总装机容量")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double installedCapacity;
@ApiModelProperty(value = "年平均风速")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double capacityRate;
@ApiModelProperty(value = "总有功功率")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double load;
@ApiModelProperty(value = "年总发电量")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double generateYear;
@ApiModelProperty(value = "月总发电量")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double generateMon;
@ApiModelProperty(value = "日总发电量")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double generateDay;
@ApiModelProperty(value = "年计划发电量")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double plan;
@ApiModelProperty(value = "年计划完成率")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double planRate;
@ApiModelProperty(value = "近年发电量集合")
private List<PowerYearVo> powerYearVoList;
@ApiModelProperty(value = "今年计划发电趋势集合")
private List<PowerMonthVo> powerMonthVoList;
}

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/ReportServiceImpl.java

@ -488,7 +488,7 @@ public class ReportServiceImpl implements ReportService {
if(ObjectUtil.isEmpty(dept)){
return;
}
R<List<User>> userR = userClient.userListByDeptId(dept.getId());
R<List<User>> userR = userClient.userListByDeptAndChildrenWithAuth(dept.getId());
if(!userR.isSuccess() && CollectionUtil.isEmpty(userR.getData())){
return;
}

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AlarmHandleServiceImpl.java

@ -140,7 +140,7 @@ public class AlarmHandleServiceImpl extends BaseServiceImpl<AlarmHandleMapper, A
}
List<User> users = new ArrayList<>();
result.getData().forEach(dept->{
users.addAll(userClient.userListByDeptId(dept.getId()).getData());
users.addAll(userClient.userListByDeptAndChildrenWithAuth(dept.getId()).getData());
});
return users.stream().distinct().collect(Collectors.toList());
}

37
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/WindHomeController.java

@ -0,0 +1,37 @@
package com.hnac.hzims.operational.main.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.operational.main.service.WindHomeService;
import com.hnac.hzims.operational.main.vo.HydropowerScoreVo;
import com.hnac.hzims.operational.main.vo.WindScoreVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author ysj
*/
@RestController
@RequestMapping("/windHome")
@Api(value = "风电首页", tags = "风电-首页")
@AllArgsConstructor
public class WindHomeController extends BladeController {
private final WindHomeService service;
@ApiLog
@ApiOperation("水电站集团/区域指标")
@GetMapping("/KPIs")
@ApiOperationSupport(order = 1)
public R<WindScoreVo> KPIs(@ApiParam(value = "站点机构ID") Long deptId) {
return R.data(service.KPIs(deptId));
}
}

12
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/WindHomeService.java

@ -0,0 +1,12 @@
package com.hnac.hzims.operational.main.service;
import com.hnac.hzims.operational.main.vo.WindScoreVo;
/**
* @author ysj
*/
public interface WindHomeService {
WindScoreVo KPIs(Long deptId);
}

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java

@ -583,7 +583,7 @@ public class AreaMonthReportServiceImpl implements IAreaMonthReportService {
if(ObjectUtil.isEmpty(dept)){
return;
}
R<List<User>> userR = userClient.userListByDeptId(dept.getId());
R<List<User>> userR = userClient.userListByDeptAndChildrenWithAuth(dept.getId());
if(!userR.isSuccess() && CollectionUtil.isEmpty(userR.getData())){
return;
}

21
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WindHomeServiceImpl.java

@ -0,0 +1,21 @@
package com.hnac.hzims.operational.main.service.impl;
import com.hnac.hzims.operational.main.service.WindHomeService;
import com.hnac.hzims.operational.main.vo.WindScoreVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* @author ysj
*/
@Service
@RequiredArgsConstructor
@Slf4j
public class WindHomeServiceImpl implements WindHomeService {
@Override
public WindScoreVo KPIs(Long deptId) {
return null;
}
}
Loading…
Cancel
Save