|
|
|
@ -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.MaintenanceService; |
|
|
|
|
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.station.StationService; |
|
|
|
|
import com.hnac.hzims.scheduled.service.safeproduct.MonthService; |
|
|
|
|
import com.hnac.hzims.scheduled.service.safeproduct.TrialService; |
|
|
|
|
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 java.math.BigDecimal; |
|
|
|
|
import java.math.RoundingMode; |
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
|
import java.time.ZoneId; |
|
|
|
@ -329,7 +330,7 @@ public class ReportServiceImpl implements ReportService {
|
|
|
|
|
areaMonthReport.setPowerFinishRate(0.0); |
|
|
|
|
} 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); |
|
|
|
|
} |
|
|
|
|
// 同比
|
|
|
|
@ -338,7 +339,7 @@ public class ReportServiceImpl implements ReportService {
|
|
|
|
|
areaMonthReport.setComparePowerRate(0.0); |
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -365,7 +366,7 @@ public class ReportServiceImpl implements ReportService {
|
|
|
|
|
if (operateQualify <= 0) { |
|
|
|
|
areaMonthReport.setOperaQualifyRate(0.0); |
|
|
|
|
} 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); |
|
|
|
|
} |
|
|
|
|
//工作票
|
|
|
|
@ -375,7 +376,7 @@ public class ReportServiceImpl implements ReportService {
|
|
|
|
|
if (workQualify <= 0) { |
|
|
|
|
areaMonthReport.setWorkQualifyRate(0.0); |
|
|
|
|
} 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); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -421,7 +422,7 @@ public class ReportServiceImpl implements ReportService {
|
|
|
|
|
if (defectSum <= 0) { |
|
|
|
|
areaMonthReport.setDefectRate(0.0); |
|
|
|
|
} 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); |
|
|
|
|
} |
|
|
|
|
countDownLatch.countDown(); |
|
|
|
@ -464,7 +465,7 @@ public class ReportServiceImpl implements ReportService {
|
|
|
|
|
if(Math.abs(oldActualPower) <= 0 && Math.abs(oldOldActualPower) <= 0 ){ |
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|