Compare commits
5 Commits
788c6787d3
...
c3258630dc
| Author | SHA1 | Date |
|---|---|---|
|
|
c3258630dc | |
|
|
d00696c73e | |
|
|
cdaaebd6d8 | |
|
|
e79432a0e1 | |
|
|
babd8ac3e9 |
|
|
@ -111,7 +111,8 @@ function SchedulesDetail(props) {
|
||||||
<ul>
|
<ul>
|
||||||
<li><Link to={URL.MAIN} className="home">Home</Link></li>
|
<li><Link to={URL.MAIN} className="home">Home</Link></li>
|
||||||
<li><Link to={URL.ADMIN}>사이트관리</Link></li>
|
<li><Link to={URL.ADMIN}>사이트관리</Link></li>
|
||||||
<li>일정관리</li>
|
<li>위원회관리</li>
|
||||||
|
<li>일정관리 상세보기</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{/* <!--// Location --> */}
|
{/* <!--// Location --> */}
|
||||||
|
|
@ -125,11 +126,9 @@ function SchedulesDetail(props) {
|
||||||
{/* <!-- 본문 --> */}
|
{/* <!-- 본문 --> */}
|
||||||
|
|
||||||
<div className="top_tit">
|
<div className="top_tit">
|
||||||
<h1 className="tit_1">사이트관리</h1>
|
<h1 className="tit_1">일정관리 상세보기</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2 className="tit_2">일정관리 상세보기</h2>
|
|
||||||
|
|
||||||
{/* <!-- 게시판 상세보기 --> */}
|
{/* <!-- 게시판 상세보기 --> */}
|
||||||
<div className="board_view2">
|
<div className="board_view2">
|
||||||
<dl>
|
<dl>
|
||||||
|
|
|
||||||
|
|
@ -187,8 +187,9 @@ function SchedulesEdit(props) {
|
||||||
EgovNet.requestFetch(modeInfo.editURL,
|
EgovNet.requestFetch(modeInfo.editURL,
|
||||||
requestOptions,
|
requestOptions,
|
||||||
(resp) => {
|
(resp) => {
|
||||||
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
||||||
navigate({ pathname: URL.ADMIN_SCHEDULE });
|
alert('일정이 등록되었습니다.');
|
||||||
|
navigate({ pathname: URL.ADMIN__COMMITTEE__SCHEDULES__DETAIL }, {state: {schdulId : resp.result?.schdulId}});
|
||||||
} else {
|
} else {
|
||||||
navigate({pathname: URL.ERROR}, {state: {msg : resp.resultMessage}});
|
navigate({pathname: URL.ERROR}, {state: {msg : resp.resultMessage}});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin';
|
||||||
import EgovPaging from "components/EgovPaging";
|
import EgovPaging from "components/EgovPaging";
|
||||||
import * as EgovNet from "api/egovFetch";
|
import * as EgovNet from "api/egovFetch";
|
||||||
import {itemIdxByPage} from "utils/calc";
|
import {itemIdxByPage} from "utils/calc";
|
||||||
|
import Modal from "react-bootstrap/Modal";
|
||||||
|
import UserInfoModal from "./UserInfoModal";
|
||||||
|
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
|
|
@ -19,6 +21,12 @@ function List(props) {
|
||||||
const cndRef = useRef();
|
const cndRef = useRef();
|
||||||
const wrdRef = useRef();
|
const wrdRef = useRef();
|
||||||
|
|
||||||
|
const [show, setShow] = useState(false);
|
||||||
|
const [modalBody, setModalBody] = useState();
|
||||||
|
|
||||||
|
const handleClose = () => setShow(false);
|
||||||
|
const handleShow = () => setShow(true);
|
||||||
|
|
||||||
const retrieveList = useCallback((searchCondition) => {
|
const retrieveList = useCallback((searchCondition) => {
|
||||||
const params = "?";
|
const params = "?";
|
||||||
EgovNet.requestFetch(
|
EgovNet.requestFetch(
|
||||||
|
|
@ -44,11 +52,11 @@ function List(props) {
|
||||||
mutListTag.push(
|
mutListTag.push(
|
||||||
<div className={"list_item"}>
|
<div className={"list_item"}>
|
||||||
<div>{item.userSe}</div>
|
<div>{item.userSe}</div>
|
||||||
<div>{item.userId}</div>
|
<div><a href={"#"} onClick={()=>{userInfoModal(item.userSeq)}}>{item.userId}</a></div>
|
||||||
<div>{item.userNm}</div>
|
<div>{item.userNm}</div>
|
||||||
<div>{item.email}</div>
|
<div>{item.email}</div>
|
||||||
<div>{item.phoneNum}</div>
|
<div>{item.phoneNum}</div>
|
||||||
<div>{item.useYn}</div>
|
<div>{item.status}</div>
|
||||||
<div><button className={"btn btn_red_h31 px-1"}>삭제</button></div>
|
<div><button className={"btn btn_red_h31 px-1"}>삭제</button></div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
@ -66,6 +74,11 @@ function List(props) {
|
||||||
retrieveList(searchCondition);
|
retrieveList(searchCondition);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
function userInfoModal(userSeq){
|
||||||
|
handleShow()
|
||||||
|
setModalBody(<UserInfoModal userSeq={userSeq}></UserInfoModal>)
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container">
|
<div className="container">
|
||||||
<div className="c_wrap">
|
<div className="c_wrap">
|
||||||
|
|
@ -124,11 +137,6 @@ function List(props) {
|
||||||
}}>조회</button>
|
}}>조회</button>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
{/*{masterBoard.bbsUseFlag === 'Y' &&
|
|
||||||
<li>
|
|
||||||
<Link to={URL.ADMIN_NOTICE_CREATE} state={{bbsId: bbsId}} className="btn btn_blue_h46 pd35">등록</Link>
|
|
||||||
</li>
|
|
||||||
}*/}
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -161,6 +169,9 @@ function List(props) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<Modal show={show} onHide={handleClose} keyboard={false}>
|
||||||
|
{modalBody}
|
||||||
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,143 @@
|
||||||
|
import React, {useEffect, useState} from "react"
|
||||||
|
import Modal from "react-bootstrap/Modal";
|
||||||
|
import * as EgovNet from "../../../api/egovFetch";
|
||||||
|
import Form from "react-bootstrap/Form";
|
||||||
|
import Row from "react-bootstrap/Row";
|
||||||
|
import Col from "react-bootstrap/Col";
|
||||||
|
import Button from "react-bootstrap/Button";
|
||||||
|
|
||||||
|
function UserInfoModal({userSeq}){
|
||||||
|
|
||||||
|
const [userInfo, setUserInfo] = useState({ userId: '', password: '', passwordChk: '', userNm: '', email: '', phoneNum: ''});
|
||||||
|
|
||||||
|
function getModalContent(){
|
||||||
|
EgovNet.requestFetch(
|
||||||
|
'/admin/users/info?userSeq='+userSeq,
|
||||||
|
{
|
||||||
|
method: "GET"
|
||||||
|
},
|
||||||
|
(resp) => {
|
||||||
|
const respInfo = {
|
||||||
|
userId: resp.result.userInfo.userId,
|
||||||
|
userNm: resp.result.userInfo.userNm,
|
||||||
|
email: resp.result.userInfo.email,
|
||||||
|
phoneNum: resp.result.userInfo.phoneNum,
|
||||||
|
password: "",
|
||||||
|
passwordChk: "",
|
||||||
|
}
|
||||||
|
setUserInfo(respInfo);
|
||||||
|
},
|
||||||
|
(resp) => {
|
||||||
|
console.log("err response : ", resp);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function userInfoChange(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getModalContent();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Modal.Header className="bookmarkModalHeader" closeButton>
|
||||||
|
<Modal.Title>
|
||||||
|
{userInfo.userNm} 상세정보
|
||||||
|
</Modal.Title>
|
||||||
|
</Modal.Header>
|
||||||
|
<Modal.Body>
|
||||||
|
<Form onSubmit={userInfoChange} noValidate>
|
||||||
|
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||||
|
<Form.Label column sm={3}>
|
||||||
|
아이디
|
||||||
|
</Form.Label>
|
||||||
|
<Col sm={9}>
|
||||||
|
<Form.Control type="text" name="userId" placeholder="아이디" required value={userInfo?.userId}
|
||||||
|
onChange={e => setUserInfo({ ...userInfo, userId: e.target.value })}/>
|
||||||
|
</Col>
|
||||||
|
</Form.Group>
|
||||||
|
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||||
|
<Form.Label column sm={3}>
|
||||||
|
이름
|
||||||
|
</Form.Label>
|
||||||
|
<Col sm={9}>
|
||||||
|
<Form.Control type="text" name="userNm" placeholder="이름" required value={userInfo?.userNm}
|
||||||
|
onChange={e => setUserInfo({ ...userInfo, userNm: e.target.value })}/>
|
||||||
|
</Col>
|
||||||
|
</Form.Group>
|
||||||
|
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||||
|
<Form.Label column sm={3}>
|
||||||
|
이메일
|
||||||
|
</Form.Label>
|
||||||
|
<Col sm={9}>
|
||||||
|
<Form.Control type="email" name="email" placeholder="email" required value={userInfo?.email}
|
||||||
|
onChange={e => setUserInfo({ ...userInfo, email: e.target.value })}/>
|
||||||
|
</Col>
|
||||||
|
</Form.Group>
|
||||||
|
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||||
|
<Form.Label column sm={3}>
|
||||||
|
연락처
|
||||||
|
</Form.Label>
|
||||||
|
<Col sm={9}>
|
||||||
|
<Form.Control type="text" name="phoneNum" placeholder="연락처" required value={userInfo?.phoneNum}
|
||||||
|
onChange={e => setUserInfo({ ...userInfo, phoneNum: e.target.value })}/>
|
||||||
|
</Col>
|
||||||
|
</Form.Group>
|
||||||
|
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||||
|
<Form.Label column sm={3}>
|
||||||
|
비밀번호
|
||||||
|
</Form.Label>
|
||||||
|
<Col sm={9}>
|
||||||
|
<Form.Control type="password" name="password" placeholder="비밀번호 변경 시 입력"
|
||||||
|
onChange={e => setUserInfo({ ...userInfo, password: e.target.value })}/>
|
||||||
|
</Col>
|
||||||
|
</Form.Group>
|
||||||
|
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||||
|
<Form.Label column sm={3}>
|
||||||
|
비밀번호 확인
|
||||||
|
</Form.Label>
|
||||||
|
<Col sm={9}>
|
||||||
|
<Form.Control type="password" name="passwordChk" placeholder="비밀번호 변경 시 입력"
|
||||||
|
onChange={e => setUserInfo({ ...userInfo, passwordChk: e.target.value })}/>
|
||||||
|
</Col>
|
||||||
|
</Form.Group>
|
||||||
|
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||||
|
<Form.Label column sm={3}>
|
||||||
|
사용자 유형
|
||||||
|
</Form.Label>
|
||||||
|
<Col sm={9}>
|
||||||
|
|
||||||
|
</Col>
|
||||||
|
</Form.Group>
|
||||||
|
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||||
|
<Form.Label column sm={3}>
|
||||||
|
사용자 권한
|
||||||
|
</Form.Label>
|
||||||
|
<Col sm={9}>
|
||||||
|
|
||||||
|
</Col>
|
||||||
|
</Form.Group>
|
||||||
|
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||||
|
<Form.Label column sm={3}>
|
||||||
|
상태
|
||||||
|
</Form.Label>
|
||||||
|
<Col sm={9}>
|
||||||
|
|
||||||
|
</Col>
|
||||||
|
</Form.Group>
|
||||||
|
<Row className="mb-3">
|
||||||
|
<Form.Label column xs={{span:8, offset:2}} id="findResultLabel"></Form.Label>
|
||||||
|
<Col xs={2}>
|
||||||
|
<Button type="submit">저장</Button>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</Form>
|
||||||
|
</Modal.Body>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default UserInfoModal;
|
||||||
|
|
@ -4,6 +4,8 @@ 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.service.EgovIndvdlSchdulManageService;
|
import com.dbnt.kcscbackend.admin.committee.schedules.service.EgovIndvdlSchdulManageService;
|
||||||
|
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||||
|
import com.dbnt.kcscbackend.config.common.ResponseCode;
|
||||||
import com.dbnt.kcscbackend.config.common.ResultVO;
|
import com.dbnt.kcscbackend.config.common.ResultVO;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
@ -11,6 +13,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
@ -93,6 +96,45 @@ public class SchedulesApiController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "일정 상세조회",
|
||||||
|
description = "일정 목록을 상세조회",
|
||||||
|
tags = {"SchedulesApiController"}
|
||||||
|
)
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(responseCode = "200", description = "조회 성공")
|
||||||
|
})
|
||||||
|
@GetMapping(value = "/schedule/{scheduleId}")
|
||||||
|
public ResultVO scheduleDetail(
|
||||||
|
HttpServletRequest request,
|
||||||
|
@AuthenticationPrincipal LoginVO user,
|
||||||
|
@PathVariable("scheduleId") Long scheduleId
|
||||||
|
)
|
||||||
|
throws Exception {
|
||||||
|
|
||||||
|
ResultVO resultVO = new ResultVO();
|
||||||
|
|
||||||
|
try {
|
||||||
|
resultVO = egovIndvdlSchdulManageService.scheduleDetail(resultVO, request, user, scheduleId);
|
||||||
|
} 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -2,7 +2,9 @@ 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.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.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import springfox.documentation.annotations.ApiIgnore;
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
|
|
@ -26,11 +28,13 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
public interface EgovIndvdlSchdulManageService {
|
public interface EgovIndvdlSchdulManageService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public ResultVO scheduleInit(ResultVO resultVO) throws Exception;
|
public ResultVO scheduleInit(ResultVO resultVO) throws Exception;
|
||||||
|
|
||||||
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 scheduleDetail(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long scheduleId) throws Exception;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -6,6 +6,8 @@ import com.dbnt.kcscbackend.admin.committee.schedules.service.EgovIndvdlSchdulMa
|
||||||
import com.dbnt.kcscbackend.admin.config.repository.TcCodeItemRepository;
|
import com.dbnt.kcscbackend.admin.config.repository.TcCodeItemRepository;
|
||||||
import com.dbnt.kcscbackend.admin.config.repository.TnCmtEventRepository;
|
import com.dbnt.kcscbackend.admin.config.repository.TnCmtEventRepository;
|
||||||
import com.dbnt.kcscbackend.admin.config.repository.TnCmtOrgRepository;
|
import com.dbnt.kcscbackend.admin.config.repository.TnCmtOrgRepository;
|
||||||
|
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||||
|
import com.dbnt.kcscbackend.config.common.ResponseCode;
|
||||||
import com.dbnt.kcscbackend.config.common.ResultVO;
|
import com.dbnt.kcscbackend.config.common.ResultVO;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.tomcat.util.json.JSONParser;
|
import org.apache.tomcat.util.json.JSONParser;
|
||||||
|
|
@ -86,6 +88,8 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i
|
||||||
resultMap.put("listSubOrg", listSubOrg);
|
resultMap.put("listSubOrg", listSubOrg);
|
||||||
resultMap.put("listTopOrg", listTopOrg);
|
resultMap.put("listTopOrg", listTopOrg);
|
||||||
resultVO.setResult(resultMap);
|
resultVO.setResult(resultMap);
|
||||||
|
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||||
|
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
|
||||||
|
|
||||||
return resultVO;
|
return resultVO;
|
||||||
}
|
}
|
||||||
|
|
@ -112,7 +116,6 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = {Exception.class})
|
|
||||||
public ResultVO createSchedule(ResultVO resultVO, HttpServletRequest request, CreateScheduleVO createScheduleVO) throws Exception {
|
public ResultVO createSchedule(ResultVO resultVO, HttpServletRequest request, CreateScheduleVO createScheduleVO) throws Exception {
|
||||||
|
|
||||||
System.out.println(
|
System.out.println(
|
||||||
|
|
@ -124,29 +127,16 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i
|
||||||
"\n--------------------------------------------------------------\n"
|
"\n--------------------------------------------------------------\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
Locale currentLocale = new Locale("KOREAN", "KOREA");
|
|
||||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", currentLocale);
|
|
||||||
Date date = formatter.parse(createScheduleVO.getStartDate());
|
|
||||||
|
|
||||||
LocalDate startDate = date.toInstant()
|
Map<String, Object> response = tnCmtEventRepository.spAddTnCmtEvent(
|
||||||
.atZone(ZoneId.systemDefault())
|
|
||||||
.toLocalDate();
|
|
||||||
|
|
||||||
LocalDateTime endDate = Instant.ofEpochMilli(date.getTime())
|
|
||||||
.atZone(ZoneId.systemDefault())
|
|
||||||
.toLocalDateTime();
|
|
||||||
|
|
||||||
Timestamp ts=new Timestamp(date.getTime());
|
|
||||||
|
|
||||||
tnCmtEventRepository.sp_add_tn_cmt_event(
|
|
||||||
createScheduleVO.getDivMeet(),
|
createScheduleVO.getDivMeet(),
|
||||||
createScheduleVO.getUpCommittee(),
|
createScheduleVO.getUpCommittee(),
|
||||||
createScheduleVO.getCommittee(),
|
createScheduleVO.getCommittee(),
|
||||||
createScheduleVO.getTitle(),
|
createScheduleVO.getTitle(),
|
||||||
createScheduleVO.getLocation(),
|
createScheduleVO.getLocation(),
|
||||||
createScheduleVO.getContents(),
|
createScheduleVO.getContents(),
|
||||||
date,
|
createScheduleVO.getStartDate(),
|
||||||
date,
|
createScheduleVO.getEndDate(),
|
||||||
"admin",
|
"admin",
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
|
@ -154,12 +144,45 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
|
|
||||||
//resultVO.setResult();
|
Map<String, Object> dto = new HashMap<String, Object>();
|
||||||
resultVO.setResultMessage("OK");
|
dto.put("schdulId", response.get("_evt_seq") );
|
||||||
resultVO.setResultCode(0);
|
|
||||||
|
resultVO.setResult(dto);
|
||||||
|
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||||
|
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
|
||||||
|
|
||||||
return resultVO;
|
return resultVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResultVO scheduleDetail(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long scheduleId) throws Exception {
|
||||||
|
|
||||||
|
System.out.println(
|
||||||
|
"\n--------------------------------------------------------------\n" +
|
||||||
|
request.getRequestURI() + " IN:" +
|
||||||
|
"\n--------------------------------------------------------------\n" +
|
||||||
|
"scheduleId:" + "\n" +
|
||||||
|
scheduleId + "\n" +
|
||||||
|
"\n--------------------------------------------------------------\n"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
int isValid = tnCmtEventRepository.sp_is_valid_tn_cmt_event_id( scheduleId );
|
||||||
|
|
||||||
|
Map<String, Object> dto = new HashMap<String, Object>();
|
||||||
|
//dto.put("schdulId", response.get("_evt_seq") );
|
||||||
|
|
||||||
|
resultVO.setResult(dto);
|
||||||
|
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||||
|
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
|
||||||
|
|
||||||
|
return resultVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,46 +2,98 @@ package com.dbnt.kcscbackend.admin.config.repository;
|
||||||
|
|
||||||
import com.dbnt.kcscbackend.admin.config.entity.TnCmtEvent;
|
import com.dbnt.kcscbackend.admin.config.entity.TnCmtEvent;
|
||||||
import com.dbnt.kcscbackend.admin.config.entity.TnCmtOrg;
|
import com.dbnt.kcscbackend.admin.config.entity.TnCmtOrg;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.Modifying;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
import org.springframework.data.jpa.repository.query.Procedure;
|
import org.springframework.data.jpa.repository.query.Procedure;
|
||||||
|
import org.springframework.data.repository.query.Param;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public interface TnCmtEventRepository extends JpaRepository<TnCmtEvent, TnCmtEvent.TnCmtEventId> {
|
public interface TnCmtEventRepository extends JpaRepository<TnCmtEvent, TnCmtEvent.TnCmtEventId> {
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
@Modifying
|
||||||
|
@Query(value = "SET datestyle TO ISO, MDY", nativeQuery = true)
|
||||||
|
int setDateStyle();
|
||||||
|
|
||||||
@Procedure
|
@Procedure
|
||||||
int sp_add_tn_cmt_event(
|
int sp_add_tn_cmt_event(
|
||||||
String evtType,
|
@Param("_evt_type") String evtType,
|
||||||
Integer upCmtSeq,
|
@Param("_up_cmt_seq") Integer upCmtSeq,
|
||||||
Integer cmtSeq,
|
@Param("_cmt_seq") Integer cmtSeq,
|
||||||
String evtTitle,
|
@Param("_evt_title") String evtTitle,
|
||||||
String evtLocation,
|
@Param("_evt_location") String evtLocation,
|
||||||
String evtContents,
|
@Param("_evt_contents") String evtContents,
|
||||||
Date evtStartDt,
|
@Param("_evt_start_dt") Date evtStartDt,
|
||||||
Date evtEndDt,
|
@Param("_evt_end_dt") Date evtEndDt,
|
||||||
String modiId,
|
@Param("_modi_id") String modiId,
|
||||||
Integer _evt_seq,
|
@Param("_evt_seq") Integer _evt_seq,
|
||||||
Integer _result_count,
|
@Param("_result_count") Integer _result_count,
|
||||||
String _result_code,
|
@Param("_result_code") String _result_code,
|
||||||
String _error_message
|
@Param("_error_message") String _error_message
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
@Query(value = "CALL sp_add_tn_cmt_event (" +
|
||||||
|
":_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, " +
|
||||||
|
":_evt_seq, " +
|
||||||
|
":_result_count, " +
|
||||||
|
":_result_code, " +
|
||||||
|
":_error_message)",
|
||||||
|
nativeQuery = true)
|
||||||
|
Map<String, Object> spAddTnCmtEvent(
|
||||||
|
@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("_evt_seq") Integer evtSeq,
|
||||||
|
@Param("_result_count") Integer resultCount,
|
||||||
|
@Param("_result_code") String resultCode,
|
||||||
|
@Param("_error_message") String errorMessage
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//@Procedure
|
||||||
|
//Map<String, Object> sp_is_valid_tn_cmt_event_id( @Param("_evt_seq") Long evtSeq );
|
||||||
|
|
||||||
@Procedure
|
@Procedure
|
||||||
int sp_add_tn_cmt_event(
|
int sp_is_valid_tn_cmt_event_id( Long evtSeq );
|
||||||
String _evt_type,
|
|
||||||
Integer _up_cmt_seq,
|
@Query(value = "CALL sp_is_valid_tn_cmt_event_id ( :_evt_seq )",
|
||||||
Integer _cmt_seq,
|
nativeQuery = true)
|
||||||
String _evt_title,
|
int spIsValidTnCmtEventId(
|
||||||
String _evt_location,
|
@Param("_evt_seq") Long evtSeq
|
||||||
String _evt_contents,
|
|
||||||
String _evt_start_dt,
|
|
||||||
String _evt_end_dt,
|
|
||||||
String _modi_id
|
|
||||||
);
|
);
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,4 +47,22 @@ public class AdminUsersController extends BaseController {
|
||||||
return resultVO;
|
return resultVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "사용자 정보 조회",
|
||||||
|
description = "사용자 정보 조회",
|
||||||
|
tags = {"AdminUsersController"}
|
||||||
|
)
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||||
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
|
})
|
||||||
|
@RequestMapping(method = RequestMethod.GET, value = "/info")
|
||||||
|
public ResultVO getUserInfo(UserInfo params) throws Exception{
|
||||||
|
ResultVO resultVO = new ResultVO();
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
resultMap.put("userInfo", adminUsersService.selectUserInfo(params.getUserSeq()));
|
||||||
|
resultVO.setResult(resultMap);
|
||||||
|
return resultVO;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,4 +22,10 @@ public class AdminUsersService {
|
||||||
public Integer selectUserListCnt(UserInfo params) {
|
public Integer selectUserListCnt(UserInfo params) {
|
||||||
return usersMapper.selectUserListCnt(params);
|
return usersMapper.selectUserListCnt(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public UserInfo selectUserInfo(Integer userSeq) {
|
||||||
|
UserInfo info = userInfoRepository.findById(userSeq).orElse(new UserInfo());
|
||||||
|
info.setPassword(null);
|
||||||
|
return info;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,14 @@ import lombok.NoArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.hibernate.annotations.DynamicInsert;
|
import org.hibernate.annotations.DynamicInsert;
|
||||||
import org.hibernate.annotations.DynamicUpdate;
|
import org.hibernate.annotations.DynamicUpdate;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.springframework.security.core.GrantedAuthority;
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
||||||
import org.springframework.security.core.userdetails.UserDetails;
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
@ -42,8 +45,16 @@ public class UserInfo extends BoardParams implements UserDetails{
|
||||||
private String phoneNum;
|
private String phoneNum;
|
||||||
@Column(name = "user_role")
|
@Column(name = "user_role")
|
||||||
private String userRole;
|
private String userRole;
|
||||||
@Column(name = "use_yn")
|
@Column(name = "status")
|
||||||
private String useYn;
|
private String status;
|
||||||
|
@Column(name = "frst_crt_dt")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime frstCrtDt;
|
||||||
|
@Column(name = "last_chg_id")
|
||||||
|
private String lastChgId;
|
||||||
|
@Column(name = "last_chg_dt")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime lastChgDt;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
|
|
@ -76,8 +87,9 @@ public class UserInfo extends BoardParams implements UserDetails{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@JsonIgnore
|
||||||
public boolean isEnabled() {
|
public boolean isEnabled() {
|
||||||
return true;
|
return getStatus().equals("USE_ST");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ import org.springframework.security.crypto.password.Pbkdf2PasswordEncoder;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -63,6 +64,8 @@ public class EgovLoginServiceImpl extends EgovAbstractServiceImpl implements Ego
|
||||||
info.setEmail(loginVO.getEmail());
|
info.setEmail(loginVO.getEmail());
|
||||||
info.setPhoneNum(loginVO.getPhoneNum());
|
info.setPhoneNum(loginVO.getPhoneNum());
|
||||||
info.setUserSe("ACC_TP02");
|
info.setUserSe("ACC_TP02");
|
||||||
|
info.setStatus("USE_ST");
|
||||||
|
info.setFrstCrtDt(LocalDateTime.now());
|
||||||
userInfoRepository.save(info);
|
userInfoRepository.save(info);
|
||||||
return info.getUserSeq();
|
return info.getUserSeq();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.dbnt.kcscbackend.config.common;
|
package com.dbnt.kcscbackend.config.common;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
@ -39,9 +40,11 @@ public class BoardParams implements Serializable {
|
||||||
@Schema(description = "정렬순서(DESC,ASC)")
|
@Schema(description = "정렬순서(DESC,ASC)")
|
||||||
private long sortOrdr = 0L;
|
private long sortOrdr = 0L;
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
public void setQueryInfo(){
|
public void setQueryInfo(){
|
||||||
setFirstIndex((getPageIndex()-1)*getRowCnt());
|
setFirstIndex((getPageIndex()-1)*getRowCnt());
|
||||||
}
|
}
|
||||||
|
@JsonIgnore
|
||||||
public void setPaginationInfo(){
|
public void setPaginationInfo(){
|
||||||
int contentCnt = getContentCnt();
|
int contentCnt = getContentCnt();
|
||||||
int rowCnt = getRowCnt();
|
int rowCnt = getRowCnt();
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ spring.datasource.url=jdbc:log4jdbc:postgresql://127.0.0.1:5432/kcsc
|
||||||
spring.datasource.username=dbnt0031
|
spring.datasource.username=dbnt0031
|
||||||
spring.datasource.password=dbnt0928!
|
spring.datasource.password=dbnt0928!
|
||||||
|
|
||||||
|
|
||||||
#jpa
|
#jpa
|
||||||
spring.jpa.show-sql=true
|
spring.jpa.show-sql=true
|
||||||
spring.jpa.generate-ddl=false
|
spring.jpa.generate-ddl=false
|
||||||
|
|
@ -25,6 +26,7 @@ spring.jpa.hibernate.naming.physical-strategy = org.hibernate.boot.model.naming.
|
||||||
spring.jpa.properties.hibernate.proc.param_null_passing=true
|
spring.jpa.properties.hibernate.proc.param_null_passing=true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# MyBatis
|
# MyBatis
|
||||||
mybatis.mapper-locations: mybatisMapper/*.xml
|
mybatis.mapper-locations: mybatisMapper/*.xml
|
||||||
mybatis.configuration.map-underscore-to-camel-case=true
|
mybatis.configuration.map-underscore-to-camel-case=true
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,16 @@
|
||||||
|
|
||||||
<select id="selectUserList" parameterType="UserInfo" resultType="UserInfo">
|
<select id="selectUserList" parameterType="UserInfo" resultType="UserInfo">
|
||||||
select user_seq,
|
select user_seq,
|
||||||
user_id,
|
a.user_id,
|
||||||
email,
|
a.email,
|
||||||
user_se,
|
b.item_nm as user_se,
|
||||||
user_nm,
|
a.user_nm,
|
||||||
phone_num,
|
a.phone_num,
|
||||||
user_role,
|
a.user_role,
|
||||||
use_yn
|
c.item_nm as status
|
||||||
from user_info
|
from user_info a
|
||||||
|
inner join tc_code_item b on a.user_se = b.item_cd
|
||||||
|
inner join tc_code_item c on a.status = c.item_cd
|
||||||
<include refid="selectUserListWhere"></include>
|
<include refid="selectUserListWhere"></include>
|
||||||
order by user_seq asc
|
order by user_seq asc
|
||||||
limit #{rowCnt} offset #{firstIndex}
|
limit #{rowCnt} offset #{firstIndex}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue