|
|
@ -4,10 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.iflytop.nuclear.mapper.TaskMapper; |
|
|
|
import com.iflytop.nuclear.model.*; |
|
|
|
import com.iflytop.nuclear.service.NuclearCoreConfigService; |
|
|
|
import com.iflytop.nuclear.service.NuclearCoreService; |
|
|
|
import com.iflytop.nuclear.service.NuclearStationService; |
|
|
|
import com.iflytop.nuclear.service.TaskService; |
|
|
|
import com.iflytop.nuclear.service.*; |
|
|
|
import com.iflytop.nuclear.vo.TaskVO; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -28,6 +25,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta |
|
|
|
NuclearCoreService nuclearCoreService; |
|
|
|
@Autowired |
|
|
|
NuclearStationService nuclearStationService; |
|
|
|
@Autowired |
|
|
|
AccountService accountService; |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<TaskVO> getTaskInfoByUsername(String username, String user_role) { |
|
|
@ -53,6 +52,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta |
|
|
|
Long nuclearCoreId = task.getNuclearCoreId(); |
|
|
|
NuclearCore nuclearCore = nuclearCoreService.getById(nuclearCoreId); |
|
|
|
NuclearStation nuclearStation = nuclearStationService.getById(nuclearStationId); |
|
|
|
QueryWrapper<Account> queryWrapper = new QueryWrapper<>(); |
|
|
|
queryWrapper.eq("username", task.getOperatorId()); |
|
|
|
Account account = accountService.getOne(queryWrapper); |
|
|
|
TaskVO taskVO = TaskVO.builder() |
|
|
|
.taskName(task.getTaskName()) |
|
|
|
.checkOrder(task.getCheckOrder()) |
|
|
@ -61,7 +63,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta |
|
|
|
.nuclearCoreName(nuclearCore.getName()) |
|
|
|
.nuclearStationName(nuclearStation.getName()) |
|
|
|
.publishTime(task.getPublishTime()) |
|
|
|
.operatorName(task.getOperatorId()) |
|
|
|
.operatorName(account.getNickname()) |
|
|
|
.startTime(task.getStartTime()) |
|
|
|
.endTime(task.getEndTime()) |
|
|
|
.canUpload(canUpload) |
|
|
|