Merge branch 'dev' into dev-reglt-tab-feat

main
minuk926 2 years ago
commit a3a2c2d110

@ -0,0 +1,30 @@
package kr.xit.fims.biz.cmm.extr;
import kr.xit.fims.biz.ec.model.CctvCrackdownDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class CctvBusOnlyCrackDownFactory extends ExtrInterfaceDataFactory<CctvCrackdownDTO.Request, CctvCrackdownDTO.BusOnly>{
private CctvCrackdownDTO.BusOnly dto;
@Override
public CctvCrackdownDTO.BusOnly parseData(CctvCrackdownDTO.Request reqDto) {
return CctvCrackdownDTO.BusOnly.builder()
.carModel("dkkdkd").build();
}
// @Override
// public CctvCrackdownDTO.BusOnly createDTO() {
// return CctvCrackdownDTO.BusOnly.builder()
// .carModel("dkkdkd").build();
// }
}

@ -0,0 +1,93 @@
package kr.xit.fims.biz.cmm.extr;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import org.apache.commons.collections4.ListUtils;
import org.apache.commons.io.IOUtils;
import org.springframework.web.multipart.MultipartFile;
import kr.xit.fims.biz.ec.model.CctvCrackdownDTO;
import kr.xit.framework.support.exception.BizRuntimeException;
import kr.xit.framework.support.util.constants.MessageKey;
import lombok.Builder;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Builder
public class CctvBusOnlyCrackDownService implements IExtrStrategyService {
// private final IEcCctvCrackdownMapper mapper;
// private final IEcCtznSttemntMapper ctznSttemntMapper;
//
// private final ICmmFileService cmmFileService;
private final CctvCrackdownDTO.Request reqDTO;
private final CctvCrackdownDTO.BusOnly dto;
@Override
public void saveInterfaceData() {
// 단속정보메타 1 + 이미지파일 4 = 5개로 구성
if(reqDTO.getFiles().size() % 5 != 0){
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "단속정보[파일]가 부정확 합니다\n다시 확인해 주세요.");
}
final Comparator<MultipartFile> comp = (mf1, mf2) -> String.CASE_INSENSITIVE_ORDER.compare(mf1.getOriginalFilename(), mf2.getOriginalFilename());
List<MultipartFile> sortedFileList = reqDTO.getFiles().stream()
.sorted(comp)
.collect(Collectors.toList());
//Arrays.copyOfRange(sortedFileList.toArray(), 0, 4);
List<List<MultipartFile>> listByMd = ListUtils.partition(sortedFileList, 5);
for(int idx = 0; idx < listByMd.size(); idx++){
List<MultipartFile> mfList = listByMd.get(idx);
MultipartFile mf = mfList.get(0);
String[] txtNames = mf.getOriginalFilename().split("[.]");
if(txtNames.length != 2 || !Objects.equals("txt", txtNames[1].toLowerCase()))
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, String.format("[%s]%s", txtNames[0], "의 단속정보[파일]가 없습니다."));
//String[] mdInfos = txtNames[0].split("_");
// meta정보 read
List<String> records = new ArrayList<>();
try(InputStream inputStream = mf.getInputStream();){
records.addAll(IOUtils.readLines(inputStream, "euc-kr"));
} catch (IOException e) {
// handle exception
}
// data set
// CctvCrackdownDTO.ExtrlRegltCntc extrRegltDTO = getExtrlRegltCntcDTO(txtNames[0], records);
// extrRegltDTO.setSysCode(getUserInfo().getOrgnztId());
// extrRegltDTO.setInsttCode(getUserInfo().getPstinstCode());
//
// if(records.size() >= 3){
// extrRegltDTO.setRegltSeCode(FimsConst.RegltSeCode.CCTV_DRV.getCode());
// }else{
// extrRegltDTO.setRegltSeCode(FimsConst.RegltSeCode.CCTV_FIX.getCode());
// }
// // 외부연계 데이타 생성
// //mapper.insertEcExtrlRegltCntc(extrRegltDTO);
//
// // CCTV image 저장
// List<MultipartFile> cpListMf = new ArrayList<>(mfList);
// cpListMf.remove(0);
// cmmFileService.saveFiles(getFileMst(extrRegltDTO.getRegltSeCode(), extrRegltDTO.getExtrlRegltCntcId()), cpListMf);
}
}
@Override
public void saveReglt() {
dto.setGpsX("xxxxxxxxx");;
}
public void saveErpp() {
dto.setGpsY("yyyyyyyyyyy");
}
}

