feat: sisul API

dev
gitea-관리자 1 year ago
parent bfc9a450f9
commit dd06c03c22

@ -0,0 +1,42 @@
package kr.xit.biz.sisul.model;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import javax.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
/**
* <pre>
* description :
*
* packageName : kr.xit.biz.sisul.model
* fileName : SisulSndngResultDTO
* author : limju
* date : 2023-11-02
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-11-02 limju
*
* </pre>
*/
public class SisulSndngResultDTO {
@Schema(name = "EpostTraceRequest", description = "발송결과정보 조회 request DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public static class RsltSisulRequest {
@Schema(requiredMode = RequiredMode.REQUIRED, title = "파일유일키", example = " ")
@Size(min = 10, max = 20, message = "파일유일키는 필수 입니다(max:20)")
private String unitySndngMastrId;
@Schema(requiredMode = RequiredMode.AUTO, title = "우편물 일련번호", example = " ")
@Size(max = 20, message = "우편물 일련번호는 20자를 넘을 수 없습니다.")
private String unitySndngDetailId;
}
}

@ -3,6 +3,7 @@ package kr.xit.biz.sisul.web;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcExcelUpload; import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcExcelUpload;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulRequest;
import kr.xit.biz.sisul.service.IBizSisulService; import kr.xit.biz.sisul.service.IBizSisulService;
import kr.xit.core.model.ApiResponseDTO; import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse; import kr.xit.core.model.IApiResponse;
@ -11,6 +12,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -33,7 +35,7 @@ import org.springframework.web.bind.annotation.RestController;
@Tag(name = "BizSisulController", description = "전자고지 시설관리 시스템 연계 관련 처리") @Tag(name = "BizSisulController", description = "전자고지 시설관리 시스템 연계 관련 처리")
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController
@RequestMapping(value = "/api/biz/sisul") @RequestMapping(value = "/api/biz/sisul/v1")
public class BizSisulController { public class BizSisulController {
private final IBizSisulService service; private final IBizSisulService service;
@ -49,4 +51,17 @@ public class BizSisulController {
String msg = service.fmcExcelUpload(fileReq); String msg = service.fmcExcelUpload(fileReq);
return ApiResponseDTO.success(fileReq, msg); return ApiResponseDTO.success(fileReq, msg);
} }
@Operation(summary = "발송결과정보 마스터 조회 - 시설공단 내부시스템에서 호출", description = "발송결과정보 마스터 조회 - 시설공단 내부시스템에서 호출")
@PostMapping(value = "/sndng/result/master", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse findSndngResultMaster(@RequestBody RsltSisulRequest reqDTO) {
return ApiResponseDTO.success();
}
@Operation(summary = "발송결과정보 상세 조회 - 시설공단 내부시스템에서 호출", description = "발송결과정보 상세 조회 - 시설공단 내부시스템에서 호출")
@PostMapping(value = "/sndng/result/details", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse findSndngResultDetails(@RequestBody RsltSisulRequest reqDTO) {
return ApiResponseDTO.success();
}
} }

@ -50,7 +50,7 @@
fd.append('files', document.querySelector("#files").files[0]); fd.append('files', document.querySelector("#files").files[0]);
$.ajax({ $.ajax({
url: 'http://localhost:8081/api/biz/sisul/fmcExcelUpload', url: 'http://localhost:8081/api/biz/sisul/v1/fmcExcelUpload',
data: fd, data: fd,
cache: false, cache: false,
contentType: false, contentType: false,

Loading…
Cancel
Save