Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
haungxing 1 year ago
parent
commit
e734d38896
  1. 6
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java
  2. 2
      hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IPushMsgClient.java
  3. 12
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/controller/ShowAlarmController.java
  4. 2
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/AlarmService.java
  5. 14
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmServiceImpl.java
  6. 8
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java
  7. 46
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java
  8. 7
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmQueryServiceImpl.java
  9. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/RealTargetService.java
  10. 12
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java
  11. 15
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/impl/ReportServiceImpl.java
  12. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java

6
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java

@ -35,7 +35,7 @@ public interface MainConstants {
String LOAD_HOME_TARGET = "loadHomeTarget"; String LOAD_HOME_TARGET = "loadHomeTarget";
// 水利-泵站实时数据 // 水利-泵站实时数据
String LOAD_WATER_PUMP_REAL = "loadWaterPumpReal"; String LOAD_WATER_PUMP_REAL = "loadWaterPumpReal";
// 水利-站点水位数据 // 水利-站点水位数据
String LOAD_WATER_LEVEL = "loadWaterLevel"; String LOAD_WATER_LEVEL = "loadWaterLevel";
@ -86,4 +86,8 @@ public interface MainConstants {
String DUTY_NOTICE = "dutyNotice"; String DUTY_NOTICE = "dutyNotice";
String PROJECT_MANAGER = "projectManager"; String PROJECT_MANAGER = "projectManager";
String LOAD_EM_INFO = "loadEmInfo";
String WIND_RECENT_YEAR_POWER_DATA = "hzims:operation:wind:power:data";
} }

2
hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IPushMsgClient.java

@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RequestBody;
public interface IPushMsgClient { public interface IPushMsgClient {
String API_PREFIX = "/feign/message"; String API_PREFIX = "/feign/message";
String PUSH_MESSAGE_MAIL = API_PREFIX + "/sendMail"; String PUSH_MESSAGE_MAIL = API_PREFIX + "/sendMail";
String PUSH_MESSAGE_SMS = API_PREFIX + "/sendSms"; String PUSH_MESSAGE_SMS = API_PREFIX + "/sendSms";
String PUSH_MESSAGE_APP = API_PREFIX + "/sendPush"; String PUSH_MESSAGE_APP = API_PREFIX + "/sendPush";
String PUSH_MESSAGE_WEB = API_PREFIX + "/sendWebsocket"; String PUSH_MESSAGE_WEB = API_PREFIX + "/sendWebsocket";

12
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/controller/ShowAlarmController.java

@ -1,6 +1,5 @@
package com.hnac.hzims.alarm.show.controller; package com.hnac.hzims.alarm.show.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.alarm.entity.AlarmEntity; import com.hnac.hzims.alarm.entity.AlarmEntity;
@ -15,14 +14,9 @@ import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.Valid;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @author ysj * @author ysj
@ -40,7 +34,7 @@ public class ShowAlarmController extends BladeController {
@GetMapping("/broadcast") @GetMapping("/broadcast")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "播报告警", notes = "传入:时间区间") @ApiOperation(value = "播报告警", notes = "传入:时间区间")
public R<List<AlarmEntity>> broadcast(@ApiParam(value = "开始时间", required = false) String startTime, public R<List<AlarmEntity>> broadcast(@ApiParam(value = "开始时间") String startTime,
@ApiParam(value = "结束时间", required = true) String endTime) { @ApiParam(value = "结束时间", required = true) String endTime) {
return R.data(alarmService.broadcast(startTime,endTime)); return R.data(alarmService.broadcast(startTime,endTime));
} }
@ -55,8 +49,8 @@ public class ShowAlarmController extends BladeController {
@PostMapping("/count") @PostMapping("/count")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@ApiOperation(value = "告警分类数量", notes = "不需要传入参数") @ApiOperation(value = "告警分类数量", notes = "不需要传入参数")
public R<List<AlarmCountVo>> counts() { public R<List<AlarmCountVo>> counts(@RequestBody AlarmEntity alarm) {
return R.data(alarmService.counts()); return R.data(alarmService.counts(alarm));
} }
} }

2
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/AlarmService.java

@ -14,7 +14,7 @@ public interface AlarmService extends BaseService<AlarmEntity> {
IPage<AlarmEntity> alarms(AlarmEntity alarm, IPage<AlarmEntity> page); IPage<AlarmEntity> alarms(AlarmEntity alarm, IPage<AlarmEntity> page);
List<AlarmCountVo> counts(); List<AlarmCountVo> counts(AlarmEntity alarm);
List<AlarmEntity> broadcast(String startTime, String endTime); List<AlarmEntity> broadcast(String startTime, String endTime);
} }

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

