mirror of
https://git.hmsn.ink/kospo/svcm/api.git
synced 2026-03-20 07:43:32 +09:00
대금지급 오류 수정
This commit is contained in:
@@ -71,7 +71,9 @@ public class ContController {
|
||||
})
|
||||
@GetMapping("/cont/page")
|
||||
public ResponseEntity findCode(
|
||||
@Parameter(description = "등록상태") @RequestParam(required = false) String contStatCd,
|
||||
|
||||
@Parameter(description = "분야") @RequestParam(required = false) String cateCd,
|
||||
@Parameter(description = "계약번호") @RequestParam(required = false) String contNo,
|
||||
@Parameter(description = "계약체결시작일") @RequestParam(required = false, defaultValue = "1970-01-01") String signSdt,
|
||||
@Parameter(description = "계약체결종료일") @RequestParam(required = false, defaultValue = "2070-01-01") String signEdt,
|
||||
@Parameter(description = "페이지") @RequestParam("page") int page,
|
||||
@@ -79,7 +81,7 @@ public class ContController {
|
||||
Principal principal
|
||||
) {
|
||||
Pageable pageable = PageRequest.of(page -1, row);
|
||||
return ResponseEntity.ok(contService.findPage(principal.getName(), contStatCd, signSdt, signEdt, pageable));
|
||||
return ResponseEntity.ok(contService.findPage(principal.getName(), contNo, cateCd, signSdt, signEdt, pageable));
|
||||
}
|
||||
|
||||
@Operation(summary = "계약관리 상세조회", description = "계약번호로 조회")
|
||||
|
||||
@@ -45,7 +45,8 @@ public interface ContRepository extends JpaRepository<Cont, String> {
|
||||
" c.regSabun as regSabun " +
|
||||
"from Cont c " +
|
||||
"where c.regSabun = :sabun " +
|
||||
"and (:contStatCd is null or :contStatCd = '' or c.contStatCd = :contStatCd) " +
|
||||
"and (:contNo is null or :contNo = '' or c.contStatCd like concat('%', :contNo, '%')) " +
|
||||
"and (:cateCd is null or :cateCd = '' or c.cateCd = :cateCd) " +
|
||||
"and c.signDt between :signSdt and :signEdt order by c.contNo desc")
|
||||
Page<IContResponse> findBySearch(String sabun, String contStatCd, String signSdt, String signEdt, Pageable pageable);
|
||||
Page<IContResponse> findBySearch(String sabun, String contNo, String cateCd, String signSdt, String signEdt, Pageable pageable);
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import org.springframework.data.domain.Pageable;
|
||||
import java.util.List;
|
||||
|
||||
public interface ContService {
|
||||
PageResponse findPage(String sabun, String contStatCd, String signSdt, String signEdt, Pageable pageable);
|
||||
PageResponse findPage(String sabun, String contNo, String cateCd, String signSdt, String signEdt, Pageable pageable);
|
||||
|
||||
@Transactional
|
||||
ContDetailResponse findDetail(String contNo);
|
||||
|
||||
@@ -48,8 +48,8 @@ public class ContServiceImpl implements ContService {
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public PageResponse findPage(String sabun, String contStatCd, String signSdt, String signEdt, Pageable pageable) {
|
||||
Page<ContRepository.IContResponse> page = contRepository.findBySearch(sabun, contStatCd, signSdt, signEdt, pageable);
|
||||
public PageResponse findPage(String sabun, String contNo, String cateCd, String signSdt, String signEdt, Pageable pageable) {
|
||||
Page<ContRepository.IContResponse> page = contRepository.findBySearch(sabun, contNo, cateCd, signSdt, signEdt, pageable);
|
||||
return PageResponse.builder()
|
||||
.pageable(page.getPageable())
|
||||
.content(page.getContent().stream().map(ContListResponse::iFrom).toList())
|
||||
|
||||
Reference in New Issue
Block a user