Compare commits
No commits in common. "a5bb7fdaa9af1c2877723401222083127de2b8db" and "6601e744c4eb4bc26de545ead47c6bfe7cb754cb" have entirely different histories.
a5bb7fdaa9
...
6601e744c4
|
|
@ -139,9 +139,9 @@ function SchedulesDetail(props) {
|
||||||
|
|
||||||
{/* <!-- 버튼영역 --> */}
|
{/* <!-- 버튼영역 --> */}
|
||||||
<div className="board_btn_area">
|
<div className="board_btn_area">
|
||||||
{user.id || true &&
|
{user.id &&
|
||||||
<div className="left_col btn1">
|
<div className="left_col btn1">
|
||||||
<Link to={{pathname: URL.ADMIN__COMMITTEE__SCHEDULES__MODIFY}}
|
<Link to={{pathname: URL.ADMIN_SCHEDULE_MODIFY}}
|
||||||
state={{
|
state={{
|
||||||
schdulId: location.state?.schdulId
|
schdulId: location.state?.schdulId
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -147,42 +147,20 @@ function SchedulesEdit(props) {
|
||||||
setScheduleInit(
|
setScheduleInit(
|
||||||
resp
|
resp
|
||||||
);
|
);
|
||||||
|
|
||||||
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(retrieveDetailURL,
|
|
||||||
requestOptions,
|
|
||||||
function (resp) {
|
|
||||||
|
|
||||||
let rawScheduleDetail = resp.result;
|
|
||||||
//기본값 설정
|
|
||||||
setScheduleDetail({
|
|
||||||
...scheduleDetail,
|
|
||||||
...rawScheduleDetail,
|
|
||||||
startDate: convertDate(rawScheduleDetail.schdulBgnde),
|
|
||||||
endDate: convertDate(rawScheduleDetail.schdulEndde),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
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 updateSchedule = () => {
|
const updateSchedule = () => {
|
||||||
|
|
@ -265,11 +243,6 @@ function SchedulesEdit(props) {
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(function () {
|
|
||||||
console.log("------------------------------EgovAdminScheduleEdit [%o]", scheduleDetail);
|
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
||||||
}, [scheduleDetail]);
|
|
||||||
|
|
||||||
useEffect(function () {
|
useEffect(function () {
|
||||||
|
|
||||||
EgovNet.requestFetch(`/schedule/api/org-api/depth/list?paramCodeGroup=${scheduleDetail.upCommittee}`,
|
EgovNet.requestFetch(`/schedule/api/org-api/depth/list?paramCodeGroup=${scheduleDetail.upCommittee}`,
|
||||||
|
|
@ -280,7 +253,7 @@ function SchedulesEdit(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
console.log("------------------------------EgovAdminScheduleEdit [%o]", scheduleDetail);
|
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [scheduleDetail && scheduleDetail.upCommittee]);
|
}, [scheduleDetail && scheduleDetail.upCommittee]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import {Link} from "react-router-dom";
|
||||||
import URL from "constants/url";
|
import URL from "constants/url";
|
||||||
import * as EgovNet from "api/egovFetch";
|
import * as EgovNet from "api/egovFetch";
|
||||||
import Form from "react-bootstrap/Form";
|
import Form from "react-bootstrap/Form";
|
||||||
import CODE from "../../../constants/code";
|
|
||||||
|
|
||||||
|
|
||||||
function MenuAuthMgt(props) {
|
function MenuAuthMgt(props) {
|
||||||
|
|
@ -29,21 +28,8 @@ function MenuAuthMgt(props) {
|
||||||
// 리스트 항목 구성
|
// 리스트 항목 구성
|
||||||
menuList.forEach(function (item, index) {
|
menuList.forEach(function (item, index) {
|
||||||
const checkboxs = [];
|
const checkboxs = [];
|
||||||
roleList.forEach(function (role) {
|
roleList.forEach(function (item, index) {
|
||||||
checkboxs.push(
|
checkboxs.push(<div><Form.Check /></div>)
|
||||||
<div>
|
|
||||||
<Form.Check className={role.itemCd} value={role.itemCd}
|
|
||||||
onClick={(e)=>{
|
|
||||||
const checked = e.target.checked;
|
|
||||||
if(checked) {
|
|
||||||
item.menuAuth += ","+role.itemCd
|
|
||||||
}else{
|
|
||||||
item.menuAuth = item.menuAuth.replace(","+role.itemCd, '');
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
defaultChecked={item.menuAuth.includes(role.itemCd)}/>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
});
|
});
|
||||||
mutListTag.push(
|
mutListTag.push(
|
||||||
<div className={"list_item"} key={"userListDiv_"+index}>
|
<div className={"list_item"} key={"userListDiv_"+index}>
|
||||||
|
|
@ -73,27 +59,7 @@ function MenuAuthMgt(props) {
|
||||||
},[]);
|
},[]);
|
||||||
|
|
||||||
function editMenu(menu){
|
function editMenu(menu){
|
||||||
if(window.confirm("수정하시겠습니까?")) {
|
|
||||||
EgovNet.requestFetch(
|
|
||||||
'/admin/config/menu-auth-mgt',
|
|
||||||
{
|
|
||||||
method: "PUT",
|
|
||||||
headers: {
|
|
||||||
'Content-type': 'application/json'
|
|
||||||
},
|
|
||||||
body: JSON.stringify(menu)
|
|
||||||
},
|
|
||||||
(resp) => {
|
|
||||||
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
|
||||||
alert("수정되었습니다.")
|
|
||||||
} else if (Number(resp.resultCode) === Number(CODE.RCV_ERROR_AUTH)) {
|
|
||||||
console.log("토큰 갱신중.")
|
|
||||||
} else {
|
|
||||||
alert(resp.result.resultMessage)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ function EgovAdminScheduleList(props) {
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
//retrieveList(searchCondition); disabled by thkim
|
retrieveList(searchCondition);
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [searchCondition]);
|
}, [searchCondition]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ package com.dbnt.kcscbackend.admin.committee.schedules.controller;
|
||||||
|
|
||||||
|
|
||||||
import com.dbnt.kcscbackend.admin.committee.schedules.model.CreateScheduleVO;
|
import com.dbnt.kcscbackend.admin.committee.schedules.model.CreateScheduleVO;
|
||||||
import com.dbnt.kcscbackend.admin.committee.schedules.model.UpdateScheduleVO;
|
|
||||||
import com.dbnt.kcscbackend.admin.committee.schedules.service.EgovIndvdlSchdulManageService;
|
import com.dbnt.kcscbackend.admin.committee.schedules.service.EgovIndvdlSchdulManageService;
|
||||||
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||||
import com.dbnt.kcscbackend.config.common.ResponseCode;
|
import com.dbnt.kcscbackend.config.common.ResponseCode;
|
||||||
|
|
@ -96,86 +95,6 @@ public class SchedulesApiController {
|
||||||
return resultVO;
|
return resultVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(
|
|
||||||
summary = "'위원회 일정 등록' 페이지에서 일정 수정하는 API",
|
|
||||||
description = "관리자 단에서 '위원회 관리' > '위원회 일정 관리'에 특정 일정을 누른 후, '수정' > '저장' 버튼을 누르면 해당 일정을 수정하는 API",
|
|
||||||
tags = {"SchedulesApiController"}
|
|
||||||
)
|
|
||||||
@ApiResponses(value = {
|
|
||||||
@ApiResponse(responseCode = "200", description = "등록 성공"),
|
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
|
||||||
})
|
|
||||||
@PutMapping(value = "/schedule/{scheduleId}")
|
|
||||||
public ResultVO updateSchedule
|
|
||||||
(
|
|
||||||
@AuthenticationPrincipal LoginVO user,
|
|
||||||
HttpServletRequest request,
|
|
||||||
UpdateScheduleVO updateScheduleVO,
|
|
||||||
@PathVariable("scheduleId") Long scheduleId
|
|
||||||
) throws Exception {
|
|
||||||
|
|
||||||
ResultVO resultVO = new ResultVO();
|
|
||||||
|
|
||||||
try {
|
|
||||||
resultVO = egovIndvdlSchdulManageService.updateSchedule(resultVO, request, updateScheduleVO);
|
|
||||||
} catch (Exception e) {
|
|
||||||
resultVO.setResultCode(-1);
|
|
||||||
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 = {"SchedulesApiController"}
|
|
||||||
)
|
|
||||||
@ApiResponses(value = {
|
|
||||||
@ApiResponse(responseCode = "200", description = "등록 성공"),
|
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
|
||||||
})
|
|
||||||
@DeleteMapping(value = "/schedule/{scheduleId}")
|
|
||||||
public ResultVO deleteSchedule
|
|
||||||
(
|
|
||||||
@AuthenticationPrincipal LoginVO user,
|
|
||||||
HttpServletRequest request,
|
|
||||||
@PathVariable("scheduleId") String schdulId
|
|
||||||
) throws Exception {
|
|
||||||
|
|
||||||
ResultVO resultVO = new ResultVO();
|
|
||||||
Long test = Long.valueOf(schdulId);
|
|
||||||
try {
|
|
||||||
resultVO = egovIndvdlSchdulManageService.deleteSchedule(resultVO, request, test);
|
|
||||||
} catch (Exception e) {
|
|
||||||
resultVO.setResultCode(-1);
|
|
||||||
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(
|
@Operation(
|
||||||
summary = "일정 상세조회",
|
summary = "일정 상세조회",
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ import java.time.LocalDateTime;
|
||||||
public class CreateScheduleVO implements Serializable {
|
public class CreateScheduleVO implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 6544623713351174876L;
|
private static final long serialVersionUID = 6544623713351174876L;
|
||||||
|
|
||||||
@ApiModelProperty(value = "eventId")
|
@ApiModelProperty(value = "eventId")
|
||||||
private Integer eventId;
|
private Integer eventId;
|
||||||
@ApiModelProperty(value = "startDate")
|
@ApiModelProperty(value = "startDate")
|
||||||
|
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
package com.dbnt.kcscbackend.admin.committee.schedules.model;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.Setter;
|
|
||||||
import lombok.ToString;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
@ApiModel(value = "createScheduleVO", description =
|
|
||||||
"관리자 단에서 '위원회 관리' > '위원회 일정 관리'에서 일정을 수정할 때 사용된다." + ""
|
|
||||||
)
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@ToString
|
|
||||||
public class UpdateScheduleVO implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 4730156840930491646L;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "startDate")
|
|
||||||
private String startDate;
|
|
||||||
@ApiModelProperty(value = "endDate")
|
|
||||||
private String endDate;
|
|
||||||
@ApiModelProperty(value = "eventId")
|
|
||||||
private Integer eventId;
|
|
||||||
@ApiModelProperty(value = "upCommitteeNm")
|
|
||||||
private String upCommitteeNm;
|
|
||||||
@ApiModelProperty(value = "committee")
|
|
||||||
private Integer committee;
|
|
||||||
@ApiModelProperty(value = "committeeNm")
|
|
||||||
private String committeeNm;
|
|
||||||
@ApiModelProperty(value = "divMeet")
|
|
||||||
private String divMeet;
|
|
||||||
@ApiModelProperty(value = "title")
|
|
||||||
private String title;
|
|
||||||
@ApiModelProperty(value = "divMeetNm")
|
|
||||||
private String divMeetNm;
|
|
||||||
@ApiModelProperty(value = "schdulEndde")
|
|
||||||
private String schdulEndde;
|
|
||||||
@ApiModelProperty(value = "evtSeq")
|
|
||||||
private Integer evtSeq;
|
|
||||||
@ApiModelProperty(value = "contents")
|
|
||||||
private String contents;
|
|
||||||
@ApiModelProperty(value = "upCommittee")
|
|
||||||
private Integer upCommittee;
|
|
||||||
@ApiModelProperty(value = "location")
|
|
||||||
private String location;
|
|
||||||
@ApiModelProperty(value = "schdulBgnde")
|
|
||||||
private String schdulBgnde;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -2,7 +2,6 @@ package com.dbnt.kcscbackend.admin.committee.schedules.service;
|
||||||
|
|
||||||
|
|
||||||
import com.dbnt.kcscbackend.admin.committee.schedules.model.CreateScheduleVO;
|
import com.dbnt.kcscbackend.admin.committee.schedules.model.CreateScheduleVO;
|
||||||
import com.dbnt.kcscbackend.admin.committee.schedules.model.UpdateScheduleVO;
|
|
||||||
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||||
import com.dbnt.kcscbackend.config.common.ResultVO;
|
import com.dbnt.kcscbackend.config.common.ResultVO;
|
||||||
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
||||||
|
|
@ -35,10 +34,6 @@ public interface EgovIndvdlSchdulManageService {
|
||||||
public ResultVO scheduleApiOrgApiDepthList(ResultVO resultVO, Long paramCodeGroup) throws Exception;
|
public ResultVO scheduleApiOrgApiDepthList(ResultVO resultVO, Long paramCodeGroup) throws Exception;
|
||||||
|
|
||||||
public ResultVO createSchedule(ResultVO resultVO, HttpServletRequest request, CreateScheduleVO createScheduleVO) throws Exception;
|
public ResultVO createSchedule(ResultVO resultVO, HttpServletRequest request, CreateScheduleVO createScheduleVO) throws Exception;
|
||||||
public ResultVO updateSchedule(ResultVO resultVO, HttpServletRequest request, UpdateScheduleVO updateScheduleVO) throws Exception;
|
|
||||||
public ResultVO deleteSchedule(ResultVO resultVO, HttpServletRequest request, Long scheduleId) throws Exception;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public ResultVO scheduleDetail(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long scheduleId) throws Exception;
|
public ResultVO scheduleDetail(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long scheduleId) throws Exception;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ package com.dbnt.kcscbackend.admin.committee.schedules.service.impl;
|
||||||
|
|
||||||
|
|
||||||
import com.dbnt.kcscbackend.admin.committee.schedules.model.CreateScheduleVO;
|
import com.dbnt.kcscbackend.admin.committee.schedules.model.CreateScheduleVO;
|
||||||
import com.dbnt.kcscbackend.admin.committee.schedules.model.UpdateScheduleVO;
|
|
||||||
import com.dbnt.kcscbackend.admin.committee.schedules.service.EgovIndvdlSchdulManageService;
|
import com.dbnt.kcscbackend.admin.committee.schedules.service.EgovIndvdlSchdulManageService;
|
||||||
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||||
import com.dbnt.kcscbackend.commonCode.entity.TcCodeItem;
|
import com.dbnt.kcscbackend.commonCode.entity.TcCodeItem;
|
||||||
|
|
@ -150,81 +149,6 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ResultVO updateSchedule(ResultVO resultVO, HttpServletRequest request, UpdateScheduleVO updateScheduleVO) throws Exception {
|
|
||||||
|
|
||||||
System.out.println(
|
|
||||||
"\n--------------------------------------------------------------\n" +
|
|
||||||
request.getRequestURI() + " IN:" +
|
|
||||||
"\n--------------------------------------------------------------\n" +
|
|
||||||
"updateScheduleVO:" + "\n" +
|
|
||||||
updateScheduleVO.toString() + "\n" +
|
|
||||||
"\n--------------------------------------------------------------\n"
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Map<String, Object> response = tnCmtEventRepository.spUpdateTnCmtEvent(
|
|
||||||
updateScheduleVO.getEvtSeq(),
|
|
||||||
updateScheduleVO.getDivMeet(), // 구분
|
|
||||||
updateScheduleVO.getUpCommittee(), // 심의위원회 상위 코드 번호
|
|
||||||
updateScheduleVO.getCommittee(), // 심의위원회 하위 코드 번호
|
|
||||||
updateScheduleVO.getTitle(), // 제목
|
|
||||||
updateScheduleVO.getLocation(), // 장소
|
|
||||||
updateScheduleVO.getContents(), // 내용
|
|
||||||
updateScheduleVO.getStartDate(), // 날짜/시간의 시작 일시
|
|
||||||
updateScheduleVO.getEndDate(), // 날짜/시간의 종료 일시
|
|
||||||
"admin",
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, Object> dto = new HashMap<String, Object>();
|
|
||||||
dto.put("errorMessage", response.get("_error_message") );
|
|
||||||
dto.put("schdulId", updateScheduleVO.getEvtSeq() );
|
|
||||||
|
|
||||||
resultVO.setResult(dto);
|
|
||||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
|
||||||
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
|
|
||||||
|
|
||||||
return resultVO;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ResultVO deleteSchedule(ResultVO resultVO, HttpServletRequest request, Long scheduleId) throws Exception {
|
|
||||||
|
|
||||||
System.out.println(
|
|
||||||
"\n--------------------------------------------------------------\n" +
|
|
||||||
request.getRequestURI() + " IN:" +
|
|
||||||
"\n--------------------------------------------------------------\n" +
|
|
||||||
"scheduleId:" + "\n" +
|
|
||||||
scheduleId + "\n" +
|
|
||||||
"\n--------------------------------------------------------------\n"
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Map<String, Object> response = tnCmtEventRepository.spDeleteTnCmtEvent(
|
|
||||||
scheduleId.intValue(),
|
|
||||||
"admin",
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, Object> dto = new HashMap<String, Object>();
|
|
||||||
dto.put("errorMessage", response.get("_error_message") );
|
|
||||||
dto.put("schdulId", scheduleId );
|
|
||||||
|
|
||||||
resultVO.setResult(dto);
|
|
||||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
|
||||||
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
|
|
||||||
|
|
||||||
return resultVO;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResultVO scheduleDetail(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long scheduleId) throws Exception {
|
public ResultVO scheduleDetail(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long scheduleId) throws Exception {
|
||||||
|
|
||||||
|
|
@ -244,28 +168,23 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i
|
||||||
throw new Exception("대상이 존재하지 않습니다.");
|
throw new Exception("대상이 존재하지 않습니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
TnCmtEvent tnCmtEvent = tnCmtEventRepository.findByEvtSeq(scheduleId);
|
TnCmtEvent tnCmtEvent = tnCmtEventRepository.findByEvtSeq(scheduleId);
|
||||||
|
|
||||||
TcCodeItem tcCodeItem = tcCodeItemRepository.findByItemCdAndUseYn(tnCmtEvent.getEvtType(), "Y");
|
TcCodeItem tcCodeItem = tcCodeItemRepository.findByItemCdAndUseYn(tnCmtEvent.getEvtType(), "Y");
|
||||||
|
|
||||||
TnCmtOrg tnCmtOrgForUpCommitteeNm = tnCmtOrgRepository.findByUseYnAndCmtSeq("Y", tnCmtEvent.getUpCmtSeq());
|
TnCmtOrg tnCmtOrgForUpCommitteeNm = tnCmtOrgRepository.findByUseYnAndCmtSeq("Y", tnCmtEvent.getUpCmtSeq());
|
||||||
TnCmtOrg tnCmtOrgForCommitteeNm = tnCmtOrgRepository.findByUseYnAndCmtSeq("Y", tnCmtEvent.getCmtSeq());
|
TnCmtOrg tnCmtOrgForCommitteeNm = tnCmtOrgRepository.findByUseYnAndCmtSeq("Y", tnCmtEvent.getCmtSeq());
|
||||||
|
|
||||||
Map<String, Object> dto = new HashMap<String, Object>();
|
Map<String, Object> dto = new HashMap<String, Object>();
|
||||||
dto.put("evtSeq", tnCmtEvent.getEvtSeq()); // sequence
|
dto.put("evtSeq", tnCmtEvent.getEvtSeq()); // sequence
|
||||||
dto.put("divMeetNm", tcCodeItem.getItemNm()); // 구분 명
|
dto.put("divMeetNm", tcCodeItem.getItemNm()); // 구분
|
||||||
dto.put("divMeet", tnCmtEvent.getEvtType()); // 구분 코드
|
dto.put("upCommitteeNm", tnCmtOrgForUpCommitteeNm.getCmtNm()); // 심의위원회 상위 이름
|
||||||
dto.put("upCommittee", tnCmtEvent.getUpCmtSeq()); // 심의위원회 상위 코드
|
dto.put("committeeNm", tnCmtOrgForCommitteeNm.getCmtNm()); // 심의위원회 하위 이름
|
||||||
dto.put("upCommitteeNm", tnCmtOrgForUpCommitteeNm.getCmtNm()); // 심의위원회 상위 이름
|
dto.put("title", tnCmtEvent.getEvtTitle()); // 제목
|
||||||
dto.put("committee", tnCmtEvent.getCmtSeq()); // 심의위원회 하위 코드
|
dto.put("location", tnCmtEvent.getEvtLocation()); // 장소
|
||||||
dto.put("committeeNm", tnCmtOrgForCommitteeNm.getCmtNm()); // 심의위원회 하위 이름
|
dto.put("contents", tnCmtEvent.getEvtContents()); // 내용
|
||||||
dto.put("title", tnCmtEvent.getEvtTitle()); // 제목
|
dto.put("startDate", tnCmtEvent.getEvtStartDt().plusHours(9)); // 날짜/시간의 시작 일시
|
||||||
dto.put("location", tnCmtEvent.getEvtLocation()); // 장소
|
dto.put("endDate", tnCmtEvent.getEvtEndDt().plusHours(9)); // 날짜/시간의 종료 일시
|
||||||
dto.put("contents", tnCmtEvent.getEvtContents()); // 내용
|
|
||||||
dto.put("startDate", tnCmtEvent.getEvtStartDt().plusHours(9)); // 날짜/시간의 시작 일시
|
|
||||||
dto.put("endDate", tnCmtEvent.getEvtEndDt().plusHours(9)); // 날짜/시간의 종료 일시
|
|
||||||
dto.put("schdulBgnde", tnCmtEvent.getEvtStartDt().plusHours(9).format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); // 날짜/시간의 시작 일시 - yyyyMMddHHmmss
|
|
||||||
dto.put("schdulEndde", tnCmtEvent.getEvtEndDt().plusHours(9).format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); // 날짜/시간의 종료 일시
|
|
||||||
|
|
||||||
// 문자열로 리턴하도록 수정해야 함.
|
// 문자열로 리턴하도록 수정해야 함.
|
||||||
|
|
||||||
|
|
@ -332,8 +251,8 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i
|
||||||
.stream()
|
.stream()
|
||||||
.map(item -> {
|
.map(item -> {
|
||||||
Map<String, Object> mapDto = new HashMap<>();
|
Map<String, Object> mapDto = new HashMap<>();
|
||||||
mapDto.put("evt_start_dt", item.getEvtStartDt().plusHours(9).format(DateTimeFormatter.ofPattern("yyyyMMdd HH:mm:ss.SSS")));
|
mapDto.put("evt_start_dt", item.getEvtStartDt().format(DateTimeFormatter.ofPattern("yyyyMMdd HH:mm:ss.SSS")));
|
||||||
mapDto.put("evt_end_dt", item.getEvtEndDt().plusHours(9).format(DateTimeFormatter.ofPattern("yyyyMMdd HH:mm:ss.SSS")));
|
mapDto.put("evt_end_dt", item.getEvtEndDt().format(DateTimeFormatter.ofPattern("yyyyMMdd HH:mm:ss.SSS")));
|
||||||
mapDto.put("schdulId", item.getEvtSeq());
|
mapDto.put("schdulId", item.getEvtSeq());
|
||||||
mapDto.put("schdulNm", item.getEvtTitle());
|
mapDto.put("schdulNm", item.getEvtTitle());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -318,36 +318,10 @@ public class AdminConfigController extends BaseController {
|
||||||
public ResultVO getMenuAuthMgt(){
|
public ResultVO getMenuAuthMgt(){
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
resultMap.put("menuList", adminConfigService.selectMenuAuthList());
|
resultMap.put("menuList", adminConfigService.selectMenuList());
|
||||||
resultMap.put("roleList", commonCodeService.selectCodeItemList("ROLE"));
|
resultMap.put("roleList", commonCodeService.selectCodeItemList("ROLE"));
|
||||||
resultVO.setResult(resultMap);
|
resultVO.setResult(resultMap);
|
||||||
return resultVO;
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
package com.dbnt.kcscbackend.admin.config.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
|
|
||||||
@Entity
|
|
||||||
@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;
|
|
||||||
|
|
||||||
@Embeddable
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public static class TbMenuRoleId implements Serializable {
|
|
||||||
private String roleId;
|
|
||||||
private String menuId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -55,7 +55,4 @@ public class TcMenu {
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
private String menuTypeValue;
|
private String menuTypeValue;
|
||||||
|
|
||||||
@Transient
|
|
||||||
private String menuAuth;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,5 +10,4 @@ public interface TcMenuMapper {
|
||||||
|
|
||||||
List<TcMenu> selectMenuList();
|
List<TcMenu> selectMenuList();
|
||||||
|
|
||||||
List<TcMenu> selectMenuAuthList();
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
package com.dbnt.kcscbackend.admin.config.repository;
|
|
||||||
|
|
||||||
import com.dbnt.kcscbackend.admin.config.entity.TbMenuRole;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface TbMenuRoleRepository extends JpaRepository<TbMenuRole, TbMenuRole.TbMenuRoleId> {
|
|
||||||
|
|
||||||
void deleteByMenuId(String menuId);
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
package com.dbnt.kcscbackend.admin.config.service;
|
package com.dbnt.kcscbackend.admin.config.service;
|
||||||
|
|
||||||
import com.dbnt.kcscbackend.admin.config.entity.TbMenuRole;
|
|
||||||
import com.dbnt.kcscbackend.admin.config.entity.TcMenu;
|
import com.dbnt.kcscbackend.admin.config.entity.TcMenu;
|
||||||
import com.dbnt.kcscbackend.admin.config.mapper.TcMenuMapper;
|
import com.dbnt.kcscbackend.admin.config.mapper.TcMenuMapper;
|
||||||
import com.dbnt.kcscbackend.admin.config.repository.TbMenuRoleRepository;
|
|
||||||
import com.dbnt.kcscbackend.admin.config.repository.TcMenuRepository;
|
import com.dbnt.kcscbackend.admin.config.repository.TcMenuRepository;
|
||||||
import com.dbnt.kcscbackend.commonCode.entity.TcCodeGrp;
|
import com.dbnt.kcscbackend.commonCode.entity.TcCodeGrp;
|
||||||
import com.dbnt.kcscbackend.commonCode.entity.TcCodeItem;
|
import com.dbnt.kcscbackend.commonCode.entity.TcCodeItem;
|
||||||
|
|
@ -15,7 +13,6 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
|
@ -25,7 +22,6 @@ public class AdminConfigService extends EgovAbstractServiceImpl {
|
||||||
private final TcCodeGrpRepository codeGrpRepository;
|
private final TcCodeGrpRepository codeGrpRepository;
|
||||||
private final TcCodeItemRepository codeItemRepository;
|
private final TcCodeItemRepository codeItemRepository;
|
||||||
private final TcMenuRepository menuRepository;
|
private final TcMenuRepository menuRepository;
|
||||||
private final TbMenuRoleRepository menuRoleRepository;
|
|
||||||
private final TcMenuMapper menuMapper;
|
private final TcMenuMapper menuMapper;
|
||||||
|
|
||||||
public List<TcCodeGrp> selectCodeGrpList(){
|
public List<TcCodeGrp> selectCodeGrpList(){
|
||||||
|
|
@ -144,25 +140,4 @@ public class AdminConfigService extends EgovAbstractServiceImpl {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<TcMenu> selectMenuAuthList(){
|
|
||||||
return menuMapper.selectMenuAuthList();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
|
||||||
public void editMenuAuth(TcMenu menu) {
|
|
||||||
String[] roleAry = menu.getMenuAuth().split(",");
|
|
||||||
menuRoleRepository.deleteByMenuId(menu.getMenuId());
|
|
||||||
List<TbMenuRole> roleList = new ArrayList<>();
|
|
||||||
for(String role: roleAry){
|
|
||||||
if(!role.isEmpty()){
|
|
||||||
TbMenuRole menuRole = new TbMenuRole();
|
|
||||||
menuRole.setMenuId(menu.getMenuId());
|
|
||||||
menuRole.setRoleId(role);
|
|
||||||
menuRole.setWriteYn("Y");
|
|
||||||
roleList.add(menuRole);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
menuRoleRepository.saveAll(roleList);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,61 +56,6 @@ public interface TnCmtEventRepository extends JpaRepository<TnCmtEvent, TnCmtEve
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@Query(value = "CALL sp_update_tn_cmt_event (" +
|
|
||||||
":_evt_seq, " +
|
|
||||||
":_evt_type, " +
|
|
||||||
":_up_cmt_seq, " +
|
|
||||||
":_cmt_seq, " +
|
|
||||||
":_evt_title, " +
|
|
||||||
":_evt_location, " +
|
|
||||||
":_evt_contents, " +
|
|
||||||
"TO_TIMESTAMP(" +
|
|
||||||
" :_evt_start_dt," +
|
|
||||||
" 'YYYY-MM-DD HH24:MI:SS'" +
|
|
||||||
")::::timestamptz AT TIME ZONE 'UTC', " +
|
|
||||||
"TO_TIMESTAMP(" +
|
|
||||||
" :_evt_end_dt," +
|
|
||||||
" 'YYYY-MM-DD HH24:MI:SS'" +
|
|
||||||
")::::timestamptz AT TIME ZONE 'UTC', " +
|
|
||||||
":_modi_id, " +
|
|
||||||
":_result_count, " +
|
|
||||||
":_result_code, " +
|
|
||||||
":_error_message)",
|
|
||||||
nativeQuery = true)
|
|
||||||
Map<String, Object> spUpdateTnCmtEvent(
|
|
||||||
@Param("_evt_seq") Integer evtSeq,
|
|
||||||
@Param("_evt_type") String evtType,
|
|
||||||
@Param("_up_cmt_seq") Integer upCmtSeq,
|
|
||||||
@Param("_cmt_seq") Integer cmtSeq,
|
|
||||||
@Param("_evt_title") String evtTitle,
|
|
||||||
@Param("_evt_location") String evtLocation,
|
|
||||||
@Param("_evt_contents") String evtContents,
|
|
||||||
@Param("_evt_start_dt") String evtStartDt,
|
|
||||||
@Param("_evt_end_dt") String evtEndDt,
|
|
||||||
@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_cmt_event (" +
|
|
||||||
":_evt_seq, " +
|
|
||||||
":_modi_id, " +
|
|
||||||
":_result_count, " +
|
|
||||||
":_result_code, " +
|
|
||||||
":_error_message)",
|
|
||||||
nativeQuery = true)
|
|
||||||
Map<String, Object> spDeleteTnCmtEvent(
|
|
||||||
@Param("_evt_seq") Integer evtSeq,
|
|
||||||
@Param("_modi_id") String modiId,
|
|
||||||
@Param("_result_count") Integer resultCount,
|
|
||||||
@Param("_result_code") String resultCode,
|
|
||||||
@Param("_error_message") String errorMessage
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//@Procedure
|
//@Procedure
|
||||||
//Map<String, Object> sp_is_valid_tn_cmt_event_id( @Param("_evt_seq") Long evtSeq );
|
//Map<String, Object> sp_is_valid_tn_cmt_event_id( @Param("_evt_seq") Long evtSeq );
|
||||||
|
|
||||||
|
|
@ -131,12 +76,12 @@ public interface TnCmtEventRepository extends JpaRepository<TnCmtEvent, TnCmtEve
|
||||||
" TO_TIMESTAMP(" + " \n" +
|
" TO_TIMESTAMP(" + " \n" +
|
||||||
" :sSearchDate," + " \n" +
|
" :sSearchDate," + " \n" +
|
||||||
" 'YYYYMM'" + " \n" +
|
" 'YYYYMM'" + " \n" +
|
||||||
" ) AT TIME ZONE 'UTC+9' <= tce.evt_start_dt AND" + " \n" +
|
" ) <= tce.evt_start_dt AND" + " \n" +
|
||||||
|
|
||||||
" tce.evt_start_dt < TO_TIMESTAMP(" + " \n" +
|
" tce.evt_start_dt < TO_TIMESTAMP(" + " \n" +
|
||||||
" :sSearchDate," + " \n" +
|
" :sSearchDate," + " \n" +
|
||||||
" 'YYYYMM'" + " \n" +
|
" 'YYYYMM'" + " \n" +
|
||||||
" ) AT TIME ZONE 'UTC+9' + INTERVAL '1 MONTH' ;\n",
|
" ) + INTERVAL '1 MONTH';\n",
|
||||||
nativeQuery = true)
|
nativeQuery = true)
|
||||||
List<TnCmtEvent> getByYyyyMm(
|
List<TnCmtEvent> getByYyyyMm(
|
||||||
@Param("sSearchDate") String sSearchDate
|
@Param("sSearchDate") String sSearchDate
|
||||||
|
|
|
||||||
|
|
@ -24,18 +24,4 @@
|
||||||
order by menu_id asc
|
order by menu_id asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMenuAuthList" resultType="TcMenu">
|
|
||||||
select a.menu_id ,
|
|
||||||
a.menu_title ,
|
|
||||||
a.menu_group ,
|
|
||||||
coalesce(b.role_cd, '') as menu_auth
|
|
||||||
from tc_menu a
|
|
||||||
left outer join (
|
|
||||||
select menu_id , string_agg(role_id, ',') as role_cd
|
|
||||||
from tb_menu_role
|
|
||||||
group by menu_id
|
|
||||||
) b on a.menu_id = b.menu_id
|
|
||||||
where a.use_yn = 'Y'
|
|
||||||
order by a.menu_id asc
|
|
||||||
</select>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue