List<JobHistory> list=jobHistoryManager.pagingList(jobId, config.getOffset(), config.getLimit());
int total =jobHistoryManager.pagingTotal(jobId);
List<JobHistoryModel> data=new ArrayList<JobHistoryModel>();
for(JobHistory his:list){
JobHistoryModel d=new JobHistoryModel();
d.setId( his.getId());
d.setJobId(his.getJobId());
d.setStartTime(his.getStartTime());
d.setEndTime(his.getEndTime());
d.setExecuteHost(his.getExecuteHost());
d.setOperator(his.getOperator());
d.setStatus(his.getStatus()==null?null:his.getStatus().toString());
String type="";
if(his.getTriggerType()!=null){
if(his.getTriggerType()==TriggerType.MANUAL){
type="手动调度";
}else if(his.getTriggerType()==TriggerType.MANUAL_RECOVER){
type="手动恢复";
}else if(his.getTriggerType()==TriggerType.SCHEDULE){
type="自动调度";
}
}
d.setTriggerType(type);
d.setIllustrate(his.getIllustrate());
data.add(d);
}
return new PagingLoadResultBean<JobHistoryModel>(data,total,config.getOffset());
}