|
|
|
@ -125,7 +125,6 @@ public class MaintenanceTaskQueryServiceImpl implements IMaintenanceTaskQuerySer
|
|
|
|
|
private List<MaintenanceTaskQueryVO> fillTaskQuery(List<OperMaintenanceTaskEntity> taskList) { |
|
|
|
|
R<List<Dept>> deptListR = sysClient.getDeptList(); |
|
|
|
|
List<Dept> deptList = deptListR.isSuccess() ? deptListR.getData() : Lists.newArrayList(); |
|
|
|
|
List<EmInfoEntity> emList = emInfoClient.list(); |
|
|
|
|
IntFunction<MaintenanceTaskQueryVO> convert = index -> { |
|
|
|
|
OperMaintenanceTaskEntity task = taskList.get(index); |
|
|
|
|
MaintenanceTaskQueryVO result = new MaintenanceTaskQueryVO(); |
|
|
|
@ -137,9 +136,7 @@ public class MaintenanceTaskQueryServiceImpl implements IMaintenanceTaskQuerySer
|
|
|
|
|
// 获取维护类型
|
|
|
|
|
result.setTypeName(DictCache.getValue(DictConstant.MAINTENANCE_TYPE_CODE,task.getTypeCode())); |
|
|
|
|
// 获取维护设备
|
|
|
|
|
result.setEmName(emList.stream().filter( |
|
|
|
|
em -> em.getNumber().equals(task.getEmCode()) |
|
|
|
|
).findFirst().map(EmInfoEntity::getName).orElse("")); |
|
|
|
|
result.setEmName(task.getEmName()); |
|
|
|
|
// 获取执行时间
|
|
|
|
|
result.setPlanDisposeTime(DateUtil.formatDateTime(task.getDisposeTime())); |
|
|
|
|
result.setDisposeTime(Optional.ofNullable(task.getExecuteTime()).map(DateUtil::formatDateTime).orElse("")); |
|
|
|
|