프로젝트 년도 불러오기
This commit is contained in:
parent
bb886bf0cf
commit
0779f6a2c8
@ -0,0 +1,51 @@
|
||||
/************************************************************
|
||||
*
|
||||
* @packageName : io.company.localhost.controller.api
|
||||
* @fileName : ProjectListController.java
|
||||
* @author : 박지윤
|
||||
* @date : 25.02.10
|
||||
* @description : 프로젝트 목록
|
||||
*
|
||||
* ===========================================================
|
||||
* DATE AUTHOR NOTE
|
||||
* -----------------------------------------------------------
|
||||
* 25.02.10 박지윤 최초 생성
|
||||
*
|
||||
*************************************************************/
|
||||
|
||||
package io.company.localhost.controller.api;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import io.company.localhost.common.annotation.ParameterCheck;
|
||||
import io.company.localhost.common.dto.ApiResponse;
|
||||
import io.company.localhost.common.dto.MapDto;
|
||||
import io.company.localhost.service.commoncodService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/project")
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class ProjectListController {
|
||||
|
||||
private final commoncodService commoncodservice;
|
||||
|
||||
/**
|
||||
* 프로젝트 년도 조회
|
||||
*
|
||||
* @return ApiResponse<List<MapDto>>
|
||||
*
|
||||
*/
|
||||
@ParameterCheck
|
||||
@GetMapping("/yearCategory")
|
||||
public ApiResponse<List<MapDto>> getYearCategories() {
|
||||
List<MapDto> yearCategory = commoncodservice.getYearCategories();
|
||||
return ApiResponse.ok(yearCategory);
|
||||
}
|
||||
}
|
||||
@ -35,5 +35,7 @@ public interface commoncodMapper {
|
||||
|
||||
int updateColorYon(String color);
|
||||
|
||||
List<MapDto> getYearCategories();
|
||||
|
||||
List<MapDto> getCategories();
|
||||
}
|
||||
|
||||
@ -44,9 +44,14 @@ public class commoncodService {
|
||||
return commoncodmapper.getMbtiList();
|
||||
}
|
||||
|
||||
public List<MapDto> getYearCategories() {
|
||||
return commoncodmapper.getYearCategories();
|
||||
}
|
||||
|
||||
public List<MapDto> getPwhintList() {
|
||||
return commoncodmapper.getPwhintList();
|
||||
}
|
||||
|
||||
public List<MapDto> getCategoryList() {
|
||||
return commoncodmapper.getCategories();
|
||||
}
|
||||
|
||||
@ -79,5 +79,18 @@
|
||||
WHERE CMNCODVAL BETWEEN 300101 AND 300103
|
||||
</select>
|
||||
|
||||
<select id="getYearCategories" resultType="Map">
|
||||
SELECT
|
||||
CMNCODVAL
|
||||
,CMNCODNAM
|
||||
FROM
|
||||
commoncod
|
||||
WHERE
|
||||
CMNCODLV1 = 900
|
||||
AND
|
||||
CMNCODODR != 0
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user