diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/committee/Schedules/Edit.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/committee/Schedules/Edit.jsx index a2adb2a..cfe4a97 100644 --- a/egovframe-template-simple-react-contribution/src/pages/admin/committee/Schedules/Edit.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/admin/committee/Schedules/Edit.jsx @@ -77,24 +77,31 @@ function SchedulesEdit(props) { } const retrieveDetail = () => { - if (modeInfo.mode === CODE.MODE_CREATE) {// 조회/등록이면 조회 안함 - setScheduleDetail({ - ...scheduleDetail, - schdulBgnde: location.state.iUseDate, - schdulEndde: location.state.iUseDate, - startDate: convertDate(location.state.iUseDate), - endDate: convertDate(location.state.iUseDate), - }); - return; - } - - const retrieveDetailURL = `/schedule/${location.state?.schdulId}`; + const requestOptions = { method: "GET", headers: { 'Content-type': 'application/json' } } + + EgovNet.requestFetch("/schedule/init", + requestOptions, + function (resp) { + let rawScheduleDetail = resp; + console.log( 'kimtheho kimtheho kimtheho kimtheho kimtheho kimtheho kimtheho kimtheho' + rawScheduleDetail ); + } + ); + + if (modeInfo.mode === CODE.MODE_CREATE) {// 조회/등록이면 조회 안함 + setScheduleDetail({ + ...scheduleDetail + }); + return; + } + + const retrieveDetailURL = `/schedule/${location.state?.schdulId}`; + EgovNet.requestFetch(retrieveDetailURL, requestOptions, function (resp) { @@ -110,6 +117,9 @@ function SchedulesEdit(props) { }); } ); + + + } const updateSchedule = () => { diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/controller/SchedulesApiController.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/controller/SchedulesApiController.java index 2780aba..ef46a32 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/controller/SchedulesApiController.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/controller/SchedulesApiController.java @@ -9,6 +9,8 @@ import com.dbnt.kcscbackend.admin.committee.schedules.service.EgovCmmUseService; import com.dbnt.kcscbackend.admin.committee.schedules.service.EgovFileMngService; import com.dbnt.kcscbackend.admin.committee.schedules.service.EgovIndvdlSchdulManageService; import com.dbnt.kcscbackend.auth.entity.LoginVO; +import com.dbnt.kcscbackend.auth.entity.UserInfo; +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; @@ -18,6 +20,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; import org.egovframe.rte.fdl.cryptography.EgovCryptoService; import org.egovframe.rte.fdl.property.EgovPropertyService; +import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.*; @@ -28,6 +31,7 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.text.SimpleDateFormat; import java.util.*; +import java.util.stream.Collectors; /** * 일정관리를 처리하는 Controller Class 구현 @@ -45,7 +49,7 @@ import java.util.*; * @created 09-6-2011 오전 10:08:04 */ @RestController -@Tag(name="EgovIndvdlSchdulManageApiController",description = "일정관리") +@Tag(name="SchedulesApiController",description = "일정관리") public class SchedulesApiController { @@ -71,6 +75,8 @@ public class SchedulesApiController { @Resource(name="egovARIACryptoService") EgovCryptoService cryptoService; + + /** * 일정(월별) 목록을 조회한다. * @param request @@ -81,7 +87,7 @@ public class SchedulesApiController { @Operation( summary = "월별 일정 조회", description = "일정(월별) 목록을 조회", - tags = {"EgovIndvdlSchdulManageApiController"} + tags = {"SchedulesApiController"} ) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "조회 성공"), @@ -154,7 +160,7 @@ public class SchedulesApiController { @Operation( summary = "일정 등록", description = "일정을 등록 처리", - tags = {"EgovIndvdlSchdulManageApiController"} + tags = {"SchedulesApiController"} ) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "등록 성공"), @@ -222,7 +228,7 @@ public class SchedulesApiController { @Operation( summary = "일정 상세조회", description = "일정 목록을 상세조회", - tags = {"EgovIndvdlSchdulManageApiController"} + tags = {"SchedulesApiController"} ) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "조회 성공") @@ -297,7 +303,7 @@ public class SchedulesApiController { @Operation( summary = "일정 삭제", description = "일정을 삭제 처리", - tags = {"EgovIndvdlSchdulManageApiController"} + tags = {"SchedulesApiController"} ) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "등록 성공"), @@ -334,7 +340,7 @@ public class SchedulesApiController { @Operation( summary = "일정 수정", description = "일정을 수정 처리", - tags = {"EgovIndvdlSchdulManageApiController"} + tags = {"SchedulesApiController"} ) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "등록 성공"), @@ -418,7 +424,7 @@ public class SchedulesApiController { @Operation( summary = "일별 일정 조회", description = "일정(일별) 목록을 조회", - tags = {"EgovIndvdlSchdulManageApiController"} + tags = {"SchedulesApiController"} ) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "조회 성공"), @@ -490,7 +496,7 @@ public class SchedulesApiController { @Operation( summary = "주간별 일정 조회", description = "일정(주간별) 목록을 조회", - tags = {"EgovIndvdlSchdulManageApiController"} + tags = {"SchedulesApiController"} ) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "조회 성공"), @@ -636,4 +642,27 @@ public class SchedulesApiController { return sOutput; } + + + /** + * 관리자 단에서 '위원회 관리' > '위원회 일정 관리'에 '등록' 버튼을 누른 후 '위원회 일정 등록' 페이지 로딩 시, 필요한 데이터 불러 오는 API + * @param commandMap + * @return resultVO + * @throws Exception + */ + @Operation( + summary = "'위원회 일정 등록' 페이지 로딩 시, 필요한 데이터 불러 오는 API", + description = "관리자 단에서 '위원회 관리' > '위원회 일정 관리'에 '등록' 버튼을 누른 후 '위원회 일정 등록' 페이지 로딩 시, 필요한 데이터 불러 오는 API", + tags = {"SchedulesApiController"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "조회 성공"), + @ApiResponse(responseCode = "403", description = "인가된 사용자가 아님") + }) + @GetMapping(value = "/schedule/init") + public ResultVO ScheduleInit(@RequestParam Map commandMap) throws Exception { + ResultVO resultVO = new ResultVO(); + return egovIndvdlSchdulManageService.ScheduleInit(resultVO); + } + } \ No newline at end of file diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/repository/CmmUseDAO.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/repository/CmmUseDAO.java index c16e3e1..c45be16 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/repository/CmmUseDAO.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/repository/CmmUseDAO.java @@ -1,11 +1,11 @@ package com.dbnt.kcscbackend.admin.committee.schedules.repository; -import com.dbnt.kcscbackend.admin.committee.schedules.repository.ComDefaultCodeVO; import com.dbnt.kcscbackend.admin.committee.schedules.service.CmmnDetailCode; import com.dbnt.kcscbackend.admin.committee.schedules.service.EgovComAbstractDAO; import org.springframework.stereotype.Repository; +import java.util.ArrayList; import java.util.List; /** @@ -35,7 +35,8 @@ public class CmmUseDAO extends EgovComAbstractDAO { */ @SuppressWarnings("unchecked") public List selectCmmCodeDetail(ComDefaultCodeVO vo) throws Exception { - return (List) list("CmmUseDAO.selectCmmCodeDetail", vo); + ////return (List) list("CmmUseDAO.selectCmmCodeDetail", vo); + return new ArrayList(); } /** @@ -47,7 +48,8 @@ public class CmmUseDAO extends EgovComAbstractDAO { */ @SuppressWarnings("unchecked") public List selectOgrnztIdDetail(ComDefaultCodeVO vo) throws Exception { - return (List) list("CmmUseDAO.selectOgrnztIdDetail", vo); + //// return (List) list("CmmUseDAO.selectOgrnztIdDetail", vo); + return new ArrayList(); } /** @@ -59,6 +61,7 @@ public class CmmUseDAO extends EgovComAbstractDAO { */ @SuppressWarnings("unchecked") public List selectGroupIdDetail(ComDefaultCodeVO vo) throws Exception { - return (List) list("CmmUseDAO.selectGroupIdDetail", vo); + ////return (List) list("CmmUseDAO.selectGroupIdDetail", vo); + return new ArrayList(); } } diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/repository/IndvdlSchdulManageDao.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/repository/IndvdlSchdulManageDao.java index 92c4c08..f050f76 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/repository/IndvdlSchdulManageDao.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/repository/IndvdlSchdulManageDao.java @@ -1,8 +1,10 @@ package com.dbnt.kcscbackend.admin.committee.schedules.repository; +import com.dbnt.kcscbackend.admin.committee.schedules.service.CmmnDetailCode; import org.egovframe.rte.psl.dataaccess.EgovAbstractMapper; import org.springframework.stereotype.Repository; +import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -41,7 +43,8 @@ public class IndvdlSchdulManageDao extends EgovAbstractMapper { * @throws Exception */ public List selectIndvdlSchdulManageRetrieve(Map map) throws Exception { - return list("IndvdlSchdulManage.selectIndvdlSchdulManageRetrieve", map); + //// return list("IndvdlSchdulManage.selectIndvdlSchdulManageRetrieve", map); + return new ArrayList(); } /** diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/repository/ResultVO.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/repository/ResultVO.java deleted file mode 100644 index 432909d..0000000 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/repository/ResultVO.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.dbnt.kcscbackend.admin.committee.schedules.repository; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -import java.util.HashMap; -import java.util.Map; - -/** - * - * @author : 정완배 - * @since : 2023. 8. 9. - * @version : 1.0 - * - * @package : egovframework.com.cmm.service - * @filename : ResultVO.java - * @modificationInformation - * - *
- * << 개정이력(Modification Information) >>
- *
- *  수정일            수정자             수정내용
- *  ----------   ----------   ----------------------
- *  2023. 8. 9.    정완배             주석추가
- * 
- * - * - */ - -@Schema(description = "응답 객체 VO") -@Getter -@Setter -public class ResultVO { - - @Schema(description = "응답 코드") - private int resultCode = 0; - - @Schema(description = "응답 메시지") - private String resultMessage = "OK"; - private Map result = new HashMap(); - - public void putResult(String key, Object value) { - result.put(key, value); - } - - public Object getResult(String key) { - return this.result.get(key); - } - - -} diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/EgovIndvdlSchdulManageService.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/EgovIndvdlSchdulManageService.java index 7cadbfc..9ad0169 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/EgovIndvdlSchdulManageService.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/EgovIndvdlSchdulManageService.java @@ -3,6 +3,8 @@ package com.dbnt.kcscbackend.admin.committee.schedules.service; import com.dbnt.kcscbackend.admin.committee.schedules.repository.ComDefaultVO; import com.dbnt.kcscbackend.admin.committee.schedules.repository.IndvdlSchdulManageVO; +import com.dbnt.kcscbackend.admin.config.entity.TcCodeItem; +import com.dbnt.kcscbackend.config.common.ResultVO; import java.util.List; import java.util.Map; @@ -102,4 +104,11 @@ public interface EgovIndvdlSchdulManageService { * @exception Exception Exception */ public void updateIndvdlSchdulManage(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception; + + /** + * 일정를(을) 수정한다. + * @return + * @throws Exception + */ + public ResultVO ScheduleInit(ResultVO resultVO) throws Exception; } \ No newline at end of file diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/EgovCmmUseServiceImpl.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/impl/EgovCmmUseServiceImpl.java similarity index 91% rename from kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/EgovCmmUseServiceImpl.java rename to kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/impl/EgovCmmUseServiceImpl.java index 796c5be..d408f2d 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/EgovCmmUseServiceImpl.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/impl/EgovCmmUseServiceImpl.java @@ -1,8 +1,10 @@ -package com.dbnt.kcscbackend.admin.committee.schedules.service; +package com.dbnt.kcscbackend.admin.committee.schedules.service.impl; import com.dbnt.kcscbackend.admin.committee.schedules.repository.CmmUseDAO; import com.dbnt.kcscbackend.admin.committee.schedules.repository.ComDefaultCodeVO; +import com.dbnt.kcscbackend.admin.committee.schedules.service.CmmnDetailCode; +import com.dbnt.kcscbackend.admin.committee.schedules.service.EgovCmmUseService; import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; import org.springframework.stereotype.Service; diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/EgovFileMngServiceImpl.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/impl/EgovFileMngServiceImpl.java similarity index 96% rename from kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/EgovFileMngServiceImpl.java rename to kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/impl/EgovFileMngServiceImpl.java index dcac5c2..cb3d4d5 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/EgovFileMngServiceImpl.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/impl/EgovFileMngServiceImpl.java @@ -1,7 +1,8 @@ -package com.dbnt.kcscbackend.admin.committee.schedules.service; +package com.dbnt.kcscbackend.admin.committee.schedules.service.impl; import com.dbnt.kcscbackend.admin.committee.schedules.repository.FileManageDAO; import com.dbnt.kcscbackend.admin.committee.schedules.repository.FileVO; +import com.dbnt.kcscbackend.admin.committee.schedules.service.EgovFileMngService; import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; import org.springframework.stereotype.Service; diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/EgovIndvdlSchdulManageServiceImpl.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/impl/EgovIndvdlSchdulManageServiceImpl.java similarity index 77% rename from kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/EgovIndvdlSchdulManageServiceImpl.java rename to kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/impl/EgovIndvdlSchdulManageServiceImpl.java index a5e8a97..bd34236 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/EgovIndvdlSchdulManageServiceImpl.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/committee/schedules/service/impl/EgovIndvdlSchdulManageServiceImpl.java @@ -1,16 +1,22 @@ -package com.dbnt.kcscbackend.admin.committee.schedules.service; +package com.dbnt.kcscbackend.admin.committee.schedules.service.impl; import com.dbnt.kcscbackend.admin.committee.schedules.repository.ComDefaultVO; import com.dbnt.kcscbackend.admin.committee.schedules.repository.IndvdlSchdulManageDao; import com.dbnt.kcscbackend.admin.committee.schedules.repository.IndvdlSchdulManageVO; +import com.dbnt.kcscbackend.admin.committee.schedules.service.EgovIndvdlSchdulManageService; +import com.dbnt.kcscbackend.admin.config.entity.TcCodeItem; +import com.dbnt.kcscbackend.admin.config.repository.TcCodeItemRepository; +import com.dbnt.kcscbackend.config.common.ResultVO; +import lombok.RequiredArgsConstructor; import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; -import org.egovframe.rte.fdl.idgnr.EgovIdGnrService; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 일정관리를 처리하는 ServiceImpl Class 구현 @@ -26,13 +32,15 @@ import java.util.Map; * @created 09-6-2011 오전 10:08:05 */ @Service("egovIndvdlSchdulManageService") -public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl implements EgovIndvdlSchdulManageService{ +@RequiredArgsConstructor +public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl implements EgovIndvdlSchdulManageService { @Resource(name="indvdlSchdulManageDao") private IndvdlSchdulManageDao dao; + private final TcCodeItemRepository tcCodeItemRepository; /** * 메인페이지/일정관리조회 @@ -122,7 +130,9 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i dao.updateIndvdlSchdulManage(indvdlSchdulManageVO); } - /** + + + /** * 일정를(을) 삭제한다. * @param indvdlSchdulManageVO - 조회할 정보가 담긴 VO * @throws Exception @@ -131,4 +141,24 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i public void deleteIndvdlSchdulManage(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception{ dao.deleteIndvdlSchdulManage(indvdlSchdulManageVO); } + + @Override + public ResultVO ScheduleInit(ResultVO resultVO) throws Exception { + + Map resultMap = new HashMap(); + + List listCodes = tcCodeItemRepository.findByGrpCdAndUseYnOrderByGrpOrder("EVT_TYPE", "Y").stream() + .map(lc -> lc.getItemNm()) + .collect(Collectors.toList()); + + + resultMap.put("listCodes", listCodes); + resultMap.put("listSubOrg", ""); + resultMap.put("listTopOrg", ""); + resultVO.setResult(resultMap); + + return resultVO; + } + + }