Browse Source

#装机容量去除小数点

zhongwei
yang_shj 6 months ago
parent
commit
96ab3474d7
  1. 1
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java
  2. 1
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/impl/DataServiceImpl.java
  3. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java

1
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;

1
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/impl/DataServiceImpl.java

@ -97,6 +97,7 @@ public class DataServiceImpl implements DataService {
List<AnalyzeDataConditionPO> signboardConditions = new ArrayList<>(); List<AnalyzeDataConditionPO> signboardConditions = new ArrayList<>();
AnalyzeDataConditionPO analyzeDataConditionPO = new AnalyzeDataConditionPO(); AnalyzeDataConditionPO analyzeDataConditionPO = new AnalyzeDataConditionPO();
analyzeDataConditionPO.setFull(1); analyzeDataConditionPO.setFull(1);
po.setDeviceCode(deviceCode); po.setDeviceCode(deviceCode);
analyzeDataConditionPO.setSignages(signages); analyzeDataConditionPO.setSignages(signages);
analyzeDataConditionPO.setKeepFigures(2); analyzeDataConditionPO.setKeepFigures(2);

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

@ -164,7 +164,7 @@ public class TargetServiceImpl implements TargetService {
double sum = stationDevices.stream().mapToDouble(EminfoAndEmParamVo::getInstalledCapacity).sum(); double sum = stationDevices.stream().mapToDouble(EminfoAndEmParamVo::getInstalledCapacity).sum();
item.setInstalledCapacity(sum); item.setInstalledCapacity(sum);
// 装机容量详情 // 装机容量详情
List<String> details = stationDevices.stream().map(device-> "[" + device.getName() + " " +device.getInstalledCapacity() +"kW]").collect(Collectors.toList()); List<String> details = stationDevices.stream().map(device-> "[" + device.getName() + " " + (int) Math.floor(device.getInstalledCapacity()) +"kW]").collect(Collectors.toList());
item.setDetail(String.join("|",details)); item.setDetail(String.join("|",details));
return item; return item;
}).filter(capacity->Math.abs(capacity.getInstalledCapacity()) > 0).collect(Collectors.toList()); }).filter(capacity->Math.abs(capacity.getInstalledCapacity()) > 0).collect(Collectors.toList());

Loading…
Cancel
Save