赵士淞
2023-01-16 c0c0ca8668823e3584855bc0865f229014911973
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/quartz/task/WeekReportMethod.java
@@ -8,6 +8,7 @@
import java.util.Date;
import java.util.List;
import me.zhengjie.modules.task.domain.TaskDailyInterface;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@@ -19,7 +20,6 @@
import me.zhengjie.modules.project.repository.ProjectProgressRepository;
import me.zhengjie.modules.project.repository.ProjectRepository;
import me.zhengjie.modules.task.domain.Task;
import me.zhengjie.modules.task.domain.TaskDaliyCollectInterface;
import me.zhengjie.modules.task.repository.TaskDaliyRepository;
import me.zhengjie.modules.task.repository.TaskRepository;
@@ -89,15 +89,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);