|
|
@ -5,13 +5,8 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
import kr.xit.batch.ens.job.PniCctvAcceptJobConfg;
|
|
|
|
|
|
|
|
import kr.xit.batch.ens.job.PniCctvFileJobConfg;
|
|
|
|
import kr.xit.batch.ens.job.*;
|
|
|
|
import kr.xit.batch.ens.job.SndngAcceptJobConfig;
|
|
|
|
|
|
|
|
import kr.xit.batch.ens.job.SndngCloseJobConfig;
|
|
|
|
|
|
|
|
import kr.xit.batch.ens.job.SndngMakeJobConfig;
|
|
|
|
|
|
|
|
import kr.xit.batch.ens.job.SndngSnedBulksJobConfig;
|
|
|
|
|
|
|
|
import kr.xit.batch.ens.job.SndngStatusBulksJobConfig;
|
|
|
|
|
|
|
|
import kr.xit.biz.common.ApiConstants;
|
|
|
|
import kr.xit.biz.common.ApiConstants;
|
|
|
|
import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
|
|
|
|
import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
|
|
|
|
import kr.xit.core.model.ApiResponseDTO;
|
|
|
|
import kr.xit.core.model.ApiResponseDTO;
|
|
|
@ -67,6 +62,7 @@ public class BatchJobWebController {
|
|
|
|
private final SndngCloseJobConfig closeJobConfig;
|
|
|
|
private final SndngCloseJobConfig closeJobConfig;
|
|
|
|
private final PniCctvFileJobConfg pniCctvFileJobConfg;
|
|
|
|
private final PniCctvFileJobConfg pniCctvFileJobConfg;
|
|
|
|
private final PniCctvAcceptJobConfg pniCctvAcceptJobConfg;
|
|
|
|
private final PniCctvAcceptJobConfg pniCctvAcceptJobConfg;
|
|
|
|
|
|
|
|
private final OtherMergeJobConfig otherMergeJobConfig;
|
|
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "accept", description = "accept")
|
|
|
|
@Operation(summary = "accept", description = "accept")
|
|
|
|
@PostMapping(value = "/accept", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
@PostMapping(value = "/accept", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
@ -228,6 +224,29 @@ public class BatchJobWebController {
|
|
|
|
return ApiResponseDTO.success(HttpStatus.OK);
|
|
|
|
return ApiResponseDTO.success(HttpStatus.OK);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "otherMerge", description = "시설 오라클 DB로 Data Merge")
|
|
|
|
|
|
|
|
@PostMapping(value = "/otherMerge", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
|
|
|
public IApiResponse otherMerge(@RequestBody final CmmEnsRequestDTO reqDTO) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
JobExecution jobExecution = jobLauncher.run(
|
|
|
|
|
|
|
|
otherMergeJobConfig.otherMergeJob(),
|
|
|
|
|
|
|
|
getJobParameters(reqDTO, null)
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while(jobExecution.isRunning()){
|
|
|
|
|
|
|
|
log.info("...");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
printLog(jobExecution);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (JobExecutionAlreadyRunningException | JobInstanceAlreadyCompleteException
|
|
|
|
|
|
|
|
| JobParametersInvalidException | org.springframework.batch.core.repository.JobRestartException e) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log.error(e.getMessage());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return ApiResponseDTO.success(HttpStatus.OK);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private JobParameters getJobParameters(final CmmEnsRequestDTO reqDTO, final String processStatus){
|
|
|
|
private JobParameters getJobParameters(final CmmEnsRequestDTO reqDTO, final String processStatus){
|
|
|
|
Map<String, JobParameter> confMap = new HashMap<>();
|
|
|
|
Map<String, JobParameter> confMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
|
|