@ -3,6 +3,7 @@ package cokr.xit.adds.biz.nims.web;
import java.util.List ;
import org.springframework.http.MediaType ;
import org.springframework.web.bind.annotation.ModelAttribute ;
import org.springframework.web.bind.annotation.PostMapping ;
import org.springframework.web.bind.annotation.PutMapping ;
import org.springframework.web.bind.annotation.RequestBody ;
@ -54,73 +55,65 @@ public class BizNimsController {
// NIMS API CALL
//------------------------------------------------------------------------------------------------------
@Operation ( summary = "NIMS 마약류 취급자 정보 조회" , description = "마약류 취급자 정보 조회<br><br>NIMS API 호출 결과를 DB에 저장후 결과 Return<br><br><strong>bi-사업자등록번호, hp-요양기관번호, bn-업체명, bc-취급자식별번호 중 하나는 필수<strong>" , tags = { "NIMS API" } )
@ Po stMapping( value = "/getNimsBsshInfoSt" )
@ Reque stMapping( value = "/getNimsBsshInfoSt" , method = { RequestMethod . POST , RequestMethod . GET } )
public ApiBaseResponse < List < NimsApiDto . BsshInfoSt > > getNimsBsshInfoSt (
@ RequestBody NimsApiRequest . BsshInfoReq dto
@ ModelAttribute NimsApiRequest . BsshInfoReq dto
) {
return ApiBaseResponse . of ( bizNimsService . saveBsshInfoSt ( dto ) ) ;
}
// @Operation(summary = "NIMS 마약류 제품 조회", description = "마약류 제품 조회<br><br>NIMS API 호출 결과를 DB에 저장후 결과 Return", tags = { "NIMS API" })
// @PostMapping(value = "/getNimsProductInfoKd")
// public ApiBaseResponse<List<NimsApiDto.ProductInfoKd>> getNimsMnfSeqInfo(
// @RequestBody NimsApiRequest.ProductInfoReq dto
// ) {
// return ApiBaseResponse.of(bizNimsService.saveProductInfoKd(dto, false));
// }
@Operation ( summary = "NIMS 마약류 제품 조회" , description = "마약류 제품 조회<br><br>NIMS API 호출 결과를 DB에 저장후 결과 Return" , tags = { "NIMS API" } )
@RequestMapping ( value = "/getNimsProductInfoKd" , method = { RequestMethod . POST , RequestMethod . GET } )
public ApiBaseResponse < List < NimsApiDto . ProductInfoKd > > getNimsMnfSeqInfo (
NimsApiRequest . ProductInfoReq dto
@ModelAttribute NimsApiRequest . ProductInfoReq dto
) {
return ApiBaseResponse . of ( bizNimsService . saveProductInfoKd ( dto , false ) ) ;
}
@Operation ( summary = "NIMS 마약류 상품 정보 & 제조번호 조회" , description = "마약류 상품정보 & 제조번호 조회<br><br>NIMS API 호출 결과를 DB에 저장후 결과 Return" , tags = { "NIMS API" } )
@ Po stMapping( value = "/getNimsProductInfoKdAndMnfSeqInfo" )
@ Reque stMapping( value = "/getNimsProductInfoKdAndMnfSeqInfo" , method = { RequestMethod . POST , RequestMethod . GET } )
public ApiBaseResponse < List < NimsApiDto . ProductInfoKd > > getNimsProductInfoKdAndMnfSeqInfo (
@ RequestBody NimsApiRequest . ProductInfoReq dto
@ ModelAttribute NimsApiRequest . ProductInfoReq dto
) {
return ApiBaseResponse . of ( bizNimsService . saveProductInfoKd ( dto , true ) ) ;
}
@Operation ( summary = "NIMS 제조 일련 번호 정보 조회" , description = "제보 일련 번호 정보 조회<br><br>NIMS API 호출 결과 Return" , tags = { "NIMS API" } )
@ Po stMapping( value = "/getNimsMnfSeqInfo" )
@ Reque stMapping( value = "/getNimsMnfSeqInfo" , method = { RequestMethod . POST , RequestMethod . GET } )
public ApiBaseResponse < List < NimsApiDto . MnfSeqInfo > > getNimsMnfSeqInfo (
@ RequestBody NimsApiRequest . MnfSeqInfoReq dto
@ ModelAttribute NimsApiRequest . MnfSeqInfoReq dto
) {
return ApiBaseResponse . of ( bizNimsService . getMnfSeqInfo ( dto ) ) ;
}
@Operation ( summary = "NIMS 관할 허가 관청 정보 조회" , description = "관할 허가 관청 정보 조회<br><br>NIMS API 호출 결과 Return" , tags = { "NIMS API" } )
@ Po stMapping( value = "/getNimsJurisdictionGovInfo" )
@ Reque stMapping( value = "/getNimsJurisdictionGovInfo" , method = { RequestMethod . POST , RequestMethod . GET } )
public ApiBaseResponse < List < NimsApiDto . JurisdictionGovInfo > > getNimsJurisdictionGovInfo (
@ RequestBody NimsApiRequest . JurisdictionGovInfoReq dto
@ ModelAttribute NimsApiRequest . JurisdictionGovInfoReq dto
) {
return ApiBaseResponse . of ( bizNimsService . getJurisdictionGovInfo ( dto ) ) ;
}
@Operation ( summary = "Nims 폐기 보고 조회" , description = "NIMS의 업체 폐기 보고 정보 목록 조회" , tags = { "NIMS API" } )
@io.swagger.v3.oas.annotations.parameters.RequestBody ( required = true , content = {
@Content ( mediaType = "application/json" , examples = {
@ExampleObject ( value = "" "
{
"sdt" : "20240105" ,
"edt" : "20240105" ,
"bc" : "" ,
"bn" : "" ,
"ur" : "" ,
"fg2" : "0" ,
"ps" : "01" ,
"userId" : "suji"
}
"" " )
} )
} )
@ PostMapping( "/getNimsDsuseRptInfo" )
// @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
// @Content(mediaType = "application/json", examples = {
// @ExampleObject(value = """
// {
// "sdt": "20240105",
// "edt": "20240105",
// "bc": "",
// "bn": "",
// "ur": "",
// "fg2": "0",
// "ps": "01",
// "userId": "suji"
// }
// """)
// })
// })
@ RequestMapping( value = "/getNimsDsuseRptInfo" , method = { RequestMethod . POST , RequestMethod . GET } )
public ApiBaseResponse < List < NimsApiDto . DsuseRptInfo > > getNimsDsuseRptInfo (
@ RequestBody NimsApiRequest . DsuseRptInfoReq dto
@ ModelAttribute NimsApiRequest . DsuseRptInfoReq dto
) {
return ApiBaseResponse . of ( bizNimsService . getNimsDsuseRptInfo ( dto ) ) ;
}