yaozc
2023-01-17 43e80e0148b02f1cc54409971dd565e7ff6402b6
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/quartz/task/WeekReportMethod.java
@@ -13,6 +13,7 @@
import java.util.Map.Entry;
import java.util.stream.Collectors;
import me.zhengjie.modules.task.domain.TaskDailyInterface;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@@ -26,7 +27,6 @@
import me.zhengjie.modules.project.service.ProjectCostService;
import me.zhengjie.modules.task.domain.Task;
import me.zhengjie.modules.task.domain.TaskDaliy;
import me.zhengjie.modules.task.domain.TaskDaliyCollectInterface;
import me.zhengjie.modules.task.repository.TaskDaliyRepository;
import me.zhengjie.modules.task.repository.TaskRepository;
@@ -124,15 +124,15 @@
         for (Task task : taskList) {
             timeTotalInit = timeTotalInit + task.getPlanHours();
             workTotalInit = workTotalInit + (task.getPlanWorkload() == null ? 0.0 : task.getPlanWorkload());
             TaskDaliyCollectInterface taskDaliyCollection = taskDaliyRepository.collectTaskDaliyUntilDate(task.getId(), projectProgress.getBelongDate());
            TaskDailyInterface taskDailyInterface = taskDaliyRepository.collectTaskDaliyUntilDate(task.getId(), projectProgress.getBelongDate());
             boolean flg = true;
             if (flg) { // TODO 任务状态:未结束  task.getStatus()
                timeTotalCost += BigDecimal.valueOf(task.getPlanHours()).multiply(BigDecimal.valueOf(taskDaliyCollection.getTaskProgress())).divide(BigDecimal.valueOf(100), 2, BigDecimal.ROUND_CEILING).doubleValue();
                timeTotalCost += BigDecimal.valueOf(task.getPlanHours()).multiply(BigDecimal.valueOf(taskDailyInterface.getTaskProgress())).divide(BigDecimal.valueOf(100), 2, BigDecimal.ROUND_CEILING).doubleValue();
             } else {
                timeTotalCost += task.getPlanHours();
            }
             workTotalCost += taskDaliyCollection.getConsumedWorkload();
             realLastCost += taskDaliyCollection.getConsumedHours();
             workTotalCost += taskDailyInterface.getConsumedWorkload();
             realLastCost += taskDailyInterface.getConsumedHours();
         }
         // 真实时长
         projectProgress.setRealLastCost(realLastCost);