| | |
| | | import me.zhengjie.modules.task.service.dto.TaskDto; |
| | | import me.zhengjie.modules.task.service.dto.TaskQueryCriteria; |
| | | import me.zhengjie.modules.task.service.mapstruct.TaskMapper; |
| | | import me.zhengjie.utils.*; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.Pageable; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import me.zhengjie.modules.task.repository.TaskDaliyRepository; |
| | | import me.zhengjie.modules.task.repository.TaskRepository; |
| | | import me.zhengjie.modules.task.repository.TaskUserRepository; |
| | | import me.zhengjie.utils.FileUtil; |
| | | import me.zhengjie.utils.PageUtil; |
| | | import me.zhengjie.utils.QueryHelp; |
| | | import me.zhengjie.utils.SecurityUtils; |
| | | import me.zhengjie.utils.ValidationUtil; |
| | | import me.zhengjie.utils.enums.DataScopeEnum; |
| | | |
| | | |
| | |
| | | Task task = taskRepository.findById(currentTaskInterface.getTaskId()).orElseGet(Task::new); |
| | | // 当前任务二次处理 |
| | | TaskDto taskDto = taskMapper.toDto(task); |
| | | taskDto = taskService.customHandle(taskDto); |
| | | taskDto = taskService.customHandleMini(taskDto); |
| | | // 已分配工时 |
| | | divideHours += taskDto.getDivideHours(); |
| | | // 未完成工时 |
| | | incompleteHours += (taskDto.getDivideHours() - taskDto.getCompletedHours()); |
| | | } |
| | | // 返回集合 |
| | | returnMap.put("divideHours", divideHours); |
| | | returnMap.put("incompleteHours", incompleteHours); |
| | | returnMap.put("divideHours", DoubleUtil.maximumDigitLimit(divideHours, 2)); |
| | | returnMap.put("incompleteHours", DoubleUtil.maximumDigitLimit(incompleteHours, 2)); |
| | | // 返回列表 |
| | | returnList.add(returnMap); |
| | | } |
| | |
| | | Task task = taskList.get(i); |
| | | // 当前任务二次处理 |
| | | TaskDto taskDto = taskMapper.toDto(task); |
| | | taskDto = taskService.customHandle(taskDto); |
| | | taskDto = taskService.customHandleMini(taskDto); |
| | | // 已分配工时 |
| | | divideHours += taskDto.getDivideHours(); |
| | | // 未完成工时 |
| | |
| | | } |
| | | // 返回集合 |
| | | Map<String, Object> returnMap = new HashMap<>(); |
| | | returnMap.put("divideHours", divideHours); |
| | | returnMap.put("incompleteHours", incompleteHours); |
| | | returnMap.put("divideHours", DoubleUtil.maximumDigitLimit(divideHours, 2)); |
| | | returnMap.put("incompleteHours", DoubleUtil.maximumDigitLimit(incompleteHours, 2)); |
| | | return returnMap; |
| | | } |
| | | |