@ -0,0 +1,14 @@
package kr.xit.fims.biz.cmm.extr;
public abstract class ExtrInterfaceDataFactory<E, T> {
//private T t;
public T parseInterfaceData(E e){
return this.parseData(e);
//return this.createDTO();
}
public abstract T parseData(E e);
//public abstract T createDTO();
}

@ -0,0 +1,43 @@
package kr.xit.fims.biz.cmm.extr;
import kr.xit.fims.biz.ec.model.CctvCrackdownDTO;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class ExtrInterfaceService implements IExtrInterfaceService{
@Override
public void processSave(IExtrStrategyService service){
service.saveInterfaceData();
}
@Override
public void processReglt(IExtrStrategyService service){
service.saveReglt();
}
@Override
public void processErpp(IExtrStrategyService service){
service.saveErpp();
}
public static void main(String[] args) {
ExtrInterfaceDataFactory<CctvCrackdownDTO.Request, CctvCrackdownDTO.BusOnly> factory = new CctvBusOnlyCrackDownFactory();
CctvCrackdownDTO.BusOnly dto = factory.parseInterfaceData(CctvCrackdownDTO.Request.builder().build());
log.debug("{}", dto);
ExtrInterfaceService eds = new ExtrInterfaceService();
IExtrStrategyService strategy = new CctvBusOnlyCrackDownService(CctvCrackdownDTO.Request.builder().build(), dto);
eds.processSave(strategy);
log.debug("{}", dto);
eds.processReglt(strategy);
log.debug("{}", dto);
eds.processErpp(strategy);
log.debug("{}", dto);
}
}

@ -0,0 +1,18 @@
package kr.xit.fims.biz.cmm.extr;
import kr.xit.framework.biz.cmm.model.XitLoginVO;
import kr.xit.framework.core.utils.XitCmmnUtil;
public interface IExtrInterfaceService {
void processSave(IExtrStrategyService service);
void processReglt(IExtrStrategyService service);
void processErpp(IExtrStrategyService service);
default XitLoginVO getUserInfo(){
return XitCmmnUtil.getUserInfo();
}
}

@ -0,0 +1,14 @@
package kr.xit.fims.biz.cmm.extr;
import kr.xit.framework.biz.cmm.model.XitLoginVO;
import kr.xit.framework.core.utils.XitCmmnUtil;
public interface IExtrStrategyService {
void saveInterfaceData();
void saveReglt();
void saveErpp();
default XitLoginVO getUserInfo(){
return XitCmmnUtil.getUserInfo();
}
}

@ -0,0 +1 @@
<mxfile host="drawio-plugin" modified="2023-01-13T03:44:27.993Z" agent="5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36" etag="JqmAsAEyE0D9sJjuU4hB" version="20.5.3" type="embed"><diagram id="q4UBqUGSLsDwTan9hy4u" name="페이지-1"><mxGraphModel dx="656" dy="482" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="ExtrInterfaceServiceStrategy" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" parent="1" vertex="1"><mxGeometry x="35" y="47.5" width="320" height="80" as="geometry"/></mxCell><mxCell id="4" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="2" vertex="1"><mxGeometry y="26" width="320" height="8" as="geometry"/></mxCell><mxCell id="5" value="+ processReglt(method: IExtrDataInterfaceMethod): void&#10;+ processErpp(method: IExtrDataInterfaceMethod): void" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fontStyle=1" parent="2" vertex="1"><mxGeometry y="34" width="320" height="46" as="geometry"/></mxCell><mxCell id="26" style="edgeStyle=none;html=1;entryX=0.557;entryY=1.129;entryDx=0;entryDy=0;entryPerimeter=0;dashed=1;endArrow=block;endFill=0;" parent="1" source="14" target="23" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="14" value="CctvCrackDown" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" parent="1" vertex="1"><mxGeometry x="500" y="260" width="180" height="100" as="geometry"/></mxCell><mxCell id="16" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="14" vertex="1"><mxGeometry y="26" width="180" height="8" as="geometry"/></mxCell><mxCell id="17" value="+ processReglt(): T&#10;+ processErpp(): T" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="14" vertex="1"><mxGeometry y="34" width="180" height="66" as="geometry"/></mxCell><mxCell id="20" style="edgeStyle=none;html=1;dashed=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="5" target="21" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="21" value="IExtrStrategyService&amp;lt;T&amp;gt;&lt;br&gt;&amp;lt;&amp;lt; interface&amp;gt;&amp;gt;" style="swimlane;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=29;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;html=1;" parent="1" vertex="1"><mxGeometry x="500" y="47.5" width="160" height="100" as="geometry"/></mxCell><mxCell id="23" value="+ processReglt(): T&lt;br&gt;+ processErpp(): T" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="21" vertex="1"><mxGeometry y="29" width="160" height="71" as="geometry"/></mxCell></root></mxGraphModel></diagram></mxfile>

