feat: 관리자 - 위원회관리 - 진행현황 관리에서 목록 구현 건 - backEnd
parent
855eea9820
commit
fba3342c69
|
|
@ -1,14 +1,15 @@
|
|||
package com.dbnt.kcscbackend.admin.config;
|
||||
package com.dbnt.kcscbackend.admin.committee;
|
||||
|
||||
import com.dbnt.kcscbackend.admin.committee.service.AdminCommitteeProgressStatusService;
|
||||
import com.dbnt.kcscbackend.admin.config.entity.TcMenu;
|
||||
import com.dbnt.kcscbackend.admin.config.entity.TnPartnerSite;
|
||||
import com.dbnt.kcscbackend.admin.config.model.CreateCommitteeCodeManagementVO;
|
||||
import com.dbnt.kcscbackend.admin.config.model.SetCommitteeCodeManagementVO;
|
||||
import com.dbnt.kcscbackend.admin.config.service.AdminCommitteeCodeManagementService;
|
||||
import com.dbnt.kcscbackend.commonCode.entity.TcCodeGrp;
|
||||
import com.dbnt.kcscbackend.commonCode.entity.TcCodeItem;
|
||||
import com.dbnt.kcscbackend.admin.config.service.AdminConfigService;
|
||||
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||
import com.dbnt.kcscbackend.commonCode.entity.TcCodeGrp;
|
||||
import com.dbnt.kcscbackend.commonCode.entity.TcCodeItem;
|
||||
import com.dbnt.kcscbackend.commonCode.service.CommonCodeService;
|
||||
import com.dbnt.kcscbackend.config.common.BaseController;
|
||||
import com.dbnt.kcscbackend.config.common.ResponseCode;
|
||||
|
|
@ -19,6 +20,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
|||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
||||
import org.springframework.validation.Errors;
|
||||
|
|
@ -34,345 +36,32 @@ import java.util.Map;
|
|||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/admin/config")
|
||||
@Tag(name="AdminConfigController", description = "사이트관리 환결설정 메뉴 컨트롤러")
|
||||
public class AdminConfigController extends BaseController {
|
||||
@RequestMapping("/admin/committee")
|
||||
@Tag(name="AdminCommitteeController", description = "사이트관리 위원회관리 메뉴 컨트롤러")
|
||||
public class AdminCommitteeController extends BaseController {
|
||||
|
||||
private final AdminConfigService adminConfigService;
|
||||
private final CommonCodeService commonCodeService;
|
||||
|
||||
@Resource(name = "adminCommitteeCodeManagementService")
|
||||
private AdminCommitteeCodeManagementService adminCommitteeCodeManagementService;
|
||||
@Resource(name = "adminCommitteeProgressStatusService")
|
||||
private AdminCommitteeProgressStatusService adminCommitteeProgressStatusService;
|
||||
|
||||
|
||||
@Operation(
|
||||
summary = "기본코드 그룹 조회",
|
||||
description = "기본코드 그룹 조회",
|
||||
tags = {"AdminConfigController"}
|
||||
summary = "'진행현황 관리' 페이지에서 목록 불러오는 API",
|
||||
description = "관리자 단에서 '위원회관리' > '진행현황 관리' 페이지에서 목록 불러오는 API",
|
||||
tags = {"AdminCommitteeController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/code-grp")
|
||||
public ResultVO getCodeGrp() throws Exception{
|
||||
ResultVO resultVO = new ResultVO();
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
resultMap.put("codeGrpList", adminConfigService.selectCodeGrpList());
|
||||
resultVO.setResult(resultMap);
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "기본코드 그룹 저장",
|
||||
description = "기본코드 그룹 저장",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "저장 성공"),
|
||||
@ApiResponse(responseCode = "303", description = "만료된 토큰"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@RequestMapping(method = RequestMethod.POST, value = "/code-grp", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResultVO addCodeGrp(@RequestBody TcCodeGrp codeGrp, @AuthenticationPrincipal LoginVO user) throws Exception{
|
||||
ResultVO resultVO = new ResultVO();
|
||||
if(user == null){
|
||||
resultVO.setResultCode(ResponseCode.TOKEN_EXPIRED.getCode());
|
||||
}else{
|
||||
if(!user.getUserSe().equals("ACC_TP01")){
|
||||
resultVO.setResultCode(ResponseCode.AUTH_ERROR.getCode());
|
||||
resultVO.setResultMessage(ResponseCode.AUTH_ERROR.getMessage());
|
||||
}else if(codeGrp.getGrpCd().isEmpty()){
|
||||
resultVO.setResultCode(ResponseCode.INPUT_CHECK_ERROR.getCode());
|
||||
resultVO.setResultMessage(ResponseCode.INPUT_CHECK_ERROR.getMessage());
|
||||
}else{
|
||||
codeGrp.setFrstCrtDt(LocalDateTime.now());
|
||||
codeGrp.setFrstCrtId(user.getId());
|
||||
codeGrp.setUseYn("Y");
|
||||
String result = adminConfigService.addCodeGrp(codeGrp);
|
||||
if(result.equals("isSaved")){
|
||||
resultVO.setResultCode(ResponseCode.SAVE_ERROR.getCode());
|
||||
resultVO.setResultMessage("중복되는 코드그룹이 있습니다.");
|
||||
}else{
|
||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "기본코드 그룹 수정",
|
||||
description = "기본코드 그룹 수정",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "수정 성공"),
|
||||
@ApiResponse(responseCode = "303", description = "만료된 토큰"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@RequestMapping(method = RequestMethod.PUT, value = "/code-grp", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResultVO modifyCodeGrp(@RequestBody TcCodeGrp codeGrp, @AuthenticationPrincipal LoginVO user) throws Exception{
|
||||
ResultVO resultVO = new ResultVO();
|
||||
if(user == null){
|
||||
resultVO.setResultCode(ResponseCode.TOKEN_EXPIRED.getCode());
|
||||
}else{
|
||||
if(!user.getUserSe().equals("ACC_TP01")){
|
||||
resultVO.setResultCode(ResponseCode.AUTH_ERROR.getCode());
|
||||
resultVO.setResultMessage(ResponseCode.AUTH_ERROR.getMessage());
|
||||
}else if(codeGrp.getGrpCd().isEmpty()){
|
||||
resultVO.setResultCode(ResponseCode.INPUT_CHECK_ERROR.getCode());
|
||||
resultVO.setResultMessage(ResponseCode.INPUT_CHECK_ERROR.getMessage());
|
||||
}else{
|
||||
codeGrp.setLastChgDt(LocalDateTime.now());
|
||||
codeGrp.setLastChgId(user.getId());
|
||||
String result = adminConfigService.modifyCodeGrp(codeGrp);
|
||||
if(result.equals("modified")){
|
||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||
}else{
|
||||
resultVO.setResultCode(ResponseCode.SAVE_ERROR.getCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "기본코드 아이템 조회",
|
||||
description = "기본코드 아이템 조회",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/code-item")
|
||||
public ResultVO getCodeItem(String grpCd) throws Exception{
|
||||
ResultVO resultVO = new ResultVO();
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
resultMap.put("codeItemList", adminConfigService.selectCodeItemList(grpCd));
|
||||
resultVO.setResult(resultMap);
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "기본코드 아이템 저장",
|
||||
description = "기본코드 아이템 저장",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "저장 성공"),
|
||||
@ApiResponse(responseCode = "303", description = "만료된 토큰"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@RequestMapping(method = RequestMethod.POST, value = "/code-item", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResultVO addCodeItem(@RequestBody TcCodeItem codeItem, @AuthenticationPrincipal LoginVO user) throws Exception{
|
||||
ResultVO resultVO = new ResultVO();
|
||||
if(user == null){
|
||||
resultVO.setResultCode(ResponseCode.TOKEN_EXPIRED.getCode());
|
||||
}else{
|
||||
if(!user.getUserSe().equals("ACC_TP01")){
|
||||
resultVO.setResultCode(ResponseCode.AUTH_ERROR.getCode());
|
||||
resultVO.setResultMessage(ResponseCode.AUTH_ERROR.getMessage());
|
||||
}else if(codeItem.getGrpCd()==null || codeItem.getGrpCd().isEmpty()){
|
||||
resultVO.setResultCode(ResponseCode.INPUT_CHECK_ERROR.getCode());
|
||||
resultVO.setResultMessage(ResponseCode.INPUT_CHECK_ERROR.getMessage());
|
||||
}else{
|
||||
codeItem.setFrstCrtDt(LocalDateTime.now());
|
||||
codeItem.setFrstCrtId(user.getId());
|
||||
codeItem.setUseYn("Y");
|
||||
String result = adminConfigService.addCodeItem(codeItem);
|
||||
if(result.equals("isSaved")){
|
||||
resultVO.setResultCode(ResponseCode.SAVE_ERROR.getCode());
|
||||
resultVO.setResultMessage("중복되는 코드가 있습니다.");
|
||||
}else{
|
||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "기본코드 아이템 수정",
|
||||
description = "기본코드 아이템 수정",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "수정 성공"),
|
||||
@ApiResponse(responseCode = "303", description = "만료된 토큰"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@RequestMapping(method = RequestMethod.PUT, value = "/code-item", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResultVO modifyCodeItem(@RequestBody TcCodeItem codeItem, @AuthenticationPrincipal LoginVO user) throws Exception{
|
||||
ResultVO resultVO = new ResultVO();
|
||||
if(user == null){
|
||||
resultVO.setResultCode(ResponseCode.TOKEN_EXPIRED.getCode());
|
||||
}else{
|
||||
if(!user.getUserSe().equals("ACC_TP01")){
|
||||
resultVO.setResultCode(ResponseCode.AUTH_ERROR.getCode());
|
||||
resultVO.setResultMessage(ResponseCode.AUTH_ERROR.getMessage());
|
||||
}else if(codeItem.getGrpCd().isEmpty()){
|
||||
resultVO.setResultCode(ResponseCode.INPUT_CHECK_ERROR.getCode());
|
||||
resultVO.setResultMessage(ResponseCode.INPUT_CHECK_ERROR.getMessage());
|
||||
}else{
|
||||
codeItem.setLastChgDt(LocalDateTime.now());
|
||||
codeItem.setLastChgId(user.getId());
|
||||
String result = adminConfigService.modifyCodeItem(codeItem);
|
||||
if(result.equals("modified")){
|
||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||
}else{
|
||||
resultVO.setResultCode(ResponseCode.SAVE_ERROR.getCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "메뉴 조회",
|
||||
description = "메뉴 조회",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/menu-mgt")
|
||||
public ResultVO getMenuMgt(){
|
||||
ResultVO resultVO = new ResultVO();
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
resultMap.put("menuList", adminConfigService.selectMenuList());
|
||||
resultVO.setResult(resultMap);
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "메뉴 저장",
|
||||
description = "메뉴 저장",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "저장 성공"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@RequestMapping(method = RequestMethod.PUT, value = "/menu-mgt")
|
||||
public ResultVO saveMenuMgt(@RequestBody @Valid TcMenu menu, Errors errors, @AuthenticationPrincipal LoginVO user){
|
||||
ResultVO resultVO = new ResultVO();
|
||||
if(user == null){
|
||||
resultVO.setResultCode(ResponseCode.TOKEN_EXPIRED.getCode());
|
||||
}else {
|
||||
menu.setRoleGrpId(menu.getMenuTypeCd().equals("MNU_0000")?"ADMIN_USER":"ALL_USER");
|
||||
if(errors.hasErrors()){
|
||||
StringBuilder msg = new StringBuilder();
|
||||
for(FieldError error: errors.getFieldErrors()){
|
||||
msg.append(error.getDefaultMessage());
|
||||
msg.append("\n");
|
||||
}
|
||||
resultVO.setResultCode(ResponseCode.INPUT_CHECK_ERROR.getCode());
|
||||
resultVO.setResultMessage(msg.toString());
|
||||
}else if (!user.getUserSe().equals("ACC_TP01")) {
|
||||
resultVO.setResultCode(ResponseCode.AUTH_ERROR.getCode());
|
||||
resultVO.setResultMessage(ResponseCode.AUTH_ERROR.getMessage());
|
||||
} else {
|
||||
adminConfigService.saveMenu(menu, user.getId());
|
||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||
}
|
||||
}
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "메뉴 삭제",
|
||||
description = "메뉴 삭제",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "삭제 성공"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/menu-mgt")
|
||||
public ResultVO removeMenuMgt(@RequestBody TcMenu menu, @AuthenticationPrincipal LoginVO user){
|
||||
ResultVO resultVO = new ResultVO();
|
||||
if(user == null){
|
||||
resultVO.setResultCode(ResponseCode.TOKEN_EXPIRED.getCode());
|
||||
}else {
|
||||
if (!user.getUserSe().equals("ACC_TP01")) {
|
||||
resultVO.setResultCode(ResponseCode.AUTH_ERROR.getCode());
|
||||
resultVO.setResultMessage(ResponseCode.AUTH_ERROR.getMessage());
|
||||
} else {
|
||||
String result = adminConfigService.deleteMenu(menu.getMenuId(), user.getId());
|
||||
if(result==null){
|
||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||
}else if(result.equals("notFind")){
|
||||
resultVO.setResultCode(ResponseCode.SAVE_ERROR.getCode());
|
||||
resultVO.setResultMessage("대상이 존재하지 않습니다.");
|
||||
}
|
||||
}
|
||||
}
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "메뉴 권한 조회",
|
||||
description = "메뉴 권한 조회",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/menu-auth-mgt")
|
||||
public ResultVO getMenuAuthMgt(){
|
||||
ResultVO resultVO = new ResultVO();
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
resultMap.put("menuList", adminConfigService.selectMenuAuthList());
|
||||
resultMap.put("roleList", commonCodeService.selectCodeItemList("ROLE"));
|
||||
resultVO.setResult(resultMap);
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "메뉴 권한 수정",
|
||||
description = "메뉴 권한 수정",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "수정 성공"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@RequestMapping(method = RequestMethod.PUT, value = "/menu-auth-mgt")
|
||||
public ResultVO editMenuAuthMgt(@RequestBody TcMenu menu, @AuthenticationPrincipal LoginVO user){
|
||||
ResultVO resultVO = new ResultVO();
|
||||
if(user == null){
|
||||
resultVO.setResultCode(ResponseCode.TOKEN_EXPIRED.getCode());
|
||||
}else {
|
||||
if (!user.getUserSe().equals("ACC_TP01")) {
|
||||
resultVO.setResultCode(ResponseCode.AUTH_ERROR.getCode());
|
||||
resultVO.setResultMessage(ResponseCode.AUTH_ERROR.getMessage());
|
||||
} else {
|
||||
adminConfigService.editMenuAuth(menu);
|
||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||
}
|
||||
}
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "'위원회 코드 관리' 페이지에서 목록 불러오는 API",
|
||||
description = "관리자 단에서 '환경설정' > '위원회코드 관리' 페이지에서 목록 불러오는 API",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||
@ApiResponse(responseCode = "200", description = "조 회 성공"),
|
||||
@ApiResponse(responseCode = "303", description = "만료된 토큰"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@GetMapping(value = "/committee-code-management")
|
||||
public ResultVO getCommitteeCodeManagement(
|
||||
@GetMapping(value = "/progress-status/list")
|
||||
public ResultVO getCommitteeProgressStatus(
|
||||
@AuthenticationPrincipal LoginVO user,
|
||||
HttpServletRequest request,
|
||||
@ApiParam(value="상위 code") @RequestParam(required=true) String paramCodeGroup,
|
||||
@ApiParam(value="code level") @RequestParam(required=true) String paramCodeLevel
|
||||
Pageable pageable
|
||||
) throws Exception {
|
||||
|
||||
ResultVO resultVO = new ResultVO();
|
||||
|
|
@ -380,11 +69,7 @@ public class AdminConfigController extends BaseController {
|
|||
resultVO.setResultCode(ResponseCode.TOKEN_EXPIRED.getCode());
|
||||
} else {
|
||||
try {
|
||||
Long upCmtSeq = null;
|
||||
if (!paramCodeGroup.equals("null")) {
|
||||
upCmtSeq = Long.parseLong(paramCodeGroup);
|
||||
}
|
||||
resultVO = adminCommitteeCodeManagementService.getCommitteeCodeManagement(resultVO, request, user, upCmtSeq, paramCodeLevel);
|
||||
resultVO = adminCommitteeProgressStatusService.getCommitteeProgressStatus(resultVO, request, user, pageable);
|
||||
} catch (Exception e) {
|
||||
resultVO.setResultCode(ResponseCode.FAILED.getCode());
|
||||
resultVO.setResultMessage(e.getMessage());
|
||||
|
|
@ -404,203 +89,4 @@ public class AdminConfigController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
@Operation(
|
||||
summary = "'위원회 코드 관리' 페이지에서 위원회 코드 추가하는 API",
|
||||
description = "관리자 단에서 '환경설정' > '위원회코드 관리' 페이지에서 +(추가) 버튼으로 항목 추가하는 API",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||
@ApiResponse(responseCode = "303", description = "만료된 토큰"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@PostMapping(value = "/committee-code-management")
|
||||
public ResultVO createCommitteeCodeManagement(
|
||||
@AuthenticationPrincipal LoginVO user,
|
||||
HttpServletRequest request,
|
||||
CreateCommitteeCodeManagementVO createCommitteeCodeManagementVO
|
||||
) throws Exception {
|
||||
|
||||
ResultVO resultVO = new ResultVO();
|
||||
if(user == null) {
|
||||
resultVO.setResultCode(ResponseCode.TOKEN_EXPIRED.getCode());
|
||||
} else {
|
||||
try {
|
||||
resultVO = adminCommitteeCodeManagementService.createCommitteeCodeManagement(resultVO, request, user, createCommitteeCodeManagementVO);
|
||||
} catch (Exception e) {
|
||||
resultVO.setResultCode(ResponseCode.FAILED.getCode());
|
||||
resultVO.setResultMessage(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " OUT:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"resultVO.toString():" + "\n" +
|
||||
resultVO.toString() + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "'위원회 코드 관리' 페이지에서 위원회 코드 삭제하는 API",
|
||||
description = "관리자 단에서 '환경설정' > '위원회코드 관리' 페이지에서 휴지통 모양 삭제 버튼으로 항목 삭제하는 API",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "등록 성공"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@DeleteMapping(value = "/committee-code-management/{orgId}")
|
||||
public ResultVO deleteSchedule
|
||||
(
|
||||
@AuthenticationPrincipal LoginVO user,
|
||||
HttpServletRequest request,
|
||||
@PathVariable("orgId") String strOrgId
|
||||
) throws Exception {
|
||||
|
||||
ResultVO resultVO = new ResultVO();
|
||||
Long orgId = Long.valueOf(strOrgId);
|
||||
try {
|
||||
resultVO = adminCommitteeCodeManagementService.deleteCommitteeCodeManagement(resultVO, request, user, orgId);
|
||||
} catch (Exception e) {
|
||||
resultVO.setResultCode(ResponseCode.FAILED.getCode());
|
||||
resultVO.setResultMessage(e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " OUT:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"resultVO.toString():" + "\n" +
|
||||
resultVO.toString() + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
return resultVO;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* ---- 관련사이트 관리 ----- */
|
||||
@Operation(
|
||||
summary = "관련사이트 목록 조회",
|
||||
description = "관련사이트 목록 조회",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/partner-site-list", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResultVO getPartnerSiteList() throws Exception {
|
||||
ResultVO resultVO = new ResultVO();
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
|
||||
resultMap.put("partnerSiteList", adminConfigService.selectPartnerSiteList());
|
||||
resultVO.setResult(resultMap);
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "관련사이트 저장",
|
||||
description = "관련사이트 저장",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "저장 성공"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@RequestMapping(method = RequestMethod.PUT, value = "/partner-site-mgt")
|
||||
public ResultVO savePartnerSite(@RequestBody @Valid TnPartnerSite tnPartnerSite, Errors errors, @AuthenticationPrincipal LoginVO user) {
|
||||
ResultVO resultVO = new ResultVO();
|
||||
if (user == null) {
|
||||
resultVO.setResultCode(ResponseCode.TOKEN_EXPIRED.getCode());
|
||||
} else {
|
||||
if (errors.hasErrors()) {
|
||||
StringBuilder msg = new StringBuilder();
|
||||
for (FieldError error : errors.getFieldErrors()) {
|
||||
msg.append(error.getDefaultMessage());
|
||||
msg.append("\n");
|
||||
}
|
||||
resultVO.setResultCode(ResponseCode.INPUT_CHECK_ERROR.getCode());
|
||||
resultVO.setResultMessage(msg.toString());
|
||||
} else {
|
||||
System.out.println("@@@ bbs.getBbsSeq() : " + tnPartnerSite.getSiteSeq());
|
||||
adminConfigService.savePartnerSite(tnPartnerSite, user.getId());
|
||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||
}
|
||||
}
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "관련사이트 삭제",
|
||||
description = "관련사이트 삭제",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "삭제 성공"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/partner-site-mgt")
|
||||
public ResultVO removePartnerSite(@RequestBody TnPartnerSite tnPartnerSite, @AuthenticationPrincipal LoginVO user) {
|
||||
ResultVO resultVO = new ResultVO();
|
||||
if (user == null) {
|
||||
resultVO.setResultCode(ResponseCode.TOKEN_EXPIRED.getCode());
|
||||
} else {
|
||||
String result = adminConfigService.deletePartnerSite(tnPartnerSite, user.getId());
|
||||
if (result == null) {
|
||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||
} else if (result.equals("notFind")) {
|
||||
resultVO.setResultCode(ResponseCode.SAVE_ERROR.getCode());
|
||||
resultVO.setResultMessage("대상이 존재하지 않습니다.");
|
||||
}
|
||||
}
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "'위원회 코드 관리' 페이지에서 위원회 코드 수정하는 API",
|
||||
description = "관리자 단에서 '환경설정' > '위원회코드 관리' 페이지에서 연필 모양 수정 버튼으로 항목 수정하는 API",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "등록 성공"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님"),
|
||||
})
|
||||
@PutMapping(value = "/committee-code-management/{orgId}")
|
||||
public ResultVO setCommitteeCodeManagement(
|
||||
HttpServletRequest request,
|
||||
@AuthenticationPrincipal LoginVO loginVO,
|
||||
SetCommitteeCodeManagementVO setCommitteeCodeManagementVO,
|
||||
@PathVariable("orgId") Long orgId
|
||||
) throws Exception {
|
||||
ResultVO resultVO = new ResultVO();
|
||||
|
||||
try {
|
||||
resultVO = adminCommitteeCodeManagementService.setCommitteeCodeManagement(resultVO, request, loginVO, setCommitteeCodeManagementVO, orgId);
|
||||
} catch (Exception e) {
|
||||
resultVO.setResultCode(ResponseCode.FAILED.getCode());
|
||||
resultVO.setResultMessage(e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " OUT:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"resultVO.toString():" + "\n" +
|
||||
resultVO.toString() + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
return resultVO;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,10 @@
|
|||
package com.dbnt.kcscbackend.admin.config.entity;
|
||||
package com.dbnt.kcscbackend.admin.committee.entity;
|
||||
|
||||
import lombok.*;
|
||||
import org.hibernate.annotations.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
|
|
@ -16,24 +12,82 @@ import java.time.LocalDateTime;
|
|||
@NoArgsConstructor
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@Table(name = "tb_menu_role")
|
||||
@IdClass(TbMenuRole.TbMenuRoleId.class)
|
||||
public class TbMenuRole {
|
||||
@Id
|
||||
@Column(name = "role_id")
|
||||
private String roleId;
|
||||
@Id
|
||||
@Column(name = "menu_id")
|
||||
private String menuId;
|
||||
@Column(name = "write_yn")
|
||||
private String writeYn;
|
||||
@Table(name = "tn_cmt_draft")
|
||||
public class TnCmtDraft {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "drft_seq")
|
||||
private Long drftSeq;
|
||||
|
||||
@Column(name = "drft_title")
|
||||
private String drftTitle;
|
||||
|
||||
@Column(name = "doc_info_seq")
|
||||
private Long docInfoSeq;
|
||||
|
||||
@Column(name = "drft_type_cd")
|
||||
private String drftTypeCd;
|
||||
|
||||
@Column(name = "drft_dt")
|
||||
private String drftDt;
|
||||
|
||||
@Column(name = "cmt_seq")
|
||||
private Long cmtSeq;
|
||||
|
||||
@Column(name = "measure_pre_data_file_grp_id")
|
||||
private String measurePreDataFileGrpId;
|
||||
|
||||
@Column(name = "measure_pre_form_file_grp_id")
|
||||
private String measurePreFormFileGrpId;
|
||||
|
||||
@Column(name = "measure_partner_file_grp_id")
|
||||
private String measurePartnerFileGrpId;
|
||||
|
||||
@Column(name = "drft_confe_charger")
|
||||
private String drftConfeCharger;
|
||||
|
||||
@Column(name = "drft_confe_pw")
|
||||
private String drftConfePw;
|
||||
|
||||
@Column(name = "drft_confe_room")
|
||||
private String drftConfeRoom;
|
||||
|
||||
@Column(name = "drft_stat_cd")
|
||||
private String drftStatCd;
|
||||
|
||||
@Column(name = "drft_summery")
|
||||
private String drftSummery;
|
||||
|
||||
@Column(name = "measure_plan_file_grp_id")
|
||||
private String measurePlanFileGrpId;
|
||||
|
||||
@Column(name = "measure_result_file_grp_id")
|
||||
private String measureResultFileGrpId;
|
||||
|
||||
@Column(name = "start_dt")
|
||||
private String startDt;
|
||||
|
||||
@Column(name = "end_dt")
|
||||
private String endDt;
|
||||
|
||||
@Column(name = "frst_crt_id")
|
||||
private String frstCrtId;
|
||||
|
||||
@Column(name = "frst_crt_dt")
|
||||
private String frstCrtDt;
|
||||
|
||||
@Column(name = "last_chg_id")
|
||||
private String lastChgId;
|
||||
|
||||
@Column(name = "last_chg_dt")
|
||||
private String lastChgDt;
|
||||
|
||||
@Column(name = "use_yn")
|
||||
private String useYn;
|
||||
|
||||
@Column(name = "old_seq")
|
||||
private Long oldSeq;
|
||||
|
||||
|
||||
@Embeddable
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class TbMenuRoleId implements Serializable {
|
||||
private String roleId;
|
||||
private String menuId;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.dbnt.kcscbackend.admin.committee.entity;
|
||||
|
||||
import lombok.*;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
|
|
@ -12,82 +14,33 @@ import javax.persistence.*;
|
|||
@NoArgsConstructor
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@Table(name = "tn_cmt_draft")
|
||||
public class TnCmtDraft {
|
||||
@Table(name = "tn_cmt_draft_attend")
|
||||
public class TnCmtDraftAttend {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "drft_atd_seq")
|
||||
private Long drftAtdSeq;
|
||||
|
||||
@Column(name = "drft_seq")
|
||||
private String drftSeq;
|
||||
private Long drftSeq;
|
||||
|
||||
@Column(name = "drft_title")
|
||||
private String drftTitle;
|
||||
@Column(name = "drft_final_type")
|
||||
private String drftFinalType;
|
||||
|
||||
@Column(name = "doc_info_seq")
|
||||
private String docInfoSeq;
|
||||
@Column(name = "drft_final_comment")
|
||||
private String drftFinalComment;
|
||||
|
||||
@Column(name = "drft_type_cd")
|
||||
private String drftTypeCd;
|
||||
@Column(name = "user_id")
|
||||
private String userId;
|
||||
|
||||
@Column(name = "drft_dt")
|
||||
private String drftDt;
|
||||
@Column(name = "nick_name")
|
||||
private String nickName;
|
||||
|
||||
@Column(name = "cmt_seq")
|
||||
private String cmtSeq;
|
||||
|
||||
@Column(name = "measure_pre_data_file_grp_id")
|
||||
private String measurePreDataFileGrpId;
|
||||
|
||||
@Column(name = "measure_pre_form_file_grp_id")
|
||||
private String measurePreFormFileGrpId;
|
||||
|
||||
@Column(name = "measure_partner_file_grp_id")
|
||||
private String measurePartnerFileGrpId;
|
||||
|
||||
@Column(name = "drft_confe_charger")
|
||||
private String drftConfeCharger;
|
||||
|
||||
@Column(name = "drft_confe_pw")
|
||||
private String drftConfePw;
|
||||
|
||||
@Column(name = "drft_confe_room")
|
||||
private String drftConfeRoom;
|
||||
|
||||
@Column(name = "drft_stat_cd")
|
||||
private String drftStatCd;
|
||||
|
||||
@Column(name = "drft_summery")
|
||||
private String drftSummery;
|
||||
|
||||
@Column(name = "measure_plan_file_grp_id")
|
||||
private String measurePlanFileGrpId;
|
||||
|
||||
@Column(name = "measure_result_file_grp_id")
|
||||
private String measureResultFileGrpId;
|
||||
|
||||
@Column(name = "start_dt")
|
||||
private String startDt;
|
||||
|
||||
@Column(name = "end_dt")
|
||||
private String endDt;
|
||||
|
||||
@Column(name = "frst_crt_id")
|
||||
private String frstCrtId;
|
||||
|
||||
@Column(name = "frst_crt_dt")
|
||||
private String frstCrtDt;
|
||||
|
||||
@Column(name = "last_chg_id")
|
||||
private String lastChgId;
|
||||
|
||||
@Column(name = "last_chg_dt")
|
||||
private String lastChgDt;
|
||||
|
||||
@Column(name = "use_yn")
|
||||
private String useYn;
|
||||
|
||||
@Column(name = "old_seq")
|
||||
private String oldSeq;
|
||||
@Column(name = "write_dt")
|
||||
private String writeDt;
|
||||
|
||||
@Column(name = "drft_file_grp_id")
|
||||
private String drftFileGrpId;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,22 +14,22 @@ import javax.persistence.*;
|
|||
@NoArgsConstructor
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@Table(name = "tn_cmt_draft_attend")
|
||||
public class TnCmtDraftAttend {
|
||||
@Table(name = "tn_cmt_draft_detail")
|
||||
public class TnCmtDraftDetail {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "drft_atd_seq")
|
||||
private Long drftAtdSeq;
|
||||
@Column(name = "drft_dt_seq")
|
||||
private Long drftDtSeq;
|
||||
|
||||
@Column(name = "drft_seq")
|
||||
private Long drftSeq;
|
||||
|
||||
@Column(name = "drft_final_type")
|
||||
private String drftFinalType;
|
||||
@Column(name = "drft_dt_type")
|
||||
private String drftDtType;
|
||||
|
||||
@Column(name = "drft_final_comment")
|
||||
private String drftFinalComment;
|
||||
@Column(name = "drft_dt_value")
|
||||
private String drftDtValue;
|
||||
|
||||
@Column(name = "user_id")
|
||||
private String userId;
|
||||
|
|
|
|||
|
|
@ -1,23 +1,18 @@
|
|||
package com.dbnt.kcscbackend.admin.config.service;
|
||||
package com.dbnt.kcscbackend.admin.committee.service;
|
||||
|
||||
import com.dbnt.kcscbackend.admin.config.model.CreateCommitteeCodeManagementVO;
|
||||
import com.dbnt.kcscbackend.admin.config.model.SetCommitteeCodeManagementVO;
|
||||
import com.dbnt.kcscbackend.admin.standardResearch.model.CreateStandardResearchVO;
|
||||
import com.dbnt.kcscbackend.admin.standardResearch.model.UpdateStandardResearchVO;
|
||||
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||
import com.dbnt.kcscbackend.config.common.ResultVO;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public interface AdminCommitteeCodeManagementService {
|
||||
public ResultVO createCommitteeCodeManagement(ResultVO resultVO, HttpServletRequest request, LoginVO user, CreateCommitteeCodeManagementVO createCommitteeCodeManagementVO) throws Exception;
|
||||
public ResultVO getCommitteeCodeManagement(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long upCmtSeq, String cmtType) throws Exception;
|
||||
public ResultVO setCommitteeCodeManagement(ResultVO resultVO, HttpServletRequest request, LoginVO user, SetCommitteeCodeManagementVO setCommitteeCodeManagementVO, Long cmtSeq) throws Exception;
|
||||
public ResultVO deleteCommitteeCodeManagement(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long cmtSeq) throws Exception;
|
||||
public interface AdminCommitteeProgressStatusService {
|
||||
public ResultVO createCommitteeProgressStatus(ResultVO resultVO, HttpServletRequest request, LoginVO user, CreateCommitteeCodeManagementVO createCommitteeCodeManagementVO) throws Exception;
|
||||
public ResultVO getCommitteeProgressStatus(ResultVO resultVO, HttpServletRequest request, LoginVO user, Pageable pageable) throws Exception;
|
||||
public ResultVO setCommitteeProgressStatus(ResultVO resultVO, HttpServletRequest request, LoginVO user, SetCommitteeCodeManagementVO setCommitteeCodeManagementVO, Long cmtSeq) throws Exception;
|
||||
public ResultVO deleteCommitteeProgressStatus(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long cmtSeq) throws Exception;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,38 +1,38 @@
|
|||
package com.dbnt.kcscbackend.admin.config.service.impl;
|
||||
package com.dbnt.kcscbackend.admin.committee.service.impl;
|
||||
|
||||
import com.dbnt.kcscbackend.admin.committee.entity.TnCmtDraft;
|
||||
import com.dbnt.kcscbackend.admin.committee.entity.TnCmtDraftAttend;
|
||||
import com.dbnt.kcscbackend.admin.committee.service.AdminCommitteeProgressStatusService;
|
||||
import com.dbnt.kcscbackend.admin.config.model.CreateCommitteeCodeManagementVO;
|
||||
import com.dbnt.kcscbackend.admin.config.model.SetCommitteeCodeManagementVO;
|
||||
import com.dbnt.kcscbackend.admin.config.service.AdminCommitteeCodeManagementService;
|
||||
import com.dbnt.kcscbackend.admin.standardResearch.model.CreateStandardResearchVO;
|
||||
import com.dbnt.kcscbackend.admin.standardResearch.model.UpdateStandardResearchVO;
|
||||
import com.dbnt.kcscbackend.admin.contents.popUp.model.FileVO;
|
||||
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||
import com.dbnt.kcscbackend.commonCode.entity.TnCmtOrg;
|
||||
import com.dbnt.kcscbackend.commonCode.repository.TnCmtOrgRepository;
|
||||
import com.dbnt.kcscbackend.commonCode.repository.TnCmtDraftAttendRepository;
|
||||
import com.dbnt.kcscbackend.commonCode.repository.TnCmtDraftDetailRepository;
|
||||
import com.dbnt.kcscbackend.commonCode.repository.TnCmtDraftRepository;
|
||||
import com.dbnt.kcscbackend.config.common.ResponseCode;
|
||||
import com.dbnt.kcscbackend.config.common.ResultVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service("adminCommitteeCodeManagementService")
|
||||
@Service("adminCommitteeProgressStatusService")
|
||||
@RequiredArgsConstructor
|
||||
public class AdminCommitteeCodeManagementServiceImpl extends EgovAbstractServiceImpl implements AdminCommitteeCodeManagementService {
|
||||
public class AdminCommitteeProgressStatusServiceImpl extends EgovAbstractServiceImpl implements AdminCommitteeProgressStatusService {
|
||||
|
||||
private final TnCmtOrgRepository tnCmtOrgRepository;
|
||||
private final TnCmtDraftRepository tnCmtDraftRepository;
|
||||
private final TnCmtDraftAttendRepository tnCmtDraftAttendRepository;
|
||||
private final TnCmtDraftDetailRepository tnCmtDraftDetailRepository;
|
||||
|
||||
@Override
|
||||
public ResultVO createCommitteeCodeManagement(ResultVO resultVO, HttpServletRequest request, LoginVO user, CreateCommitteeCodeManagementVO createCommitteeCodeManagementVO) throws Exception {
|
||||
public ResultVO createCommitteeProgressStatus(ResultVO resultVO, HttpServletRequest request, LoginVO user, CreateCommitteeCodeManagementVO createCommitteeCodeManagementVO) throws Exception {
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN:" +
|
||||
|
|
@ -47,17 +47,24 @@ public class AdminCommitteeCodeManagementServiceImpl extends EgovAbstractService
|
|||
if(createCommitteeCodeManagementVO.getParamCodeLevel().trim().isEmpty()) {
|
||||
throw new Exception("오류가 발생했습니다. 시스템 담당자에게 문의 바랍니다. paramCodeLevel is empty.");
|
||||
}
|
||||
Integer upCmtSeq = null;
|
||||
if( createCommitteeCodeManagementVO.getParamOrgId().trim().equals("00") == false ) { // 00은 '중앙건설기술심의' 항목의 부모 sequnce이다. 그러나 DB에 실제 00이란 sequence는 존재하지 않는다.
|
||||
upCmtSeq = Integer.parseInt(createCommitteeCodeManagementVO.getParamOrgId());
|
||||
}
|
||||
|
||||
Map<String, Object> response = tnCmtOrgRepository.spAddTnCmtOrg(
|
||||
Map<String, Object> response = tnCmtDraftRepository.spAddTnCmtDraft(
|
||||
createCommitteeCodeManagementVO.getParamOrgNm(), // 위원회 이름
|
||||
createCommitteeCodeManagementVO.getParamCodeLevel(), // 위원회 등급
|
||||
null, // 위원회 등급
|
||||
createCommitteeCodeManagementVO.getParamOrgDesc(), // 위원회 설명
|
||||
upCmtSeq, // 상위 위원회 sequence
|
||||
1, // 정렬 순서
|
||||
null, // 상위 위원회 sequence
|
||||
null, // 정렬 순서
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
user.getId(),
|
||||
null,
|
||||
null,
|
||||
|
|
@ -76,7 +83,7 @@ public class AdminCommitteeCodeManagementServiceImpl extends EgovAbstractService
|
|||
}
|
||||
|
||||
@Override
|
||||
public ResultVO getCommitteeCodeManagement(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long upCmtSeq, String cmtType) throws Exception {
|
||||
public ResultVO getCommitteeProgressStatus(ResultVO resultVO, HttpServletRequest request, LoginVO user, Pageable pageable) throws Exception {
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
|
|
@ -84,23 +91,38 @@ public class AdminCommitteeCodeManagementServiceImpl extends EgovAbstractService
|
|||
"\n--------------------------------------------------------------\n" +
|
||||
"user.getEmail():" + "\n" +
|
||||
user.getEmail() + "\n" +
|
||||
"pageable.getPageSize():" + "\n" +
|
||||
pageable.getPageSize() + "\n" +
|
||||
"pageable.getPageNumber():" + "\n" +
|
||||
pageable.getPageNumber() + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
List<Map<String, Object>> list = tnCmtOrgRepository.findByUseYnAndUpCmtSeqAndCmtTypeOrderByCmtOrder("Y", upCmtSeq, cmtType).stream()
|
||||
.map(item -> {
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
returnMap.put("orgId", item.getCmtSeq());
|
||||
returnMap.put("orgNm", item.getCmtNm());
|
||||
returnMap.put("orgDesc", item.getCmtDesc());
|
||||
returnMap.put("omtOrder", item.getCmtOrder());
|
||||
returnMap.put("upCmtSeq", item.getUpCmtSeq());
|
||||
return returnMap;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
long totalRecordCount = tnCmtDraftRepository.findByUseYnOrderByDrftSeqDesc("Y").size();
|
||||
List<Map<String, Object>> itemList = tnCmtDraftRepository.getCommitteeProgressStatus(pageable.getPageSize(),pageable.getPageNumber());
|
||||
AtomicInteger index = new AtomicInteger();
|
||||
for (Map<String, Object> item : itemList) {
|
||||
|
||||
Map<String, Object> item2 = new HashMap<>();
|
||||
for (String key : item.keySet()) {
|
||||
item2.put(key, item.get(key));
|
||||
}
|
||||
item2.put("number", totalRecordCount - (long) pageable.getPageNumber() * pageable.getPageSize() - index.getAndIncrement());
|
||||
list.add(item2);
|
||||
}
|
||||
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(pageable.getPageNumber()+1);
|
||||
paginationInfo.setRecordCountPerPage(pageable.getPageSize());
|
||||
paginationInfo.setPageSize(5);//hard coded
|
||||
paginationInfo.setTotalRecordCount((int) totalRecordCount);
|
||||
|
||||
Map<String, Object> dto = new HashMap<String, Object>();
|
||||
|
||||
dto.put("list", list);
|
||||
dto.put("paginationInfo", paginationInfo);
|
||||
resultVO.setResult(dto);
|
||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
|
||||
|
|
@ -109,7 +131,7 @@ public class AdminCommitteeCodeManagementServiceImpl extends EgovAbstractService
|
|||
}
|
||||
|
||||
@Override
|
||||
public ResultVO setCommitteeCodeManagement(ResultVO resultVO, HttpServletRequest request, LoginVO user, SetCommitteeCodeManagementVO setCommitteeCodeManagementVO, Long cmtSeq) throws Exception {
|
||||
public ResultVO setCommitteeProgressStatus(ResultVO resultVO, HttpServletRequest request, LoginVO user, SetCommitteeCodeManagementVO setCommitteeCodeManagementVO, Long cmtSeq) throws Exception {
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN:" +
|
||||
|
|
@ -122,23 +144,37 @@ public class AdminCommitteeCodeManagementServiceImpl extends EgovAbstractService
|
|||
);
|
||||
|
||||
// 유효성 검사 실시
|
||||
int isValid = tnCmtOrgRepository.spIsValidTnCmtOrgId(cmtSeq.intValue());
|
||||
int isValid = tnCmtDraftRepository.spIsValidTnCmtDraftId(cmtSeq.intValue());
|
||||
|
||||
if( isValid == 0 ) {
|
||||
throw new Exception("대상이 존재하지 않습니다.");
|
||||
}
|
||||
|
||||
TnCmtOrg tnCmtOrg = tnCmtOrgRepository.findByCmtSeq(cmtSeq);
|
||||
//TnCmtDraft tnCmtDraft = tnCmtDraftRepository.findByDrftSeq(cmtSeq);
|
||||
|
||||
Map<String, Object> response = tnCmtOrgRepository.spUpdateTnCmtOrg(
|
||||
Map<String, Object> response = tnCmtDraftRepository.spUpdateTnCmtDraft(
|
||||
cmtSeq.intValue(),
|
||||
setCommitteeCodeManagementVO.getParamOrgNm(),
|
||||
setCommitteeCodeManagementVO.getParamOrgDesc(),
|
||||
tnCmtOrg.getCmtOrder(),
|
||||
user.getId(),
|
||||
null,
|
||||
null,
|
||||
null
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
user.getId(),
|
||||
null,
|
||||
null,
|
||||
null
|
||||
);
|
||||
|
||||
|
||||
|
|
@ -154,7 +190,7 @@ public class AdminCommitteeCodeManagementServiceImpl extends EgovAbstractService
|
|||
}
|
||||
|
||||
@Override
|
||||
public ResultVO deleteCommitteeCodeManagement(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long cmtSeq) throws Exception {
|
||||
public ResultVO deleteCommitteeProgressStatus(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long cmtSeq) throws Exception {
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN:" +
|
||||
|
|
@ -165,7 +201,7 @@ public class AdminCommitteeCodeManagementServiceImpl extends EgovAbstractService
|
|||
);
|
||||
|
||||
|
||||
Map<String, Object> response = tnCmtOrgRepository.spDeleteTnCmtOrg(
|
||||
Map<String, Object> response = tnCmtDraftRepository.spDeleteTnCmtDraft(
|
||||
cmtSeq.intValue(),
|
||||
user.getId(),
|
||||
null,
|
||||
|
|
@ -173,9 +209,6 @@ public class AdminCommitteeCodeManagementServiceImpl extends EgovAbstractService
|
|||
null
|
||||
);
|
||||
|
||||
// 자식 코드들을 모두 제거한다.
|
||||
getChildrenOrg(user, cmtSeq);
|
||||
|
||||
|
||||
Map<String, Object> dto = new HashMap<String, Object>();
|
||||
dto.put("errorMessage", response.get("_error_message") );
|
||||
|
|
@ -188,22 +221,4 @@ public class AdminCommitteeCodeManagementServiceImpl extends EgovAbstractService
|
|||
return resultVO;
|
||||
}
|
||||
|
||||
private void getChildrenOrg(LoginVO user, Long upCmtSeq) {
|
||||
List<Map<String, Object>> list = tnCmtOrgRepository.findByUpCmtSeq(upCmtSeq).stream()
|
||||
.map(item -> {
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
returnMap.put("cmtSeq", item.getCmtSeq());
|
||||
getChildrenOrg( user, item.getCmtSeq() );
|
||||
Map<String, Object> response = tnCmtOrgRepository.spDeleteTnCmtOrg(
|
||||
item.getCmtSeq().intValue(),
|
||||
user.getId(),
|
||||
null,
|
||||
null,
|
||||
null
|
||||
);
|
||||
return returnMap;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
System.out.println("for Debugging");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.dbnt.kcscbackend.commonCode.repository;
|
||||
|
||||
import com.dbnt.kcscbackend.admin.committee.entity.TnCmtDraftAttend;
|
||||
import com.dbnt.kcscbackend.commonCode.entity.TnPopupMng;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
|
|
@ -8,8 +9,8 @@ import org.springframework.data.repository.query.Param;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public interface TnCmtDraftRepository extends JpaRepository<TnPopupMng, Long> {
|
||||
/** 작성 중 ...*/
|
||||
public interface TnCmtDraftAttendRepository extends JpaRepository<TnCmtDraftAttend, Long> {
|
||||
|
||||
@Query(value = "CALL sp_add_tn_popup_mng (" +
|
||||
":_popup_title, " +
|
||||
|
|
@ -94,7 +95,7 @@ public interface TnCmtDraftRepository extends JpaRepository<TnPopupMng, Long> {
|
|||
@Procedure("sp_is_valid_tn_popup_mng_id")
|
||||
int spIsValidTnPopupMngId( Integer popupSeq );
|
||||
|
||||
TnPopupMng findByPopupSeq(Long popupSeq);
|
||||
TnCmtDraftAttend findByDrftAtdSeq(Long drftAtdSeq);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.dbnt.kcscbackend.commonCode.repository;
|
||||
|
||||
import com.dbnt.kcscbackend.admin.committee.entity.TnCmtDraftDetail;
|
||||
import com.dbnt.kcscbackend.commonCode.entity.TnPopupMng;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
|
|
@ -8,8 +9,8 @@ import org.springframework.data.repository.query.Param;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public interface TnCmtDraftAttendRepository extends JpaRepository<TnPopupMng, Long> {
|
||||
/** 작성 중 ...*/
|
||||
public interface TnCmtDraftDetailRepository extends JpaRepository<TnCmtDraftDetail, Long> {
|
||||
|
||||
@Query(value = "CALL sp_add_tn_popup_mng (" +
|
||||
":_popup_title, " +
|
||||
|
|
@ -94,7 +95,7 @@ public interface TnCmtDraftAttendRepository extends JpaRepository<TnPopupMng, Lo
|
|||
@Procedure("sp_is_valid_tn_popup_mng_id")
|
||||
int spIsValidTnPopupMngId( Integer popupSeq );
|
||||
|
||||
TnPopupMng findByPopupSeq(Long popupSeq);
|
||||
TnCmtDraftDetail findByDrftDtSeq(Long drftDtSeq);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.dbnt.kcscbackend.commonCode.repository;
|
||||
|
||||
import com.dbnt.kcscbackend.commonCode.entity.TnCmtEvent;
|
||||
import com.dbnt.kcscbackend.admin.committee.entity.TnCmtDraft;
|
||||
import com.dbnt.kcscbackend.commonCode.entity.TnPopupMng;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
|
|
@ -11,81 +11,115 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
|
||||
public interface TnPopupMngRepository extends JpaRepository<TnPopupMng, Long> {
|
||||
public interface TnCmtDraftRepository extends JpaRepository<TnCmtDraft, Long> {
|
||||
|
||||
@Query(value = "CALL sp_add_tn_popup_mng (" +
|
||||
":_popup_title, " +
|
||||
"TO_TIMESTAMP(" +
|
||||
" :_popup_start_date," +
|
||||
" 'YYYYMMDDHH24MISS'" +
|
||||
")::::timestamptz AT TIME ZONE 'UTC', " +
|
||||
"TO_TIMESTAMP(" +
|
||||
" :_popup_end_date," +
|
||||
" 'YYYYMMDDHH24MISS'" +
|
||||
")::::timestamptz AT TIME ZONE 'UTC', " +
|
||||
":_file_grp_id, " +
|
||||
":_popup_contents, " +
|
||||
@Query(value = "CALL sp_add_tn_cmt_draft (" +
|
||||
":_drft_title, " +
|
||||
":_drft_type_cd, " +
|
||||
":_drft_dt, " +
|
||||
":_cmt_seq, " +
|
||||
":_measure_pre_data_file_grp_id, " +
|
||||
":_measure_pre_form_file_grp_id, " +
|
||||
":_measure_partner_file_grp_id, " +
|
||||
":_drft_confe_charger, " +
|
||||
":_drft_confe_pw, " +
|
||||
":_drft_confe_room, " +
|
||||
":_drft_stat_cd, " +
|
||||
":_drft_summery, " +
|
||||
":_measure_plan_file_grp_id, " +
|
||||
":_measure_result_file_grp_id, " +
|
||||
":_start_dt, " +
|
||||
":_end_dt, " +
|
||||
":_modi_id, " +
|
||||
":_popup_seq, " +
|
||||
":_drft_seq, " +
|
||||
":_result_count, " +
|
||||
":_result_code, " +
|
||||
":_error_message)",
|
||||
nativeQuery = true)
|
||||
Map<String, Object> spAddTnPopupMng(
|
||||
@Param("_popup_title") String popupTitle,
|
||||
@Param("_popup_start_date") String popupStartDate,
|
||||
@Param("_popup_end_date") String popupEndDate,
|
||||
@Param("_file_grp_id") String fileGrpId,
|
||||
@Param("_popup_contents") String popupContents,
|
||||
@Param("_modi_id") String modiId,
|
||||
@Param("_popup_seq") Integer popupSeq,
|
||||
@Param("_result_count") Integer resultCount,
|
||||
@Param("_result_code") String resultCode,
|
||||
@Param("_error_message") String errorMessage
|
||||
Map<String, Object> spAddTnCmtDraft(
|
||||
@Param("_drft_title") String drftTitle,
|
||||
@Param("_drft_type_cd") Integer drftTypeCd,
|
||||
@Param("_drft_dt") String drftDt,
|
||||
@Param("_cmt_seq") Integer cmtSeq,
|
||||
@Param("_measure_pre_data_file_grp_id") String measurePreDataFileGrpId,
|
||||
@Param("_measure_pre_form_file_grp_id") String measurePreFormFileGrpId,
|
||||
@Param("_measure_partner_file_grp_id") String measurePartnerFileGrpId,
|
||||
@Param("_drft_confe_charger") String drftConfeCharger,
|
||||
@Param("_drft_confe_pw") String drftConfePw,
|
||||
@Param("_drft_confe_room") String drftConfeRoom,
|
||||
@Param("_drft_stat_cd") String drftStatCd,
|
||||
@Param("_drft_summery") String drftSummery,
|
||||
@Param("_measure_plan_file_grp_id") String measurePlanFileGrpId,
|
||||
@Param("_measure_result_file_grp_id") String measureResultFileGrpId,
|
||||
@Param("_start_dt") String startDt,
|
||||
@Param("_end_dt") String endDt,
|
||||
@Param("_modi_id") String modiId,
|
||||
@Param("_drft_seq") Integer drftSeq,
|
||||
@Param("_result_count") Integer resultCount,
|
||||
@Param("_result_code") String resultCode,
|
||||
@Param("_error_message") String errorMessage
|
||||
);
|
||||
|
||||
|
||||
@Query(value = "CALL sp_update_tn_popup_mng (" +
|
||||
":_popup_seq, " +
|
||||
":_popup_title, " +
|
||||
"TO_TIMESTAMP(" +
|
||||
" :_popup_start_date," +
|
||||
" 'YYYYMMDDHH24MISS'" +
|
||||
")::::timestamptz AT TIME ZONE 'UTC', " +
|
||||
"TO_TIMESTAMP(" +
|
||||
" :_popup_end_date," +
|
||||
" 'YYYYMMDDHH24MISS'" +
|
||||
")::::timestamptz AT TIME ZONE 'UTC', " +
|
||||
":_file_grp_id, " +
|
||||
":_popup_contents, " +
|
||||
@Query(value = "CALL sp_update_tn_cmt_draft (" +
|
||||
":_drft_seq, " +
|
||||
":_drft_title, " +
|
||||
":_doc_info_seq, " +
|
||||
":_drft_type_cd, " +
|
||||
":_drft_dt, " +
|
||||
":_cmt_seq, " +
|
||||
":_measure_pre_data_file_grp_id, " +
|
||||
":_measure_pre_form_file_grp_id, " +
|
||||
":_measure_partner_file_grp_id, " +
|
||||
":_drft_confe_charger, " +
|
||||
":_drft_confe_pw, " +
|
||||
":_drft_confe_room, " +
|
||||
":_drft_stat_cd, " +
|
||||
":_drft_summery, " +
|
||||
":_measure_plan_file_grp_id, " +
|
||||
":_measure_result_file_grp_id, " +
|
||||
":_start_dt, " +
|
||||
":_end_dt, " +
|
||||
":_modi_id, " +
|
||||
":_result_count, " +
|
||||
":_result_code, " +
|
||||
":_error_message)",
|
||||
nativeQuery = true)
|
||||
Map<String, Object> spUpdateTnPopupMng(
|
||||
@Param("_popup_seq") Integer popupSeq,
|
||||
@Param("_popup_title") String popupTitle,
|
||||
@Param("_popup_start_date") String popupStartDate,
|
||||
@Param("_popup_end_date") String popupEndDate,
|
||||
@Param("_file_grp_id") String fileGrpId,
|
||||
@Param("_popup_contents") String popupContents,
|
||||
@Param("_modi_id") String modiId,
|
||||
@Param("_result_count") Integer resultCount,
|
||||
@Param("_result_code") String resultCode,
|
||||
@Param("_error_message") String errorMessage
|
||||
Map<String, Object> spUpdateTnCmtDraft(
|
||||
@Param("_drft_seq") Integer drftSeq,
|
||||
@Param("_drft_title") String drftTitle,
|
||||
@Param("_doc_info_seq") Integer docInfoSeq,
|
||||
@Param("_drft_type_cd") String drftTypeCd,
|
||||
@Param("_drft_dt") String drftDt,
|
||||
@Param("_cmt_seq") Integer cmtSeq,
|
||||
@Param("_measure_pre_data_file_grp_id") String measurePreDataFileGrpId,
|
||||
@Param("_measure_pre_form_file_grp_id") String measurePreFormFileGrpId,
|
||||
@Param("_measure_partner_file_grp_id") String measurePartnerFileGrpId,
|
||||
@Param("_drft_confe_charger") String drftConfeCharger,
|
||||
@Param("_drft_confe_pw") String drftConfePw,
|
||||
@Param("_drft_confe_room") String drftConfeRoom,
|
||||
@Param("_drft_stat_cd") String drftStatCd,
|
||||
@Param("_drft_summery") String drftSummery,
|
||||
@Param("_measure_plan_file_grp_id") String measurePlanFileGrpId,
|
||||
@Param("_measure_result_file_grp_id") String measureResultFileGrpId,
|
||||
@Param("_start_dt") String startDt,
|
||||
@Param("_end_dt") String endDt,
|
||||
@Param("_modi_id") String modiId,
|
||||
@Param("_result_count") Integer resultCount,
|
||||
@Param("_result_code") String resultCode,
|
||||
@Param("_error_message") String errorMessage
|
||||
);
|
||||
|
||||
|
||||
@Query(value = "CALL sp_delete_tn_popup_mng (" +
|
||||
":_popup_seq, " +
|
||||
@Query(value = "CALL sp_delete_tn_cmt_draft (" +
|
||||
":_drft_seq, " +
|
||||
":_modi_id, " +
|
||||
":_result_count, " +
|
||||
":_result_code, " +
|
||||
":_error_message)",
|
||||
nativeQuery = true)
|
||||
Map<String, Object> spDeleteTnPopupMng(
|
||||
@Param("_popup_seq") Integer popupSeq,
|
||||
Map<String, Object> spDeleteTnCmtDraft(
|
||||
@Param("_drft_seq") Integer drftSeq,
|
||||
@Param("_modi_id") String modiId,
|
||||
@Param("_result_count") Integer resultCount,
|
||||
@Param("_result_code") String resultCode,
|
||||
|
|
@ -93,10 +127,86 @@ public interface TnPopupMngRepository extends JpaRepository<TnPopupMng, Long> {
|
|||
);
|
||||
|
||||
|
||||
@Procedure("sp_is_valid_tn_popup_mng_id")
|
||||
int spIsValidTnPopupMngId( Integer popupSeq );
|
||||
@Procedure("sp_is_valid_tn_cmt_draft_id")
|
||||
int spIsValidTnCmtDraftId( Integer drftSeq );
|
||||
|
||||
TnPopupMng findByPopupSeq(Long popupSeq);
|
||||
TnCmtDraft findByDrftSeq(Long drftSeq);
|
||||
List<TnCmtDraft> findByUseYnOrderByDrftSeqDesc(String useYn);
|
||||
|
||||
|
||||
@Query(value =
|
||||
"select " +
|
||||
" tcd.drft_seq as \"seq\", " +
|
||||
" tcd.doc_info_seq as \"categoryId\", " +
|
||||
" tcd.drft_dt as \"drftDatetime\", " +
|
||||
" tcd.drft_title as \"title\", " +
|
||||
" null as \"drftCharger\", " +
|
||||
" null as \"drftChargerEmail\", " +
|
||||
" null as \"drftChargerPhone\", " +
|
||||
" null as \"drftStatCode\", " +
|
||||
" tcd.drft_type_cd as \"drftTypeCode\", " +
|
||||
" tcd.cmt_seq as \"orgId\", " +
|
||||
" null as \"startDatetime\", " +
|
||||
" null as \"endDatetime\", " +
|
||||
" null as \"closeDatetime\", " +
|
||||
" tcd.frst_crt_dt as \"createDate\", " +
|
||||
" tcd.last_chg_dt as \"updateDate\", " +
|
||||
" null as \"createUserId\", " +
|
||||
" null as \"updateUserId\", " +
|
||||
" case when UPPER(tcd.use_yn) = 'Y' then 'N' else 'Y' end as \"delYn\", " +
|
||||
" tcd.drft_summery as \"drftSummery\", " +
|
||||
" tcd.drft_confe_charger as \"drftConfeCharger\", " +
|
||||
" tcd.drft_confe_pw as \"drftConfePw\", " +
|
||||
" tcd.drft_confe_room as \"drftConfeRoom\", " +
|
||||
" null as \"drftMeasurePlanFileSeq\", " +
|
||||
" null as \"drftMeasureResultFileSeq\", " +
|
||||
" null as \"drftMeasurePlanFileName\", " +
|
||||
" null as \"drftMeasureResultFileName\", " +
|
||||
" null as \"drftMeasurePreDataFileName\", " +
|
||||
" null as \"drftMeasurePreDataFileSeq\", " +
|
||||
" null as \"drftMeasurePreFormFileName\", " +
|
||||
" null as \"drftMeasurePreFormFileSeq\", " +
|
||||
" null as \"drftMeasurePartnerFileName\", " +
|
||||
" null as \"drftMeasurePartnerFileSeq\", " +
|
||||
" null as \"drftProcess\", " +
|
||||
" ( " +
|
||||
" select tci.item_nm " +
|
||||
" from tc_code_item tci " +
|
||||
" where tci.item_cd = tcd.drft_type_cd " +
|
||||
" limit 1 offset 0 " +
|
||||
" ) as \"drftTypeNm\", " +
|
||||
" concat(tdi.kcsc_cd, ' ', tdi.doc_nm) as \"categoryNm\", " +
|
||||
" tco.cmt_nm as \"orgNm\", " +
|
||||
" ( " +
|
||||
" select tci.item_nm " +
|
||||
" from tc_code_item tci " +
|
||||
" where tci.item_cd = tcd.drft_stat_cd " +
|
||||
" limit 1 offset 0 " +
|
||||
" ) as \"drftStatNm\", " +
|
||||
" null as \"categoryInfo\", " +
|
||||
" null as \"orgType\", " +
|
||||
" null as \"upOrgId\", " +
|
||||
" null as \"orgList\", " +
|
||||
" null as \"orgList1\", " +
|
||||
" null as \"orgList2\", " +
|
||||
" null as \"orgList3\", " +
|
||||
" null as \"depthOrgId\", " +
|
||||
" null as \"depthOrgId1\", " +
|
||||
" null as \"depthOrgId2\", " +
|
||||
" null as \"depthOrgId3\", " +
|
||||
" to_char(tcd.frst_crt_dt, 'yyyy-mm-dd') as \"regDate\" " +
|
||||
"from tn_cmt_draft tcd " +
|
||||
"left join tn_document_info tdi on tcd.doc_info_seq = tdi.doc_info_seq " +
|
||||
"left join tn_document_group tdg on tdi.group_seq = tdg.group_seq " +
|
||||
"left join tn_cmt_org tco on tcd.cmt_seq = tco.cmt_seq " +
|
||||
"where tcd.use_yn = 'Y' " +
|
||||
"order by tcd.drft_seq desc " +
|
||||
"limit :limit offset :limit * :offset",
|
||||
nativeQuery = true)
|
||||
List<Map<String, Object>> getCommitteeProgressStatus(
|
||||
@Param("limit") Integer limit,
|
||||
@Param("offset") Integer offset
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue