Compare commits
No commits in common. "eee0b471bf8119ad759ae59848bcbc442eb381b5" and "d005366d8f471a42076093ee5ead9d2ccea7f1d6" have entirely different histories.
eee0b471bf
...
d005366d8f
|
|
@ -28,9 +28,10 @@ function BaseCodeMgt(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>
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={"6"}>
|
<Col xs={"6"}>
|
||||||
<ParentCodeDiv/>
|
<ParentCodeDiv/>
|
||||||
|
|
@ -39,6 +40,9 @@ function BaseCodeMgt(props) {
|
||||||
<ChildCodeDiv/>
|
<ChildCodeDiv/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
<div className={"childCode"}>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,38 +1,10 @@
|
||||||
import React, { useState, useEffect, useCallback } from 'react';
|
|
||||||
import {Container} from "react-bootstrap";
|
import {Container} from "react-bootstrap";
|
||||||
import Row from "react-bootstrap/Row";
|
import Row from "react-bootstrap/Row";
|
||||||
import Col from "react-bootstrap/Col";
|
import Col from "react-bootstrap/Col";
|
||||||
import Form from 'react-bootstrap/Form'
|
import Form from 'react-bootstrap/Form'
|
||||||
import Button from "react-bootstrap/Button";
|
import Button from "react-bootstrap/Button";
|
||||||
import * as EgovNet from "api/egovFetch";
|
|
||||||
|
|
||||||
function ParentCodeDiv(props){
|
|
||||||
|
|
||||||
const [codeGrpRow, setCodeGrpRow] = useState();
|
|
||||||
|
|
||||||
function getCodeGrp(){
|
|
||||||
EgovNet.requestFetch(
|
|
||||||
'/admin/config/code-grp',
|
|
||||||
{
|
|
||||||
method: "GET",
|
|
||||||
headers: {
|
|
||||||
'Content-type': 'application/json'
|
|
||||||
},
|
|
||||||
body: JSON.stringify({})
|
|
||||||
},
|
|
||||||
(resp) => {
|
|
||||||
debugger
|
|
||||||
},
|
|
||||||
function (resp) {
|
|
||||||
console.log("err response : ", resp);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
getCodeGrp();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
|
function ParentCodeDiv(){
|
||||||
return (
|
return (
|
||||||
<Container className={"pt-3"}>
|
<Container className={"pt-3"}>
|
||||||
<Row className={"py-2 bg-light border-bottom"}>
|
<Row className={"py-2 bg-light border-bottom"}>
|
||||||
|
|
@ -41,7 +13,7 @@ function ParentCodeDiv(props){
|
||||||
<Col xs={2}>삭제</Col>
|
<Col xs={2}>삭제</Col>
|
||||||
<Col xs={2}>수정</Col>
|
<Col xs={2}>수정</Col>
|
||||||
</Row>
|
</Row>
|
||||||
{codeGrpRow}
|
{}
|
||||||
<Row className={"py-1"}>
|
<Row className={"py-1"}>
|
||||||
<Col xs={4}>
|
<Col xs={4}>
|
||||||
<Form.Control type={"text"} placeholder={"코드그룹"} size={"sm"}/>
|
<Form.Control type={"text"} placeholder={"코드그룹"} size={"sm"}/>
|
||||||
|
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
package com.dbnt.kcscbackend.admin.config;
|
|
||||||
|
|
||||||
import com.dbnt.kcscbackend.admin.config.entity.TcCodeGrp;
|
|
||||||
import com.dbnt.kcscbackend.admin.config.service.AdminConfigService;
|
|
||||||
import com.dbnt.kcscbackend.config.common.BaseController;
|
|
||||||
import com.dbnt.kcscbackend.config.common.ResultVO;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
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.http.MediaType;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@RequestMapping("/admin/config")
|
|
||||||
@Tag(name="AdminConfigController", description = "사이트관리 환결설정 메뉴 컨트롤러")
|
|
||||||
public class AdminConfigController extends BaseController {
|
|
||||||
|
|
||||||
private final AdminConfigService adminConfigService;
|
|
||||||
|
|
||||||
@Operation(
|
|
||||||
summary = "기본코드 그룹 조회",
|
|
||||||
description = "기본코드 그룹 조회",
|
|
||||||
tags = {"AdminConfigController"}
|
|
||||||
)
|
|
||||||
@ApiResponses(value = {
|
|
||||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
|
||||||
})
|
|
||||||
@RequestMapping(method = RequestMethod.GET, value = "/code-grp", consumes = MediaType.APPLICATION_JSON_VALUE)
|
|
||||||
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 = "403", description = "인가된 사용자가 아님")
|
|
||||||
})
|
|
||||||
@RequestMapping(method = RequestMethod.GET, value = "/code-item", consumes = MediaType.APPLICATION_JSON_VALUE)
|
|
||||||
public ResultVO getCodeItem(TcCodeGrp param) throws Exception{
|
|
||||||
ResultVO resultVO = new ResultVO();
|
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
|
||||||
resultMap.put("codeItemList", adminConfigService.selectCodeItemList(param.getGrpCd()));
|
|
||||||
resultVO.setResult(resultMap);
|
|
||||||
return resultVO;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
package com.dbnt.kcscbackend.admin.config.entity;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.Setter;
|
|
||||||
import org.hibernate.annotations.DynamicInsert;
|
|
||||||
import org.hibernate.annotations.DynamicUpdate;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import javax.persistence.*;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Entity
|
|
||||||
@NoArgsConstructor
|
|
||||||
@DynamicInsert
|
|
||||||
@DynamicUpdate
|
|
||||||
@Table(name = "tc_code_grp")
|
|
||||||
public class TcCodeGrp {
|
|
||||||
@Id
|
|
||||||
@Column(name = "grp_cd")
|
|
||||||
private String grpCd;
|
|
||||||
@Column(name = "grp_cd_nm")
|
|
||||||
private String grpCdNm;
|
|
||||||
@Column(name = "grp_cd_desc")
|
|
||||||
private String grpCdDesc;
|
|
||||||
@Column(name = "frst_crt_id")
|
|
||||||
private String frstCrtId;
|
|
||||||
@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;
|
|
||||||
@Column(name = "use_yn")
|
|
||||||
private String useYn;
|
|
||||||
}
|
|
||||||
|
|
@ -1,52 +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 java.io.Serializable;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Entity
|
|
||||||
@NoArgsConstructor
|
|
||||||
@DynamicInsert
|
|
||||||
@DynamicUpdate
|
|
||||||
@Table(name = "tc_code_item")
|
|
||||||
@IdClass(TcCodeItem.TcCodeItemId.class)
|
|
||||||
public class TcCodeItem {
|
|
||||||
@Id
|
|
||||||
@Column(name = "item_cd")
|
|
||||||
private String itemCd;
|
|
||||||
@Id
|
|
||||||
@Column(name = "grp_cd")
|
|
||||||
private String grpCd;
|
|
||||||
@Column(name = "item_nm")
|
|
||||||
private String itemNm;
|
|
||||||
@Column(name = "frst_crt_id")
|
|
||||||
private String frstCrtId;
|
|
||||||
@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;
|
|
||||||
@Column(name = "use_yn")
|
|
||||||
private String useYn;
|
|
||||||
@Column(name = "grp_order")
|
|
||||||
private Integer grpOrder;
|
|
||||||
|
|
||||||
@Embeddable
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public static class TcCodeItemId implements Serializable {
|
|
||||||
private String itemCd;
|
|
||||||
private String grpCd;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
package com.dbnt.kcscbackend.admin.config.mapper;
|
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface AdminConfigMapper {
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
package com.dbnt.kcscbackend.admin.config.repository;
|
|
||||||
|
|
||||||
import com.dbnt.kcscbackend.admin.config.entity.TcCodeGrp;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
|
|
||||||
public interface TcCodeGrpRepository extends JpaRepository<TcCodeGrp, String> {
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
package com.dbnt.kcscbackend.admin.config.repository;
|
|
||||||
|
|
||||||
import com.dbnt.kcscbackend.admin.config.entity.TcCodeItem;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface TcCodeItemRepository extends JpaRepository<TcCodeItem, TcCodeItem.TcCodeItemId> {
|
|
||||||
List<TcCodeItem> findByGrpCdOrderByGrpOrder(String grpCd);
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
package com.dbnt.kcscbackend.admin.config.service;
|
|
||||||
|
|
||||||
import com.dbnt.kcscbackend.admin.config.entity.TcCodeGrp;
|
|
||||||
import com.dbnt.kcscbackend.admin.config.entity.TcCodeItem;
|
|
||||||
import com.dbnt.kcscbackend.admin.config.mapper.AdminConfigMapper;
|
|
||||||
import com.dbnt.kcscbackend.admin.config.repository.TcCodeGrpRepository;
|
|
||||||
import com.dbnt.kcscbackend.admin.config.repository.TcCodeItemRepository;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class AdminConfigService extends EgovAbstractServiceImpl {
|
|
||||||
|
|
||||||
private final TcCodeGrpRepository codeGrpRepository;
|
|
||||||
private final TcCodeItemRepository codeItemRepository;
|
|
||||||
private final AdminConfigMapper adminConfigMapper;
|
|
||||||
|
|
||||||
public List<TcCodeGrp> selectCodeGrpList(){
|
|
||||||
return codeGrpRepository.findAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<TcCodeItem> selectCodeItemList(String grpCd){
|
|
||||||
return codeItemRepository.findByGrpCdOrderByGrpOrder(grpCd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -66,7 +66,6 @@ public class SecurityConfig {
|
||||||
"/auth/join",//회원가입
|
"/auth/join",//회원가입
|
||||||
"/auth/findId", // id 찾기
|
"/auth/findId", // id 찾기
|
||||||
"/auth/findPw", // pw 찾기
|
"/auth/findPw", // pw 찾기
|
||||||
|
|
||||||
"/cmm/main/**.do", // 메인페이지
|
"/cmm/main/**.do", // 메인페이지
|
||||||
"/cmm/fms/FileDown.do", //파일 다운로드
|
"/cmm/fms/FileDown.do", //파일 다운로드
|
||||||
"/cmm/fms/getImage.do", //갤러리 이미지보기
|
"/cmm/fms/getImage.do", //갤러리 이미지보기
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@Transactional
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class StandardCodeService extends EgovAbstractServiceImpl {
|
public class StandardCodeService extends EgovAbstractServiceImpl {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.dbnt.kcscbackend.admin.config.mapper.AdminConfigMapper">
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
Loading…
Reference in New Issue