|
|
package com.monitor.other.worksystem.service.impl;
|
|
|
|
|
|
import com.model.HandledJob;
|
|
|
import com.model.ReleaseWorkJob;
|
|
|
import com.model.WorkJob;
|
|
|
import com.monitor.model.domain.PageBean;
|
|
|
import com.monitor.model.page.PageRequest;
|
|
|
import com.monitor.model.response.PageResponse;
|
|
|
import com.monitor.mysql.mapper.ReleaseWorkJobMapper;
|
|
|
import com.monitor.mysql.mapper.WorkJobMapper;
|
|
|
import com.monitor.other.worksystem.service.WorksService;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
...
|
...
|
@@ -22,6 +23,9 @@ public class WorksServiceImpl implements WorksService { |
|
|
@Autowired
|
|
|
private WorkJobMapper workJobMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private ReleaseWorkJobMapper releaseWorkJobMapper;
|
|
|
|
|
|
@Override
|
|
|
public PageResponse<WorkJob> getWorkJobs(PageRequest req) {
|
|
|
// 组装分页对象
|
...
|
...
|
@@ -37,6 +41,14 @@ public class WorksServiceImpl implements WorksService { |
|
|
|
|
|
// 获取列表
|
|
|
List<WorkJob> list = workJobMapper.selectByPage(page);
|
|
|
if(CollectionUtils.isNotEmpty(list)){
|
|
|
for(WorkJob job : list){
|
|
|
ReleaseWorkJob releaseWorkJob = releaseWorkJobMapper.selectById(job.getWorkId());
|
|
|
if(releaseWorkJob != null){
|
|
|
job.setTestMessage(releaseWorkJob.getTestMessage());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// 获取列表
|
|
|
PageResponse<WorkJob> response = new PageResponse<WorkJob>();
|
|
|
response.setCurrentPage(req.getCurrentPage());
|
...
|
...
|
|