feat: '위원회 일정 등록' 페이지 로딩 시, 필요한 데이터 불러 오는 API 구현 완료 건

관리자 단에서 '위원회 관리' > '위원회 일정 관리'에 '등록' 버튼을 누른 후 '위원회 일정 등록' 페이지 로딩 시, 필요한 데이터 불러 오는 API 구현 완료.
thkim
thkim 2024-01-05 17:49:31 +09:00
parent 823ff346e8
commit f8fcda0369
3 changed files with 56 additions and 6 deletions

View File

@ -14,6 +14,7 @@ import com.dbnt.kcscbackend.auth.repository.UserInfoRepository;
import com.dbnt.kcscbackend.config.common.ResponseCode;
import com.dbnt.kcscbackend.config.common.ResultVO;
import com.dbnt.kcscbackend.config.egov.EgovMessageSource;
import io.swagger.models.auth.In;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
@ -665,4 +666,29 @@ public class SchedulesApiController {
return egovIndvdlSchdulManageService.ScheduleInit(resultVO);
}
/**
* ' ' , API
* @param paramCodeGroup
* @return
* @throws Exception
*/
@Operation(
summary = "'위원회 일정 등록' 페이지에서 심의위원회 첫 번째 거 선택 시, 하위 목록 불러오는 API",
description = "관리자 단에서 '위원회 관리' > '위원회 일정 관리'에 '등록' 버튼을 누른 후 '위원회 일정 등록' 페이지에서 심의위원회 첫 번째 거 선택 시, 하위 목록 불러오는 API",
tags = {"SchedulesApiController"}
)
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "조회 성공"),
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
})
@GetMapping(value = "/schedule/api/org-api/depth/list")
public ResultVO ScheduleApiOrgApiDepthList(@RequestParam Integer paramCodeGroup) throws Exception {
ResultVO resultVO = new ResultVO();
return egovIndvdlSchdulManageService.ScheduleApiOrgApiDepthList(resultVO, paramCodeGroup);
}
}

View File

@ -105,10 +105,9 @@ public interface EgovIndvdlSchdulManageService {
*/
public void updateIndvdlSchdulManage(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception;
/**
* () .
* @return
* @throws Exception
*/
public ResultVO ScheduleInit(ResultVO resultVO) throws Exception;
public ResultVO ScheduleApiOrgApiDepthList(ResultVO resultVO, Integer paramCodeGroup) throws Exception;
}

View File

@ -154,12 +154,37 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i
List<String> listCodes = tcCodeItemRepository.findByGrpCdAndUseYnOrderByGrpOrder("EVT_TYPE", "Y").stream()
.map(lc -> lc.getItemNm())
.collect(Collectors.toList());
List<String> listSubOrg = tnCmtOrgRepository.findByUseYnAndUpCmtSeqOrderByCmtOrder("Y", 3).stream()
.map(lc -> lc.getCmtNm())
.collect(Collectors.toList());
List<String> listTopOrg = tnCmtOrgRepository.findByUseYnAndUpCmtSeqOrderByCmtOrder("Y", 2).stream()
.map(lc -> lc.getCmtNm())
.collect(Collectors.toList());
resultMap.put("listCodes", listCodes);
resultMap.put("listSubOrg", "");
resultMap.put("listSubOrg", listSubOrg);
resultMap.put("listTopOrg", listTopOrg);
resultVO.setResult(resultMap);
return resultVO;
}
@Override
public ResultVO ScheduleApiOrgApiDepthList(ResultVO resultVO, Integer paramCodeGroup) throws Exception {
Map<String, Object> resultMap = new HashMap<String, Object>();
List<String> listCodes = tcCodeItemRepository.findByGrpCdAndUseYnOrderByGrpOrder("EVT_TYPE", "Y").stream()
.map(lc -> lc.getItemNm())
.collect(Collectors.toList());
List<String> listSubOrg = tnCmtOrgRepository.findByUseYnAndUpCmtSeqOrderByCmtOrder("Y", 3).stream()
.map(lc -> lc.getCmtNm())
.collect(Collectors.toList());
List<String> listTopOrg = tnCmtOrgRepository.findByUseYnAndUpCmtSeqOrderByCmtOrder("Y", 2).stream()
.map(lc -> lc.getCmtNm())
.collect(Collectors.toList());
resultMap.put("listCodes", listCodes);
resultMap.put("listSubOrg", listSubOrg);
resultMap.put("listTopOrg", listTopOrg);
resultVO.setResult(resultMap);