|
@@ -284,6 +284,12 @@ public class IotRyDailyReportServiceImpl implements IotRyDailyReportService {
|
|
|
if (ObjUtil.isNotEmpty(detail.getStartDateTime())) {
|
|
if (ObjUtil.isNotEmpty(detail.getStartDateTime())) {
|
|
|
tempDetail.setReportDate(detail.getStartDateTime());
|
|
tempDetail.setReportDate(detail.getStartDateTime());
|
|
|
}
|
|
}
|
|
|
|
|
+ // 计算定额时效 = 1-((时长-定额时长)/定额时长)
|
|
|
|
|
+ if (ObjUtil.isNotEmpty(detail.getAllocatedTime()) && detail.getAllocatedTime().compareTo(BigDecimal.ZERO) > 0) {
|
|
|
|
|
+ BigDecimal subtrahend = (detail.getDuration().subtract(detail.getAllocatedTime())).divide(detail.getAllocatedTime(), 2, RoundingMode.HALF_UP);
|
|
|
|
|
+ BigDecimal minuend = new BigDecimal("1");
|
|
|
|
|
+ tempDetail.setAllocatedEfficiency(minuend.subtract(subtrahend));
|
|
|
|
|
+ }
|
|
|
reportDOs.add(tempDetail);
|
|
reportDOs.add(tempDetail);
|
|
|
});
|
|
});
|
|
|
// 插入日报明细记录
|
|
// 插入日报明细记录
|