mirror of
https://git.hmsn.ink/kospo/svcm/api.git
synced 2026-03-19 19:05:20 +09:00
가격조사 결재번호로 조회 기능 추가
This commit is contained in:
@@ -50,12 +50,32 @@ public class PrcsController {
|
||||
{CustomErrorResponse.class })))
|
||||
})
|
||||
@GetMapping("/prcs/{prcsNo}")
|
||||
public ResponseEntity findSearchPage(
|
||||
public ResponseEntity findDetail(
|
||||
@Parameter(description = "가격조사번호") @PathVariable(required = false) String prcsNo
|
||||
) {
|
||||
return ResponseEntity.ok(prcsService.findDetail(prcsNo));
|
||||
}
|
||||
|
||||
@Operation(summary = "가격조사 상세조회 (apprNo)", description = "결재번호로 조회")
|
||||
@ApiResponses({
|
||||
@ApiResponse(description = "Success", responseCode = "200",
|
||||
content = @Content(mediaType = "application/json",
|
||||
schema = @Schema(oneOf =
|
||||
{PrcsResponse.class}))),
|
||||
@ApiResponse(description = "Not found", responseCode = "404",
|
||||
content = @Content(mediaType = "text/plain", schema = @Schema(oneOf =
|
||||
{String.class}))),
|
||||
@ApiResponse(description = "Internal Error", responseCode = "500",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(oneOf =
|
||||
{CustomErrorResponse.class })))
|
||||
})
|
||||
@GetMapping("/prcs/approval/{apprNo}")
|
||||
public ResponseEntity findByApprNoDetail(
|
||||
@Parameter(description = "결재번호") @PathVariable(required = false) String apprNo
|
||||
) {
|
||||
return ResponseEntity.ok(prcsService.findByApprNoDetail(apprNo));
|
||||
}
|
||||
|
||||
@Operation(summary = "가격조사 조회 (페이징)", description = "전체 조회")
|
||||
@ApiResponses({
|
||||
@ApiResponse(description = "Success", responseCode = "200",
|
||||
|
||||
@@ -26,6 +26,9 @@ public interface PrcsService {
|
||||
@Transactional
|
||||
PrcsResponse findDetail(String prcsNo);
|
||||
|
||||
@Transactional
|
||||
PrcsResponse findByApprNoDetail(String apprNo);
|
||||
|
||||
@Transactional
|
||||
PageResponse findExternalSearch(String bizNo, String cateCd, String title, String regNm, String regSdt, String regEdt, Pageable pageable);
|
||||
|
||||
|
||||
@@ -123,6 +123,18 @@ public class PrcsServiceImpl implements PrcsService {
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public PrcsResponse findByApprNoDetail(String apprNo) {
|
||||
ApprMst apprMst = apprMstRepository.findByApprNo(apprNo);
|
||||
Prcs prcs = apprMst.getPrcs();
|
||||
if(prcs != null) {
|
||||
return PrcsResponse.from(prcs);
|
||||
} else {
|
||||
throw new CustomException(ErrorCode.FIND_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public PageResponse findExternalSearch(String bizNo, String cateCd, String title, String regNm, String regSdt, String regEdt, Pageable pageable) {
|
||||
|
||||
Reference in New Issue
Block a user