init
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package com.eactive.eai.rms.common.schedulerStatus;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
|
||||
public class JobHistoryUI {
|
||||
|
||||
@JsonProperty("UUID")
|
||||
private String uuid;
|
||||
|
||||
@JsonProperty("JOBNAME")
|
||||
private String jobName;
|
||||
|
||||
@JsonProperty("INSTANCENAME")
|
||||
private String instanceName;
|
||||
|
||||
@JsonProperty("STARTDATE")
|
||||
private String startDate;
|
||||
|
||||
@JsonProperty("ENDDATE")
|
||||
private String endDate;
|
||||
|
||||
@JsonProperty("STATUS")
|
||||
private String status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.eactive.eai.rms.common.schedulerStatus;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
import com.eactive.eai.data.mapper.GenericMapper;
|
||||
import com.eactive.eai.rms.data.entity.man.scheduler.JobHistory;
|
||||
|
||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface JobHistoryUIMapper extends GenericMapper<JobHistoryUI, JobHistory> {
|
||||
|
||||
@Override
|
||||
JobHistoryUI toVo(JobHistory entity);
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.eactive.eai.rms.common.schedulerStatus;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.web.SortDefault;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
import com.eactive.eai.rms.common.base.BaseAnnotationController;
|
||||
import com.eactive.eai.rms.common.vo.GridResponse;
|
||||
|
||||
@Controller
|
||||
public class SchedulerStatusHistoryController extends BaseAnnotationController {
|
||||
|
||||
@Autowired
|
||||
private SchedulerStatusHistoryService service;
|
||||
|
||||
@GetMapping(value = "/common/scheduler/schedulerStatusHistoryMan.view")
|
||||
public String viewList() {
|
||||
return "/common/scheduler/schedulerStatusHistoryMan";
|
||||
}
|
||||
|
||||
@PostMapping(value = "/common/scheduler/schedulerStatusHistoryMan.json", params = "cmd=LIST")
|
||||
public ResponseEntity<GridResponse<JobHistoryUI>> selectList(
|
||||
@SortDefault(sort= {"startDate"}, direction = Sort.Direction.DESC) Pageable pageable, String searchStartTime,
|
||||
String searchEndTime, String searchJobName, String searchInstanceName) {
|
||||
|
||||
Page<JobHistoryUI> map = service
|
||||
.selectList(pageable, searchStartTime, searchEndTime, searchJobName, searchInstanceName);
|
||||
return ResponseEntity.ok(new GridResponse<>(map));
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.eactive.eai.rms.common.schedulerStatus;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.eactive.eai.rms.common.base.BaseService;
|
||||
import com.eactive.eai.rms.data.entity.man.scheduler.JobHistoryService;
|
||||
|
||||
@Service
|
||||
public class SchedulerStatusHistoryService extends BaseService {
|
||||
|
||||
@Autowired
|
||||
private JobHistoryService jobHistoryService;
|
||||
|
||||
@Autowired
|
||||
private JobHistoryUIMapper jobHistoryUIMapper;
|
||||
|
||||
public Page<JobHistoryUI> selectList(Pageable pageable, String searchStartTime, String searchEndTime,
|
||||
String searchJobName, String searchInstanceName) {
|
||||
return jobHistoryService
|
||||
.findAll(pageable, searchStartTime, searchEndTime, searchJobName, searchInstanceName)
|
||||
.map(jobHistoryUIMapper::toVo);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user