@ -62,6 +62,7 @@ public class AlarmServiceImpl extends BaseServiceImpl<AlarmMapper, AlarmEntity>
// 参数过滤 :站点、告警来源、告警子类 // 参数过滤 :站点、告警来源、告警子类
QueryWrapper wrapper = new QueryWrapper<>(); QueryWrapper wrapper = new QueryWrapper<>();
wrapper.orderByDesc("CREATE_TIME");
wrapper.eq("IS_RIGHT_TABULATION",0); wrapper.eq("IS_RIGHT_TABULATION",0);
wrapper.in("STATION_ID",stations.stream().map(StationEntity::getCode).collect(Collectors.toList())); wrapper.in("STATION_ID",stations.stream().map(StationEntity::getCode).collect(Collectors.toList()));
if(!StringUtil.isEmpty(alarm.getStationId())){ if(!StringUtil.isEmpty(alarm.getStationId())){
@ -98,7 +99,7 @@ public class AlarmServiceImpl extends BaseServiceImpl<AlarmMapper, AlarmEntity>
* @return * @return
*/ */
@Override @Override
public List<AlarmCountVo> counts() { public List<AlarmCountVo> counts(AlarmEntity alarm) {
// 站点查询 // 站点查询
List<StationEntity> stations = this.stations(); List<StationEntity> stations = this.stations();
if(CollectionUtil.isEmpty(stations)){ if(CollectionUtil.isEmpty(stations)){
@ -114,13 +115,22 @@ public class AlarmServiceImpl extends BaseServiceImpl<AlarmMapper, AlarmEntity>
QueryWrapper wrapper = new QueryWrapper<>(); QueryWrapper wrapper = new QueryWrapper<>();
wrapper.eq("IS_RIGHT_TABULATION",0); wrapper.eq("IS_RIGHT_TABULATION",0);
wrapper.in("STATION_ID",stations.stream().map(StationEntity::getCode).collect(Collectors.toList())); wrapper.in("STATION_ID",stations.stream().map(StationEntity::getCode).collect(Collectors.toList()));
if(!StringUtil.isEmpty(alarm.getStationId())){
wrapper.eq("STATION_ID",alarm.getStationId());
}
if(!StringUtil.isEmpty(alarm.getAlarmSource())){
wrapper.eq("ALARM_SOURCE",alarm.getAlarmSource());
}
if(!StringUtil.isEmpty(alarm.getAlarmType())){
wrapper.eq("ALARM_TYPE",alarm.getAlarmType());
}
// 查询告警数据 // 查询告警数据
List<AlarmEntity> alarms = this.list(wrapper); List<AlarmEntity> alarms = this.list(wrapper);
// 查询数量 // 查询数量
return AlarmConstants.ALARAM_SOURCE.stream().map(source->{ return AlarmConstants.ALARAM_SOURCE.stream().map(source->{
AlarmCountVo count = new AlarmCountVo(); AlarmCountVo count = new AlarmCountVo();
count.setType(source); count.setType(source);
if(CollectionUtil.isNotEmpty(alarms)){ if(CollectionUtil.isEmpty(alarms)){
count.setCount(0L); count.setCount(0L);
}else{ }else{
count.setCount(alarms.stream().filter(o->o.getAlarmSource().equals(source)).count()); count.setCount(alarms.stream().filter(o->o.getAlarmSource().equals(source)).count());

8
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java

@ -7,6 +7,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.Date; import java.util.Date;
@ -42,7 +43,6 @@ public class MonitorScheduledTask {
* @return ReturnT<String> * @return ReturnT<String>
*/ */
@XxlJob(REAL_TIME_DATA) @XxlJob(REAL_TIME_DATA)
//@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadRealData(String param) { public ReturnT<String> loadRealData(String param) {
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
@ -55,8 +55,10 @@ public class MonitorScheduledTask {
* 集中监控数据处理 * 集中监控数据处理
* @return ReturnT<String> * @return ReturnT<String>
*/ */
@XxlJob(CENTRALIZED_MONITORING) //@XxlJob(CENTRALIZED_MONITORING)
public ReturnT<String> loadMonitoring(String param) { @Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadMonitoring() {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }

46
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java

@ -8,7 +8,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.Arrays; import java.util.Arrays;
@ -33,10 +32,13 @@ public class RealTargetScheduledTask {
* @return * @return
* @throws Exception * @throws Exception
*/ */
// @XxlJob(LOAD_EM_INFO) @XxlJob(LOAD_EM_INFO)
// @Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadEmInfo() { public ReturnT<String> loadEmInfo(String param) {
service.loadEmInfo(); if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}
service.loadEmInfo(param);
return new ReturnT<>("SUCCESS"); return new ReturnT<>("SUCCESS");
} }
@ -128,26 +130,24 @@ public class RealTargetScheduledTask {
/** /**
* 获取站点近3年发电量数据 * 获取站点近3年发电量数据
*/ */
// @XxlJob(ELECTRICITY_GENERATION_RECENT_YEAR) @XxlJob(ELECTRICITY_GENERATION_RECENT_YEAR)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadPowerData() { public ReturnT<String> loadPowerData(String param) {
// if (Func.isBlank(param)) { if (Func.isBlank(param)) {
// param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
// } }
service.loadPowerData("", Arrays.asList(HomePageConstant.HYDROPOWER,HomePageConstant.PHOTOVOLTAIC),2,3); service.loadPowerData(param, Arrays.asList(HomePageConstant.HYDROPOWER,HomePageConstant.PHOTOVOLTAIC),2,3);
return new ReturnT<>("SUCCESS"); return new ReturnT<>("SUCCESS");
} }
/**
* 获取風電和儲能站点近3年发电量数据
*/ @XxlJob(WIND_POWER_GENERATION_RECENT_YEAR)
private final static String wind_recent_year_power_data = "hzims:operation:wind:power:data"; //@Scheduled(cron = "0/40 * * * * ? ")
// @XxlJob(WIND_POWER_GENERATION_RECENT_YEAR) public ReturnT<String> loadWindPowerData(String param) {
@Scheduled(cron = "0/40 * * * * ? ") if (Func.isBlank(param)) {
public ReturnT<String> loadWindPowerData() { param = DateUtil.format(new Date(), "yyyy-MM");
// if (Func.isBlank(param)) { }
// param = DateUtil.format(new Date(), "yyyy-MM"); service.loadPowerDataByWindEnergy(param, Arrays.asList(HomePageConstant.WIND_POWER,HomePageConstant.ENERGY_STORAGE),2,3,WIND_RECENT_YEAR_POWER_DATA);
// }
service.loadPowerDataByWindEnergy("", Arrays.asList(HomePageConstant.WIND_POWER,HomePageConstant.ENERGY_STORAGE),2,3,wind_recent_year_power_data);
return new ReturnT<>("SUCCESS"); return new ReturnT<>("SUCCESS");
} }
} }

7
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmQueryServiceImpl.java

@ -11,13 +11,11 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.StringUtil; import org.springblade.core.tool.utils.StringUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -39,6 +37,7 @@ public class AlarmQueryServiceImpl extends BaseServiceImpl<AlarmQueryMapper, Ala
List<AlarmEntity> alarms = this.list(Wrappers.<AlarmEntity>lambdaQuery() List<AlarmEntity> alarms = this.list(Wrappers.<AlarmEntity>lambdaQuery()
.in(AlarmEntity::getStationId,codes) .in(AlarmEntity::getStationId,codes)
.eq(AlarmEntity::getIsSmallBell,0) .eq(AlarmEntity::getIsSmallBell,0)
.like(AlarmEntity::getAlarmTime, DateUtil.format(new Date(),DateUtil.PATTERN_DATE))
); );
if(CollectionUtil.isEmpty(alarms)){ if(CollectionUtil.isEmpty(alarms)){
return new ArrayList<>(); return new ArrayList<>();

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/RealTargetService.java

@ -9,7 +9,7 @@ import java.util.List;
public interface RealTargetService { public interface RealTargetService {
void loadEmInfo(); void loadEmInfo(String param);
// 水电站实时数据加载 // 水电站实时数据加载
void loadHydropowerReal(String param); void loadHydropowerReal(String param);

12
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java

@ -101,7 +101,7 @@ public class RealTargetServiceImpl implements RealTargetService {
@Override @Override
public void loadEmInfo() { public void loadEmInfo(String param) {
List<StationEntity> stations = stationService.list(Wrappers.<StationEntity>lambdaQuery() List<StationEntity> stations = stationService.list(Wrappers.<StationEntity>lambdaQuery()
.eq(StationEntity::getDataOrigin,"0")); .eq(StationEntity::getDataOrigin,"0"));
// 查询所有首页展示/状态非删除设备 // 查询所有首页展示/状态非删除设备
@ -148,17 +148,17 @@ public class RealTargetServiceImpl implements RealTargetService {
List<EmParamEntity> itemParamList = paramList.stream().filter(o->item.getId().equals(o.getInfoId())).collect(Collectors.toList()); List<EmParamEntity> itemParamList = paramList.stream().filter(o->item.getId().equals(o.getInfoId())).collect(Collectors.toList());
if(CollectionUtil.isNotEmpty(itemParamList)){ if(CollectionUtil.isNotEmpty(itemParamList)){
// 遍历设备配置参数 // 遍历设备配置参数
for(EmParamEntity param : itemParamList){ for(EmParamEntity paramEntity : itemParamList){
String param_name = param.getParamName(); String param_name = paramEntity.getParamName();
switch (param_name){ switch (param_name){
case "ct": case "ct":
item.setCt(Integer.valueOf(param.getParamValue())); item.setCt(Integer.valueOf(paramEntity.getParamValue()));
break; break;
case "pt": case "pt":
item.setPt(Integer.valueOf(param.getParamValue())); item.setPt(Integer.valueOf(paramEntity.getParamValue()));
break; break;
case "installedCapacity": case "installedCapacity":
item.setInstalledCapacity(Double.valueOf(param.getParamValue())); item.setInstalledCapacity(Double.valueOf(paramEntity.getParamValue()));
break; break;
default: default:
break; break;

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

@ -17,8 +17,8 @@ import com.hnac.hzims.scheduled.service.inspect.TaskService;
import com.hnac.hzims.scheduled.service.operation.business.AccessService; import com.hnac.hzims.scheduled.service.operation.business.AccessService;
import com.hnac.hzims.scheduled.service.operation.business.MaintenanceService; import com.hnac.hzims.scheduled.service.operation.business.MaintenanceService;
import com.hnac.hzims.scheduled.service.operation.business.PhenomenonService; import com.hnac.hzims.scheduled.service.operation.business.PhenomenonService;
import com.hnac.hzims.scheduled.service.operation.station.StationService;
import com.hnac.hzims.scheduled.service.operation.report.ReportService; import com.hnac.hzims.scheduled.service.operation.report.ReportService;
import com.hnac.hzims.scheduled.service.operation.station.StationService;
import com.hnac.hzims.scheduled.service.safeproduct.MonthService; import com.hnac.hzims.scheduled.service.safeproduct.MonthService;
import com.hnac.hzims.scheduled.service.safeproduct.TrialService; import com.hnac.hzims.scheduled.service.safeproduct.TrialService;
import com.hnac.hzims.scheduled.service.ticket.TicketService; import com.hnac.hzims.scheduled.service.ticket.TicketService;
@ -41,6 +41,7 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.ZoneId; import java.time.ZoneId;
@ -329,7 +330,7 @@ public class ReportServiceImpl implements ReportService {
areaMonthReport.setPowerFinishRate(0.0); areaMonthReport.setPowerFinishRate(0.0);
} else { } else {
// 发电完成率 // 发电完成率
double powerFinishRate = BigDecimal.valueOf(actualPower / planPower * 100).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue(); double powerFinishRate = BigDecimal.valueOf(actualPower / planPower * 100).setScale(1, RoundingMode.HALF_UP).doubleValue();
areaMonthReport.setPowerFinishRate(powerFinishRate); areaMonthReport.setPowerFinishRate(powerFinishRate);
} }
// 同比 // 同比
@ -338,7 +339,7 @@ public class ReportServiceImpl implements ReportService {
areaMonthReport.setComparePowerRate(0.0); areaMonthReport.setComparePowerRate(0.0);
return; return;
} }
double comparePowerRate = BigDecimal.valueOf(actualPower / oldActualPower).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); double comparePowerRate = BigDecimal.valueOf(actualPower / oldActualPower).setScale(2, RoundingMode.HALF_UP).doubleValue();
areaMonthReport.setComparePowerRate(comparePowerRate); areaMonthReport.setComparePowerRate(comparePowerRate);
} }
@ -365,7 +366,7 @@ public class ReportServiceImpl implements ReportService {
if (operateQualify <= 0) { if (operateQualify <= 0) {
areaMonthReport.setOperaQualifyRate(0.0); areaMonthReport.setOperaQualifyRate(0.0);
} else { } else {
double operateQualifyRate = BigDecimal.valueOf(operateQualify / (double) operate * 100L).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue(); double operateQualifyRate = BigDecimal.valueOf(operateQualify / (double) operate * 100L).setScale(1, RoundingMode.HALF_UP).doubleValue();
areaMonthReport.setOperaQualifyRate(operateQualifyRate); areaMonthReport.setOperaQualifyRate(operateQualifyRate);
} }
//工作票 //工作票
@ -375,7 +376,7 @@ public class ReportServiceImpl implements ReportService {
if (workQualify <= 0) { if (workQualify <= 0) {
areaMonthReport.setWorkQualifyRate(0.0); areaMonthReport.setWorkQualifyRate(0.0);
} else { } else {
double workQualifyRate = BigDecimal.valueOf(workQualify / (double) work * 100L).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue(); double workQualifyRate = BigDecimal.valueOf(workQualify / (double) work * 100L).setScale(1, RoundingMode.HALF_UP).doubleValue();
areaMonthReport.setWorkQualifyRate(workQualifyRate); areaMonthReport.setWorkQualifyRate(workQualifyRate);
} }
} }
@ -421,7 +422,7 @@ public class ReportServiceImpl implements ReportService {
if (defectSum <= 0) { if (defectSum <= 0) {
areaMonthReport.setDefectRate(0.0); areaMonthReport.setDefectRate(0.0);
} else { } else {
double deletionRate = BigDecimal.valueOf(defect / defectSum * 100L).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue(); double deletionRate = BigDecimal.valueOf(defect / defectSum * 100L).setScale(1, RoundingMode.HALF_UP).doubleValue();
areaMonthReport.setDefectRate(deletionRate); areaMonthReport.setDefectRate(deletionRate);
} }
countDownLatch.countDown(); countDownLatch.countDown();
@ -464,7 +465,7 @@ public class ReportServiceImpl implements ReportService {
if(Math.abs(oldActualPower) <= 0 && Math.abs(oldOldActualPower) <= 0 ){ if(Math.abs(oldActualPower) <= 0 && Math.abs(oldOldActualPower) <= 0 ){
return; return;
} }
double predictPlanPower = BigDecimal.valueOf((oldActualPower + oldOldActualPower) / 2).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); double predictPlanPower = BigDecimal.valueOf((oldActualPower + oldOldActualPower) / 2).setScale(2, RoundingMode.HALF_UP).doubleValue();
areaMonthReport.setPredictPlanPower(predictPlanPower); areaMonthReport.setPredictPlanPower(predictPlanPower);
} }

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java

@ -153,6 +153,9 @@ public class OperMaintenanceTaskServiceImpl extends BaseServiceImpl<OperMaintena
if (StringUtil.isNoneBlank(req.getFlowTaskName())) { if (StringUtil.isNoneBlank(req.getFlowTaskName())) {
eq(OperMaintenanceTaskEntity::getFlowTaskName, req.getFlowTaskName()); eq(OperMaintenanceTaskEntity::getFlowTaskName, req.getFlowTaskName());
} }
if(ObjectUtil.isNotEmpty(req.getPlanId())){
eq(OperMaintenanceTaskEntity::getPlanId,req.getPlanId());
}
}}; }};
return queryWrapper; return queryWrapper;
} }

Loading…
Cancel
Save