@ -22,7 +22,7 @@ import kr.xit.framework.biz.mng.auth.model.XitAuthorGroupInfoVO;
public interface IAuthGrpMgtMapper {
List<XitAuthorGroupInfoVO> selectAuthorGroupInfos(final Map<String, Object> paraMap, final RowBounds rowBounds);
XitAuthorGroupInfoVO selectAuthorGroupInfo(final String groupId);
<T> XitAuthorGroupInfoVO selectAuthorGroupInfo(final T t);
int insertAuthorGroupInfo(final XitAuthorGroupInfoVO vo);
int updateAuthorGroupInfo(final XitAuthorGroupInfoVO vo);
int deleteAuthorGroupInfo(final String groupId);

@ -42,8 +42,8 @@ public class AuthAuthorMgtService implements IAuthAuthorMgtService {
@Override
@Transactional(readOnly = true)
public XitAuthorInfoVO findAuthAuthor(final String authorCode) {
return mapper.selectAuthorInfo(authorCode);
public <T> XitAuthorInfoVO findAuthAuthor(final T t) {
return mapper.selectAuthorInfo(t);
}
/* =====================================================

@ -42,8 +42,8 @@ public class AuthGrpMgtService implements IAuthGrpMgtService {
@Override
@Transactional(readOnly = true)
public XitAuthorGroupInfoVO findAuthGrp(final String groupId) {
return mapper.selectAuthorGroupInfo(groupId);
public <T> XitAuthorGroupInfoVO findAuthGrp(final T t) {
return mapper.selectAuthorGroupInfo(t);
}
@Override

@ -33,8 +33,8 @@ public class AuthRoleMgtService implements IAuthRoleMgtService {
@Override
@Transactional(readOnly = true)
public XitRoleInfoVO findAuthRole(final String roleCode) {
return mapper.selectAuthRole(roleCode);
public <T> XitRoleInfoVO findAuthRole(final T t) {
return mapper.selectAuthRole(t);
}
@Override

@ -23,7 +23,7 @@ public interface IAuthAuthorMgtService {
/**
* <pre> : </pre>
* @param searchVO
* @param paraMap
* @return List<XitAuthRegMngVO>
* @author:
* @date: 2020. 4. 16.
@ -31,7 +31,7 @@ public interface IAuthAuthorMgtService {
List<XitAuthorInfoVO> findAuthAuthors(final Map<String,Object> paraMap, final RowBounds rowBounds);
List<XitAuthorInfoVO> findAuthAuthors(final Map<String,Object> paraMap);
XitAuthorInfoVO findAuthAuthor(final String authorCode);
<T> XitAuthorInfoVO findAuthAuthor(final T t);
void addAuthAuthor(final XitAuthorInfoVO vo);
void modifyAuthAuthor(final XitAuthorInfoVO vo);
void removeAuthAuthor(final String authorCode);

@ -20,7 +20,7 @@ import kr.xit.framework.biz.mng.auth.model.XitAuthorGroupInfoVO;
public interface IAuthGrpMgtService {
List<XitAuthorGroupInfoVO> findAuthGrps(final Map<String,Object> paraMap, final RowBounds rowBounds);
XitAuthorGroupInfoVO findAuthGrp(final String groupId);
<T> XitAuthorGroupInfoVO findAuthGrp(final T t);
void addAuthGrp(final XitAuthorGroupInfoVO vo);
void modifyAuthGrp(final XitAuthorGroupInfoVO vo);
void removeAuthGrp(final String authorCode);

@ -22,7 +22,7 @@ public interface IAuthRoleMgtService {
/**
* <pre> : </pre>
* @param searchVO
* @param paraMap
* @return List<XitAuthRuleMngVO>
* @author:
* @date: 2020. 4. 16.
@ -31,12 +31,12 @@ public interface IAuthRoleMgtService {
/**
* <pre> : </pre>
* @param vo
* @param t
* @return XitAuthRuleMngVO
* @author:
* @date: 2020. 4. 16.
*/
XitRoleInfoVO findAuthRole(final String roleCode);
<T> XitRoleInfoVO findAuthRole(final T t);
/**
* <pre> : </pre>

@ -50,14 +50,14 @@ public class AuthAuthorMgtController {
}
@RequestMapping(value = "/mngAuthAuthorMgtPopup")
public ModelAndView mngAuthAuthorMgtPopup(@ModelAttribute final XitAuthorInfoVO vo){
public ModelAndView mngAuthAuthorMgtPopup(final XitAuthorInfoVO vo){
ModelAndView mav = new ModelAndView();
if(Checks.isEmpty(vo) || Checks.isEmpty(vo.getAuthorCode())){
mav.addObject("authorInfoVO", new XitAuthorInfoVO());
mav.addObject("pageTitle", "권한 등록");
} else {
mav.addObject("authorInfoVO", vo);
mav.addObject("authorInfoVO", service.findAuthAuthor(vo));
mav.addObject("pageTitle", "권한 변경");
}
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/auth/mngAuthAuthorMgtPopup.popup");

@ -57,7 +57,7 @@ public class AuthGrpMgtController {
mav.addObject("groupManage", new XitAuthorGroupInfoVO());
mav.addObject("pageTitle", "권한그룹 등록");
} else {
mav.addObject("groupManage", vo);
mav.addObject("groupManage", service.findAuthGrp(vo));
mav.addObject("pageTitle", "권한그룹 변경");
}
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/auth/mngAuthGrpMgtPopup.popup");

@ -57,7 +57,7 @@ public class AuthRoleMgtController {
mav.addObject("roleManage", new XitRoleInfoVO());
mav.addObject("pageTitle", "롤 등록");
} else {
mav.addObject("roleManage", vo);
mav.addObject("roleManage", service.findAuthRole(vo));
mav.addObject("pageTitle", "롤 정보 변경");
}
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/auth/mngAuthRoleMgtPopup.popup");

@ -70,4 +70,7 @@ public class XitBbsTmplateMngVO {
/** 사용여부 */
private String useAt;
/** 코드 명 */
private String codeNm;
}

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import kr.xit.framework.support.util.Checks;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
@ -56,8 +57,13 @@ public class BoardTmplMgtController {
ModelAndView mav = new ModelAndView();
mav.addObject("templateInf", vo);
mav.addObject("pageTitle", "게시판 템플릿 등록 / 변경");
if(Checks.isEmpty(vo.getTmplatId())){
mav.addObject("templateInf", vo);
mav.addObject("pageTitle", "게시판 템플릿 등록");
} else {
mav.addObject("templateInf", service.findBoardTmpl(vo));
mav.addObject("pageTitle", "게시판 템플릿 변경");
}
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/bbs/mngBoardTmplMgtPopup.popup");
return mav;
}

@ -12,7 +12,7 @@ import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO;
public interface ICodeCfnMgtMapper {
List<XitClCodeMngVO> selectCmmnClCodes(final Map<String, Object> paraMap, final RowBounds rowBounds);
XitClCodeMngVO selectCmmnClCode(final String clCode);
<T> XitClCodeMngVO selectCmmnClCode(final T t);
int insertCmmnClCode(final XitClCodeMngVO vo);
int updateCmmnClCode(final XitClCodeMngVO vo);

@ -79,4 +79,9 @@ public class XitDetailCodeMngVO {
*/
private String lastUpdusrId;
/*
*
*/
private String clCode;
}

@ -30,6 +30,10 @@ public class CodeCfnMgtService implements ICodeCfnMgtService {
return mapper.selectCmmnClCodes(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public <T> XitClCodeMngVO findCodeCfn(final T t){return mapper.selectCmmnClCode(t);}
@Override
@Transactional
public void addCodeCfn(final XitClCodeMngVO vo) {

@ -26,6 +26,10 @@ public class CodeDtlMgtService implements ICodeDtlMgtService {
return mapper.selectCmmnDtlCodes(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public <T> XitDetailCodeMngVO findCodeDtl(final T t){return mapper.selectCmmnDtlCode(t);}
@Override
@Transactional
public void addCodeDtl(final XitDetailCodeMngVO vo) {

@ -30,6 +30,10 @@ public class CodeGrpMgtService implements ICodeGrpMgtService {
return mapper.selectCmmnGrpCodes(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public <T> XitCmmnCodeMngVO findCodeGrp(final T t){return mapper.selectCmmnGrpCode(t);}
@Override
@Transactional(readOnly = true)
public void addCodeGrp(final XitCmmnCodeMngVO vo) {

@ -22,6 +22,8 @@ public interface ICodeCfnMgtService {
List<XitClCodeMngVO> findCodeCfns(final Map<String, Object> paraMap, final RowBounds rowBounds);
<T> XitClCodeMngVO findCodeCfn(final T t);
void addCodeCfn(final XitClCodeMngVO vo);

@ -23,6 +23,8 @@ public interface ICodeDtlMgtService {
List<XitDetailCodeMngVO> findCodeDtls(final Map<String, Object> paraMap, final RowBounds rowBounds);
<T> XitDetailCodeMngVO findCodeDtl(final T t);
void addCodeDtl(final XitDetailCodeMngVO vo);
void modifyCodeDtl(final XitDetailCodeMngVO vo);

@ -23,6 +23,8 @@ public interface ICodeGrpMgtService {
List<XitCmmnCodeMngVO> findCodeGrps(final Map<String, Object> paraMap, final RowBounds rowBounds);
<T> XitCmmnCodeMngVO findCodeGrp(final T t);
void addCodeGrp(final XitCmmnCodeMngVO vo);
void modifyCodeGrp(final XitCmmnCodeMngVO vo);

@ -2,9 +2,7 @@ package kr.xit.framework.biz.mng.code.web;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import kr.xit.framework.support.util.Checks;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
@ -15,11 +13,8 @@ import org.springframework.web.servlet.ModelAndView;
import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO;
import kr.xit.framework.biz.mng.code.service.ICodeCfnMgtService;
import kr.xit.framework.biz.mng.menu.model.XitMenuInfoVO;
import kr.xit.framework.core.constants.FrameworkConstants;
import kr.xit.framework.core.message.XitMessageSource;
import kr.xit.framework.core.model.ResultResponse;
import kr.xit.framework.core.validation.XitBeanValidator;
import kr.xit.framework.support.mybatis.MybatisUtils;
import kr.xit.framework.support.util.AjaxMessageMapRenderer;
import kr.xit.framework.support.util.ValidationError;
@ -41,8 +36,13 @@ public class CodeCfnMgtController {
public ModelAndView mngCodeCfnMgtPopup(final XitClCodeMngVO vo) {
ModelAndView mav = new ModelAndView();
mav.addObject("cmmnClCode", vo);
mav.addObject("pageTitle", "분류 코드 등록 / 변경");
if(Checks.isEmpty(vo.getClCode())){
mav.addObject("cmmnClCode", vo);
mav.addObject("pageTitle", "분류 코드 등록");
} else {
mav.addObject("cmmnClCode", service.findCodeCfn(vo));
mav.addObject("pageTitle", "분류 코드 변경");
}
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/code/mngCodeCfnMgtPopup.popup");
return mav;
}

@ -2,6 +2,7 @@ package kr.xit.framework.biz.mng.code.web;
import java.util.Map;
import kr.xit.framework.support.util.Checks;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
@ -37,8 +38,14 @@ public class CodeDtlMgtController {
ModelAndView mav = new ModelAndView();
mav.addObject("cfnCodeList", CacheServiceUtils.getComboCodes(null, "CMM_CFN"));
mav.addObject("cmmnDetailCode", vo);
mav.addObject("pageTitle", "공통 코드 등록 / 변경");
if(Checks.isEmpty(vo.getCodeId())){
mav.addObject("cmmnDetailCode", vo);
mav.addObject("pageTitle", "공통 코드 등록");
} else {
mav.addObject("cmmnDetailCode", service.findCodeDtl(vo));
mav.addObject("pageTitle", "공통 코드 변경");
}
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/code/mngCodeDtlMgtPopup.popup");
return mav;
}

@ -2,6 +2,7 @@ package kr.xit.framework.biz.mng.code.web;
import java.util.Map;
import kr.xit.framework.support.util.Checks;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
@ -35,8 +36,13 @@ public class CodeGrpMgtController {
public ModelAndView mngCodeGrpMgtPopup(final XitCmmnCodeMngVO vo) {
ModelAndView mav = new ModelAndView();
mav.addObject("cmmnCode", vo);
mav.addObject("pageTitle", "공통 코드 그룹 등록 / 변경");
if(Checks.isEmpty(vo.getCodeId())){
mav.addObject("cmmnCode", vo);
mav.addObject("pageTitle", "공통 코드 그룹 등록");
} else {
mav.addObject("cmmnCode", service.findCodeGrp(vo));
mav.addObject("pageTitle", "공통 코드 그룹 변경");
}
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/code/mngCodeGrpMgtPopup.popup");
return mav;
}

@ -26,10 +26,12 @@ public interface IMenuMgtMapper {
<T> List<XitMenuInfoVO> selectMenuInfos(final T t, final RowBounds rowBounds);
<T> List<XitMenuInfoVO> selectMenuInfos(final T t);
<T> XitMenuInfoVO selectMenuInfo(final T t);
<T> List<XitMenuInfoVO> selectMenuCreatDtls(final T t);
int insertMenuInfo(final XitMenuInfoVO vo);
int updateMenuInfo(final XitMenuInfoVO vo);
int deleteMenuInfo(final String menuNo);
int deleteMenuCreatDtlsList(final String menuNo);

@ -29,6 +29,7 @@ public interface IMenuMgtService {
* @date: 2022. 10. 18.
*/
List<XitMenuInfoVO> findMenus(final Map<String, Object> paraMap, final RowBounds rowBounds);
<T> XitMenuInfoVO findMenu(final T t);
void addMenu(final XitMenuInfoVO vo);
void modifyMenu(final XitMenuInfoVO vo);

@ -45,6 +45,10 @@ public class MenuMgtService implements IMenuMgtService {
return mapper.selectMenuInfos(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public <T> XitMenuInfoVO findMenu(final T t){return mapper.selectMenuInfo(t); }
@Override
@Transactional
public void addMenu(final XitMenuInfoVO vo) {
@ -78,8 +82,10 @@ public class MenuMgtService implements IMenuMgtService {
if(mapper.selectMenuInfos(XitMenuInfoVO.builder().upperMenuNo(menuNo).build()).size() > 0)
throw BizRuntimeException.create("fail.common.delete.upperMenuExist");
//권한별 메뉴 관리 조회 후 삭제
if(mapper.selectMenuCreatDtls(XitMenuInfoVO.builder().menuNo(menuNo).build()).size() > 0)
mapper.deleteMenuCreatDtlsList(menuNo);
//TODO: xit_menu_creat_dtls 해당 정보 삭제후 실행???
mapper.deleteMenuInfo(menuNo);
cacheService.evictAllMenuCache();
}

@ -12,6 +12,7 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import kr.xit.framework.support.util.Checks;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
@ -71,8 +72,14 @@ public class MenuMgtController {
public ModelAndView mngMenuMgtPopup(final XitMenuInfoVO vo) {
ModelAndView mav = new ModelAndView();
mav.addObject("menuManageVO", vo);
mav.addObject("pageTitle", "메뉴 정보 등록 / 변경");
if(Checks.isEmpty(vo.getMenuNm())){
mav.addObject("menuManageVO", vo);
mav.addObject("pageTitle", "메뉴 정보 등록");
} else {
mav.addObject("menuManageVO", service.findMenu(vo));
mav.addObject("pageTitle", "메뉴 정보 변경");
}
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/mngMenuMgtPopup.popup");
return mav;
}

@ -16,7 +16,7 @@
, role_creat_de
FROM xit_role_info
<where>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(RoleCode)">
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(roleCode)">
AND role_code = #{roleCode}
</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(roleNm)">

@ -26,9 +26,6 @@
<where>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(tmplatSeCode)">
AND xti.tmplat_se_code = #{tmplatSeCode}
</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(tmplatNm)">
AND INSTR(xti.tmplat_nm, #{tmplatNm}) > 0
</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(codeNm)">
AND INSTR(cdc.code_nm #{codeNm}) > 0
@ -39,12 +36,18 @@
<select id="selectBoardTmpls" resultType="kr.xit.framework.biz.mng.bbs.model.XitBbsTmplateMngVO">
/* board-tmpl-mysql-mapper|selectBoardTmpls-템플릿 목록 조회|julim */
<include refid="sqlTmplInfo"/>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(tmplatNm)">
AND INSTR(xti.tmplat_nm, #{tmplatNm}) > 0
</if>
ORDER BY xti.frst_regist_pnttm DESC
</select>
<select id="selectBoardTmpl" resultType="kr.xit.framework.biz.mng.bbs.model.XitBbsTmplateMngVO">
/* board-tmpl-mysql-mapper|selectBoardTmpl-템플릿 정보 조회|julim */
<include refid="sqlTmplInfo"/>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(tmplatId)">
AND xti.tmplat_id = #{tmplatId}
</if>
</select>
<insert id="insertBoardTmpl">

@ -94,7 +94,9 @@
, etc_1 = IF(etc_1 = #{etc1}, etc_1, #{etc1})
, etc_2 = IF(etc_2 = #{etc2}, etc_2, #{etc2})
, etc_3 = IF(etc_3 = #{etc3}, etc_3, #{etc3})
, ordr = IF(ordr = #{ordr}, ordr, #{ordr})
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(ordr)">
, ordr = IF(ordr = #{ordr}, ordr, #{ordr})
</if>
, use_at = IF(use_at = #{useAt}, use_at, #{useAt})
, last_updt_pnttm = NOW()
, last_updusr_id = #{lastUpdusrId}

@ -39,6 +39,15 @@
<include refid="sqlMenuInfo"/>
</select>
<select id="selectMenuCreatDtls" resultType="kr.xit.framework.biz.mng.menu.model.XitMenuInfoVO">
/* menu-mysql-mapper|selectMenuCreatDtls-메뉴생성내역 권한 데이터 조회|julim */
SELECT menu_no
FROM xit_menu_creat_dtls
<where>
AND menu_no = #{menuNo}
</where>
</select>
<insert id="insertMenuInfo" parameterType="kr.xit.framework.biz.mng.menu.model.XitMenuInfoVO">
/* menu-mysql-mapper|insertMenuInfo-메뉴 정보 등록|julim */
INSERT
@ -90,6 +99,14 @@
</delete>
<delete id="deleteMenuCreatDtlsList">
/* menu-mysql-mapper|deleteMenuCreatDtlsList-메뉴생성내역 권한 데이터 삭제|julim */
DELETE
FROM xit_menu_creat_dtls
WHERE menu_no = #{menuNo}
</delete>
<delete id="deleteAllMenuCreatDtlsList">
/* menu-mysql-mapper|deleteAllMenuCreatDtlsList-메뉴생성내역 전체데이터 삭제|julim */
DELETE

@ -156,17 +156,11 @@
alert('변경된 내역이 없습니다.');
return false;
}
data = $(document.authHierarchyManage).serialize();
if(data.indexOf('%2C') > 0){
data = decodeURIComponent(data);
data = data.split(',').join('&authorCode=')
}
if(confirm("저장 하시겠습니까?")) {
cmmAjax({
url: '<c:url value="/framework/biz/mng/auth/saveAuthHierarchy.do"/>'
, data: $(document.authHierarchyManage).serialize()
, data: data
,success: () => {
//$('#btnReload').css('display', 'inline-block');
}
@ -197,15 +191,13 @@
if($(this).hasClass('separator')){ //구분자 일때
//배열에 담기
if(sb.length>0)
arrAuthorCode.push(sb);
// arrAuthorCode.push(sb);
arrAuthorCode.push(sb.join(';'));
//StringBuffer 초기화
sb = [];
console.log(arrAuthorCode)
}else{ //구분자가 아닐때
const authorCode = $(this).find('#authorCode').val();
console.log(arrAuthorCode, arrAuthorCode.length)
sb.push($(this).find('#authorCode').val());
}

Loading…
Cancel
Save