[KC-116] shp 파일 다운로드 이력 추가
This commit is contained in:
@@ -8,6 +8,9 @@ import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceServerSt
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceStatusDetailDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.ResultList;
|
||||
import com.kamco.cd.kamcoback.inference.service.InferenceResultService;
|
||||
import com.kamco.cd.kamcoback.log.dto.AuditLogDto;
|
||||
import com.kamco.cd.kamcoback.log.dto.AuditLogDto.DownloadReq;
|
||||
import com.kamco.cd.kamcoback.log.dto.AuditLogDto.searchReq;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngYyyyDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.service.MapSheetMngService;
|
||||
import com.kamco.cd.kamcoback.model.dto.ModelMngDto;
|
||||
@@ -413,7 +416,7 @@ public class InferenceResultApiController {
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@GetMapping(value = "/download/{uuid}", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
||||
public ResponseEntity<Resource> downloadZip(@PathVariable UUID uuid) throws IOException {
|
||||
public ResponseEntity<Resource> downloadShp(@PathVariable UUID uuid) throws IOException {
|
||||
|
||||
String path;
|
||||
try {
|
||||
@@ -441,4 +444,37 @@ public class InferenceResultApiController {
|
||||
.contentLength(resource.contentLength())
|
||||
.body((Resource) resource);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/download-audit/{uuid}")
|
||||
public ApiResponseDto<Page<AuditLogDto.Basic>> downloadAudit(
|
||||
@Parameter(description = "UUID", example = "0192efc6-9ec2-43ee-9a90-5b73e763c09f")
|
||||
@PathVariable
|
||||
UUID uuid,
|
||||
@Parameter(description = "구분-NAME(이름), EMPLOYEE_NO(사번)", example = "NAME")
|
||||
@RequestParam(required = false)
|
||||
String type,
|
||||
@Parameter(description = "다운로드일 시작", example = "2025-01-01") @RequestParam(required = false)
|
||||
LocalDate strtDttm,
|
||||
@Parameter(description = "다운로드일 종료", example = "2026-01-01") @RequestParam(required = false)
|
||||
LocalDate endDttm,
|
||||
@Parameter(description = "키워드", example = "변화탐지") @RequestParam(required = false)
|
||||
String searchValue,
|
||||
@Parameter(description = "페이지 번호 (0부터 시작)", example = "0") @RequestParam(defaultValue = "0")
|
||||
int page,
|
||||
@Parameter(description = "페이지 크기", example = "20") @RequestParam(defaultValue = "20")
|
||||
int size) {
|
||||
AuditLogDto.searchReq searchReq = new searchReq();
|
||||
searchReq.setPage(page);
|
||||
searchReq.setSize(size);
|
||||
DownloadReq downloadReq = new DownloadReq();
|
||||
downloadReq.setUuid(uuid);
|
||||
downloadReq.setStartDate(strtDttm);
|
||||
downloadReq.setEndDate(endDttm);
|
||||
downloadReq.setType(type);
|
||||
downloadReq.setSearchValue(searchValue);
|
||||
downloadReq.setMenuId("22");
|
||||
downloadReq.setRequestUri("/api/inference/download-audit");
|
||||
|
||||
return ApiResponseDto.ok(inferenceResultService.getDownloadAudit(searchReq, downloadReq));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user