관리자 사이트 수정 중

This commit is contained in:
leejunho 2025-05-14 18:28:59 +09:00
parent 0f5afe2536
commit 1f68254688
262 changed files with 17951 additions and 78305 deletions

48
pom.xml
View File

@ -36,12 +36,6 @@
<enabled>false</enabled>
</snapshots>
</repository>
<!-- Komoran 형태소분석기 -->
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<!-- Komoran 형태소분석기 -->
</repositories>
<dependencies>
@ -282,14 +276,6 @@
<version>3.1</version>
</dependency>
<dependency>
<groupId>nl.captcha</groupId>
<artifactId>simplecaptcha</artifactId>
<version>1.2.1</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/simplecaptcha-1.2.1_exp.jar</systemPath>
</dependency>
<!-- sci 평가 siren24. 본인인증 -->
<dependency>
<groupId>sciSecuPCC</groupId>
@ -373,13 +359,6 @@
<version>1.0</version>
</dependency>
<!-- eGov 호환성 인증을 위한 패키지명 변경 작업하고, was 에러가 발생하여 추가함. -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator-annotation-processor</artifactId>
<version>4.1.0.Final</version>
</dependency>
<!-- Solr -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
@ -464,7 +443,6 @@
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/ICERTSecu_JDK18.jar</systemPath>
</dependency>
<!-- crpyto -->
<dependency>
<groupId>egovframework.rte</groupId>
@ -506,12 +484,6 @@
<artifactId>jai-imageio-core</artifactId>
<version>1.3.1</version>
</dependency>
<!-- Komoran 형태소 분석기 -->
<dependency>
<groupId>com.github.shin285</groupId>
<artifactId>KOMORAN</artifactId>
<version>3.3.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
@ -560,26 +532,6 @@
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<components>
<component>
<name>hbm2ddl</name>
<implementation>annotationconfiguration</implementation>
</component>
</components>
</configuration>
<dependencies>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.3.2</version>
</dependency>
</dependencies>
</plugin>
<!-- EMMA -->
<plugin>
<groupId>org.codehaus.mojo</groupId>

View File

@ -1,62 +0,0 @@
package itn.com.uss.ion.cnf.service;
import java.util.List;
import org.springframework.stereotype.Repository;
import itn.com.cmm.service.impl.EgovComAbstractDAO;
@Repository("captchaMngDAO")
public class CaptchaMngDAO extends EgovComAbstractDAO{
public CaptchaMngVO selectCaptchaMngVO(CaptchaMngVO captchaMngVO) throws Exception{
return (CaptchaMngVO)select("captchaMngDAO.selectCaptchaMngVO", captchaMngVO);
}
public int selectCaptchaMngCnt(CaptchaMngVO captchaMngVO) throws Exception{
return (int)select("captchaMngDAO.selectCaptchaMngCnt", captchaMngVO);
}
@SuppressWarnings("unchecked")
public List<CaptchaMngVO> selectCaptchaMngList(CaptchaMngVO captchaMngVO) throws Exception{
return (List<CaptchaMngVO>)list("captchaMngDAO.selectCaptchaMngList", captchaMngVO);
}
public void insertCaptchaMng(CaptchaMngVO captchaMngVO) throws Exception{
insert("captchaMngDAO.insertCaptchaMng", captchaMngVO);
}
public void updateCaptchaMng(CaptchaMngVO captchaMngVO) throws Exception{
update("captchaMngDAO.updateCaptchaMng", captchaMngVO);
}
public void deleteCaptchaMng(CaptchaMngVO captchaMngVO) throws Exception{
delete("captchaMngDAO.deleteCaptchaMng", captchaMngVO);
}
@SuppressWarnings("unchecked")
public List<CaptchaMngVO> selectCaptchaSiteList(CaptchaMngVO captchaMngVO) throws Exception{
return (List<CaptchaMngVO>)list("captchaMngDAO.selectCaptchaSiteList", captchaMngVO);
}
public int selectCaptchaSiteCnt(CaptchaMngVO captchaMngVO) throws Exception{
return (int)select("captchaMngDAO.selectCaptchaSiteCnt", captchaMngVO);
}
public CaptchaMngVO selectCaptchaSiteVO(CaptchaMngVO captchaMngVO) throws Exception{
return (CaptchaMngVO)select("captchaMngDAO.selectCaptchaSiteVO", captchaMngVO);
}
public void insertCaptchaSite(CaptchaMngVO captchaMngVO) throws Exception{
insert("captchaMngDAO.insertCaptchaSite", captchaMngVO);
}
public void updateCaptchaSite(CaptchaMngVO captchaMngVO) throws Exception{
update("captchaMngDAO.updateCaptchaSite", captchaMngVO);
}
public void deleteCaptchaSite(CaptchaMngVO captchaMngVO) throws Exception{
delete("captchaMngDAO.deleteCaptchaSite", captchaMngVO);
}
}

View File

@ -1,31 +0,0 @@
package itn.com.uss.ion.cnf.service;
import java.util.List;
public interface CaptchaMngService {
CaptchaMngVO selectCaptchaMngVO(CaptchaMngVO captchaMngVO) throws Exception;
List<CaptchaMngVO> selectCaptchaMngList(CaptchaMngVO captchaMngVO) throws Exception;
int selectCaptchaMngCnt(CaptchaMngVO captchaMngVO) throws Exception;
void insertCaptchaMng(CaptchaMngVO captchaMngVO) throws Exception;
void updateCaptchaMng(CaptchaMngVO captchaMngVO) throws Exception;
void deleteCaptchaMng(CaptchaMngVO tempMetaCaptchaMngVO) throws Exception;
List<CaptchaMngVO> selectCaptchaSiteList(CaptchaMngVO captchaMngVO) throws Exception;
int selectCaptchaSiteCnt(CaptchaMngVO captchaMngVO) throws Exception;
CaptchaMngVO selectCaptchaSiteVO(CaptchaMngVO captchaMngVO) throws Exception;
void insertCaptchaSite(CaptchaMngVO captchaMngVO) throws Exception;
void updateCaptchaSite(CaptchaMngVO captchaMngVO) throws Exception;
void deleteCaptchaSite(CaptchaMngVO tempMetaCaptchaMngVO) throws Exception;
}

View File

@ -1,85 +0,0 @@
package itn.com.uss.ion.cnf.service;
import java.io.Serializable;
import itn.com.cmm.ComDefaultVO;
public class CaptchaMngVO extends ComDefaultVO implements Serializable {
/**
*
*/
private static final long serialVersionUID = 8456587157460027592L;
private String captchaSj = "";
private String captchaCode = "";
private String captchaKey = "";
private String captchaCn = "";
private String registerId = "";
private String registPnttm = "";
private String updtPnttm = "";
public String getCaptchaCn() {
return captchaCn;
}
public void setCaptchaCn(String captchaCn) {
this.captchaCn = captchaCn;
}
public String getRegisterId() {
return registerId;
}
public void setRegisterId(String registerId) {
this.registerId = registerId;
}
public String getRegistPnttm() {
return registPnttm;
}
public void setRegistPnttm(String registPnttm) {
this.registPnttm = registPnttm;
}
public String getUpdtPnttm() {
return updtPnttm;
}
public void setUpdtPnttm(String updtPnttm) {
this.updtPnttm = updtPnttm;
}
public String getCaptchaSj() {
return captchaSj;
}
public void setCaptchaSj(String captchaSj) {
this.captchaSj = captchaSj;
}
public String getCaptchaCode() {
return captchaCode;
}
public void setCaptchaCode(String captchaCode) {
this.captchaCode = captchaCode;
}
public String getCaptchaKey() {
return captchaKey;
}
public void setCaptchaKey(String captchaKey) {
this.captchaKey = captchaKey;
}
}

View File

@ -1,81 +0,0 @@
package itn.com.uss.ion.cnf.service.impl;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
import itn.com.uss.ion.cnf.service.CaptchaMngDAO;
import itn.com.uss.ion.cnf.service.CaptchaMngService;
import itn.com.uss.ion.cnf.service.CaptchaMngVO;
import itn.com.uss.ion.cnf.service.ScriptMngDAO;
@Service("captchaMngService")
public class CaptchaMngServiceImpl extends EgovAbstractServiceImpl implements CaptchaMngService {
@Resource(name = "captchaMngDAO")
public CaptchaMngDAO captchaMngDAO;
@Override
public CaptchaMngVO selectCaptchaMngVO(CaptchaMngVO captchaMngVO) throws Exception {
return captchaMngDAO.selectCaptchaMngVO(captchaMngVO);
}
@Override
public List<CaptchaMngVO> selectCaptchaMngList(CaptchaMngVO captchaMngVO) throws Exception {
return captchaMngDAO.selectCaptchaMngList(captchaMngVO);
}
@Override
public int selectCaptchaMngCnt(CaptchaMngVO captchaMngVO) throws Exception {
return captchaMngDAO.selectCaptchaMngCnt(captchaMngVO);
}
@Override
public void insertCaptchaMng(CaptchaMngVO captchaMngVO) throws Exception {
captchaMngDAO.insertCaptchaMng(captchaMngVO);
}
@Override
public void updateCaptchaMng(CaptchaMngVO captchaMngVO) throws Exception {
captchaMngDAO.updateCaptchaMng(captchaMngVO);
}
@Override
public void deleteCaptchaMng(CaptchaMngVO captchaMngVO) throws Exception {
captchaMngDAO.deleteCaptchaMng(captchaMngVO);
}
@Override
public List<CaptchaMngVO> selectCaptchaSiteList(CaptchaMngVO captchaMngVO) throws Exception {
return captchaMngDAO.selectCaptchaSiteList(captchaMngVO);
}
@Override
public int selectCaptchaSiteCnt(CaptchaMngVO captchaMngVO) throws Exception {
return captchaMngDAO.selectCaptchaSiteCnt(captchaMngVO);
}
@Override
public CaptchaMngVO selectCaptchaSiteVO(CaptchaMngVO captchaMngVO) throws Exception {
return captchaMngDAO.selectCaptchaSiteVO(captchaMngVO);
}
@Override
public void insertCaptchaSite(CaptchaMngVO captchaMngVO) throws Exception {
captchaMngDAO.insertCaptchaSite(captchaMngVO);
}
@Override
public void updateCaptchaSite(CaptchaMngVO captchaMngVO) throws Exception {
captchaMngDAO.updateCaptchaSite(captchaMngVO);
}
@Override
public void deleteCaptchaSite(CaptchaMngVO captchaMngVO) throws Exception {
captchaMngDAO.deleteCaptchaSite(captchaMngVO);
}
}

View File

@ -23,13 +23,10 @@ import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.ComDefaultCodeVO;
import itn.com.cmm.EgovMessageSource;
import itn.com.cmm.LoginVO;
import itn.com.cmm.service.EgovCmmUseService;
import itn.com.cmm.util.RedirectUrlMaker;
import itn.com.uss.ion.cnf.service.CaptchaMngService;
import itn.com.uss.ion.cnf.service.CaptchaMngVO;
import itn.com.uss.ion.cnf.service.ImgExtMngService;
import itn.com.uss.ion.cnf.service.ImgExtMngVO;
import itn.com.uss.ion.cnf.service.MetaTagManageService;
@ -93,10 +90,6 @@ public class HomePageConfigController {
@Resource(name = "scriptMngService")
private ScriptMngService scriptMngService;
/** WordFilterService 방문자 스크립트 */
@Resource(name = "captchaMngService")
private CaptchaMngService captchaMngService;
/** WordFilterService 방문자 스크립트 */
@Resource(name = "imgExtMngService")
private ImgExtMngService imgExtMngService;
@ -539,294 +532,6 @@ public class HomePageConfigController {
return redirectUrlMaker.getRedirectUrl();
}
/**
* 캡차 관리 목록을 조회한다.
* @param popupManageVO
* @param model
* @return "uss/ion/pwm/listPopupManage"
* @throws Exception
*/
@RequestMapping(value = "/uss/ion/cnf/captchaMngList.do")
public String selectCaptchaMngList(@RequestParam Map<?, ?> commandMap, @ModelAttribute("searchVO") CaptchaMngVO captchaMngVO,
RedirectAttributes redirectAttributes, ModelMap model ,HttpSession session ) throws Exception {
/** EgovPropertyService.sample */
captchaMngVO.setPageUnit(propertiesService.getInt("pageUnit"));
captchaMngVO.setPageSize(propertiesService.getInt("pageSize"));
/** pageing */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(captchaMngVO.getPageIndex());
paginationInfo.setRecordCountPerPage(captchaMngVO.getPageUnit());
paginationInfo.setPageSize(captchaMngVO.getPageSize());
captchaMngVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
captchaMngVO.setLastIndex(paginationInfo.getLastRecordIndex());
captchaMngVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
if(null != loginVO && !"super".equals(loginVO.getSiteId())){ //리스트, 수정, 입력
captchaMngVO.setSiteId(loginVO.getSiteId());
}
List<CaptchaMngVO> captchaMngList = new ArrayList<CaptchaMngVO>();
captchaMngList = captchaMngService.selectCaptchaMngList(captchaMngVO);
model.addAttribute("captchaMngList", captchaMngList);
int totCnt = captchaMngService.selectCaptchaMngCnt(captchaMngVO);
/*캡차종류*/
ComDefaultCodeVO vo = new ComDefaultCodeVO();
vo.setCodeId("UNI001");
List<?> codeList = cmmUseService.selectCmmCodeDetail(vo);
model.addAttribute("codeList", codeList);
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", paginationInfo);
return "uss/ion/cnf/CaptchaMngList";
}
/* 캡차수정/등록 view*/
@RequestMapping(value="/uss/ion/cnf/captchaMngModifyView.do")
public String captchaMngModifyView(@RequestParam Map<?, ?> commandMap, HttpServletRequest request, CaptchaMngVO captchaMngVO,
Model model , HttpSession session) throws Exception {
if("Modify".equals((String)commandMap.get("pageType"))){ //수정
captchaMngVO = captchaMngService.selectCaptchaMngVO(captchaMngVO);
}
model.addAttribute("captchaMngVO", captchaMngVO);
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
model.addAttribute("siteId", loginVO.getSiteId());
/*캡차종류*/
ComDefaultCodeVO vo = new ComDefaultCodeVO();
vo.setCodeId("UNI001");
List<?> codeList = cmmUseService.selectCmmCodeDetail(vo);
model.addAttribute("codeList", codeList);
return "uss/ion/cnf/CaptchaMngModifyView";
}
/* 캡차 등록*/
@RequestMapping(value="/uss/ion/cnf/captchaMngInsert.do")
public String captchaMngInsert(@RequestParam Map<?, ?> commandMap, HttpServletRequest request, CaptchaMngVO captchaMngVO,
Model model , HttpSession session , RedirectAttributes redirectAttributes) throws Exception {
LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
captchaMngVO.setRegisterId(user.getId());
if(null != user && !"super".equals(user.getSiteId())){
//captchaMngVO.setSiteId(user.getSiteId());
}
CaptchaMngVO tempCaptchaMngVO = captchaMngService.selectCaptchaMngVO(captchaMngVO) ;
if(tempCaptchaMngVO != null){
redirectAttributes.addFlashAttribute("message", "동일한 캡차 종류가 등록되어 있습니다. 수정페이지를 이용해 주세요.");
RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/uss/ion/cnf/captchaMngList.do");
return redirectUrlMaker.getRedirectUrl();
}
try{
captchaMngService.insertCaptchaMng(captchaMngVO);
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.insert"));
}catch(Exception e){
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("fail.common.insert"));
}
RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/uss/ion/cnf/captchaMngList.do");
return redirectUrlMaker.getRedirectUrl();
}
/* 캡차설정 수정*/
@RequestMapping(value="/uss/ion/cnf/captchaMngUpdate.do")
public String updateCaptchaMng( CaptchaMngVO captchaMngVO,
ModelMap model, RedirectAttributes redirectAttributes) throws Exception {
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
if(null != loginVO && !"super".equals(loginVO.getSiteId())){ //일반 관리자 로그인시
//captchaMngVO.setSiteId(loginVO.getSiteId());
}
try{
captchaMngVO.setRegisterId(loginVO.getId());
captchaMngService.updateCaptchaMng(captchaMngVO);
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.update"));
}catch(Exception e){
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("fail.common.update"));
}
RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/uss/ion/cnf/captchaMngList.do");
return redirectUrlMaker.getRedirectUrl();
}
/* 캡차설정관리 삭제*/
@RequestMapping(value="/uss/ion/cnf/captchaMngDelete.do")
public String deleteCaptchaMng( CaptchaMngVO captchaMngVO,
String[] del, SessionStatus status,
ModelMap model, RedirectAttributes redirectAttributes) throws Exception {
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
CaptchaMngVO tempMetaCaptchaMngVO = new CaptchaMngVO();
try{
if(null != loginVO && !"super".equals(loginVO.getSiteId())){ //일반 관리자 로그인시
//tempMetaCaptchaMngVO.setCaptchaCode(loginVO.getSiteId());
//captchaMngService.deleteCaptchaMng(tempMetaCaptchaMngVO);
}else{ //수퍼 관리자 로그인시
for(String id:del) {
tempMetaCaptchaMngVO.setCaptchaCode(id);
captchaMngService.deleteCaptchaMng(tempMetaCaptchaMngVO);
}
}
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.delete"));
}catch(Exception e){
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("fail.common.delete"));
}
RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/uss/ion/cnf/captchaMngList.do");
return redirectUrlMaker.getRedirectUrl();
}
/**
* 캡차 사이트 목록을 조회한다.
* @param popupManageVO
* @param model
* @return "uss/ion/pwm/listPopupManage"
* @throws Exception
*/
@RequestMapping(value = "/uss/ion/cnf/captchaSiteList.do")
public String selectCaptchaSiteList(@RequestParam Map<?, ?> commandMap, @ModelAttribute("searchVO") CaptchaMngVO captchaMngVO,
RedirectAttributes redirectAttributes, ModelMap model ,HttpSession session ) throws Exception {
if(captchaMngVO.getPageUnit() != 10) {
captchaMngVO.setPageUnit(captchaMngVO.getPageUnit());
}
/** pageing */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(captchaMngVO.getPageIndex());
paginationInfo.setRecordCountPerPage(captchaMngVO.getPageUnit());
paginationInfo.setPageSize(captchaMngVO.getPageSize());
captchaMngVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
captchaMngVO.setLastIndex(paginationInfo.getLastRecordIndex());
captchaMngVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
if(null != loginVO && !"super".equals(loginVO.getSiteId())){ //리스트, 수정, 입력
captchaMngVO.setSiteId(loginVO.getSiteId());
}
List<CaptchaMngVO> captchaMngList = new ArrayList<CaptchaMngVO>();
if("".equals(captchaMngVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
captchaMngVO.setSearchSortCnd("tempSortNum");
captchaMngVO.setSearchSortOrd("desc");
}
captchaMngList = captchaMngService.selectCaptchaSiteList(captchaMngVO);
model.addAttribute("captchaMngList", captchaMngList);
int totCnt = captchaMngService.selectCaptchaSiteCnt(captchaMngVO);
/*캡차종류*/
ComDefaultCodeVO vo = new ComDefaultCodeVO();
vo.setCodeId("UNI001");
List<?> codeList = cmmUseService.selectCmmCodeDetail(vo);
model.addAttribute("codeList", codeList);
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", paginationInfo);
return "uss/ion/cnf/CaptchaSiteList";
}
/* 캡차수정/등록 view*/
@RequestMapping(value="/uss/ion/cnf/captchaSiteModifyView.do")
public String captchaSiteModifyView(@RequestParam Map<?, ?> commandMap, HttpServletRequest request, CaptchaMngVO captchaMngVO,
Model model , HttpSession session) throws Exception {
if("Modify".equals((String)commandMap.get("pageType"))){ //수정
captchaMngVO = captchaMngService.selectCaptchaSiteVO(captchaMngVO);
}
model.addAttribute("captchaMngVO", captchaMngVO);
/*캡차종류*/
ComDefaultCodeVO vo = new ComDefaultCodeVO();
vo.setCodeId("UNI001");
List<?> codeList = cmmUseService.selectCmmCodeDetail(vo);
model.addAttribute("codeList", codeList);
return "uss/ion/cnf/CaptchaSiteModifyView";
}
/* 캡차 사이트 등록*/
@RequestMapping(value="/uss/ion/cnf/captchaSiteInsert.do")
public String insertCaptchaSite(@RequestParam Map<?, ?> commandMap, HttpServletRequest request, CaptchaMngVO captchaMngVO,
Model model , HttpSession session , RedirectAttributes redirectAttributes) throws Exception {
LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
captchaMngVO.setRegisterId(user.getId());
if(null != user && !"super".equals(user.getSiteId())){
captchaMngVO.setSiteId(user.getSiteId());
}
CaptchaMngVO tempCaptchaMngVO = captchaMngService.selectCaptchaSiteVO(captchaMngVO) ;
if(tempCaptchaMngVO != null){
redirectAttributes.addFlashAttribute("message", "사이트당 하나의 캡차만 등록 가능합니다. 수정페이지를 이용해 주세요.");
RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/uss/ion/cnf/captchaSiteList.do");
return redirectUrlMaker.getRedirectUrl();
}
try{
captchaMngService.insertCaptchaSite(captchaMngVO);
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.insert"));
}catch(Exception e){
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("fail.common.insert"));
}
RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/uss/ion/cnf/captchaSiteList.do");
return redirectUrlMaker.getRedirectUrl();
}
/* 캡차사이트 수정*/
@RequestMapping(value="/uss/ion/cnf/captchaSiteUpdate.do")
public String updateCaptchaSite( CaptchaMngVO captchaMngVO,
ModelMap model, RedirectAttributes redirectAttributes) throws Exception {
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
if(null != loginVO && !"super".equals(loginVO.getSiteId())){ //일반 관리자 로그인시
captchaMngVO.setSiteId(loginVO.getSiteId());
}
try{
captchaMngVO.setRegisterId(loginVO.getId());
captchaMngService.updateCaptchaSite(captchaMngVO);
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.update"));
}catch(Exception e){
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("fail.common.update"));
}
RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/uss/ion/cnf/captchaSiteList.do");
return redirectUrlMaker.getRedirectUrl();
}
/* 캡차사이트 삭제*/
@RequestMapping(value="/uss/ion/cnf/captchaSiteDelete.do")
public String deleteCaptchaSite(CaptchaMngVO captchaMngVO,
String[] del, SessionStatus status,
ModelMap model, RedirectAttributes redirectAttributes) throws Exception {
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
CaptchaMngVO tempCaptchaMngVO = new CaptchaMngVO();
try{
if(null != loginVO && !"super".equals(loginVO.getSiteId())){ //일반 관리자 로그인시
tempCaptchaMngVO.setSiteId(loginVO.getSiteId());
captchaMngService.deleteCaptchaSite(tempCaptchaMngVO);
}else{ //수퍼 관리자 로그인시
for(String id:del) {
tempCaptchaMngVO.setSiteId(id);
captchaMngService.deleteCaptchaSite(tempCaptchaMngVO);
}
}
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.delete"));
}catch(Exception e){
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("fail.common.delete"));
}
RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/uss/ion/cnf/captchaSiteList.do");
return redirectUrlMaker.getRedirectUrl();
}
/* 메타수정/등록 view*/
@RequestMapping(value="/common/getMetaTag.do")
public String getMetaTag(@RequestParam Map<?, ?> commandMap, HttpServletRequest request, MetaTagManageVO metaTagManageVO,

View File

@ -16,8 +16,6 @@ import itn.let.cop.bbs.service.BoardMaster;
import itn.let.cop.bbs.service.BoardMasterVO;
import itn.let.cop.bbs.service.BoardVO;
import itn.let.cop.bbs.service.EgovBBSAttributeManageService;
import itn.let.cop.com.service.EgovUserInfManageService;
import itn.let.cop.com.service.impl.BBSUseInfoManageDAO;
/**
* 게시판 속성관리를 위한 서비스 구현 클래스
@ -43,12 +41,6 @@ public class EgovBBSAttributeManageServiceImpl extends EgovAbstractServiceImpl i
@Resource(name = "BBSAttributeManageDAO")
private BBSAttributeManageDAO attrbMngDAO;
@Resource(name = "BBSUseInfoManageDAO")
private BBSUseInfoManageDAO bbsUseDAO;
@Resource(name = "EgovUserInfManageService")
private EgovUserInfManageService userService;
@Resource(name = "egovBBSMstrIdGnrService")
private EgovIdGnrService idgenService;

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,6 @@
package itn.let.cop.cmt.web;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
@ -12,29 +11,21 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import org.springmodules.validation.commons.DefaultBeanValidator;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.EgovMessageSource;
import itn.com.cmm.LoginVO;
import itn.com.cmm.UserVO;
import itn.com.cmm.util.StringUtil;
import itn.com.cmm.util.WebUtil;
import itn.com.uss.ion.cnf.service.ProhibitMngService;
import itn.let.cop.bbs.service.Board;
import itn.let.cop.bbs.service.BoardVO;
import itn.let.cop.bbs.service.EgovBBSAttributeManageService;
import itn.let.cop.cmt.service.Comment;
import itn.let.cop.cmt.service.CommentVO;
import itn.let.cop.cmt.service.EgovArticleCommentService;
import itn.let.sym.site.service.EgovSiteManagerService;
import itn.let.sym.site.service.SiteManagerVO;
@Controller
public class EgovArticleCommentController {
@ -42,27 +33,12 @@ public class EgovArticleCommentController {
@Resource(name = "EgovArticleCommentService")
protected EgovArticleCommentService egovArticleCommentService;
@Resource(name="propertiesService")
protected EgovPropertyService propertyService;
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
@Autowired
private DefaultBeanValidator beanValidator;
@Resource(name = "egovSiteManagerService")
private EgovSiteManagerService egovSiteManagerService;
@Resource(name = "EgovBBSAttributeManageService")
private EgovBBSAttributeManageService bbsAttrbService;
/** scriptMngService 금지어 */
@Resource(name = "prohibitMngService")
private ProhibitMngService prohibitMngService;
//protected Logger log = Logger.getLogger(this.getClass());
/**
* 댓글관리 목록 조회를 제공한다.
*
@ -94,11 +70,6 @@ public class EgovArticleCommentController {
return "forward:/cop/cmt/updateArticleCommentView.do";
}
// model.addAttribute("sessionUniqId", userVO.get());
// commentVO.setWrterNm(user.getName());
// commentVO.setSubPageUnit(propertyService.getInt("pageUnit"));
// commentVO.setSubPageSize(propertyService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(commentVO.getSubPageIndex());
@ -228,9 +199,6 @@ public class EgovArticleCommentController {
commentVO.setWrterNm(user.getName());
// commentVO.setSubPageUnit(propertyService.getInt("pageUnit"));
// commentVO.setSubPageSize(propertyService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(commentVO.getSubPageIndex());
paginationInfo.setRecordCountPerPage(commentVO.getSubPageUnit());
@ -303,364 +271,5 @@ public class EgovArticleCommentController {
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.update"));
return "redirect:/cop/bbs/selectBoardArticle.do";
}
// @@@@@@@@@@@@@@@@@@@@@@@@@@@ 사용자 @@@@@@@@@@@@@@@@@@@@
/**
* (사용자)댓글관리 목록 조회를 제공한다.
*
* @param boardVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/web/cop/cmt/selectArticleCommentList.do")
public String selectArticleCommentListWeb(HttpServletRequest request, @ModelAttribute("searchVO") CommentVO commentVO, ModelMap model) throws Exception {
CommentVO articleCommentVO = new CommentVO();
// 수정 처리된 댓글 등록 화면으로 처리되기 위한 구현
if (commentVO.isModified()) {
commentVO.setCommentNo("");
commentVO.setCommentCn("");
}
// 수정을 위한 처리
if (!commentVO.getCommentNo().equals("")) {
return "forward:/web/cop/cmt/updateArticleCommentView.do";
}
List<?> resultList = egovArticleCommentService.selectArticleCommentListAll(commentVO);
int totCnt = resultList.size();
model.addAttribute("resultList", resultList);
model.addAttribute("resultCnt", totCnt);
model.addAttribute("type", "body"); // 댓글 페이지 body import용
model.addAttribute("userFlag", "Y"); // 사용자 화면 유무
model.addAttribute("userPath", "/web"); // 사용자 화면 경로
model.addAttribute("articleCommentVO", articleCommentVO); // validator 용도
commentVO.setCommentCn(""); // 등록 댓글 내용 처리
return "cop/cmt/EgovArticleCommentListWeb";
}
/**
* (사용자)댓글을 등록한다.
*
* @param commentVO
* @param comment
* @param bindingResult
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/web/cop/cmt/insertArticleComment.do")
public String insertArticleCommentWeb(HttpServletRequest request, @ModelAttribute("searchVO") CommentVO commentVO, @ModelAttribute("comment") Comment comment,
BindingResult bindingResult, ModelMap model, @RequestParam HashMap<String, String> map, RedirectAttributes redirectAttributes) throws Exception {
UserVO userVO = (UserVO)request.getSession().getAttribute("userVO"); // 사용자 정보
if (userVO == null) { // 인증 필요
BoardVO boardVO = new BoardVO();
boardVO.setPageIndex(commentVO.getPageIndex());
boardVO.setSearchCnd(commentVO.getSearchCnd());
boardVO.setSearchWrd(commentVO.getSearchWrd());
boardVO.setBbsId(commentVO.getBbsId());
boardVO.setNttId(commentVO.getNttId());
request.getSession().setAttribute("searchVO", boardVO);
request.getSession().setAttribute("url", "/web/cop/bbsWeb/selectBoardArticle.do");
return "web/cop/selfauth/authentication";
}
beanValidator.validate(comment, bindingResult);
if (bindingResult.hasErrors()) {
return "forward:/web/cop/bbsWeb/selectBoardArticle.do";
}
comment.setWrterNm(userVO.getName());
comment.setMblDn(userVO.getMblDn());
egovArticleCommentService.insertArticleComment(comment);
commentVO.setCommentCn("");
commentVO.setCommentNo("");
redirectAttributes.addAttribute("pageIndex", commentVO.getPageIndex());
redirectAttributes.addAttribute("searchCnd", commentVO.getSearchCnd());
redirectAttributes.addAttribute("searchWrd", commentVO.getSearchWrd());
redirectAttributes.addAttribute("bbsId", commentVO.getBbsId());
redirectAttributes.addAttribute("nttId", commentVO.getNttId());
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.insert"));
return "redirect:/web/cop/bbsWeb/selectBoardArticle.do";
}
/**
* (사용자)댓글을 삭제한다.
*
* @param commentVO
* @param comment
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/web/cop/cmt/deleteArticleComment.do")
public String deleteArticleCommentWeb(HttpServletRequest request, @ModelAttribute("searchVO") CommentVO commentVO, @ModelAttribute("comment") Comment comment,
ModelMap model, @RequestParam HashMap<String, String> map, RedirectAttributes redirectAttributes) throws Exception {
UserVO userVO = (UserVO)request.getSession().getAttribute("userVO"); // 사용자 정보
if (userVO == null) { // 인증 필요
BoardVO boardVO = new BoardVO();
boardVO.setPageIndex(commentVO.getPageIndex());
boardVO.setSearchCnd(commentVO.getSearchCnd());
boardVO.setSearchWrd(commentVO.getSearchWrd());
boardVO.setBbsId(commentVO.getBbsId());
boardVO.setNttId(commentVO.getNttId());
request.getSession().setAttribute("searchVO", boardVO);
request.getSession().setAttribute("url", "/web/cop/bbsWeb/selectBoardArticle.do");
return "web/cop/selfauth/authentication";
}
redirectAttributes.addAttribute("pageIndex", commentVO.getPageIndex());
redirectAttributes.addAttribute("searchCnd", commentVO.getSearchCnd());
redirectAttributes.addAttribute("searchWrd", commentVO.getSearchWrd());
redirectAttributes.addAttribute("bbsId", commentVO.getBbsId());
redirectAttributes.addAttribute("nttId", commentVO.getNttId());
// 본인 댓글 확인
CommentVO articleCommentVO = egovArticleCommentService.selectArticleCommentDetail(commentVO);
if (!articleCommentVO.getMblDn().equals(userVO.getMblDn())){
redirectAttributes.addFlashAttribute("message", "본인 댓글만 삭제할 수 있습니다.");
return "redirect:/web/cop/bbsWeb/selectBoardArticle.do";
} else {
egovArticleCommentService.deleteArticleComment(commentVO);
}
commentVO.setCommentCn("");
commentVO.setCommentNo("");
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.delete"));
return "redirect:/web/cop/bbsWeb/selectBoardArticle.do";
}
/**
* (사용자)댓글 수정 페이지로 이동한다.
*
* @param commentVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/web/cop/cmt/updateArticleCommentView.do")
public String updateArticleCommentViewWeb(HttpServletRequest request, @ModelAttribute("searchVO") CommentVO commentVO, ModelMap model, RedirectAttributes redirectAttributes) throws Exception {
UserVO userVO = (UserVO)request.getSession().getAttribute("userVO"); // 사용자 정보
if (userVO == null) { // 인증 필요
BoardVO boardVO = new BoardVO();
boardVO.setPageIndex(commentVO.getPageIndex());
boardVO.setSearchCnd(commentVO.getSearchCnd());
boardVO.setSearchWrd(commentVO.getSearchWrd());
boardVO.setBbsId(commentVO.getBbsId());
boardVO.setNttId(commentVO.getNttId());
request.getSession().setAttribute("searchVO", boardVO);
request.getSession().setAttribute("url", "/web/cop/bbsWeb/selectBoardArticle.do");
return "web/cop/selfauth/authentication";
}
// 본인 댓글 확인
CommentVO articleCommentVO = egovArticleCommentService.selectArticleCommentDetail(commentVO);
if (!articleCommentVO.getMblDn().equals(userVO.getMblDn())){
model.addAttribute("commentMessage", "본인 댓글만 수정할 수 있습니다.");
articleCommentVO = new CommentVO();
commentVO.setCommentNo("");
commentVO.setCommentCn("");
}
articleCommentVO.setMblDn(""); // 사용자 인증키 화면단 전송 제거
List<?> resultList = egovArticleCommentService.selectArticleCommentListAll(commentVO);
int totCnt = resultList.size();
model.addAttribute("resultList", resultList);
model.addAttribute("resultCnt", totCnt);
model.addAttribute("type", "body"); // body import
model.addAttribute("userFlag", "Y"); // 사용자 화면 유무
model.addAttribute("userPath", "/web"); // 사용자 화면 경로
model.addAttribute("articleCommentVO", articleCommentVO);
return "cop/cmt/EgovArticleCommentListWeb";
}
/**
* (사용자)댓글을 수정한다.
*
* @param commentVO
* @param comment
* @param bindingResult
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/web/cop/cmt/updateArticleComment.do")
public String updateArticleCommentWeb(HttpServletRequest request, @ModelAttribute("searchVO") CommentVO commentVO, @ModelAttribute("comment") Comment comment,
BindingResult bindingResult, ModelMap model, RedirectAttributes redirectAttributes) throws Exception {
UserVO userVO = (UserVO)request.getSession().getAttribute("userVO"); // 사용자 정보
if (userVO == null) { // 인증 필요
BoardVO boardVO = new BoardVO();
boardVO.setPageIndex(commentVO.getPageIndex());
boardVO.setSearchCnd(commentVO.getSearchCnd());
boardVO.setSearchWrd(commentVO.getSearchWrd());
boardVO.setBbsId(commentVO.getBbsId());
boardVO.setNttId(commentVO.getNttId());
request.getSession().setAttribute("searchVO", boardVO);
request.getSession().setAttribute("url", "/web/cop/bbsWeb/selectBoardArticle.do");
return "web/cop/selfauth/authentication";
}
redirectAttributes.addAttribute("pageIndex", commentVO.getPageIndex());
redirectAttributes.addAttribute("searchCnd", commentVO.getSearchCnd());
redirectAttributes.addAttribute("searchWrd", commentVO.getSearchWrd());
redirectAttributes.addAttribute("bbsId", commentVO.getBbsId());
redirectAttributes.addAttribute("nttId", commentVO.getNttId());
// 본인 댓글 확인
CommentVO articleCommentVO = egovArticleCommentService.selectArticleCommentDetail(commentVO);
if (!articleCommentVO.getMblDn().equals(userVO.getMblDn())){
redirectAttributes.addFlashAttribute("message", "본인 댓글만 수정할 수 있습니다.");
commentVO.setCommentCn("");
commentVO.setCommentNo("");
return "redirect:/web/cop/bbsWeb/selectBoardArticle.do";
} else {
beanValidator.validate(comment, bindingResult);
if (bindingResult.hasErrors()) {
return "forward:/web/cop/bbsWeb/selectBoardArticle.do";
}
egovArticleCommentService.updateArticleComment(comment);
commentVO.setCommentCn("");
commentVO.setCommentNo("");
}
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.update"));
return "redirect:/web/cop/bbsWeb/selectBoardArticle.do";
}
/**
* (사용자)댓글관리 목록 조회를 제공한다.
*
* @param boardVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/{siteId}/web/cop/cmt/selectArticleCommentList.do")
public String siteSelectArticleCommentListWeb(@PathVariable("siteId") String siteId , HttpServletRequest request, @ModelAttribute("searchVO") CommentVO commentVO, ModelMap model) throws Exception {
CommentVO articleCommentVO = new CommentVO();
// 수정 처리된 댓글 등록 화면으로 처리되기 위한 구현
if (commentVO.isModified()) {
commentVO.setCommentNo("");
commentVO.setCommentCn("");
}
// 수정을 위한 처리
if (!commentVO.getCommentNo().equals("")) {
return "forward:/"+siteId+"/web/cop/cmt/updateArticleCommentView.do";
}
List<?> resultList = egovArticleCommentService.selectArticleCommentListAll(commentVO);
int totCnt = resultList.size();
model.addAttribute("resultList", resultList);
model.addAttribute("resultCnt", totCnt);
model.addAttribute("type", "body"); // 댓글 페이지 body import용
model.addAttribute("userFlag", "Y"); // 사용자 화면 유무
model.addAttribute("userPath", "/web"); // 사용자 화면 경로
model.addAttribute("articleCommentVO", articleCommentVO); // validator 용도
commentVO.setCommentCn(""); // 등록 댓글 내용 처리
model.addAttribute("siteId", siteId);
String siteFolder = "site/"+siteId ;
/*if(!("linc".equals(siteId) || "klc".equals(siteId)) ){
String theme = "01";
String isMobile = "pc";
setSiteinfo(siteId , theme , isMobile, model , request );
return "web/site/"+siteId+"/"+isMobile+"/cop/cmt/EgovArticleCommentListWeb";
}*/
return "web/"+siteFolder+"/cop/cmt/EgovArticleCommentListWeb";
}
/**
* (사용자)댓글을 삭제한다.
*
* @param commentVO
* @param comment
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/{siteId}/web/member/cop/cmt/deleteArticleComment.do")
public String siteDeleteArticleCommentWeb(@PathVariable("siteId") String siteId , HttpServletRequest request, @ModelAttribute("searchVO") CommentVO commentVO, @ModelAttribute("comment") Comment comment,
ModelMap model, @RequestParam HashMap<String, String> map, RedirectAttributes redirectAttributes) throws Exception {
//UserVO userVO = (UserVO)request.getSession().getAttribute("userVO"); // 사용자 정보
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
redirectAttributes.addAttribute("pageIndex", commentVO.getPageIndex());
redirectAttributes.addAttribute("searchCnd", commentVO.getSearchCnd());
redirectAttributes.addAttribute("searchWrd", commentVO.getSearchWrd());
redirectAttributes.addAttribute("bbsId", commentVO.getBbsId());
redirectAttributes.addAttribute("nttId", commentVO.getNttId());
// 본인 댓글 확인
CommentVO articleCommentVO = egovArticleCommentService.selectArticleCommentDetail(commentVO);
if (!articleCommentVO.getFrstRegisterId().equals(loginVO.getUniqId())){
redirectAttributes.addFlashAttribute("message", "본인 댓글만 삭제할 수 있습니다.");
return "redirect:/web/cop/bbsWeb/selectBoardArticle.do";
} else {
egovArticleCommentService.deleteArticleComment(commentVO);
}
commentVO.setCommentCn("");
commentVO.setCommentNo("");
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.delete"));
return "redirect:/web/cop/bbsWeb/selectBoardArticle.do";
}
private void setSiteinfo(String siteId , String theme , String isMobile , ModelMap model , HttpServletRequest request) throws Exception{
SiteManagerVO siteManagerVO = new SiteManagerVO();
siteManagerVO.setSiteId(siteId);
siteManagerVO = egovSiteManagerService.selectSiteManagerVO(siteManagerVO) ;
if( !"".equals(siteManagerVO.getTheme()) && null != siteManagerVO.getTheme()){
theme = siteManagerVO.getTheme() ;
}
WebUtil util = new WebUtil();
if(util.isMobile(request)){
isMobile = "mobile";
}
model.addAttribute("siteId", siteId);
model.addAttribute("site_path" , "/site/theme_"+theme+"/"+isMobile);
}
}

View File

@ -1,229 +0,0 @@
package itn.let.cop.com.service;
import java.io.Serializable;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* 게시판의 이용정보를 관리하기 위한 모델 클래스
* @author 공통서비스개발팀 이삼섭
* @since 2009.04.02
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.04.02 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 커스터마이징버전 생성
*
* </pre>
*/
@SuppressWarnings("serial")
public class BoardUseInf implements Serializable {
/** 게시판 아이디 */
private String bbsId = "";
/** 대상시스템 아이디 */
private String trgetId = "";
/** 대상 구분 (커뮤니티, 동호회) */
private String trgetType = "";
/** 최초 등록자 아이디 */
private String frstRegisterId = "";
/** 최초등록시점 */
private String frstRegisterPnttm = "";
/** 최종수정자 아이디 */
private String lastUpdusrId = "";
/** 최종수정시점 */
private String lastUpdusrPnttm = "";
/** 등록구분코드 */
private String registSeCode = "";
/** 사용여부 */
private String useAt = "";
/**
* bbsId attribute를 리턴한다.
*
* @return the bbsId
*/
public String getBbsId() {
return bbsId;
}
/**
* bbsId attribute 값을 설정한다.
*
* @param bbsId
* the bbsId to set
*/
public void setBbsId(String bbsId) {
this.bbsId = bbsId;
}
/**
* trgetId attribute를 리턴한다.
*
* @return the trgetId
*/
public String getTrgetId() {
return trgetId;
}
/**
* trgetId attribute 값을 설정한다.
*
* @param trgetId
* the trgetId to set
*/
public void setTrgetId(String trgetId) {
this.trgetId = trgetId;
}
/**
* frstRegisterId attribute를 리턴한다.
*
* @return the frstRegisterId
*/
public String getFrstRegisterId() {
return frstRegisterId;
}
/**
* frstRegisterId attribute 값을 설정한다.
*
* @param frstRegisterId
* the frstRegisterId to set
*/
public void setFrstRegisterId(String frstRegisterId) {
this.frstRegisterId = frstRegisterId;
}
/**
* frstRegisterPnttm attribute를 리턴한다.
*
* @return the frstRegisterPnttm
*/
public String getFrstRegisterPnttm() {
return frstRegisterPnttm;
}
/**
* frstRegisterPnttm attribute 값을 설정한다.
*
* @param frstRegisterPnttm
* the frstRegisterPnttm to set
*/
public void setFrstRegisterPnttm(String frstRegisterPnttm) {
this.frstRegisterPnttm = frstRegisterPnttm;
}
/**
* lastUpdusrId attribute를 리턴한다.
*
* @return the lastUpdusrId
*/
public String getLastUpdusrId() {
return lastUpdusrId;
}
/**
* lastUpdusrId attribute 값을 설정한다.
*
* @param lastUpdusrId
* the lastUpdusrId to set
*/
public void setLastUpdusrId(String lastUpdusrId) {
this.lastUpdusrId = lastUpdusrId;
}
/**
* lastUpdusrPnttm attribute를 리턴한다.
*
* @return the lastUpdusrPnttm
*/
public String getLastUpdusrPnttm() {
return lastUpdusrPnttm;
}
/**
* lastUpdusrPnttm attribute 값을 설정한다.
*
* @param lastUpdusrPnttm
* the lastUpdusrPnttm to set
*/
public void setLastUpdusrPnttm(String lastUpdusrPnttm) {
this.lastUpdusrPnttm = lastUpdusrPnttm;
}
/**
* registSeCode attribute를 리턴한다.
*
* @return the registSeCode
*/
public String getRegistSeCode() {
return registSeCode;
}
/**
* registSeCode attribute 값을 설정한다.
*
* @param registSeCode
* the registSeCode to set
*/
public void setRegistSeCode(String registSeCode) {
this.registSeCode = registSeCode;
}
/**
* useAt attribute를 리턴한다.
*
* @return the useAt
*/
public String getUseAt() {
return useAt;
}
/**
* useAt attribute 값을 설정한다.
*
* @param useAt
* the useAt to set
*/
public void setUseAt(String useAt) {
this.useAt = useAt;
}
/**
* trgetType attribute를 리턴한다.
* @return the trgetType
*/
public String getTrgetType() {
return trgetType;
}
/**
* trgetType attribute 값을 설정한다.
* @param trgetType the trgetType to set
*/
public void setTrgetType(String trgetType) {
this.trgetType = trgetType;
}
/**
* toString 메소드를 대치한다.
*/
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
}

View File

@ -1,559 +0,0 @@
package itn.let.cop.com.service;
import java.io.Serializable;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* 게시판의 이용정보를 관리하기 위한 VO 클래스
* @author 공통서비스개발팀 이삼섭
* @since 2009.04.02
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.04.02 이삼섭 최초 생성
* 2011.05.31 JJY 경량환경 커스터마이징버전 생성
*
* </pre>
*/
@SuppressWarnings("serial")
public class BoardUseInfVO extends BoardUseInf implements Serializable {
/** 검색시작일 */
private String searchBgnDe = "";
/** 검색조건 */
private String searchCnd = "";
/** 검색종료일 */
private String searchEndDe = "";
/** 검색단어 */
private String searchWrd = "";
/** 정렬순서(DESC,ASC) */
private long sortOrdr = 0L;
/** 검색사용여부 */
private String searchUseYn = "";
/** 현재페이지 */
private int pageIndex = 1;
/** 페이지갯수 */
private int pageUnit = 10;
/** 페이지사이즈 */
private int pageSize = 10;
/** 첫페이지 인덱스 */
private int firstIndex = 1;
/** 마지막페이지 인덱스 */
private int lastIndex = 1;
/** 페이지당 레코드 개수 */
private int recordCountPerPage = 10;
/** 레코드 번호 */
private int rowNo = 0;
/** 최초 등록자명 */
private String frstRegisterNm = "";
/** 최종 수정자명 */
private String lastUpdusrNm = "";
/** 등록구분 코드명 */
private String registSeCodeNm = "";
/** 커뮤니티 아이디 */
private String cmmntyId = "";
/** 커뮤니티 명 */
private String cmmntyNm = "";
/** 동호회 아이디 */
private String clbId = "";
/** 동호회 명 */
private String clbNm = "";
/** 게시판 명 */
private String bbsNm = "";
/** 사용자 명 */
private String userNm = "";
/** 제공 URL */
private String provdUrl = "";
/** 게시판 유형코드 */
private String bbsTyCode = "";
/**
* searchBgnDe attribute를 리턴한다.
*
* @return the searchBgnDe
*/
public String getSearchBgnDe() {
return searchBgnDe;
}
/**
* searchBgnDe attribute 값을 설정한다.
*
* @param searchBgnDe
* the searchBgnDe to set
*/
public void setSearchBgnDe(String searchBgnDe) {
this.searchBgnDe = searchBgnDe;
}
/**
* searchCnd attribute를 리턴한다.
*
* @return the searchCnd
*/
public String getSearchCnd() {
return searchCnd;
}
/**
* searchCnd attribute 값을 설정한다.
*
* @param searchCnd
* the searchCnd to set
*/
public void setSearchCnd(String searchCnd) {
this.searchCnd = searchCnd;
}
/**
* searchEndDe attribute를 리턴한다.
*
* @return the searchEndDe
*/
public String getSearchEndDe() {
return searchEndDe;
}
/**
* searchEndDe attribute 값을 설정한다.
*
* @param searchEndDe
* the searchEndDe to set
*/
public void setSearchEndDe(String searchEndDe) {
this.searchEndDe = searchEndDe;
}
/**
* searchWrd attribute를 리턴한다.
*
* @return the searchWrd
*/
public String getSearchWrd() {
return searchWrd;
}
/**
* searchWrd attribute 값을 설정한다.
*
* @param searchWrd
* the searchWrd to set
*/
public void setSearchWrd(String searchWrd) {
this.searchWrd = searchWrd;
}
/**
* sortOrdr attribute를 리턴한다.
*
* @return the sortOrdr
*/
public long getSortOrdr() {
return sortOrdr;
}
/**
* sortOrdr attribute 값을 설정한다.
*
* @param sortOrdr
* the sortOrdr to set
*/
public void setSortOrdr(long sortOrdr) {
this.sortOrdr = sortOrdr;
}
/**
* searchUseYn attribute를 리턴한다.
*
* @return the searchUseYn
*/
public String getSearchUseYn() {
return searchUseYn;
}
/**
* searchUseYn attribute 값을 설정한다.
*
* @param searchUseYn
* the searchUseYn to set
*/
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
/**
* pageIndex attribute를 리턴한다.
*
* @return the pageIndex
*/
public int getPageIndex() {
return pageIndex;
}
/**
* pageIndex attribute 값을 설정한다.
*
* @param pageIndex
* the pageIndex to set
*/
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
/**
* pageUnit attribute를 리턴한다.
*
* @return the pageUnit
*/
public int getPageUnit() {
return pageUnit;
}
/**
* pageUnit attribute 값을 설정한다.
*
* @param pageUnit
* the pageUnit to set
*/
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
/**
* pageSize attribute를 리턴한다.
*
* @return the pageSize
*/
public int getPageSize() {
return pageSize;
}
/**
* pageSize attribute 값을 설정한다.
*
* @param pageSize
* the pageSize to set
*/
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
/**
* firstIndex attribute를 리턴한다.
*
* @return the firstIndex
*/
public int getFirstIndex() {
return firstIndex;
}
/**
* firstIndex attribute 값을 설정한다.
*
* @param firstIndex
* the firstIndex to set
*/
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
/**
* lastIndex attribute를 리턴한다.
*
* @return the lastIndex
*/
public int getLastIndex() {
return lastIndex;
}
/**
* lastIndex attribute 값을 설정한다.
*
* @param lastIndex
* the lastIndex to set
*/
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
/**
* recordCountPerPage attribute를 리턴한다.
*
* @return the recordCountPerPage
*/
public int getRecordCountPerPage() {
return recordCountPerPage;
}
/**
* recordCountPerPage attribute 값을 설정한다.
*
* @param recordCountPerPage
* the recordCountPerPage to set
*/
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
/**
* rowNo attribute를 리턴한다.
*
* @return the rowNo
*/
public int getRowNo() {
return rowNo;
}
/**
* rowNo attribute 값을 설정한다.
*
* @param rowNo
* the rowNo to set
*/
public void setRowNo(int rowNo) {
this.rowNo = rowNo;
}
/**
* frstRegisterNm attribute를 리턴한다.
*
* @return the frstRegisterNm
*/
public String getFrstRegisterNm() {
return frstRegisterNm;
}
/**
* frstRegisterNm attribute 값을 설정한다.
*
* @param frstRegisterNm
* the frstRegisterNm to set
*/
public void setFrstRegisterNm(String frstRegisterNm) {
this.frstRegisterNm = frstRegisterNm;
}
/**
* lastUpdusrNm attribute를 리턴한다.
*
* @return the lastUpdusrNm
*/
public String getLastUpdusrNm() {
return lastUpdusrNm;
}
/**
* lastUpdusrNm attribute 값을 설정한다.
*
* @param lastUpdusrNm
* the lastUpdusrNm to set
*/
public void setLastUpdusrNm(String lastUpdusrNm) {
this.lastUpdusrNm = lastUpdusrNm;
}
/**
* registSeCodeNm attribute를 리턴한다.
*
* @return the registSeCodeNm
*/
public String getRegistSeCodeNm() {
return registSeCodeNm;
}
/**
* registSeCodeNm attribute 값을 설정한다.
*
* @param registSeCodeNm
* the registSeCodeNm to set
*/
public void setRegistSeCodeNm(String registSeCodeNm) {
this.registSeCodeNm = registSeCodeNm;
}
/**
* cmmntyId attribute를 리턴한다.
*
* @return the cmmntyId
*/
public String getCmmntyId() {
return cmmntyId;
}
/**
* cmmntyId attribute 값을 설정한다.
*
* @param cmmntyId
* the cmmntyId to set
*/
public void setCmmntyId(String cmmntyId) {
this.cmmntyId = cmmntyId;
}
/**
* cmmntyNm attribute를 리턴한다.
*
* @return the cmmntyNm
*/
public String getCmmntyNm() {
return cmmntyNm;
}
/**
* cmmntyNm attribute 값을 설정한다.
*
* @param cmmntyNm
* the cmmntyNm to set
*/
public void setCmmntyNm(String cmmntyNm) {
this.cmmntyNm = cmmntyNm;
}
/**
* clbId attribute를 리턴한다.
*
* @return the clbId
*/
public String getClbId() {
return clbId;
}
/**
* clbId attribute 값을 설정한다.
*
* @param clbId
* the clbId to set
*/
public void setClbId(String clbId) {
this.clbId = clbId;
}
/**
* clbNm attribute를 리턴한다.
*
* @return the clbNm
*/
public String getClbNm() {
return clbNm;
}
/**
* clbNm attribute 값을 설정한다.
*
* @param clbNm
* the clbNm to set
*/
public void setClbNm(String clbNm) {
this.clbNm = clbNm;
}
/**
* bbsNm attribute를 리턴한다.
*
* @return the bbsNm
*/
public String getBbsNm() {
return bbsNm;
}
/**
* bbsNm attribute 값을 설정한다.
*
* @param bbsNm
* the bbsNm to set
*/
public void setBbsNm(String bbsNm) {
this.bbsNm = bbsNm;
}
/**
* userNm attribute를 리턴한다.
*
* @return the userNm
*/
public String getUserNm() {
return userNm;
}
/**
* userNm attribute 값을 설정한다.
*
* @param userNm
* the userNm to set
*/
public void setUserNm(String userNm) {
this.userNm = userNm;
}
/**
* provdUrl attribute를 리턴한다.
*
* @return the provdUrl
*/
public String getProvdUrl() {
return provdUrl;
}
/**
* provdUrl attribute 값을 설정한다.
*
* @param provdUrl
* the provdUrl to set
*/
public void setProvdUrl(String provdUrl) {
this.provdUrl = provdUrl;
}
/**
* bbsTyCode attribute를 리턴한다.
* @return the bbsTyCode
*/
public String getBbsTyCode() {
return bbsTyCode;
}
/**
* bbsTyCode attribute 값을 설정한다.
* @param bbsTyCode the bbsTyCode to set
*/
public void setBbsTyCode(String bbsTyCode) {
this.bbsTyCode = bbsTyCode;
}
/**
* toString 메소드를 대치한다.
*/
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
}

View File

@ -1,124 +0,0 @@
package itn.let.cop.com.service;
import java.util.Map;
/**
* 게시판 이용정보를 관리하기 위한 서비스 인터페이스 클래스
* @author 공통서비스개발팀 이삼섭
* @since 2009.04.02
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.04.02 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
public interface EgovBBSUseInfoManageService {
/**
* 게시판 사용 정보를 삭제한다.
*
* @param bdUseInf
* @throws Exception
*/
public void deleteBBSUseInf(BoardUseInf bdUseInf) throws Exception;
/**
* 커뮤니티에 사용되는 게시판 사용정보를 삭제한다.
*
* @param bdUseInf
* @throws Exception
*/
public void deleteBBSUseInfByCmmnty(BoardUseInfVO bdUseVO) throws Exception;
/**
* 동호회에 사용되는 게시판 사용정보를 삭제한다.
*
* @param bdUseInf
* @throws Exception
*/
public void deleteBBSUseInfByClub(BoardUseInfVO bdUseVO) throws Exception;
/**
* 커뮤니티에 사용되는 모든 게시판 사용정보를 삭제한다.
*
* @param bdUseInf
* @throws Exception
*/
public void deleteAllBBSUseInfByCmmnty(BoardUseInfVO bdUseVO) throws Exception;
/**
* 동호회에 사용되는 모든 게시판 사용정보를 삭제한다.
*
* @param bdUseInf
* @throws Exception
*/
public void deleteAllBBSUseInfByClub(BoardUseInfVO bdUseVO) throws Exception;
/**
* 게시판 사용정보를 등록한다.
*
* @param bdUseInf
* @throws Exception
*/
public void insertBBSUseInf(BoardUseInf bdUseInf) throws Exception;
/**
* 게시판 사용정보 목록을 조회한다.
*
* @param bdUseVO
* @return
* @throws Exception
*/
public Map<String, Object> selectBBSUseInfs(BoardUseInfVO bdUseVO) throws Exception;
/**
* 게시판 사용정보를 수정한다.
*
* @param bdUseInf
* @throws Exception
*/
public void updateBBSUseInf(BoardUseInf bdUseInf) throws Exception;
/**
* 게시판 사용정보에 대한 상세정보를 조회한다.
*
* @param bdUseVO
* @return
* @throws Exception
*/
public BoardUseInfVO selectBBSUseInf(BoardUseInfVO bdUseVO) throws Exception;
/**
* 게시판에 대한 사용정보를 삭제한다.
*
* @param bdUseInf
* @throws Exception
*/
public void deleteBBSUseInfByBoardId(BoardUseInf bdUseInf) throws Exception;
/**
* 커뮤니티, 동호회에 사용되는 게시판 사용정보에 대한 목록을 조회한다.
*
* @param bdUseVO
* @return
* @throws Exception
*/
public Map<String, Object> selectBBSUseInfsByTrget(BoardUseInfVO bdUseVO) throws Exception;
/**
* 커뮤니티, 동호회에 사용되는 게시판 사용정보를 수정한다.
*
* @param bdUseInf
* @throws Exception
*/
public void updateBBSUseInfByTrget(BoardUseInf bdUseInf) throws Exception;
}

View File

@ -1,92 +0,0 @@
package itn.let.cop.com.service;
import java.util.List;
import java.util.Map;
/**
* 템플릿 관리를 위한 서비스 인터페이스 클래스
* @author 공통서비스개발팀 이삼섭
* @since 2009.03.17
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.03.17 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
public interface EgovTemplateManageService {
/**
* 템플릿 정보를 삭제한다.
*
* @param tmplatInf
* @exception Exception Exception
*/
public void deleteTemplateInf(TemplateInf tmplatInf)
throws Exception;
/**
* 템플릿 정보를 등록한다.
*
* @param tmplatInf
* @exception Exception Exception
*/
public void insertTemplateInf(TemplateInf tmplatInf)
throws Exception;
/**
* 템플릿에 대한 상세정보를 조회한다.
* @return
*
* @param tmplatInfVO
* @exception Exception Exception
*/
public TemplateInfVO selectTemplateInf(TemplateInfVO tmplatInfVO)
throws Exception;
/**
* 템플릿에 대한 목록를 조회한다.
* @return
*
* @param tmplatInfVO
* @exception Exception Exception
*/
public Map<String, Object> selectTemplateInfs(TemplateInfVO tmplatInfVO)
throws Exception;
/**
* 템플릿 구분에 따른 목록을 조회한다.
* @return
*
* @param tmplatInfVO
* @exception Exception Exception
*/
public List<TemplateInfVO> selectTemplateInfsByCode(TemplateInfVO tmplatInfVO)
throws Exception;
/**
* 템플릿에 대한 미리보기 정보를 조회한다.
* @return
*
* @param tmplatInfVO
* @exception Exception Exception
*/
public TemplateInfVO selectTemplatePreview(TemplateInfVO tmplatInfVO)
throws Exception;
/**
* 템플릿 정보를 수정한다.
*
* @param tmplatInf
* @exception Exception Exception
*/
public void updateTemplateInf(TemplateInf tmplatInf)
throws Exception;
}

View File

@ -1,87 +0,0 @@
package itn.let.cop.com.service;
import java.util.List;
import java.util.Map;
/**
* 협업 기능에서 사용자 정보를 관리하기 위한 서비스 인터페이스 클래스
* @author 공통서비스개발팀 이삼섭
* @since 2009.04.06
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.04.06 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
public interface EgovUserInfManageService {
/**
* 사용자 정보에 대한 목록을 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
public Map<String, Object> selectUserList(UserInfVO userVO) throws Exception;
/**
* 커뮤니티 사용자 목록을 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
public Map<String, Object> selectCmmntyUserList(UserInfVO userVO) throws Exception;
/**
* 커뮤니티 관리자 목록을 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
public Map<String, Object> selectCmmntyMngrList(UserInfVO userVO) throws Exception;
/**
* 동호회 사용자 목록을 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
public Map<String, Object> selectClubUserList(UserInfVO userVO) throws Exception;
/**
* 동호회 운영자 목록을 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
public Map<String, Object> selectClubOprtrList(UserInfVO userVO) throws Exception;
/**
* 동호회에 대한 모든 사용자 목록을 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
public List<UserInfVO> selectAllClubUser(UserInfVO userVO) throws Exception;
/**
* 커뮤니티에 대한 모든 사용자 목록을 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
public List<UserInfVO> selectAllCmmntyUser(UserInfVO userVO) throws Exception;
}

View File

@ -1,231 +0,0 @@
package itn.let.cop.com.service;
import java.io.Serializable;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* 템플릿 정보를 관리하기 위한 모델 클래스
* @author 공통서비스개발팀 이삼섭
* @since 2009.03.17
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.03.17 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
@SuppressWarnings("serial")
public class TemplateInf implements Serializable {
/** 최초등록자 아이디 */
private String frstRegisterId = "";
/** 최초등록시점 */
private String frstRegisterPnttm = "";
/** 최종수정자 아이디 */
private String lastUpdusrId = "";
/** 최종수정시점 */
private String lastUpdusrPnttm = "";
/** 템플릿 경로 */
private String tmplatCours = "";
/** 템플릿 아이디 */
private String tmplatId = "";
/** 템플릿 명 */
private String tmplatNm = "";
/** 탬플릿 구분코드 */
private String tmplatSeCode = "";
/** 사용여부 */
private String useAt = "";
/**
* frstRegisterId attribute를 리턴한다.
*
* @return the frstRegisterId
*/
public String getFrstRegisterId() {
return frstRegisterId;
}
/**
* frstRegisterId attribute 값을 설정한다.
*
* @param frstRegisterId
* the frstRegisterId to set
*/
public void setFrstRegisterId(String frstRegisterId) {
this.frstRegisterId = frstRegisterId;
}
/**
* frstRegisterPnttm attribute를 리턴한다.
*
* @return the frstRegisterPnttm
*/
public String getFrstRegisterPnttm() {
return frstRegisterPnttm;
}
/**
* frstRegisterPnttm attribute 값을 설정한다.
*
* @param frstRegisterPnttm
* the frstRegisterPnttm to set
*/
public void setFrstRegisterPnttm(String frstRegisterPnttm) {
this.frstRegisterPnttm = frstRegisterPnttm;
}
/**
* lastUpdusrId attribute를 리턴한다.
*
* @return the lastUpdusrId
*/
public String getLastUpdusrId() {
return lastUpdusrId;
}
/**
* lastUpdusrId attribute 값을 설정한다.
*
* @param lastUpdusrId
* the lastUpdusrId to set
*/
public void setLastUpdusrId(String lastUpdusrId) {
this.lastUpdusrId = lastUpdusrId;
}
/**
* lastUpdusrPnttm attribute를 리턴한다.
*
* @return the lastUpdusrPnttm
*/
public String getLastUpdusrPnttm() {
return lastUpdusrPnttm;
}
/**
* lastUpdusrPnttm attribute 값을 설정한다.
*
* @param lastUpdusrPnttm
* the lastUpdusrPnttm to set
*/
public void setLastUpdusrPnttm(String lastUpdusrPnttm) {
this.lastUpdusrPnttm = lastUpdusrPnttm;
}
/**
* tmplatCours attribute를 리턴한다.
*
* @return the tmplatCours
*/
public String getTmplatCours() {
return tmplatCours;
}
/**
* tmplatCours attribute 값을 설정한다.
*
* @param tmplatCours
* the tmplatCours to set
*/
public void setTmplatCours(String tmplatCours) {
this.tmplatCours = tmplatCours;
}
/**
* tmplatId attribute를 리턴한다.
*
* @return the tmplatId
*/
public String getTmplatId() {
return tmplatId;
}
/**
* tmplatId attribute 값을 설정한다.
*
* @param tmplatId
* the tmplatId to set
*/
public void setTmplatId(String tmplatId) {
this.tmplatId = tmplatId;
}
/**
* tmplatNm attribute를 리턴한다.
*
* @return the tmplatNm
*/
public String getTmplatNm() {
return tmplatNm;
}
/**
* tmplatNm attribute 값을 설정한다.
*
* @param tmplatNm
* the tmplatNm to set
*/
public void setTmplatNm(String tmplatNm) {
this.tmplatNm = tmplatNm;
}
/**
* tmplatSeCode attribute를 리턴한다.
*
* @return the tmplatSeCode
*/
public String getTmplatSeCode() {
return tmplatSeCode;
}
/**
* tmplatSeCode attribute 값을 설정한다.
*
* @param tmplatSeCode
* the tmplatSeCode to set
*/
public void setTmplatSeCode(String tmplatSeCode) {
this.tmplatSeCode = tmplatSeCode;
}
/**
* useAt attribute를 리턴한다.
*
* @return the useAt
*/
public String getUseAt() {
return useAt;
}
/**
* useAt attribute 값을 설정한다.
*
* @param useAt
* the useAt to set
*/
public void setUseAt(String useAt) {
this.useAt = useAt;
}
/**
* toString 메소드를 대치한다.
*/
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
}

View File

@ -1,407 +0,0 @@
package itn.let.cop.com.service;
import java.io.Serializable;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* 템플릿 정보 관리를 위한 VO 클래스
* @author 공통서비스개발팀 이삼섭
* @since 2009.03.17
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.03.17 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
@SuppressWarnings("serial")
public class TemplateInfVO extends TemplateInf implements Serializable {
/** 최초 등록자명 */
private String frstRegisterNm = "";
/** 최종 수정자명 */
private String lastUpdusrNm = "";
/** 템플릿 구분 코드명 */
private String tmplatSeCodeNm = "";
/** 검색시작일 */
private String searchBgnDe = "";
/** 검색조건 */
private String searchCnd = "";
/** 검색종료일 */
private String searchEndDe = "";
/** 검색단어 */
private String searchWrd = "";
/** 정렬순서(DESC,ASC) */
private String sortOrdr = "";
/** 검색사용여부 */
private String searchUseYn = "";
/** 현재페이지 */
private int pageIndex = 1;
/** 페이지갯수 */
private int pageUnit = 10;
/** 페이지사이즈 */
private int pageSize = 10;
/** 첫페이지 인덱스 */
private int firstIndex = 1;
/** 마지막페이지 인덱스 */
private int lastIndex = 1;
/** 페이지당 레코드 개수 */
private int recordCountPerPage = 10;
/** 레코드 번호 */
private int rowNo = 0;
/** 구분 유형 */
private String typeFlag = "";
/**
* frstRegisterNm attribute를 리턴한다.
*
* @return the frstRegisterNm
*/
public String getFrstRegisterNm() {
return frstRegisterNm;
}
/**
* frstRegisterNm attribute 값을 설정한다.
*
* @param frstRegisterNm
* the frstRegisterNm to set
*/
public void setFrstRegisterNm(String frstRegisterNm) {
this.frstRegisterNm = frstRegisterNm;
}
/**
* lastUpdusrNm attribute를 리턴한다.
*
* @return the lastUpdusrNm
*/
public String getLastUpdusrNm() {
return lastUpdusrNm;
}
/**
* lastUpdusrNm attribute 값을 설정한다.
*
* @param lastUpdusrNm
* the lastUpdusrNm to set
*/
public void setLastUpdusrNm(String lastUpdusrNm) {
this.lastUpdusrNm = lastUpdusrNm;
}
/**
* tmplatSeCodeNm attribute를 리턴한다.
*
* @return the tmplatSeCodeNm
*/
public String getTmplatSeCodeNm() {
return tmplatSeCodeNm;
}
/**
* tmplatSeCodeNm attribute 값을 설정한다.
*
* @param tmplatSeCodeNm
* the tmplatSeCodeNm to set
*/
public void setTmplatSeCodeNm(String tmplatSeCodeNm) {
this.tmplatSeCodeNm = tmplatSeCodeNm;
}
/**
* searchBgnDe attribute를 리턴한다.
*
* @return the searchBgnDe
*/
public String getSearchBgnDe() {
return searchBgnDe;
}
/**
* searchBgnDe attribute 값을 설정한다.
*
* @param searchBgnDe
* the searchBgnDe to set
*/
public void setSearchBgnDe(String searchBgnDe) {
this.searchBgnDe = searchBgnDe;
}
/**
* searchCnd attribute를 리턴한다.
*
* @return the searchCnd
*/
public String getSearchCnd() {
return searchCnd;
}
/**
* searchCnd attribute 값을 설정한다.
*
* @param searchCnd
* the searchCnd to set
*/
public void setSearchCnd(String searchCnd) {
this.searchCnd = searchCnd;
}
/**
* searchEndDe attribute를 리턴한다.
*
* @return the searchEndDe
*/
public String getSearchEndDe() {
return searchEndDe;
}
/**
* searchEndDe attribute 값을 설정한다.
*
* @param searchEndDe
* the searchEndDe to set
*/
public void setSearchEndDe(String searchEndDe) {
this.searchEndDe = searchEndDe;
}
/**
* searchWrd attribute를 리턴한다.
*
* @return the searchWrd
*/
public String getSearchWrd() {
return searchWrd;
}
/**
* searchWrd attribute 값을 설정한다.
*
* @param searchWrd
* the searchWrd to set
*/
public void setSearchWrd(String searchWrd) {
this.searchWrd = searchWrd;
}
/**
* sortOrdr attribute를 리턴한다.
*
* @return the sortOrdr
*/
public String getSortOrdr() {
return sortOrdr;
}
/**
* sortOrdr attribute 값을 설정한다.
*
* @param sortOrdr
* the sortOrdr to set
*/
public void setSortOrdr(String sortOrdr) {
this.sortOrdr = sortOrdr;
}
/**
* searchUseYn attribute를 리턴한다.
*
* @return the searchUseYn
*/
public String getSearchUseYn() {
return searchUseYn;
}
/**
* searchUseYn attribute 값을 설정한다.
*
* @param searchUseYn
* the searchUseYn to set
*/
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
/**
* pageIndex attribute를 리턴한다.
*
* @return the pageIndex
*/
public int getPageIndex() {
return pageIndex;
}
/**
* pageIndex attribute 값을 설정한다.
*
* @param pageIndex
* the pageIndex to set
*/
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
/**
* pageUnit attribute를 리턴한다.
*
* @return the pageUnit
*/
public int getPageUnit() {
return pageUnit;
}
/**
* pageUnit attribute 값을 설정한다.
*
* @param pageUnit
* the pageUnit to set
*/
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
/**
* pageSize attribute를 리턴한다.
*
* @return the pageSize
*/
public int getPageSize() {
return pageSize;
}
/**
* pageSize attribute 값을 설정한다.
*
* @param pageSize
* the pageSize to set
*/
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
/**
* firstIndex attribute를 리턴한다.
*
* @return the firstIndex
*/
public int getFirstIndex() {
return firstIndex;
}
/**
* firstIndex attribute 값을 설정한다.
*
* @param firstIndex
* the firstIndex to set
*/
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
/**
* lastIndex attribute를 리턴한다.
*
* @return the lastIndex
*/
public int getLastIndex() {
return lastIndex;
}
/**
* lastIndex attribute 값을 설정한다.
*
* @param lastIndex
* the lastIndex to set
*/
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
/**
* recordCountPerPage attribute를 리턴한다.
*
* @return the recordCountPerPage
*/
public int getRecordCountPerPage() {
return recordCountPerPage;
}
/**
* recordCountPerPage attribute 값을 설정한다.
*
* @param recordCountPerPage
* the recordCountPerPage to set
*/
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
/**
* rowNo attribute를 리턴한다.
*
* @return the rowNo
*/
public int getRowNo() {
return rowNo;
}
/**
* rowNo attribute 값을 설정한다.
*
* @param rowNo
* the rowNo to set
*/
public void setRowNo(int rowNo) {
this.rowNo = rowNo;
}
/**
* typeFlag attribute를 리턴한다.
*
* @return the typeFlag
*/
public String getTypeFlag() {
return typeFlag;
}
/**
* typeFlag attribute 값을 설정한다.
*
* @param typeFlag
* the typeFlag to set
*/
public void setTypeFlag(String typeFlag) {
this.typeFlag = typeFlag;
}
/**
* toString 메소드를 대치한다.
*/
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
}

View File

@ -1,561 +0,0 @@
package itn.let.cop.com.service;
import java.io.Serializable;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* 사용자 정보 조회를 위한 VO 클래스
* @author 공통서비스개발팀 이삼섭
* @since 2009.04.06
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.04.06 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
@SuppressWarnings("serial")
public class UserInfVO implements Serializable {
/** 유일 아이디 */
private String uniqId = "";
/** 사용자 아이디 */
private String userId = "";
/** 사용자 명 */
private String userNm = "";
/** 사용자 우편번호 */
private String userZip = "";
/** 사용자 주소 */
private String userAdres = "";
/** 사용자 이메일 */
private String userEmail = "";
/** 검색시작일 */
private String searchBgnDe = "";
/** 검색조건 */
private String searchCnd = "";
/** 검색종료일 */
private String searchEndDe = "";
/** 검색단어 */
private String searchWrd = "";
/** 정렬순서(DESC,ASC) */
private String sortOrdr = "";
/** 검색사용여부 */
private String searchUseYn = "";
/** 현재페이지 */
private int pageIndex = 1;
/** 페이지갯수 */
private int pageUnit = 10;
/** 페이지사이즈 */
private int pageSize = 10;
/** 첫페이지 인덱스 */
private int firstIndex = 1;
/** 마지막페이지 인덱스 */
private int lastIndex = 1;
/** 페이지당 레코드 개수 */
private int recordCountPerPage = 10;
/** 레코드 번호 */
private int rowNo = 0;
/** 대상 아이디 */
private String trgetId = "";
/** 사용여부 */
private String useAt = "Y";
/** 커뮤니티 아이디 */
private String cmmntyId = "";
/** 동호회 아이디 */
private String clubId = "";
/** 대상 중지 여부 (커뮤니티 또는 동호회) */
private String deletedAt = "N";
/**
* uniqId attribute를 리턴한다.
*
* @return the uniqId
*/
public String getUniqId() {
return uniqId;
}
/**
* uniqId attribute 값을 설정한다.
*
* @param uniqId
* the uniqId to set
*/
public void setUniqId(String uniqId) {
this.uniqId = uniqId;
}
/**
* userId attribute를 리턴한다.
*
* @return the userId
*/
public String getUserId() {
return userId;
}
/**
* userId attribute 값을 설정한다.
*
* @param userId
* the userId to set
*/
public void setUserId(String userId) {
this.userId = userId;
}
/**
* userNm attribute를 리턴한다.
*
* @return the userNm
*/
public String getUserNm() {
return userNm;
}
/**
* userNm attribute 값을 설정한다.
*
* @param userNm
* the userNm to set
*/
public void setUserNm(String userNm) {
this.userNm = userNm;
}
/**
* userZip attribute를 리턴한다.
*
* @return the userZip
*/
public String getUserZip() {
return userZip;
}
/**
* userZip attribute 값을 설정한다.
*
* @param userZip
* the userZip to set
*/
public void setUserZip(String userZip) {
this.userZip = userZip;
}
/**
* userAdres attribute를 리턴한다.
*
* @return the userAdres
*/
public String getUserAdres() {
return userAdres;
}
/**
* userAdres attribute 값을 설정한다.
*
* @param userAdres
* the userAdres to set
*/
public void setUserAdres(String userAdres) {
this.userAdres = userAdres;
}
/**
* userEmail attribute를 리턴한다.
*
* @return the userEmail
*/
public String getUserEmail() {
return userEmail;
}
/**
* userEmail attribute 값을 설정한다.
*
* @param userEmail
* the userEmail to set
*/
public void setUserEmail(String userEmail) {
this.userEmail = userEmail;
}
/**
* searchBgnDe attribute를 리턴한다.
*
* @return the searchBgnDe
*/
public String getSearchBgnDe() {
return searchBgnDe;
}
/**
* searchBgnDe attribute 값을 설정한다.
*
* @param searchBgnDe
* the searchBgnDe to set
*/
public void setSearchBgnDe(String searchBgnDe) {
this.searchBgnDe = searchBgnDe;
}
/**
* searchCnd attribute를 리턴한다.
*
* @return the searchCnd
*/
public String getSearchCnd() {
return searchCnd;
}
/**
* searchCnd attribute 값을 설정한다.
*
* @param searchCnd
* the searchCnd to set
*/
public void setSearchCnd(String searchCnd) {
this.searchCnd = searchCnd;
}
/**
* searchEndDe attribute를 리턴한다.
*
* @return the searchEndDe
*/
public String getSearchEndDe() {
return searchEndDe;
}
/**
* searchEndDe attribute 값을 설정한다.
*
* @param searchEndDe
* the searchEndDe to set
*/
public void setSearchEndDe(String searchEndDe) {
this.searchEndDe = searchEndDe;
}
/**
* searchWrd attribute를 리턴한다.
*
* @return the searchWrd
*/
public String getSearchWrd() {
return searchWrd;
}
/**
* searchWrd attribute 값을 설정한다.
*
* @param searchWrd
* the searchWrd to set
*/
public void setSearchWrd(String searchWrd) {
this.searchWrd = searchWrd;
}
/**
* sortOrdr attribute를 리턴한다.
*
* @return the sortOrdr
*/
public String getSortOrdr() {
return sortOrdr;
}
/**
* sortOrdr attribute 값을 설정한다.
*
* @param sortOrdr
* the sortOrdr to set
*/
public void setSortOrdr(String sortOrdr) {
this.sortOrdr = sortOrdr;
}
/**
* searchUseYn attribute를 리턴한다.
*
* @return the searchUseYn
*/
public String getSearchUseYn() {
return searchUseYn;
}
/**
* searchUseYn attribute 값을 설정한다.
*
* @param searchUseYn
* the searchUseYn to set
*/
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
/**
* pageIndex attribute를 리턴한다.
*
* @return the pageIndex
*/
public int getPageIndex() {
return pageIndex;
}
/**
* pageIndex attribute 값을 설정한다.
*
* @param pageIndex
* the pageIndex to set
*/
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
/**
* pageUnit attribute를 리턴한다.
*
* @return the pageUnit
*/
public int getPageUnit() {
return pageUnit;
}
/**
* pageUnit attribute 값을 설정한다.
*
* @param pageUnit
* the pageUnit to set
*/
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
/**
* pageSize attribute를 리턴한다.
*
* @return the pageSize
*/
public int getPageSize() {
return pageSize;
}
/**
* pageSize attribute 값을 설정한다.
*
* @param pageSize
* the pageSize to set
*/
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
/**
* firstIndex attribute를 리턴한다.
*
* @return the firstIndex
*/
public int getFirstIndex() {
return firstIndex;
}
/**
* firstIndex attribute 값을 설정한다.
*
* @param firstIndex
* the firstIndex to set
*/
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
/**
* lastIndex attribute를 리턴한다.
*
* @return the lastIndex
*/
public int getLastIndex() {
return lastIndex;
}
/**
* lastIndex attribute 값을 설정한다.
*
* @param lastIndex
* the lastIndex to set
*/
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
/**
* recordCountPerPage attribute를 리턴한다.
*
* @return the recordCountPerPage
*/
public int getRecordCountPerPage() {
return recordCountPerPage;
}
/**
* recordCountPerPage attribute 값을 설정한다.
*
* @param recordCountPerPage
* the recordCountPerPage to set
*/
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
/**
* rowNo attribute를 리턴한다.
*
* @return the rowNo
*/
public int getRowNo() {
return rowNo;
}
/**
* rowNo attribute 값을 설정한다.
*
* @param rowNo
* the rowNo to set
*/
public void setRowNo(int rowNo) {
this.rowNo = rowNo;
}
/**
* trgetId attribute를 리턴한다.
*
* @return the trgetId
*/
public String getTrgetId() {
return trgetId;
}
/**
* trgetId attribute 값을 설정한다.
*
* @param trgetId
* the trgetId to set
*/
public void setTrgetId(String trgetId) {
this.trgetId = trgetId;
}
/**
* useAt attribute를 리턴한다.
*
* @return the useAt
*/
public String getUseAt() {
return useAt;
}
/**
* useAt attribute 값을 설정한다.
*
* @param useAt
* the useAt to set
*/
public void setUseAt(String useAt) {
this.useAt = useAt;
}
/**
* cmmntyId attribute를 리턴한다.
*
* @return the cmmntyId
*/
public String getCmmntyId() {
return cmmntyId;
}
/**
* cmmntyId attribute 값을 설정한다.
*
* @param cmmntyId
* the cmmntyId to set
*/
public void setCmmntyId(String cmmntyId) {
this.cmmntyId = cmmntyId;
}
/**
* clubId attribute를 리턴한다.
*
* @return the clubId
*/
public String getClubId() {
return clubId;
}
/**
* clubId attribute 값을 설정한다.
*
* @param clubId
* the clubId to set
*/
public void setClubId(String clubId) {
this.clubId = clubId;
}
/**
* deletedAt attribute를 리턴한다.
*
* @return the deletedAt
*/
public String getDeletedAt() {
return deletedAt;
}
/**
* deletedAt attribute 값을 설정한다.
*
* @param deletedAt
* the deletedAt to set
*/
public void setDeletedAt(String deletedAt) {
this.deletedAt = deletedAt;
}
/**
* toString 메소드를 대치한다.
*/
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
}

View File

@ -1,179 +0,0 @@
package itn.let.cop.com.service.impl;
import java.util.List;
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
import itn.let.cop.com.service.BoardUseInf;
import itn.let.cop.com.service.BoardUseInfVO;
import org.springframework.stereotype.Repository;
/**
* 게시판 이용정보를 관리하기 위한 데이터 접근 클래스
* @author 공통서비스개발팀 이삼섭
* @since 2009.04.02
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.04.02 이삼섭 최초 생성
* 2011.05.31 JJY 경량환경 커스터마이징버전 생성
*
* </pre>
*/
@Repository("BBSUseInfoManageDAO")
public class BBSUseInfoManageDAO extends EgovAbstractDAO {
/**
* 게시판 사용 정보를 삭제한다.
*
* @param bdUseInf
* @throws Exception
*/
public void deleteBBSUseInf(BoardUseInf bdUseInf) throws Exception {
update("BBSUseInfoManageDAO.deleteBBSUseInf", bdUseInf);
}
/**
* 커뮤니티에 사용되는 게시판 사용정보 목록을 조회한다.
*
* @param bdUseInf
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<BoardUseInf> selectBBSUseInfByCmmnty(BoardUseInfVO bdUseVO) throws Exception {
return (List<BoardUseInf>) list("BBSUseInfoManageDAO.selectBBSUseInfByCmmnty", bdUseVO);
}
/**
* 동호회에 사용되는 게시판 사용정보 목록을 조회한다.
*
* @param bdUseInf
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<BoardUseInf> selectBBSUseInfByClub(BoardUseInfVO bdUseVO) throws Exception {
return (List<BoardUseInf>) list("BBSUseInfoManageDAO.selectBBSUseInfByClub", bdUseVO);
}
/**
* 커뮤니티에 사용되는 모든 게시판 사용정보를 삭제한다.
*
* @param bdUseInf
* @throws Exception
*/
public void deleteAllBBSUseInfByCmmnty(BoardUseInfVO bdUseVO) throws Exception {
update("BBSUseInfoManageDAO.deleteAllBBSUseInfByCmmnty", bdUseVO);
}
/**
* 동호회에 사용되는 모든 게시판 사용정보를 삭제한다.
*
* @param bdUseInf
* @throws Exception
*/
public void deleteAllBBSUseInfByClub(BoardUseInfVO bdUseVO) throws Exception {
update("BBSUseInfoManageDAO.deleteAllBBSUseInfByClub", bdUseVO);
}
/**
* 게시판 사용정보를 등록한다.
*
* @param bdUseInf
* @throws Exception
*/
public void insertBBSUseInf(BoardUseInf bdUseInf) throws Exception {
insert("BBSUseInfoManageDAO.insertBBSUseInf", bdUseInf);
}
/**
* 게시판 사용정보 목록을 조회한다.
*
* @param bdUseVO
* @return
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<BoardUseInfVO> selectBBSUseInfs(BoardUseInfVO bdUseVO) throws Exception {
return (List<BoardUseInfVO>) list("BBSUseInfoManageDAO.selectBBSUseInfs", bdUseVO);
}
/**
*
* @param bdUseVO
* @return
* @throws Exception
*/
public int selectBBSUseInfsCnt(BoardUseInfVO bdUseVO) throws Exception {
return (Integer)select("BBSUseInfoManageDAO.selectBBSUseInfsCnt", bdUseVO);
}
/**
* 게시판 사용정보에 대한 상세정보를 조회한다.
*
* @param bdUseVO
* @return
* @throws Exception
*/
public BoardUseInfVO selectBBSUseInf(BoardUseInfVO bdUseVO) throws Exception {
return (BoardUseInfVO)select("BBSUseInfoManageDAO.selectBBSUseInf", bdUseVO);
}
/**
* 게시판 사용정보를 수정한다.
*
* @param bdUseInf
* @throws Exception
*/
public void updateBBSUseInf(BoardUseInf bdUseInf) throws Exception {
update("BBSUseInfoManageDAO.updateBBSUseInf", bdUseInf);
}
/**
* 사용
* 게시판에 대한 사용정보를 삭제한다.
*
* @param bdUseInf
* @throws Exception
*/
public void deleteBBSUseInfByBoardId(BoardUseInf bdUseInf) throws Exception {
update("BBSUseInfoManageDAO.deleteBBSUseInfByBoardId", bdUseInf);
}
/**
* 커뮤니티, 동호회에 사용되는 게시판 사용정보에 대한 목록을 조회한다.
*
* @param bdUseVO
* @return
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<BoardUseInfVO> selectBBSUseInfsByTrget(BoardUseInfVO bdUseVO) throws Exception {
return (List<BoardUseInfVO>) list("BBSUseInfoManageDAO.selectBBSUseInfsByTrget", bdUseVO);
}
/**
* 커뮤니티, 동호회에 사용되는 게시판 사용정보에 대한 전체 건수를 조회한다.
*
* @param bdUseVO
* @return
* @throws Exception
*/
public int selectBBSUseInfsCntByTrget(BoardUseInfVO bdUseVO) throws Exception {
return (Integer)select("BBSUseInfoManageDAO.selectBBSUseInfsCntByTrget", bdUseVO);
}
/**
* 커뮤니티, 동호회에 사용되는 게시판 사용정보를 수정한다.
*
* @param bdUseInf
* @throws Exception
*/
public void updateBBSUseInfByTrget(BoardUseInf bdUseInf) throws Exception {
update("BBSUseInfoManageDAO.updateBBSUseInfByTrget", bdUseInf);
}
}

View File

@ -1,187 +0,0 @@
package itn.let.cop.com.service.impl;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
import itn.let.cop.com.service.BoardUseInf;
import itn.let.cop.com.service.BoardUseInfVO;
import itn.let.cop.com.service.EgovBBSUseInfoManageService;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
/**
* 게시판 이용정보를 관리하기 위한 서비스 구현 클래스
* @author 공통서비스개발팀 이삼섭
* @since 2009.04.02
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.04.02 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
@Service("EgovBBSUseInfoManageService")
public class EgovBBSUseInfoManageServiceImpl extends EgovAbstractServiceImpl implements EgovBBSUseInfoManageService {
@Resource(name = "BBSUseInfoManageDAO")
private BBSUseInfoManageDAO bbsUseDAO;
/**
* 게시판 사용 정보를 삭제한다.
*
* @see itn.let.cop.bbs.com.service.EgovBBSUseInfoManageService#deleteBBSUseInf(itn.let.cop.bbs.com.service.BoardUseInf)
*/
public void deleteBBSUseInf(BoardUseInf bdUseInf) throws Exception {
bbsUseDAO.deleteBBSUseInf(bdUseInf);
}
/**
* 게시판 사용정보를 등록한다.
*
* @see itn.let.cop.bbs.com.service.EgovBBSUseInfoManageService#insertBBSUseInf(itn.let.cop.bbs.com.service.BoardUseInf)
*/
public void insertBBSUseInf(BoardUseInf bdUseInf) throws Exception {
bbsUseDAO.insertBBSUseInf(bdUseInf);
}
/**
* 게시판 사용정보 목록을 조회한다.
*
* @see itn.let.cop.bbs.com.service.EgovBBSUseInfoManageService#selectBBSUseInfs(itn.let.cop.bbs.com.service.BoardUseInfVO)
*/
public Map<String, Object> selectBBSUseInfs(BoardUseInfVO bdUseVO) throws Exception {
List<BoardUseInfVO> result = bbsUseDAO.selectBBSUseInfs(bdUseVO);
int cnt = bbsUseDAO.selectBBSUseInfsCnt(bdUseVO);
Map<String, Object> map = new HashMap<String, Object>();
map.put("resultList", result);
map.put("resultCnt", Integer.toString(cnt));
return map;
}
/**
* 게시판 사용정보를 수정한다.
*
* @see itn.let.cop.bbs.com.service.EgovBBSUseInfoManageService#updateBBSUseInf(itn.let.cop.bbs.com.service.BoardUseInf)
*/
public void updateBBSUseInf(BoardUseInf bdUseInf) throws Exception {
bbsUseDAO.updateBBSUseInf(bdUseInf);
}
/**
* 게시판 사용정보에 대한 상세정보를 조회한다.
*
* @see itn.let.cop.bbs.com.service.EgovBBSUseInfoManageService#selectBBSUseInf(itn.let.cop.bbs.com.service.BoardUseInfVO)
*/
public BoardUseInfVO selectBBSUseInf(BoardUseInfVO bdUseVO) throws Exception {
return bbsUseDAO.selectBBSUseInf(bdUseVO);
}
/**
* 동호회에 사용되는 게시판 사용정보를 삭제한다.
*
* @see itn.let.cop.com.service.EgovBBSUseInfoManageService#deleteBBSUseInfByClub(itn.let.cop.com.service.BoardUseInf)
*/
public void deleteBBSUseInfByClub(BoardUseInfVO bdUseVO) throws Exception {
List<BoardUseInf> result = bbsUseDAO.selectBBSUseInfByClub(bdUseVO);
BoardUseInf bdUseInf = null;
Iterator<BoardUseInf> iter = result.iterator();
while (iter.hasNext()) {
bdUseInf = (BoardUseInf)iter.next();
bdUseInf.setLastUpdusrId(bdUseVO.getLastUpdusrId());
//bdUseInf.setTrgetId(bdUseVO.getClbId()); // 사용자 ID를 넘겨야 ..
bdUseInf.setTrgetId(bdUseVO.getTrgetId());
bbsUseDAO.deleteBBSUseInf(bdUseInf);
}
}
/**
* 커뮤니티에 사용되는 게시판 사용정보를 삭제한다.
*
* @see itn.let.cop.com.service.EgovBBSUseInfoManageService#deleteBBSUseInfByCmmnty(itn.let.cop.com.service.BoardUseInf)
*/
public void deleteBBSUseInfByCmmnty(BoardUseInfVO bdUseVO) throws Exception {
List<BoardUseInf> result = bbsUseDAO.selectBBSUseInfByCmmnty(bdUseVO);
BoardUseInf bdUseInf = null;
Iterator<BoardUseInf> iter = result.iterator();
while (iter.hasNext()) {
bdUseInf = (BoardUseInf)iter.next();
bdUseInf.setLastUpdusrId(bdUseVO.getLastUpdusrId());
//bdUseInf.setTrgetId(bdUseVO.getCmmntyId()); // 사용자 ID를 넘겨야 ..
bdUseInf.setTrgetId(bdUseVO.getTrgetId());
bbsUseDAO.deleteBBSUseInf(bdUseInf);
}
}
/**
* 동호회에 사용되는 모든 게시판 사용정보를 삭제한다.
*
* @see itn.let.cop.com.service.EgovBBSUseInfoManageService#deleteAllBBSUseInfByClub(itn.let.cop.com.service.BoardUseInfVO)
*/
public void deleteAllBBSUseInfByClub(BoardUseInfVO bdUseVO) throws Exception {
bbsUseDAO.deleteAllBBSUseInfByClub(bdUseVO);
}
/**
* 커뮤니티에 사용되는 모든 게시판 사용정보를 삭제한다.
*
* @see itn.let.cop.com.service.EgovBBSUseInfoManageService#deleteAllBBSUseInfByCmmnty(itn.let.cop.com.service.BoardUseInfVO)
*/
public void deleteAllBBSUseInfByCmmnty(BoardUseInfVO bdUseVO) throws Exception {
bbsUseDAO.deleteAllBBSUseInfByCmmnty(bdUseVO);
}
/**
* 게시판에 대한 사용정보를 삭제한다.
*
* @see itn.let.cop.com.service.EgovBBSUseInfoManageService#deleteBBSUseInfByBoardId(itn.let.cop.com.service.BoardUseInf)
*/
public void deleteBBSUseInfByBoardId(BoardUseInf bdUseInf) throws Exception {
bbsUseDAO.deleteBBSUseInfByBoardId(bdUseInf);
}
/**
* 커뮤니티, 동호회에 사용되는 게시판 사용정보에 대한 목록을 조회한다.
*
* @see itn.let.cop.com.service.EgovBBSUseInfoManageService#selectBBSUseInfsByTrget(itn.let.cop.com.service.BoardUseInfVO)
*/
public Map<String, Object> selectBBSUseInfsByTrget(BoardUseInfVO bdUseVO) throws Exception {
List<BoardUseInfVO> result = bbsUseDAO.selectBBSUseInfsByTrget(bdUseVO);
int cnt = bbsUseDAO.selectBBSUseInfsCntByTrget(bdUseVO);
Map<String, Object> map = new HashMap<String, Object>();
map.put("resultList", result);
map.put("resultCnt", Integer.toString(cnt));
return map;
}
/**
* 커뮤니티, 동호회에 사용되는 게시판 사용정보를 수정한다.
*/
public void updateBBSUseInfByTrget(BoardUseInf bdUseInf) throws Exception {
bbsUseDAO.updateBBSUseInfByTrget(bdUseInf);
}
}

View File

@ -1,121 +0,0 @@
package itn.let.cop.com.service.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import itn.let.cop.com.service.EgovTemplateManageService;
import itn.let.cop.com.service.TemplateInf;
import itn.let.cop.com.service.TemplateInfVO;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
/**
* 템플릿 정보관리를 위한 서비스 구현 클래스
* @author 공통서비스개발팀 이삼섭
* @since 2009.3.17
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.3.17 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
@Service("EgovTemplateManageService")
public class EgovTemplateManageServiceImpl extends EgovAbstractServiceImpl implements EgovTemplateManageService {
@Resource(name = "TemplateManageDAO")
private TemplateManageDAO tmplatDAO;
@Resource(name = "egovTmplatIdGnrService")
private EgovIdGnrService idgenService;
/**
* 템플릿 정보를 삭제한다.
*
* @see itn.let.cop.bbs.com.service.EgovTemplateManageService#deleteTemplateInf(itn.let.cop.bbs.com.service.TemplateInf)
*/
public void deleteTemplateInf(TemplateInf tmplatInf) throws Exception {
tmplatDAO.deleteTemplateInf(tmplatInf);
}
/**
* 템플릿 정보를 등록한다.
*
* @see itn.let.cop.bbs.com.service.EgovTemplateManageService#insertTemplateInf(itn.let.cop.bbs.com.service.TemplateInf)
*/
public void insertTemplateInf(TemplateInf tmplatInf) throws Exception {
tmplatInf.setTmplatId(idgenService.getNextStringId());
tmplatDAO.insertTemplateInf(tmplatInf);
}
/**
* 템플릿에 대한 상세정보를 조회한다.
*
* @see itn.let.cop.bbs.com.service.EgovTemplateManageService#selectTemplateInf(itn.let.cop.bbs.com.service.TemplateInfVO)
*/
public TemplateInfVO selectTemplateInf(TemplateInfVO tmplatInfVO) throws Exception {
TemplateInfVO vo = new TemplateInfVO();
vo = tmplatDAO.selectTemplateInf(tmplatInfVO);
return vo;
}
/**
* 템플릿에 대한 목록를 조회한다.
*
* @see itn.let.cop.bbs.com.service.EgovTemplateManageService#selectTemplateInfs(itn.let.cop.bbs.com.service.TemplateInfVO)
*/
public Map<String, Object> selectTemplateInfs(TemplateInfVO tmplatInfVO) throws Exception {
List<TemplateInfVO> result = tmplatDAO.selectTemplateInfs(tmplatInfVO);
int cnt = tmplatDAO.selectTemplateInfsCnt(tmplatInfVO);
Map<String, Object> map = new HashMap<String, Object>();
map.put("resultList", result);
map.put("resultCnt", Integer.toString(cnt));
return map;
}
/**
* 템플릿에 대한 미리보기 정보를 조회한다.
*
* @see itn.let.cop.bbs.com.service.EgovTemplateManageService#selectTemplatePreview(itn.let.cop.bbs.com.service.TemplateInfVO)
*/
public TemplateInfVO selectTemplatePreview(TemplateInfVO tmplatInfVO) throws Exception {
TemplateInfVO vo = new TemplateInfVO();
vo = tmplatDAO.selectTemplatePreview(tmplatInfVO);
return vo;
}
/**
* 템플릿 정보를 수정한다.
*
* @see itn.let.cop.bbs.com.service.EgovTemplateManageService#updateTemplateInf(itn.let.cop.bbs.com.service.TemplateInf)
*/
public void updateTemplateInf(TemplateInf tmplatInf) throws Exception {
tmplatDAO.updateTemplateInf(tmplatInf);
}
/**
* 템플릿 구분에 따른 목록을 조회한다.
*
* @see itn.let.cop.bbs.com.service.EgovTemplateManageService#selectAllTemplateInfs(itn.let.cop.bbs.com.service.TemplateInfVO)
*/
public List<TemplateInfVO> selectTemplateInfsByCode(TemplateInfVO tmplatInfVO) throws Exception {
return tmplatDAO.selectTemplateInfsByCode(tmplatInfVO);
}
}

View File

@ -1,168 +0,0 @@
package itn.let.cop.com.service.impl;
import java.util.List;
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
import itn.let.cop.com.service.UserInfVO;
import org.springframework.stereotype.Repository;
/**
* 협업 활용 사용자 정보 조회를 위한 데이터 접근 클래스
* @author 공통서비스개발팀 이삼섭
* @since 2009.04.06
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.04.06 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
@Repository("EgovUserInfManageDAO")
public class EgovUserInfManageDAO extends EgovAbstractDAO {
/**
* 사용자 정보에 대한 목록을 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<UserInfVO> selectUserList(UserInfVO userVO) throws Exception {
return (List<UserInfVO>) list("EgovUserInfManageDAO.selectUserList", userVO);
}
/**
* 사용자 정보에 대한 목록 전체 건수를 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
public int selectUserListCnt(UserInfVO userVO) throws Exception {
return (Integer)select("EgovUserInfManageDAO.selectUserListCnt", userVO);
}
/**
* 커뮤니티 사용자 목록을 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<UserInfVO> selectCmmntyUserList(UserInfVO userVO) throws Exception {
return (List<UserInfVO>) list("EgovUserInfManageDAO.selectCmmntyUserList", userVO);
}
/**
* 커뮤니티 사용자 목록에 대한 전체 건수를 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
public int selectCmmntyUserListCnt(UserInfVO userVO) throws Exception {
return (Integer)select("EgovUserInfManageDAO.selectCmmntyUserListCnt", userVO);
}
/**
* 커뮤니티 관리자 목록을 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<UserInfVO> selectCmmntyMngrList(UserInfVO userVO) throws Exception {
return (List<UserInfVO>) list("EgovUserInfManageDAO.selectCmmntyMngrList", userVO);
}
/**
* 커뮤니티 관리자 목록에 대한 전체 건수를 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
public int selectCmmntyMngrListCnt(UserInfVO userVO) throws Exception {
return (Integer)select("EgovUserInfManageDAO.selectCmmntyMngrListCnt", userVO);
}
/**
* 동호회 사용자 목록을 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<UserInfVO> selectClubUserList(UserInfVO userVO) throws Exception {
return (List<UserInfVO>) list("EgovUserInfManageDAO.selectClubUserList", userVO);
}
/**
* 동호회 사용자 목록에 대한 전체 건수를 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
public int selectClubUserListCnt(UserInfVO userVO) throws Exception {
return (Integer)select("EgovUserInfManageDAO.selectClubUserListCnt", userVO);
}
/**
* 동호회 운영자 목록을 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<UserInfVO> selectClubOprtrList(UserInfVO userVO) throws Exception {
return (List<UserInfVO>) list("EgovUserInfManageDAO.selectClubOprtrList", userVO);
}
/**
* 동호회 운영자 목록에 대한 전체 건수를 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
public int selectClubOprtrListCnt(UserInfVO userVO) throws Exception {
return (Integer)select("EgovUserInfManageDAO.selectClubOprtrListCnt", userVO);
}
/**
* 동호회에 대한 모든 사용자 목록을 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<UserInfVO> selectAllClubUser(UserInfVO userVO) throws Exception {
return (List<UserInfVO>) list("EgovUserInfManageDAO.selectAllClubUser", userVO);
}
/**
* 커뮤니티에 대한 모든 사용자 목록을 조회한다.
*
* @param userVO
* @return
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<UserInfVO> selectAllCmmntyUser(UserInfVO userVO) throws Exception {
return (List<UserInfVO>) list("EgovUserInfManageDAO.selectAllCmmntyUser", userVO);
}
}

View File

@ -1,141 +0,0 @@
package itn.let.cop.com.service.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
import itn.let.cop.com.service.EgovUserInfManageService;
import itn.let.cop.com.service.UserInfVO;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
/**
* 협업에서 사용할 사용자 조회 서비스 기능 구현 클래스
* @author 공통서비스개발팀 이삼섭
* @since 2009.04.06
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.04.06 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
@Service("EgovUserInfManageService")
public class EgovUserInfManageServiceImpl extends EgovAbstractServiceImpl implements EgovUserInfManageService {
@Resource(name = "EgovUserInfManageDAO")
private EgovUserInfManageDAO userInfDAO;
/**
* 동호회 운영자 목록을 조회한다.
*
* @see itn.let.cop.com.service.EgovUserInfManageService#selectClubOprtrList(itn.let.cop.com.service.UserInfVO)
*/
public Map<String, Object> selectClubOprtrList(UserInfVO userVO) throws Exception {
List<UserInfVO> result = userInfDAO.selectClubOprtrList(userVO);
int cnt = userInfDAO.selectClubOprtrListCnt(userVO);
Map<String, Object> map = new HashMap<String, Object>();
map.put("resultList", result);
map.put("resultCnt", Integer.toString(cnt));
return map;
}
/**
* 동호회 사용자 목록을 조회한다.
*
* @see itn.let.cop.com.service.EgovUserInfManageService#selectClubUserList(itn.let.cop.com.service.UserInfVO)
*/
public Map<String, Object> selectClubUserList(UserInfVO userVO) throws Exception {
List<UserInfVO> result = userInfDAO.selectClubUserList(userVO);
int cnt = userInfDAO.selectClubUserListCnt(userVO);
Map<String, Object> map = new HashMap<String, Object>();
map.put("resultList", result);
map.put("resultCnt", Integer.toString(cnt));
return map;
}
/**
* 커뮤니티 관리자 목록을 조회한다.
*
* @see itn.let.cop.com.service.EgovUserInfManageService#selectCmmntyMngrList(itn.let.cop.com.service.UserInfVO)
*/
public Map<String, Object> selectCmmntyMngrList(UserInfVO userVO) throws Exception {
List<UserInfVO> result = userInfDAO.selectCmmntyMngrList(userVO);
int cnt = userInfDAO.selectCmmntyMngrListCnt(userVO);
Map<String, Object> map = new HashMap<String, Object>();
map.put("resultList", result);
map.put("resultCnt", Integer.toString(cnt));
return map;
}
/**
* 커뮤니티 사용자 목록을 조회한다.
*
* @see itn.let.cop.com.service.EgovUserInfManageService#selectCmmntyUserList(itn.let.cop.com.service.UserInfVO)
*/
public Map<String, Object> selectCmmntyUserList(UserInfVO userVO) throws Exception {
List<UserInfVO> result = userInfDAO.selectCmmntyUserList(userVO);
int cnt = userInfDAO.selectCmmntyUserListCnt(userVO);
Map<String, Object> map = new HashMap<String, Object>();
map.put("resultList", result);
map.put("resultCnt", Integer.toString(cnt));
return map;
}
/**
* 사용자 정보에 대한 목록을 조회한다.
*
* @see itn.let.cop.com.service.EgovUserInfManageService#selectUserList(itn.let.cop.com.service.UserInfVO)
*/
public Map<String, Object> selectUserList(UserInfVO userVO) throws Exception {
List<UserInfVO> result = userInfDAO.selectUserList(userVO);
int cnt = userInfDAO.selectUserListCnt(userVO);
Map<String, Object> map = new HashMap<String, Object>();
map.put("resultList", result);
map.put("resultCnt", Integer.toString(cnt));
return map;
}
/**
* 동호회에 대한 모든 사용자 목록을 조회한다.
*
* @see itn.let.cop.com.service.EgovUserInfManageService#selectAllClubUser(itn.let.cop.com.service.UserInfVO)
*/
public List<UserInfVO> selectAllClubUser(UserInfVO userVO) throws Exception {
return userInfDAO.selectAllClubUser(userVO);
}
/**
* 커뮤니티에 대한 모든 사용자 목록을 조회한다.
*
* @see itn.let.cop.com.service.EgovUserInfManageService#selectAllCmmntyUser(itn.let.cop.com.service.UserInfVO)
*/
public List<UserInfVO> selectAllCmmntyUser(UserInfVO userVO) throws Exception {
return userInfDAO.selectAllCmmntyUser(userVO);
}
}

View File

@ -1,118 +0,0 @@
package itn.let.cop.com.service.impl;
import java.util.List;
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
import itn.let.cop.com.service.TemplateInf;
import itn.let.cop.com.service.TemplateInfVO;
import org.springframework.stereotype.Repository;
/**
* 템플릿 정보관리를 위한 데이터 접근 클래스
* @author 공통서비스개발팀 이삼섭
* @since 2009.03.17
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.03.17 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
@Repository("TemplateManageDAO")
public class TemplateManageDAO extends EgovAbstractDAO {
/**
* 템플릿 정보를 삭제한다.
*
* @param tmplatInf
* @throws Exception
*/
public void deleteTemplateInf(TemplateInf tmplatInf) throws Exception {
update("TemplateManageDAO.deleteTemplateInf", tmplatInf);
}
/**
* 템플릿 정보를 등록한다.
*
* @param tmplatInf
* @throws Exception
*/
public void insertTemplateInf(TemplateInf tmplatInf) throws Exception {
insert("TemplateManageDAO.insertTemplateInf", tmplatInf);
}
/**
* 템플릿 정보를 수정한다.
*
* @param tmplatInf
* @throws Exception
*/
public void updateTemplateInf(TemplateInf tmplatInf) throws Exception {
update("TemplateManageDAO.updateTemplateInf", tmplatInf);
}
/**
* 템플릿에 대한 목록를 조회한다.
*
* @param tmplatInfVO
* @return
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<TemplateInfVO> selectTemplateInfs(TemplateInfVO tmplatInfVO) throws Exception {
return (List<TemplateInfVO>) list("TemplateManageDAO.selectTemplateInfs", tmplatInfVO);
}
/**
* 템플릿에 대한 목록 전체 건수를 조회한다.
*
* @param tmplatInfVO
* @return
* @throws Exception
*/
public int selectTemplateInfsCnt(TemplateInfVO tmplatInfVO) throws Exception {
return (Integer)select("TemplateManageDAO.selectTemplateInfsCnt", tmplatInfVO);
}
/**
* 템플릿에 대한 상세정보를 조회한다.
*
* @param tmplatInfVO
* @return
* @throws Exception
*/
public TemplateInfVO selectTemplateInf(TemplateInfVO tmplatInfVO) throws Exception {
return (TemplateInfVO)select("TemplateManageDAO.selectTemplateInf", tmplatInfVO);
}
/**
* 템플릿에 대한 미리보기 정보를 조회한다.
*
* @param tmplatInfVO
* @return
* @throws Exception
*/
public TemplateInfVO selectTemplatePreview(TemplateInfVO tmplatInfVO) throws Exception {
return null;
}
/**
* 템플릿 구분에 따른 목록을 조회한다.
*
* @param tmplatInfVO
* @return
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<TemplateInfVO> selectTemplateInfsByCode(TemplateInfVO tmplatInfVO) throws Exception {
return (List<TemplateInfVO>) list("TemplateManageDAO.selectTemplateInfsByCode", tmplatInfVO);
}
}

View File

@ -1,375 +0,0 @@
package itn.let.cop.com.web;
import java.util.Map;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.LoginVO;
import itn.let.cop.com.service.BoardUseInf;
import itn.let.cop.com.service.BoardUseInfVO;
import itn.let.cop.com.service.EgovBBSUseInfoManageService;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.support.SessionStatus;
import org.springmodules.validation.commons.DefaultBeanValidator;
//SHT-CUSTOMIZING//import itn.let.cop.clb.service.ClubUser;
//SHT-CUSTOMIZING//import itn.let.cop.clb.service.EgovClubManageService;
//SHT-CUSTOMIZING//import itn.let.cop.cmy.service.CommunityUser;
//SHT-CUSTOMIZING//import itn.let.cop.cmy.service.EgovCommunityManageService;
//import egovframework.rte.fdl.cmmn.exception.EgovBizException;
/**
* 게시판의 이용정보를 관리하기 위한 컨트롤러 클래스
* @author 공통서비스개발팀 이삼섭
* @since 2009.04.02
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.04.02 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
@Controller
public class EgovBBSUseInfoManageController {
@Resource(name = "EgovBBSUseInfoManageService")
private EgovBBSUseInfoManageService bbsUseService;
@Resource(name = "propertiesService")
protected EgovPropertyService propertyService;
//SHT-CUSTOMIZING//@Resource(name = "EgovCommunityManageService")
//SHT-CUSTOMIZING//private EgovCommunityManageService cmmntyService; // 커뮤니티 관리자 권한 확인
//SHT-CUSTOMIZING//@Resource(name = "EgovClubManageService")
//SHT-CUSTOMIZING//private EgovClubManageService clubService; // 동호회 운영자 권한 확인
@Autowired
private DefaultBeanValidator beanValidator;
/**
* 커뮤니티 관리자 동호회 운영자 권한을 확인한다.
*
* @param boardUseInf
* @throws EgovBizException
*/
//SHT-CUSTOMIZING//protected void checkAuthority(BoardUseInf boardUseInf) throws Exception {
//SHT-CUSTOMIZING//String targetId = boardUseInf.getTrgetId();
//SHT-CUSTOMIZING//LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
//SHT-CUSTOMIZING//if (user == null) {
//SHT-CUSTOMIZING//throw new EgovBizException("인증된 사용자 정보가 존재하지 않습니다.");
//SHT-CUSTOMIZING//}
//SHT-CUSTOMIZING//if (targetId.startsWith("CMMNTY_")) {
//SHT-CUSTOMIZING//CommunityUser cmmntyUser = new CommunityUser();
//SHT-CUSTOMIZING//cmmntyUser.setCmmntyId(boardUseInf.getTrgetId());
//SHT-CUSTOMIZING//cmmntyUser.setEmplyrId(user.getUniqId());
//SHT-CUSTOMIZING//if (!cmmntyService.isManager(cmmntyUser)) {
//SHT-CUSTOMIZING//throw new EgovBizException("해당 커뮤니티 관리자만 사용하실 수 있습니다.");
//SHT-CUSTOMIZING//}
//SHT-CUSTOMIZING//} else if (targetId.startsWith("CLB_")) {
//SHT-CUSTOMIZING//ClubUser clubUser = new ClubUser();
//SHT-CUSTOMIZING//clubUser.setClbId(boardUseInf.getTrgetId());
//SHT-CUSTOMIZING//clubUser.setEmplyrId(user.getUniqId());
//SHT-CUSTOMIZING//if (!clubService.isOperator(clubUser)) {
//SHT-CUSTOMIZING//throw new EgovBizException("해당 동호회 운영자만 사용하실 수 있습니다.");
//SHT-CUSTOMIZING//}
//SHT-CUSTOMIZING//} else {
//SHT-CUSTOMIZING//throw new EgovBizException("대상ID 정보가 정확하지 않습니다.");
//SHT-CUSTOMIZING//}
//SHT-CUSTOMIZING//}
/**
* 게시판 사용 정보를 삭제한다.
*
* @param bdUseVO
* @param bdUseInf
* @param sessionVO
* @param status
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/com/deleteBBSUseInf.do")
public String deleteBBSUseInf(@ModelAttribute("searchVO") BoardUseInfVO bdUseVO, @ModelAttribute("bdUseInf") BoardUseInf bdUseInf, SessionStatus status, ModelMap model)
throws Exception {
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
if (isAuthenticated) {
bbsUseService.deleteBBSUseInf(bdUseInf);
}
return "forward:/cop/com/selectBBSUseInfs.do";
}
/**
* 게사판 사용정보 등록을 위한 등록페이지로 이동한다.
*
* @param bdUseVO
* @param sessionVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/com/addBBSUseInf.do")
public String addBBSUseInf(@ModelAttribute("searchVO") BoardUseInfVO bdUseVO, ModelMap model) throws Exception {
return "cop/com/EgovBoardUseInfRegist";
}
/**
* 게시판 사용정보를 등록한다.
*
* @param bdUseVO
* @param bdUseInf
* @param sessionVO
* @param status
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/com/insertBBSUseInf.do")
public String insertBBSUseInf(@ModelAttribute("searchVO") BoardUseInfVO bdUseVO, @ModelAttribute("boardUseInf") BoardUseInf boardUseInf, BindingResult bindingResult,
@RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception {
LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
beanValidator.validate(boardUseInf, bindingResult);
if (bindingResult.hasErrors()) {
return "cop/com/EgovBoardUseInfRegist";
}
String trgetType = (String) commandMap.get("param_trgetType");
String registSeCode = "";
// CMMNTY 06/CLUB 05/SYSTEM(REGC01)
if ("CMMNTY".equals(trgetType)) {
registSeCode = "REGC06";
} else if ("CLUB".equals(trgetType)) {
registSeCode = "REGC05";
} else {
registSeCode = "REGC01";
}
boardUseInf.setUseAt("Y");
boardUseInf.setFrstRegisterId(user.getUniqId());
boardUseInf.setRegistSeCode(registSeCode);
if (isAuthenticated) {
bbsUseService.insertBBSUseInf(boardUseInf);
}
return "forward:/cop/com/selectBBSUseInfs.do";
}
/**
* 게시판 사용정보 목록을 조회한다.
*
* @param bdUseVO
* @param sessionVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/com/selectBBSUseInfs.do")
public String selectBBSUseInfs(@ModelAttribute("searchVO") BoardUseInfVO bdUseVO, ModelMap model) throws Exception {
bdUseVO.setPageUnit(propertyService.getInt("pageUnit"));
bdUseVO.setPageSize(propertyService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(bdUseVO.getPageIndex());
paginationInfo.setRecordCountPerPage(bdUseVO.getPageUnit());
paginationInfo.setPageSize(bdUseVO.getPageSize());
bdUseVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
bdUseVO.setLastIndex(paginationInfo.getLastRecordIndex());
bdUseVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
Map<String, Object> map = bbsUseService.selectBBSUseInfs(bdUseVO);
int totCnt = Integer.parseInt((String) map.get("resultCnt"));
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("resultList", map.get("resultList"));
model.addAttribute("resultCnt", map.get("resultCnt"));
model.addAttribute("paginationInfo", paginationInfo);
return "cop/com/EgovBoardUseInfList";
}
/**
* 게시판 사용정보를 수정한다.
*
* @param bdUseVO
* @param bdUseInf
* @param sessionVO
* @param status
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/com/updateBBSUseInf.do")
public String updateBBSUseInf(@ModelAttribute("searchVO") BoardUseInfVO bdUseVO, @ModelAttribute("boardUseInf") BoardUseInf boardUseInf, HttpServletRequest request,
ModelMap model) throws Exception {
if (EgovUserDetailsHelper.isAuthenticated()) {
bbsUseService.updateBBSUseInf(boardUseInf);
}
return "forward:/cop/com/selectBBSUseInfs.do";
}
/**
* 게시판 사용정보에 대한 상세정보를 조회한다.
*
* @param bdUseVO
* @param sessionVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/com/selectBBSUseInf.do")
public String selectBBSUseInf(@ModelAttribute("searchVO") BoardUseInfVO bdUseVO, ModelMap model) throws Exception {
BoardUseInfVO vo = bbsUseService.selectBBSUseInf(bdUseVO);
// 시스템 사용 게시판의 경우 URL 표시
if ("SYSTEM_DEFAULT_BOARD".equals(vo.getTrgetId())) {
if (vo.getBbsTyCode().equals("BBST02")) { // 익명게시판
vo.setProvdUrl("/cop/bbs/anonymous/selectBoardList.do?bbsId=" + vo.getBbsId());
} else {
vo.setProvdUrl("/cop/bbs/selectBoardList.do?bbsId=" + vo.getBbsId());
}
}
model.addAttribute("bdUseVO", vo);
return "cop/com/EgovBoardUseInfInqire";
}
/**
* 커뮤니티, 동호회에 사용되는 게시판 사용정보에 대한 목록을 조회한다.
*
* @param bdUseVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/com/selectBBSUseInfsByTrget.do")
public String selectBBSUseInfsByTrget(@ModelAttribute("searchVO") BoardUseInfVO bdUseVO, ModelMap model) throws Exception {
//SHT-CUSTOMIZING//checkAuthority(bdUseVO); // server-side 권한 확인
bdUseVO.setPageUnit(propertyService.getInt("pageUnit"));
bdUseVO.setPageSize(propertyService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(bdUseVO.getPageIndex());
paginationInfo.setRecordCountPerPage(bdUseVO.getPageUnit());
paginationInfo.setPageSize(bdUseVO.getPageSize());
bdUseVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
bdUseVO.setLastIndex(paginationInfo.getLastRecordIndex());
bdUseVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
Map<String, Object> map = bbsUseService.selectBBSUseInfsByTrget(bdUseVO);
int totCnt = Integer.parseInt((String) map.get("resultCnt"));
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("resultList", map.get("resultList"));
model.addAttribute("resultCnt", map.get("resultCnt"));
model.addAttribute("trgetId", bdUseVO.getTrgetId());
model.addAttribute("trgetType", bdUseVO.getTrgetType());
model.addAttribute("paginationInfo", paginationInfo);
return "cop/com/EgovBdUseInfListByTrget";
}
/**
* 커뮤니티, 동호회에 사용되는 게시판 사용정보를 수정한다.
*
* @param bdUseVO
* @param boardUseInf
* @param status
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/com/updateBBSUseInfByTrget.do")
public String updateBBSUseInfByTrget(@ModelAttribute("searchVO") BoardUseInfVO bdUseVO, @ModelAttribute("boardUseInf") BoardUseInf boardUseInf,
@RequestParam Map<String, Object> commandMap, SessionStatus status, ModelMap model) throws Exception {
//SHT-CUSTOMIZING//checkAuthority(bdUseVO); // server-side 권한 확인
String param_trgetId = (String) commandMap.get("param_trgetId");
//LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
if (isAuthenticated) {
boardUseInf.setTrgetId(param_trgetId);
bbsUseService.updateBBSUseInfByTrget(boardUseInf);
}
return "forward:/cop/com/selectBBSUseInfsByTrget.do";
}
/**
* 커뮤니티, 동호회에 사용되는 게시판 사용정보를 등록한다.
*
* @param bdUseVO
* @param boardUseInf
* @param status
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/com/insertBBSUseInfByTrget.do")
public String insertBBSUseInfByTrget(@ModelAttribute("searchVO") BoardUseInfVO bdUseVO, @ModelAttribute("boardUseInf") BoardUseInf boardUseInf,
@RequestParam Map<String, Object> commandMap, SessionStatus status, ModelMap model) throws Exception {
//SHT-CUSTOMIZING//checkAuthority(bdUseVO); // server-side 권한 확인
String paramTrgetId = (String) commandMap.get("param_trgetId");
String bbsId = (String) commandMap.get("bbsId");
LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
if (isAuthenticated) {
boardUseInf.setUseAt("Y");
boardUseInf.setFrstRegisterId(user.getUniqId());
boardUseInf.setRegistSeCode("REGC07");
boardUseInf.setBbsId(bbsId);
boardUseInf.setTrgetId(paramTrgetId);
bbsUseService.insertBBSUseInf(boardUseInf);
}
return "forward:/cop/com/selectBBSUseInfsByTrget.do";
}
}

View File

@ -1,334 +0,0 @@
package itn.let.cop.com.web;
import java.util.List;
import java.util.Map;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.ComDefaultCodeVO;
import itn.com.cmm.LoginVO;
import itn.com.cmm.service.EgovCmmUseService;
import itn.let.cop.com.service.EgovTemplateManageService;
import itn.let.cop.com.service.TemplateInf;
import itn.let.cop.com.service.TemplateInfVO;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.support.SessionStatus;
import org.springmodules.validation.commons.DefaultBeanValidator;
/**
* 템플릿 관리를 위한 컨트롤러 클래스
* @author 공통서비스개발팀 이삼섭
* @since 2009.03.18
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.03.18 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
@Controller
public class EgovTemplateManageController {
@Resource(name = "EgovTemplateManageService")
private EgovTemplateManageService tmplatService;
@Resource(name = "EgovCmmUseService")
private EgovCmmUseService cmmUseService;
@Resource(name = "propertiesService")
protected EgovPropertyService propertyService;
@Autowired
private DefaultBeanValidator beanValidator;
/**
* 템플릿 목록을 조회한다.
*
* @param searchVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/com/selectTemplateInfs.do")
public String selectTemplateInfs(@ModelAttribute("searchVO") TemplateInfVO tmplatInfVO, ModelMap model) throws Exception {
tmplatInfVO.setPageUnit(propertyService.getInt("pageUnit"));
tmplatInfVO.setPageSize(propertyService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(tmplatInfVO.getPageIndex());
paginationInfo.setRecordCountPerPage(tmplatInfVO.getPageUnit());
paginationInfo.setPageSize(tmplatInfVO.getPageSize());
tmplatInfVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
tmplatInfVO.setLastIndex(paginationInfo.getLastRecordIndex());
tmplatInfVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
Map<String, Object> map = tmplatService.selectTemplateInfs(tmplatInfVO);
int totCnt = Integer.parseInt((String) map.get("resultCnt"));
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("resultList", map.get("resultList"));
model.addAttribute("resultCnt", map.get("resultCnt"));
model.addAttribute("paginationInfo", paginationInfo);
return "cop/com/EgovTemplateList";
}
/**
* 템플릿에 대한 상세정보를 조회한다.
*
* @param searchVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/com/selectTemplateInf.do")
public String selectTemplateInf(@ModelAttribute("searchVO") TemplateInfVO tmplatInfVO, ModelMap model) throws Exception {
ComDefaultCodeVO codeVO = new ComDefaultCodeVO();
codeVO.setCodeId("COM005");
List<?> result = cmmUseService.selectCmmCodeDetail(codeVO);
TemplateInfVO vo = tmplatService.selectTemplateInf(tmplatInfVO);
model.addAttribute("TemplateInfVO", vo);
model.addAttribute("resultList", result);
return "cop/com/EgovTemplateUpdt";
}
/**
* 템플릿 정보를 등록한다.
*
* @param searchVO
* @param tmplatInfo
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/com/insertTemplateInf.do")
public String insertTemplateInf(@ModelAttribute("searchVO") TemplateInfVO searchVO, @ModelAttribute("templateInf") TemplateInf templateInf, BindingResult bindingResult,
SessionStatus status, ModelMap model) throws Exception {
LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
beanValidator.validate(templateInf, bindingResult);
if (bindingResult.hasErrors()) {
ComDefaultCodeVO vo = new ComDefaultCodeVO();
vo.setCodeId("COM005");
List<?> result = cmmUseService.selectCmmCodeDetail(vo);
model.addAttribute("resultList", result);
return "cop/com/EgovTemplateRegist";
}
templateInf.setFrstRegisterId(user.getUniqId());
if (isAuthenticated) {
tmplatService.insertTemplateInf(templateInf);
}
return "forward:/cop/com/selectTemplateInfs.do";
}
/**
* 템플릿 등록을 위한 등록페이지로 이동한다.
*
* @param searchVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/com/addTemplateInf.do")
public String addTemplateInf(@ModelAttribute("searchVO") TemplateInfVO searchVO, ModelMap model) throws Exception {
ComDefaultCodeVO vo = new ComDefaultCodeVO();
vo.setCodeId("COM005");
List<?> result = cmmUseService.selectCmmCodeDetail(vo);
model.addAttribute("resultList", result);
return "cop/com/EgovTemplateRegist";
}
/**
* 템플릿 정보를 수정한다.
*
* @param searchVO
* @param tmplatInfo
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/com/updateTemplateInf.do")
public String updateTemplateInf(@ModelAttribute("searchVO") TemplateInfVO tmplatInfVO, @ModelAttribute("templateInf") TemplateInf templateInf, BindingResult bindingResult,
SessionStatus status, ModelMap model) throws Exception {
LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
beanValidator.validate(templateInf, bindingResult);
if (bindingResult.hasErrors()) {
ComDefaultCodeVO codeVO = new ComDefaultCodeVO();
codeVO.setCodeId("COM005");
List<?> result = cmmUseService.selectCmmCodeDetail(codeVO);
TemplateInfVO vo = tmplatService.selectTemplateInf(tmplatInfVO);
model.addAttribute("TemplateInfVO", vo);
model.addAttribute("resultList", result);
return "cop/com/EgovTemplateUpdt";
}
templateInf.setLastUpdusrId(user.getUniqId());
if (isAuthenticated) {
tmplatService.updateTemplateInf(templateInf);
}
return "forward:/cop/com/selectTemplateInfs.do";
}
/**
* 템플릿 정보를 삭제한다.
*
* @param searchVO
* @param tmplatInfo
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/bbs/deleteTemplateInf.do")
public String deleteTemplateInf(@ModelAttribute("searchVO") TemplateInfVO searchVO, @ModelAttribute("tmplatInf") TemplateInf tmplatInf, SessionStatus status, ModelMap model)
throws Exception {
LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
tmplatInf.setLastUpdusrId(user.getUniqId());
if (isAuthenticated) {
tmplatService.deleteTemplateInf(tmplatInf);
}
return "forward:/cop/com/selectTemplateInfs.do";
}
/**
* 팝업을 위한 템플릿 목록을 조회한다.
*
* @param searchVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/com/selectTemplateInfsPop.do")
public String selectTemplateInfsPop(@ModelAttribute("searchVO") TemplateInfVO tmplatInfVO, @RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception {
String typeFlag = (String) commandMap.get("typeFlag");
if ("CLB".equals(typeFlag)) {
tmplatInfVO.setTypeFlag(typeFlag);
tmplatInfVO.setTmplatSeCode("TMPT03");
} else if ("CMY".equals(typeFlag)) {
tmplatInfVO.setTypeFlag(typeFlag);
tmplatInfVO.setTmplatSeCode("TMPT02");
} else {
tmplatInfVO.setTypeFlag(typeFlag);
tmplatInfVO.setTmplatSeCode("TMPT01");
}
tmplatInfVO.setPageUnit(propertyService.getInt("pageUnit"));
tmplatInfVO.setPageSize(propertyService.getInt("pageSize"));
//CMY, CLB
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(tmplatInfVO.getPageIndex());
paginationInfo.setRecordCountPerPage(tmplatInfVO.getPageUnit());
paginationInfo.setPageSize(tmplatInfVO.getPageSize());
tmplatInfVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
tmplatInfVO.setLastIndex(paginationInfo.getLastRecordIndex());
tmplatInfVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
Map<String, Object> map = tmplatService.selectTemplateInfs(tmplatInfVO);
int totCnt = Integer.parseInt((String) map.get("resultCnt"));
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("resultList", map.get("resultList"));
model.addAttribute("resultCnt", map.get("resultCnt"));
model.addAttribute("paginationInfo", paginationInfo);
return "cop/com/EgovTemplateInqirePopup";
}
/**
* 팝업 페이지를 호출한다.
*
* @param userVO
* @param sessionVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/com/openPopup.do")
public String openPopupWindow(@RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception {
String requestUrl = (String) commandMap.get("requestUrl");
String trgetId = (String) commandMap.get("trgetId");
String width = (String) commandMap.get("width");
String height = (String) commandMap.get("height");
String typeFlag = (String) commandMap.get("typeFlag");
if (trgetId != null && trgetId != "") {
if (typeFlag != null && typeFlag != "") {
model.addAttribute("requestUrl", requestUrl + "?trgetId=" + trgetId + "&amp;PopFlag=Y&amp;typeFlag=" + typeFlag);
} else {
model.addAttribute("requestUrl", requestUrl + "?trgetId=" + trgetId + "&amp;PopFlag=Y");
}
} else {
if (typeFlag != null && typeFlag != "") {
model.addAttribute("requestUrl", requestUrl + "?PopFlag=Y&amp;typeFlag=" + typeFlag);
} else {
model.addAttribute("requestUrl", requestUrl + "?PopFlag=Y");
}
}
model.addAttribute("width", width);
model.addAttribute("height", height);
return "/cop/com/EgovModalPopupFrame";
}
}

View File

@ -1,108 +0,0 @@
package itn.let.cop.org.service;
import java.util.List;
/**
* 조직도 관리를 위한 서비스 인터페이스 클래스
* @author ITN
* @since 2018.06.11
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2018.06.11 ITN 최초 생성
*
* </pre>
*/
public interface EgovOrgChartManageService {
/**
* 부서 목록을 조회한다.
*
* @param partInfVO
* @exception Exception Exception
*/
public List<PartInfVO> selectPartInfs(PartInfVO partInfVO)
throws Exception;
/**
* 부서명을 수정한다.
*
* @param partInfVO
* @exception Exception Exception
*/
public void updatePartTitle(PartInfVO partInfVO)
throws Exception;
/**
* 부서명 순서를 변경한다.
*
* @param partInfVO
* @exception Exception Exception
*/
public void updatePartOrder(PartInfVO partInfVO)
throws Exception;
/**
* 부서 정보를 등록한다.
*
* @param partInfVO
* @exception Exception Exception
*/
public void insertPartInf(PartInfVO partInfVO)
throws Exception;
/**
* 부서 하위부서, 직원정보 전체를 삭제한다.
*
* @param partInfVO
* @exception Exception Exception
*/
public void deletePart(PartInfVO partInfVO)
throws Exception;
/**
* 사원 정보를 조회한다.
*
* @param partInfVO
* @exception Exception Exception
*/
public List<EmpInfVO> selectPartEmpInf(EmpInfVO empInfVO)
throws Exception;
/**
* 사원 정보를 등록한다.
*
* @param partInfVO
* @exception Exception Exception
*/
public void insertEmpInf(EmpInfVO empInfVO)
throws Exception;
/**
* 사원 정보를 수정한다.
*
* @param partInfVO
* @exception Exception Exception
*/
public void updateEmpInf(EmpInfVO empInfVO)
throws Exception;
/**
* 사원 정보를 삭제한다.
*
* @param partInfVO
* @exception Exception Exception
*/
public void deleteEmpInf(EmpInfVO empInfVO)
throws Exception;
public List<PartInfVO> selectChartDepth(PartInfVO partInfVO) throws Exception;
public List<PartInfVO> selectUserPart(PartInfVO partInfVO) throws Exception;
}

View File

@ -1,168 +0,0 @@
package itn.let.cop.org.service;
import java.io.Serializable;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* 조직 부서에 사원 정보 조회를 위한 VO 클래스
* @author ITN
* @since 2018.06.11
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2018.06.11 ITN 최초 생성
*
* </pre>
*/
@SuppressWarnings("serial")
public class EmpInfVO implements Serializable {
/** 사원 아이디 */
private int paIdx = 0;
/** 사원 명 */
private String paName = "";
/** 직급 */
private String paGrade = "";
/** 부서 아이디 */
private int partIdx = 0;
/** 입력 일자 */
private String insertDate = "";
/** 담당업무 */
private String paJob = "";
/** 전화번호 */
private String paTel = "";
/** 정렬 순번 */
private int sortOrd = 0;
/**
* @return the paIdx
*/
public int getPaIdx() {
return paIdx;
}
/**
* @param paIdx the paIdx to set
*/
public void setPaIdx(int paIdx) {
this.paIdx = paIdx;
}
/**
* @return the paName
*/
public String getPaName() {
return paName;
}
/**
* @param paName the paName to set
*/
public void setPaName(String paName) {
this.paName = paName;
}
/**
* @return the paGrade
*/
public String getPaGrade() {
return paGrade;
}
/**
* @param paGrade the paGrade to set
*/
public void setPaGrade(String paGrade) {
this.paGrade = paGrade;
}
/**
* @return the partIdx
*/
public int getPartIdx() {
return partIdx;
}
/**
* @param partIdx the partIdx to set
*/
public void setPartIdx(int partIdx) {
this.partIdx = partIdx;
}
/**
* @return the insertDate
*/
public String getInsertDate() {
return insertDate;
}
/**
* @param insertDate the insertDate to set
*/
public void setInsertDate(String insertDate) {
this.insertDate = insertDate;
}
/**
* @return the paJob
*/
public String getPaJob() {
return paJob;
}
/**
* @param paJob the paJob to set
*/
public void setPaJob(String paJob) {
this.paJob = paJob;
}
/**
* @return the paTel
*/
public String getPaTel() {
return paTel;
}
/**
* @param paTel the paTel to set
*/
public void setPaTel(String paTel) {
this.paTel = paTel;
}
/**
* @return the sortOrd
*/
public int getSortOrd() {
return sortOrd;
}
/**
* @param sortOrd the sortOrd to set
*/
public void setSortOrd(int sortOrd) {
this.sortOrd = sortOrd;
}
/**
* toString 메소드를 대치한다.
*/
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
}

View File

@ -1,232 +0,0 @@
package itn.let.cop.org.service;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang3.builder.ToStringBuilder;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* 조직도 부서 정보 조회를 위한 VO 클래스
* @author ITN
* @since 2018.06.11
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2018.06.11 ITN 최초 생성
*
* </pre>
*/
@SuppressWarnings("serial")
public class PartInfVO implements Serializable {
/**
* Jackson json annotaion
* @JsonIgnore : 제외
* @JsonProperty : json id 설정
*/
/** 부서 아이디 */
@JsonIgnore
public int partIdx = 0;
/** Jstree 부서 아이디 String */
@JsonProperty("id")
public String strPartIdx = "";
/** 부서 명 */
@JsonProperty("text")
private String partTitle = "";
/** 상위 부서 ID */
@JsonIgnore
private int upperIdx = 0;
/** Jstree 상위 부서 ID String */
@JsonProperty("parent")
private String strUpperIdx = "";
/** 부서 단계 */
private int depth = 0;
/** 입력 일자 */
@JsonIgnore
private String insertDate = "";
/** 정렬 순번 */
@JsonIgnore
private int sortOrd = 0;
/** Jstree li_attr in sortOrd */
@JsonProperty("li_attr")
private Map<String, Object> liAttr = null;
/** 증가 정렬 순번 */
@JsonIgnore
private int incrsSortOrd = 0;
public boolean selected = false;
/**
* @return the strPartIdx
*/
public String getStrPartIdx() {
return strPartIdx;
}
/**
* @param strPartIdx the strPartIdx to set
*/
public void setStrPartIdx(String strPartIdx) {
this.strPartIdx = strPartIdx;
}
/**
* @return the strUpperIdx
*/
public String getStrUpperIdx() {
return strUpperIdx;
}
/**
* @param strUpperIdx the strUpperIdx to set
*/
public void setStrUpperIdx(String strUpperIdx) {
this.strUpperIdx = strUpperIdx;
}
/**
* @return the partIdx
*/
public int getPartIdx() {
return partIdx;
}
/**
* @param partIdx the partIdx to set
*/
public void setPartIdx(int partIdx) {
this.partIdx = partIdx;
this.strPartIdx = Integer.toString(partIdx);
}
/**
* @return the partTitle
*/
public String getPartTitle() {
return partTitle;
}
/**
* @param partTitle the partTitle to set
*/
public void setPartTitle(String partTitle) {
this.partTitle = partTitle;
}
/**
* @return the upperIdx
*/
public int getUpperIdx() {
return upperIdx;
}
/**
* @param upperIdx the upperIdx to set
*/
public void setUpperIdx(int upperIdx) {
this.upperIdx = upperIdx;
this.strUpperIdx = Integer.toString(upperIdx);
}
/**
* @return the depth
*/
public int getDepth() {
return depth;
}
/**
* @param depth the depth to set
*/
public void setDepth(int depth) {
this.depth = depth;
}
/**
* @return the insertDate
*/
public String getInsertDate() {
return insertDate;
}
/**
* @param insertDate the insertDate to set
*/
public void setInsertDate(String insertDate) {
this.insertDate = insertDate;
}
/**
* @return the sortOrd
*/
public int getSortOrd() {
return sortOrd;
}
/**
* @param sortOrd the sortOrd to set
*/
public void setSortOrd(int sortOrd) {
this.sortOrd = sortOrd;
}
/**
* toString 메소드를 대치한다.
*/
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
/**
* @return the liAttr
*/
public Map<String, Object> getLiAttr() {
this.liAttr = new HashMap<String, Object>();
this.liAttr.put("sortOrd", this.getSortOrd());
this.liAttr.put("depth", this.getDepth());
return liAttr;
}
/**
* @return the incrsSortOrd
*/
public int getIncrsSortOrd() {
return incrsSortOrd;
}
/**
* @param incrsSortOrd the incrsSortOrd to set
*/
public void setIncrsSortOrd(int incrsSortOrd) {
this.incrsSortOrd = incrsSortOrd;
}
public boolean isSelected() {
return selected;
}
public void setSelected(boolean selected) {
this.selected = selected;
}
}

View File

@ -1,150 +0,0 @@
package itn.let.cop.org.service.impl;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
import itn.let.cop.org.service.EgovOrgChartManageService;
import itn.let.cop.org.service.EmpInfVO;
import itn.let.cop.org.service.PartInfVO;
/**
* 조직도 관리를 위한 서비스 구현 클래스
* @author ITN
* @since 2018.06.11
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2018.06.11 ITN 최초 생성
*
* </pre>
*/
@Service("EgovOrgChartManageService")
public class EgovOrgChartManageServiceImpl extends EgovAbstractServiceImpl implements EgovOrgChartManageService {
@Resource(name = "OrgChartManageDAO")
private OrgChartManageDAO orgChartManageDAO;
/**
* 부서 목록을 조회한다.
* @param partInfVO
* @return List<PartInfVO>
* @exception Exception
*/
public List<PartInfVO> selectPartInfs(PartInfVO partInfVO) throws Exception {
List<PartInfVO> result = orgChartManageDAO.selectPartInfs(partInfVO);
return result;
}
/**
* 부서명을 수정한다.
*
* @param partInfVO
* @exception Exception Exception
*/
public void updatePartTitle(PartInfVO partInfVO) throws Exception {
orgChartManageDAO.updatePartTitle(partInfVO);
}
/**
* 부서 순서를 변경한다.
*
* @param partInfVO
* @exception Exception Exception
*/
public void updatePartOrder(PartInfVO partInfVO) throws Exception {
// 정렬 순번 증가 필요
if (partInfVO.getIncrsSortOrd() != 0) {
orgChartManageDAO.updatePartSortOrderIncrs(partInfVO);
}
orgChartManageDAO.updatePartOrder(partInfVO);
}
/**
* 부서 정보를 등록한다.
*
* @param partInfVO
* @exception Exception Exception
*/
public void insertPartInf(PartInfVO partInfVO) throws Exception {
orgChartManageDAO.insertPartInf(partInfVO);
}
/**
* 부서 하위부서, 직원정보 전체를 삭제한다.
*
* @param partInfVO
* @exception Exception Exception
*/
public void deletePart(PartInfVO partInfVO) throws Exception {
orgChartManageDAO.deletePart(partInfVO);
}
/**
* 사원 정보를 조회한다.
*
* @param partInfVO
* @exception Exception Exception
*/
public List<EmpInfVO> selectPartEmpInf(EmpInfVO empInfVO) throws Exception {
return (List<EmpInfVO>) orgChartManageDAO.selectPartEmpInf(empInfVO);
}
/**
* 사원 정보를 등록한다.
*
* @param partInfVO
* @exception Exception Exception
*/
public void insertEmpInf(EmpInfVO empInfVO) throws Exception {
orgChartManageDAO.insertEmpInf(empInfVO);
}
/**
* 사원 정보를 수정한다.
*
* @param partInfVO
* @exception Exception Exception
*/
public void updateEmpInf(EmpInfVO empInfVO) throws Exception {
orgChartManageDAO.updateEmpInf(empInfVO);
}
/**
* 사원 정보를 삭제한다.
*
* @param partInfVO
* @exception Exception Exception
*/
public void deleteEmpInf(EmpInfVO empInfVO) throws Exception {
orgChartManageDAO.deleteEmpInf(empInfVO);
}
@Override
public List<PartInfVO> selectChartDepth(PartInfVO partInfVO) throws Exception {
List<PartInfVO> result = orgChartManageDAO.selectChartDepth(partInfVO);
return result;
}
@Override
public List<PartInfVO> selectUserPart(PartInfVO partInfVO) throws Exception {
List<PartInfVO> result = orgChartManageDAO.selectUserPart(partInfVO);
return result;
}
}

View File

@ -1,133 +0,0 @@
package itn.let.cop.org.service.impl;
import java.util.List;
import org.springframework.stereotype.Repository;
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
import itn.let.cop.org.service.EmpInfVO;
import itn.let.cop.org.service.PartInfVO;
/**
* 조직도 관리를 위한 데이터 접근 클래스
* @author ITN
* @since 2018.06.11
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2018.06.11 ITN 최초 생성
*
* </pre>
*/
@Repository("OrgChartManageDAO")
public class OrgChartManageDAO extends EgovAbstractDAO {
/**
* 부서 목록를 조회한다.
*
* @param partInfVO
* @return
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<PartInfVO> selectPartInfs(PartInfVO partInfVO) throws Exception {
return (List<PartInfVO>) list("orgChartManageDAO.selectPartInfs", partInfVO);
}
/**
* 부서 명을 수정한다.
*
* @param PartInfVO
*/
public void updatePartTitle(PartInfVO partInfVO) throws Exception {
update("orgChartManageDAO.updatePartTitle", partInfVO);
}
/**
* 부서 순서를 변경한다.
*
* @param PartInfVO
*/
public void updatePartOrder(PartInfVO partInfVO) throws Exception {
update("orgChartManageDAO.updatePartOrder", partInfVO);
}
/**
* 부서 순서를 증가한다.
*
* @param PartInfVO
*/
public void updatePartSortOrderIncrs(PartInfVO partInfVO) throws Exception {
update("orgChartManageDAO.updatePartSortOrderIncrs", partInfVO);
}
/**
* 부서 정보를 등록한다.
*
* @param PartInfVO
*/
public void insertPartInf(PartInfVO partInfVO) throws Exception {
update("orgChartManageDAO.insertPartInf", partInfVO);
}
/**
* 부서 하위부서, 직원정보 전체를 삭제한다.
*
* @param PartInfVO
*/
public void deletePart(PartInfVO partInfVO) throws Exception {
delete("orgChartManageDAO.deletePart", partInfVO);
}
/**
* 사원 정보를 조회한다.
*
* @param PartInfVO
*/
@SuppressWarnings("unchecked")
public List<EmpInfVO> selectPartEmpInf(EmpInfVO empInfVO) throws Exception {
return (List<EmpInfVO>) list("orgChartManageDAO.selectPartEmpInf", empInfVO);
}
/**
* 사원 정보를 등록한다.
*
* @param PartInfVO
*/
public void insertEmpInf(EmpInfVO empInfVO) throws Exception {
update("orgChartManageDAO.insertEmpInf", empInfVO);
}
/**
* 사원 정보를 수정한다.
*
* @param PartInfVO
*/
public void updateEmpInf(EmpInfVO empInfVO) throws Exception {
update("orgChartManageDAO.updateEmpInf", empInfVO);
}
/**
* 사원 정보를 삭제한다.
*
* @param PartInfVO
*/
public void deleteEmpInf(EmpInfVO empInfVO) throws Exception {
delete("orgChartManageDAO.deleteEmpInf", empInfVO);
}
@SuppressWarnings("unchecked")
public List<PartInfVO> selectChartDepth(PartInfVO partInfVO) throws Exception{
return (List<PartInfVO>) list("orgChartManageDAO.selectChartDepth", partInfVO);
}
public List<PartInfVO> selectUserPart(PartInfVO partInfVO) {
return (List<PartInfVO>) list("orgChartManageDAO.selectUserPart", partInfVO);
}
}

View File

@ -1,248 +0,0 @@
package itn.let.cop.org.web;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import com.fasterxml.jackson.databind.ObjectMapper;
import itn.let.cop.org.service.EgovOrgChartManageService;
import itn.let.cop.org.service.EmpInfVO;
import itn.let.cop.org.service.PartInfVO;
/**
* 조직도 관리를 위한 컨트롤러 클래스
* @author ITN
* @since 2018.06.11
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2018.06.11 ITN 최초 생성
*
* </pre>
*/
@Controller
public class EgovOrgChartManageController {
@Resource(name = "EgovOrgChartManageService")
private EgovOrgChartManageService orgChartManageService;
/**
* 조직도 관리 정보를 조회한다.
*
* @param searchVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/org/orgChartManage.do")
public String selectTemplateInfs(@ModelAttribute("searchVO") PartInfVO partInfVO, ModelMap model) throws Exception {
return "cop/org/EgovOrgChartManage";
}
/**
* 조직도 목록 정보를 조회한다.
*
* @param searchVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/org/orgChartPartListAjax.do")
public void orgChartPartListAjax(@ModelAttribute("searchVO") PartInfVO partInfVO, ModelMap model, HttpServletResponse response) throws Exception {
ObjectMapper mapper = new ObjectMapper();
response.setHeader("Content-Type", "text/html;charset=utf-8");
PrintWriter out = new PrintWriter(new OutputStreamWriter(response.getOutputStream(), "UTF-8"));
List<PartInfVO> resultList = orgChartManageService.selectPartInfs(partInfVO);
// jstree root node 필요함으로 추가 (우클릭 contextmenu 기능으로 1depth 추가 안됨)
PartInfVO rootNode = new PartInfVO();
rootNode.setStrUpperIdx("#");
rootNode.setPartIdx(0);
rootNode.setPartTitle("우체국물류지원단");
resultList.add(0, rootNode);
mapper.writeValue(out, resultList);
out.flush();
}
/**
* 부서명을 변경한다.
*
* @param partInfVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/org/updatePartTitleAjax.do")
public ModelAndView updatePartInf(@ModelAttribute("partInfVO") PartInfVO partInfVO, ModelMap model) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
orgChartManageService.updatePartTitle(partInfVO);
modelAndView.addObject("status", "success");
return modelAndView;
}
/**
* 부서 순서를 변경한다.
*
* @param partInfVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/org/updatePartOrderAjax.do")
public ModelAndView updatePartOrderAjax(@ModelAttribute("partInfVO") PartInfVO partInfVO, ModelMap model) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
orgChartManageService.updatePartOrder(partInfVO);
modelAndView.addObject("status", "success");
return modelAndView;
}
/**
* 부서 정보를 등록한다.
*
* @param partInfVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/org/insertPartInfAjax.do")
public ModelAndView insertPartInfAjax(@ModelAttribute("partInfVO") PartInfVO partInfVO, ModelMap model) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
orgChartManageService.insertPartInf(partInfVO);
modelAndView.addObject("status", "success");
return modelAndView;
}
/**
* 부서 하위부서, 직원정보 전체를 삭제한다.
*
* @param partInfVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/org/deletePartAjax.do")
public ModelAndView deletePartAjax(@ModelAttribute("partInfVO") PartInfVO partInfVO, ModelMap model) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
orgChartManageService.deletePart(partInfVO);
modelAndView.addObject("status", "success");
return modelAndView;
}
/**
* 사원 정보를 조회한다.
*
* @param partInfVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/org/selectPartEmpInfAjax.do")
public ModelAndView selectPartAccountAjax(@ModelAttribute("empInfVO") EmpInfVO empInfVO, ModelMap model) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
List<?> empList = orgChartManageService.selectPartEmpInf(empInfVO);
model.addAttribute("empList", empList);
modelAndView.addObject("status", "success");
return modelAndView;
}
/**
* 사원 정보를 등록한다.
*
* @param partInfVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/org/insertEmpInfAjax.do")
public ModelAndView insertEmpInfAjax(@ModelAttribute("empInfVO") EmpInfVO empInfVO, ModelMap model) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
orgChartManageService.insertEmpInf(empInfVO);
modelAndView.addObject("status", "success");
return modelAndView;
}
/**
* 사원 정보를 수정한다.
*
* @param partInfVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/org/updateEmpInfAjax.do")
public ModelAndView updateEmpInfAjax(@ModelAttribute("empInfVO") EmpInfVO empInfVO, ModelMap model) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
orgChartManageService.updateEmpInf(empInfVO);
modelAndView.addObject("status", "success");
return modelAndView;
}
/**
* 사원 정보를 삭제한다.
*
* @param partInfVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/org/deleteEmpInfAjax.do")
public ModelAndView deleteEmpInf(@ModelAttribute("empInfVO") EmpInfVO empInfVO, ModelMap model) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
orgChartManageService.deleteEmpInf(empInfVO);
modelAndView.addObject("status", "success");
return modelAndView;
}
}

View File

@ -1,851 +0,0 @@
package itn.let.cop.resve.service;
import java.io.Serializable;
/**
* 대관관리 정보를 담기위한 엔티티 클래스
* @author 공통 서비스 개발팀 이삼섭
* @since 2009.03.12
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.03.12 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
@SuppressWarnings("serial")
public class Resve implements Serializable {
/** 대관IDX */
private long applyNum = 0L;
/** 신청자명 */
private String userName = "";
/** 신청자구분(개인:P,법인:G) */
private String userType = "";
/** 신청자구분명 */
private String userTypeNm = "";
/** EMAIL */
private String email = "";
/** EMAIL1 */
private String email1 = "";
/** EMAIL2 */
private String email2 = "";
/** EMAIL select */
private String emailSelect = "";
/** 사용자화면게시여부 */
private String display = "";
/** 메인화면게시여부 */
private String maindisplay = "";
/** 전시시작일 */
private String resSdate = "";
/** 전시종료일 */
private String resEdate = "";
/** 신청일자 */
private String resStart = "";
/** 신청상태(그룹코드:00015) */
private String resState = "";
/** 신청상태명 */
private String resStateNm = "";
/** 삭제구분 D:삭제 */
private String recordStatus = "";
/** 전시구분(d:대관전시,g:기획전시) */
private String exDevise = "";
/** 전시명 */
private String exName = "";
/** 전시구성및안내 */
private String exExplain = "";
/** 관람시간 */
private String exHours = "";
/** 전시관1 */
private String exRoom1 = "";
/** 전시관2 */
private String exRoom2 = "";
/** 전시관3 */
private String exRoom3 = "";
/** 전시관4 */
private String exRoom4 = "";
/** 교육장 */
private String exRoom5 = "";
/** 세미나실 */
private String exRoom6 = "";
/** 전화번호1 */
private String telHome1 = "";
/** 전화번호2 */
private String telHome2 = "";
/** 전화번호3 */
private String telHome3 = "";
/** 휴대폰1 */
private String telMobile1 = "";
/** 휴대폰2 */
private String telMobile2 = "";
/** 휴대폰3 */
private String telMobile3 = "";
/** 작가및단체명 */
private String authorName = "";
/** 회사명(또는 단체명) */
private String companyName = "";
/** 사업자등록번호 */
private String companyNumber = "";
/** 그룹명 */
private String groupName = "";
/** 대표이미지 파일id */
private String imgAtchFileId = "";
/** 대표이미지(썸네일) 파일id */
private String thumbAtchFileId = "";
/** 포트폴리오 파일id */
private String portfolioAtchFileId = "";
/** 최종수정자 ID */
private String memberId = "";
/** 전시관 */
private String selectExRoom = "";
/** 여러날짜 쿼리 조건절 삽입용 */
private String searchDate = "";
/** 여러날짜 쿼리 조건절 삽입용 */
private String searchDate1 = "";
/** 달력일자(사용자 대관관리현황) */
private String strDate = "";
/** 교육장 AM */
private String exRoom5Am = "";
/** 교육 */
private String exRoom5Pm = "";
/**
* 전시관 Set
*/
public void setSelectExRoom(String selectExRoom) {
this.selectExRoom = selectExRoom;
switch (selectExRoom) {
case "1" : this.exRoom1 = "r"; break;
case "2" : this.exRoom2 = "r"; break;
case "3" : this.exRoom3 = "r"; break;
case "4" :
this.exRoom2 = "r"; this.exRoom3 = "r";
break;
case "5" :
this.exRoom1 = "r"; this.exRoom2 = "r"; this.exRoom3 = "r";
break;
case "6" : this.exRoom5 = "r"; break;
}
}
/** 목록 - 전시관명(복수) */
public String getExRooms() {
String exRooms = "";
String exType = ""; // g:전시관, e:교육장
if (this.exRoom1 != null && ("r").equals(this.exRoom1)) {
exRooms += " 1"; exType = "g";
}
if (this.exRoom2 != null && ("r").equals(this.exRoom2)) {
exRooms += " 2"; exType = "g";
}
if (this.exRoom3 != null && ("r").equals(this.exRoom3)) {
exRooms += " 3"; exType = "g";
}
if (this.exRoom4 != null && ("r").equals(this.exRoom4)) {
exRooms += " 4"; exType = "g";
}
if (this.exRoom5 != null && ("r").equals(this.exRoom5)) {
exType = "e";
}
if (("g").equals(exType)) {
exRooms += "전시관";
} else if (("e").equals(exType)) {
exRooms = "교육장";
}
return exRooms;
}
/**
* @return the applyNum
*/
public long getApplyNum() {
return applyNum;
}
/**
* @param applyNum the applyNum to set
*/
public void setApplyNum(long applyNum) {
this.applyNum = applyNum;
}
/**
* @return the userName
*/
public String getUserName() {
return userName;
}
/**
* @param userName the userName to set
*/
public void setUserName(String userName) {
this.userName = userName;
}
/**
* @return the userType
*/
public String getUserType() {
return userType;
}
/**
* @param userType the userType to set
*/
public void setUserType(String userType) {
this.userType = userType;
}
/**
* @return the email
*/
public String getEmail() {
return email;
}
/**
* @param email the email to set
*/
public void setEmail(String email) {
this.email = email;
}
/**
* @return the display
*/
public String getDisplay() {
return display;
}
/**
* @param display the display to set
*/
public void setDisplay(String display) {
this.display = display;
}
/**
* @return the maindisplay
*/
public String getMaindisplay() {
return maindisplay;
}
/**
* @param maindisplay the maindisplay to set
*/
public void setMaindisplay(String maindisplay) {
this.maindisplay = maindisplay;
}
/**
* @return the resSdate
*/
public String getResSdate() {
return resSdate;
}
/**
* @param resSdate the resSdate to set
*/
public void setResSdate(String resSdate) {
this.resSdate = resSdate;
}
/**
* @return the resEdate
*/
public String getResEdate() {
return resEdate;
}
/**
* @param resEdate the resEdate to set
*/
public void setResEdate(String resEdate) {
this.resEdate = resEdate;
}
/**
* @return the resStart
*/
public String getResStart() {
return resStart;
}
/**
* @param resStart the resStart to set
*/
public void setResStart(String resStart) {
this.resStart = resStart;
}
/**
* @return the resState
*/
public String getResState() {
return resState;
}
/**
* @param resState the resState to set
*/
public void setResState(String resState) {
this.resState = resState;
}
/**
* @return the recordStatus
*/
public String getRecordStatus() {
return recordStatus;
}
/**
* @param recordStatus the recordStatus to set
*/
public void setRecordStatus(String recordStatus) {
this.recordStatus = recordStatus;
}
/**
* @return the exDevise
*/
public String getExDevise() {
return exDevise;
}
/**
* @param exDevise the exDevise to set
*/
public void setExDevise(String exDevise) {
this.exDevise = exDevise;
}
/**
* @return the exName
*/
public String getExName() {
return exName;
}
/**
* @param exName the exName to set
*/
public void setExName(String exName) {
this.exName = exName;
}
/**
* @return the exExplain
*/
public String getExExplain() {
return exExplain;
}
/**
* @param exExplain the exExplain to set
*/
public void setExExplain(String exExplain) {
this.exExplain = exExplain;
}
/**
* @return the exRoom1
*/
public String getExRoom1() {
return exRoom1;
}
/**
* @param exRoom1 the exRoom1 to set
*/
public void setExRoom1(String exRoom1) {
this.exRoom1 = exRoom1;
}
/**
* @return the exRoom2
*/
public String getExRoom2() {
return exRoom2;
}
/**
* @param exRoom2 the exRoom2 to set
*/
public void setExRoom2(String exRoom2) {
this.exRoom2 = exRoom2;
}
/**
* @return the exRoom3
*/
public String getExRoom3() {
return exRoom3;
}
/**
* @param exRoom3 the exRoom3 to set
*/
public void setExRoom3(String exRoom3) {
this.exRoom3 = exRoom3;
}
/**
* @return the exRoom4
*/
public String getExRoom4() {
return exRoom4;
}
/**
* @param exRoom4 the exRoom4 to set
*/
public void setExRoom4(String exRoom4) {
this.exRoom4 = exRoom4;
}
/**
* @return the exRoom5
*/
public String getExRoom5() {
return exRoom5;
}
/**
* @param exRoom5 the exRoom5 to set
*/
public void setExRoom5(String exRoom5) {
this.exRoom5 = exRoom5;
}
/**
* @return the exRoom6
*/
public String getExRoom6() {
return exRoom6;
}
/**
* @param exRoom6 the exRoom6 to set
*/
public void setExRoom6(String exRoom6) {
this.exRoom6 = exRoom6;
}
/**
* @return the telHome1
*/
public String getTelHome1() {
return telHome1;
}
/**
* @param telHome1 the telHome1 to set
*/
public void setTelHome1(String telHome1) {
this.telHome1 = telHome1;
}
/**
* @return the telHome2
*/
public String getTelHome2() {
return telHome2;
}
/**
* @param telHome2 the telHome2 to set
*/
public void setTelHome2(String telHome2) {
this.telHome2 = telHome2;
}
/**
* @return the telHome3
*/
public String getTelHome3() {
return telHome3;
}
/**
* @param telHome3 the telHome3 to set
*/
public void setTelHome3(String telHome3) {
this.telHome3 = telHome3;
}
/**
* @return the telMobile1
*/
public String getTelMobile1() {
return telMobile1;
}
/**
* @param telMobile1 the telMobile1 to set
*/
public void setTelMobile1(String telMobile1) {
this.telMobile1 = telMobile1;
}
/**
* @return the telMobile2
*/
public String getTelMobile2() {
return telMobile2;
}
/**
* @param telMobile2 the telMobile2 to set
*/
public void setTelMobile2(String telMobile2) {
this.telMobile2 = telMobile2;
}
/**
* @return the telMobile3
*/
public String getTelMobile3() {
return telMobile3;
}
/**
* @param telMobile3 the telMobile3 to set
*/
public void setTelMobile3(String telMobile3) {
this.telMobile3 = telMobile3;
}
/**
* @return the authorName
*/
public String getAuthorName() {
return authorName;
}
/**
* @param authorName the authorName to set
*/
public void setAuthorName(String authorName) {
this.authorName = authorName;
}
/**
* @return the companyName
*/
public String getCompanyName() {
return companyName;
}
/**
* @param companyName the companyName to set
*/
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
* @return the companyNumber
*/
public String getCompanyNumber() {
return companyNumber;
}
/**
* @param companyNumber the companyNumber to set
*/
public void setCompanyNumber(String companyNumber) {
this.companyNumber = companyNumber;
}
/**
* @return the groupName
*/
public String getGroupName() {
return groupName;
}
/**
* @param groupName the groupName to set
*/
public void setGroupName(String groupName) {
this.groupName = groupName;
}
/**
* @return the imgAtchFileId
*/
public String getImgAtchFileId() {
return imgAtchFileId;
}
/**
* @param imgAtchFileId the imgAtchFileId to set
*/
public void setImgAtchFileId(String imgAtchFileId) {
this.imgAtchFileId = imgAtchFileId;
}
/**
* @return the thumbAtchFileId
*/
public String getThumbAtchFileId() {
return thumbAtchFileId;
}
/**
* @param thumbAtchFileId the thumbAtchFileId to set
*/
public void setThumbAtchFileId(String thumbAtchFileId) {
this.thumbAtchFileId = thumbAtchFileId;
}
/**
* @return the portfolioAtchFileId
*/
public String getPortfolioAtchFileId() {
return portfolioAtchFileId;
}
/**
* @param portfolioAtchFileId the portfolioAtchFileId to set
*/
public void setPortfolioAtchFileId(String portfolioAtchFileId) {
this.portfolioAtchFileId = portfolioAtchFileId;
}
/**
* @return the userTypeNm
*/
public String getUserTypeNm() {
return userTypeNm;
}
/**
* @param userTypeNm the userTypeNm to set
*/
public void setUserTypeNm(String userTypeNm) {
this.userTypeNm = userTypeNm;
}
/**
* @return the resStateNm
*/
public String getResStateNm() {
return resStateNm;
}
/**
* @param resStateNm the resStateNm to set
*/
public void setResStateNm(String resStateNm) {
this.resStateNm = resStateNm;
}
/**
* @return the exHours
*/
public String getExHours() {
return exHours;
}
/**
* @param exHours the exHours to set
*/
public void setExHours(String exHours) {
this.exHours = exHours;
}
/**
* @return the email1
*/
public String getEmail1() {
return email1;
}
/**
* @param email1 the email1 to set
*/
public void setEmail1(String email1) {
this.email1 = email1;
}
/**
* @return the email2
*/
public String getEmail2() {
return email2;
}
/**
* @param email2 the email2 to set
*/
public void setEmail2(String email2) {
this.email2 = email2;
}
/**
* @return the emailSelect
*/
public String getEmailSelect() {
return emailSelect;
}
/**
* @param emailSelect the emailSelect to set
*/
public void setEmailSelect(String emailSelect) {
this.emailSelect = emailSelect;
}
/**
* @return the memberId
*/
public String getMemberId() {
return memberId;
}
/**
* @param memberId the memberId to set
*/
public void setMemberId(String memberId) {
this.memberId = memberId;
}
/**
* @return the selectExroom
*/
public String getSelectExRoom() {
return selectExRoom;
}
/**
* @return the searchDate
*/
public String getSearchDate() {
return searchDate;
}
/**
* @param searchDate the searchDate to set
*/
public void setSearchDate(String searchDate) {
this.searchDate = searchDate;
}
/**
* @return the searchDate1
*/
public String getSearchDate1() {
return searchDate1;
}
/**
* @param searchDate1 the searchDate1 to set
*/
public void setSearchDate1(String searchDate1) {
this.searchDate1 = searchDate1;
}
/**
* @return the strDate
*/
public String getStrDate() {
return strDate;
}
/**
* @param strDate the strDate to set
*/
public void setStrDate(String strDate) {
this.strDate = strDate;
}
/**
* @return the exRoom5Am
*/
public String getExRoom5Am() {
return exRoom5Am;
}
/**
* @param exRoom5Am the exRoom5Am to set
*/
public void setExRoom5Am(String exRoom5Am) {
this.exRoom5Am = exRoom5Am;
}
/**
* @return the exRoom5Pm
*/
public String getExRoom5Pm() {
return exRoom5Pm;
}
/**
* @param exRoom5Pm the exRoom5Pm to set
*/
public void setExRoom5Pm(String exRoom5Pm) {
this.exRoom5Pm = exRoom5Pm;
}
}

View File

@ -1,101 +0,0 @@
package itn.let.cop.resve.service;
import java.util.List;
import java.util.Map;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import itn.com.cmm.ComDefaultVO;
/**
* 게시판 속성관리를 위한 서비스 인터페이스 클래스
* @author 공통 서비스 개발팀 이삼섭
* @since 2009.03.12
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.03.12 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
public interface ResveManageService {
/**
* 등록된 대관신청 정보를 삭제한다.
* @param Resve
*
* @param resve
* @exception Exception Exception
*/
public void deleteResveManage(Resve resve)
throws Exception;
/**
* 대관관리 정보를 생성한다.
* @param resve
*
* @exception Exception Exception
*/
public void insertResveManage(Resve resve)
throws Exception;
/**
* 대관관리 건을 상세조회한다.
* @param ResveVO
*
* @param searchVO
* @exception Exception Exception
*/
public ResveVO selectResveManageInf(ResveVO searchVO)
throws Exception;
/**
* 대관신청 관리 목록을 조회 한다.
* @param ResveVO
*
* @param searchVO
* @exception Exception Exception
*/
public Map<String, Object> selectResveManageList(ResveVO searchVO)
throws Exception;
/**
* 대관관리 정보를 수정한다.
* @param resve
* @exception Exception Exception
*/
public void updateResveManageInf(Resve resve)
throws Exception;
/**
* 대관신청 전시기간 시작일 가능 일자 조회(화면 달력 표시. 전시관/교육장)
* @param Resve
*
* @exception Exception Exception
*/
public List<EgovMap> resveResSdateList(Resve vo) throws Exception;
/**
* 대관신청 대관가능일 가능여부
* @param Resve
*
* @exception Exception Exception
*/
public int resvePosbleDate(Resve vo) throws Exception;
/**
* (사용자)대관신청 관리 목록을 조회 한다. (달력)
* @param ResveVO
*
* @param searchVO
* @exception Exception Exception
*/
public List<ResveVO> selectResveManageListWeb(ResveVO searchVO)
throws Exception;
}

View File

@ -1,405 +0,0 @@
package itn.let.cop.resve.service;
import java.io.Serializable;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* 대관관리 정보를 관리하기 위한 VO 클래스
* @author 공통 서비스 개발팀 이삼섭
* @since 2009.03.12
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.03.12 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
@SuppressWarnings("serial")
public class ResveVO extends Resve implements Serializable {
/** 검색시작일 */
private String searchBgnDe = "";
/** 검색조건 */
private String searchCnd = "";
/** 검색종료일 */
private String searchEndDe = "";
/** 검색단어 */
private String searchWrd = "";
/** 정렬순서(DESC,ASC) */
private String sortOrdr = "";
/** 검색사용여부 */
private String searchUseYn = "";
/** 현재페이지 */
private int pageIndex = 1;
/** 페이지갯수 */
private int pageUnit = 10;
/** 페이지사이즈 */
private int pageSize = 10;
/** firstIndex */
private int firstIndex = 1;
/** lastIndex */
private int lastIndex = 1;
/** recordCountPerPage */
private int recordCountPerPage = 10;
/** rowNo */
private int rowNo = 0;
/** 검색 삭제포함 */
private String delSttus = "";
/** 사용자 대관현황 달력 - 검색년도 */
private String searchYear = "";
/** 사용자 대관현황 달력 - 검색월 */
private String searchMonth = "";
/** 사용자 대관현황 달력 - 검색일자 */
private String searchDate = "";
/** 사용자 대관현황 달력 - 검색일자 */
private String searchDate1 = "";
/**
* searchBgnDe attribute를 리턴한다.
*
* @return the searchBgnDe
*/
public String getSearchBgnDe() {
return searchBgnDe;
}
/**
* searchBgnDe attribute 값을 설정한다.
*
* @param searchBgnDe
* the searchBgnDe to set
*/
public void setSearchBgnDe(String searchBgnDe) {
this.searchBgnDe = searchBgnDe;
}
/**
* searchCnd attribute를 리턴한다.
*
* @return the searchCnd
*/
public String getSearchCnd() {
return searchCnd;
}
/**
* searchCnd attribute 값을 설정한다.
*
* @param searchCnd
* the searchCnd to set
*/
public void setSearchCnd(String searchCnd) {
this.searchCnd = searchCnd;
}
/**
* searchEndDe attribute를 리턴한다.
*
* @return the searchEndDe
*/
public String getSearchEndDe() {
return searchEndDe;
}
/**
* searchEndDe attribute 값을 설정한다.
*
* @param searchEndDe
* the searchEndDe to set
*/
public void setSearchEndDe(String searchEndDe) {
this.searchEndDe = searchEndDe;
}
/**
* searchWrd attribute를 리턴한다.
*
* @return the searchWrd
*/
public String getSearchWrd() {
return searchWrd;
}
/**
* searchWrd attribute 값을 설정한다.
*
* @param searchWrd
* the searchWrd to set
*/
public void setSearchWrd(String searchWrd) {
this.searchWrd = searchWrd;
}
/**
* sortOrdr attribute를 리턴한다.
*
* @return the sortOrdr
*/
public String getSortOrdr() {
return sortOrdr;
}
/**
* sortOrdr attribute 값을 설정한다.
*
* @param sortOrdr
* the sortOrdr to set
*/
public void setSortOrdr(String sortOrdr) {
this.sortOrdr = sortOrdr;
}
/**
* searchUseYn attribute를 리턴한다.
*
* @return the searchUseYn
*/
public String getSearchUseYn() {
return searchUseYn;
}
/**
* searchUseYn attribute 값을 설정한다.
*
* @param searchUseYn
* the searchUseYn to set
*/
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
/**
* pageIndex attribute를 리턴한다.
*
* @return the pageIndex
*/
public int getPageIndex() {
return pageIndex;
}
/**
* pageIndex attribute 값을 설정한다.
*
* @param pageIndex
* the pageIndex to set
*/
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
/**
* pageUnit attribute를 리턴한다.
*
* @return the pageUnit
*/
public int getPageUnit() {
return pageUnit;
}
/**
* pageUnit attribute 값을 설정한다.
*
* @param pageUnit
* the pageUnit to set
*/
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
/**
* pageSize attribute를 리턴한다.
*
* @return the pageSize
*/
public int getPageSize() {
return pageSize;
}
/**
* pageSize attribute 값을 설정한다.
*
* @param pageSize
* the pageSize to set
*/
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
/**
* firstIndex attribute를 리턴한다.
*
* @return the firstIndex
*/
public int getFirstIndex() {
return firstIndex;
}
/**
* firstIndex attribute 값을 설정한다.
*
* @param firstIndex
* the firstIndex to set
*/
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
/**
* lastIndex attribute를 리턴한다.
*
* @return the lastIndex
*/
public int getLastIndex() {
return lastIndex;
}
/**
* lastIndex attribute 값을 설정한다.
*
* @param lastIndex
* the lastIndex to set
*/
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
/**
* recordCountPerPage attribute를 리턴한다.
*
* @return the recordCountPerPage
*/
public int getRecordCountPerPage() {
return recordCountPerPage;
}
/**
* recordCountPerPage attribute 값을 설정한다.
*
* @param recordCountPerPage
* the recordCountPerPage to set
*/
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
/**
* rowNo attribute를 리턴한다.
*
* @return the rowNo
*/
public int getRowNo() {
return rowNo;
}
/**
* rowNo attribute 값을 설정한다.
*
* @param rowNo
* the rowNo to set
*/
public void setRowNo(int rowNo) {
this.rowNo = rowNo;
}
/**
* toString 메소드를 대치한다.
*/
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
/**
* @return the delSttus
*/
public String getDelSttus() {
return delSttus;
}
/**
* @param delSttus the delSttus to set
*/
public void setDelSttus(String delSttus) {
this.delSttus = delSttus;
}
/**
* @return the searcrYear
*/
public String getSearchYear() {
return searchYear;
}
/**
* @param searcrYear the searcrYear to set
*/
public void setSearchYear(String searcrYear) {
this.searchYear = searcrYear;
}
/**
* @return the searchMonth
*/
public String getSearchMonth() {
return searchMonth;
}
/**
* @param searchMonth the searchMonth to set
*/
public void setSearchMonth(String searchMonth) {
this.searchMonth = searchMonth;
}
/**
* @return the searchDate
*/
public String getSearchDate() {
return searchDate;
}
/**
* @param searchDate the searchDate to set
*/
public void setSearchDate(String searchDate) {
this.searchDate = searchDate;
}
/**
* @return the searchDate1
*/
public String getSearchDate1() {
return searchDate1;
}
/**
* @param searchDate1 the searchDate1 to set
*/
public void setSearchDate1(String searchDate1) {
this.searchDate1 = searchDate1;
}
}

View File

@ -1,267 +0,0 @@
package itn.let.cop.resve.service.impl;
import java.util.List;
import org.springframework.stereotype.Repository;
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import itn.com.cmm.ComDefaultVO;
import itn.let.cop.resve.service.Resve;
import itn.let.cop.resve.service.ResveVO;
/**
* 게시판 속성정보 관리를 위한 데이터 접근 클래스
* @author 공통 서비스 개발팀 이삼섭
* @since 2009.03.12
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.03.12 이삼섭 최초 생성
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
@Repository("ResveManageDAO")
public class ResveManageDAO extends EgovAbstractDAO {
/**
* 등록된 게시판 속성정보를 삭제한다.
*
* @param Resve
*/
public void deleteResveManage(Resve resve) throws Exception {
update("ResveManageDAO.deleteResveManage", resve);
}
/**
* 대관신청 관리 목록을 조회한다.
*
* @param ResveVO
*/
@SuppressWarnings("unchecked")
public List<ResveVO> selectResveManageList(ResveVO vo) throws Exception {
return (List<ResveVO>) list("ResveManageDAO.selectResveManageList", vo);
}
/**
* 사용
* 게시판 속성정보 목록 숫자를 조회한다
*
* @param vo
* @return
* @throws Exception
*/
public int selectResveManageListCnt(ResveVO vo) throws Exception {
return (Integer)select("ResveManageDAO.selectResveManageListCnt", vo);
}
/**
* 템플릿의 유효여부를 점검한다.
*
* @param ResveVO
*/
public boolean validateTemplate(ResveVO vo) throws Exception {
return true;
}
/**
* 유효한 게시판 목록을 불러온다.
*
* @param vo
* @return
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<ResveVO> selectAllBBSMasteInf(ResveVO vo) throws Exception {
// 커뮤니티, 동호회의 게시판이 나오지 않도록 LETTNBBSUSE 테이블과 Join 필요
return (List<ResveVO>) list("ResveManageDAO.selectAllBBSMaster", vo);
}
/**
* 사용중인 게시판 속성정보 목록을 조회한다.
*
* @param ResveVO
*/
@SuppressWarnings("unchecked")
public List<ResveVO> selectBdMstrListByTrget(ResveVO vo) throws Exception {
return (List<ResveVO>) list("ResveManageDAO.selectBdMstrListByTrget", vo);
}
/**
* 사용중인 게시판 속성정보 목록 숫자를 조회한다
*
* @param vo
* @return
* @throws Exception
*/
public int selectBdMstrListCntByTrget(ResveVO vo) throws Exception {
return (Integer)select("ResveManageDAO.selectBdMstrListCntByTrget", vo);
}
/**
* 커뮤니티, 동호회등 게시판 사용등록이 게시판 목록 전체를 불러온다.
*
* @param vo
* @return
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<ResveVO> selectAllBdMstrByTrget(ResveVO vo) throws Exception {
return (List<ResveVO>) list("ResveManageDAO.selectAllBdMstrByTrget", vo);
}
/**
* 사용 중이지 않은 게시판 속성정보 목록을 조회한다.
*
* @param ResveVO
*/
@SuppressWarnings("unchecked")
public List<ResveVO> selectNotUsedBdMstrList(ResveVO vo) throws Exception {
return (List<ResveVO>) list("ResveManageDAO.selectNotUsedBdMstrList", vo);
}
/**
* 사용 중이지 않은 게시판 속성정보 목록 숫자를 조회한다
*
* @param vo
* @return
* @throws Exception
*/
public int selectNotUsedBdMstrListCnt(ResveVO vo) throws Exception {
return (Integer)select("ResveManageDAO.selectNotUsedBdMstrListCnt", vo);
}
/**
* 신규 대관관리 정보를 등록한다.
*
* @param Resve
*/
public void insertResveManage(Resve resve) throws Exception {
update("ResveManageDAO.insertResveManage", resve);
}
/**
* 대관관리 정보 건을 상세조회 한다.
*
* @param ResveVO
*/
public ResveVO selectResveManageInf(ResveVO searchVO) throws Exception {
return (ResveVO)select("ResveManageDAO.selectResveManageInf", searchVO);
}
/**
* 대관관리 정보를 수정한다.
*
* @param Resve
*/
public void updateResveManageInf(Resve resve) throws Exception {
update("ResveManageDAO.updateResveManageInf", resve);
}
/**
* 게시판 관리자 정보를 등록한다.
*
* @param ResveVO
*/
public void insertBBSMngInf(Resve vo) throws Exception {
insert("ResveManageDAO.insertBBSMngInf", vo);
}
/**
* 게시판 관리자 유무를 조회한다.
*
* @param vo
* @return
* @throws Exception
*/
public int selectBBSMngInfCnt(Resve vo) throws Exception {
return (Integer)select("ResveManageDAO.selectBBSMngInfCnt", vo);
}
/**
* 게시판 관리자 테이블 max 키값을 조회한다.
*
* @param vo
* @return
* @throws Exception
*/
public int selectBBSMaxMngId() throws Exception {
return (Integer)select("ResveManageDAO.selectBBSMaxMngId");
}
/**
* 게시판 관리자 정보를 삭제한다.
*
* @param vo
* @return
* @throws Exception
*/
public void deleteBBSMngInf(Resve vo) throws Exception {
delete("ResveManageDAO.deleteBBSMngInf", vo);
}
/**
* 게시판 ID 정보의 목록을 조회 한다.
*
* @param ComDefaultVO
*/
@SuppressWarnings("unchecked")
public List<EgovMap> selectBBSIdList(ComDefaultVO vo) throws Exception {
return (List<EgovMap>) list("ResveManageDAO.selectBBSIdList", vo);
}
/**
* 게시판 ID 정보의 목록 숫자를 조회 한다.
*
* @param ComDefaultVO
*/
public int selectBBSIdListCnt(ComDefaultVO vo) throws Exception {
return (Integer)select("ResveManageDAO.selectBBSIdListCnt", vo);
}
/**
* 대관신청 전시기간 시작일 가능 일자 조회 (전시관)
*
* @param Resve
*/
@SuppressWarnings("unchecked")
public List<EgovMap> resveResSdateList(Resve vo) throws Exception {
return (List<EgovMap>) list("ResveManageDAO.resveResSdateList", vo);
}
/**
* 대관신청 전시기간 시작일 가능 일자 조회 (교육장)
*
* @param Resve
*/
@SuppressWarnings("unchecked")
public List<EgovMap> resveResSdateList1(Resve vo) throws Exception {
return (List<EgovMap>) list("ResveManageDAO.resveResSdateList1", vo);
}
/**
* 대관신청 대관가능일 가능여부
*
* @param Resve
*/
public int resvePosbleDate(Resve vo) throws Exception {
return (Integer) select("ResveManageDAO.resvePosbleDate", vo);
}
/**
* (사용자)대관신청 관리 목록을 조회 한다. (달력)
*
* @param ResveVO
*/
@SuppressWarnings("unchecked")
public List<ResveVO> selectResveManageListWeb(ResveVO vo) throws Exception {
return (List<ResveVO>) list("ResveManageDAO.selectResveManageListWeb", vo);
}
}

View File

@ -1,159 +0,0 @@
package itn.let.cop.resve.service.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import itn.com.cmm.ComDefaultVO;
import itn.com.cmm.service.EgovFileMngService;
import itn.com.cmm.service.FileVO;
import itn.let.cop.com.service.EgovUserInfManageService;
import itn.let.cop.resve.service.Resve;
import itn.let.cop.resve.service.ResveManageService;
import itn.let.cop.resve.service.ResveVO;
/**
* 게시판 속성관리를 위한 서비스 구현 클래스
* @author 공통 서비스 개발팀 이삼섭
* @since 2009.03.24
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.03.24 이삼섭 최초 생성
* 2009.06.26 한성곤 2단계 기능 추가 (댓글관리, 만족도조사)
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
*
* </pre>
*/
@Service("ResveManageService")
public class ResveManageServiceImpl extends EgovAbstractServiceImpl implements ResveManageService {
@Resource(name = "ResveManageDAO")
private ResveManageDAO resveManageDAO;
@Resource(name = "EgovUserInfManageService")
private EgovUserInfManageService userService;
@Resource(name = "egovBBSMstrIdGnrService")
private EgovIdGnrService idgenService;
@Resource(name = "propertiesService")
protected EgovPropertyService propertyService;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileService;
/**
* 등록된 대관신청 정보를 삭제한다.
*
*/
public void deleteResveManage(Resve resve) throws Exception {
resveManageDAO.deleteResveManage(resve);
FileVO fvo = new FileVO();
// 첨부파일
if (resve.getThumbAtchFileId() != null && !"".equals(resve.getThumbAtchFileId())) {
fvo.setAtchFileId(resve.getThumbAtchFileId());
fileService.deleteAllFileInf(fvo);
}
if (resve.getImgAtchFileId() != null && !"".equals(resve.getImgAtchFileId())) {
fvo.setAtchFileId(resve.getImgAtchFileId());
fileService.deleteAllFileInf(fvo);
}
if (resve.getPortfolioAtchFileId() != null && !"".equals(resve.getPortfolioAtchFileId())) {
fvo.setAtchFileId(resve.getPortfolioAtchFileId());
fileService.deleteAllFileInf(fvo);
}
}
/**
* 대관신청 관리 목록을 조회 한다.
*/
public Map<String, Object> selectResveManageList(ResveVO searchVO) throws Exception {
List<ResveVO> result = resveManageDAO.selectResveManageList(searchVO);
int cnt = resveManageDAO.selectResveManageListCnt(searchVO);
Map<String, Object> map = new HashMap<String, Object>();
map.put("resultList", result);
map.put("resultCnt", Integer.toString(cnt));
return map;
}
/**
* 신규 대관관리 정보를 생성한다.
*
* @see itn.let.cop.bbs.ResveManageService.service.EgovBBSAttributeManageService#insertBBSMastetInf(itn.let.cop.bbs.Resve.service.Resve)
*/
public void insertResveManage(Resve resve) throws Exception {
resveManageDAO.insertResveManage(resve);
}
/**
* 대관관리 정보 건을 상세조회한다.
*
* @see itn.let.cop.bbs.ResveManageService.service.EgovBBSAttributeManageService#selectBBSMasterInf(itn.let.cop.bbs.ResveVO.service.ResveVO)
*/
public ResveVO selectResveManageInf(ResveVO searchVO) throws Exception {
ResveVO result = resveManageDAO.selectResveManageInf(searchVO);
return result;
}
/**
* 대관관리 정보를 수정한다.
*
*/
public void updateResveManageInf(Resve resve) throws Exception {
resveManageDAO.updateResveManageInf(resve);
}
/**
* 대관신청 전시기간 시작일 가능 일자 조회 (화면 달력 표시. 전시관/교육장)
* @param Resve
*
* @exception Exception Exception
*/
public List<EgovMap> resveResSdateList(Resve vo) throws Exception {
if (("r").equals(vo.getExRoom5())) {
// 교육장
return resveManageDAO.resveResSdateList1(vo);
} else {
// 전시관
return resveManageDAO.resveResSdateList(vo);
}
}
/**
* 대관신청 대관가능일 가능여부
* @param Resve
*
* @exception Exception Exception
*/
public int resvePosbleDate(Resve vo) throws Exception {
return resveManageDAO.resvePosbleDate(vo);
}
/**
* (사용자)대관신청 관리 목록을 조회 한다. (달력)
*/
public List<ResveVO> selectResveManageListWeb(ResveVO searchVO) throws Exception {
List<ResveVO> result = resveManageDAO.selectResveManageListWeb(searchVO);
return result;
}
}

View File

@ -1,598 +0,0 @@
package itn.let.cop.resve.web;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import javax.annotation.Resource;
import org.apache.commons.lang3.ArrayUtils;
import org.json.simple.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import org.springmodules.validation.commons.DefaultBeanValidator;
import com.ibm.icu.util.StringTokenizer;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.ComDefaultCodeVO;
import itn.com.cmm.EgovMessageSource;
import itn.com.cmm.LoginVO;
import itn.com.cmm.service.EgovCmmUseService;
import itn.com.cmm.service.EgovFileMngService;
import itn.com.cmm.service.EgovFileMngUtil;
import itn.com.cmm.service.FileVO;
import itn.let.cop.resve.service.Resve;
import itn.let.cop.resve.service.ResveManageService;
import itn.let.cop.resve.service.ResveVO;
import itn.let.sec.ram.service.AuthorManageVO;
import itn.let.sec.ram.service.EgovAuthorManageService;
/**
* 대관신청 관리를 위한 컨트롤러 클래스
* @author
* @since 2018.11.21
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2018.11.10 최초 생성
*
* </pre>
*/
@Controller
public class ResveManageController {
@Resource(name = "ResveManageService")
private ResveManageService resveManageService;
@Resource(name = "EgovCmmUseService")
private EgovCmmUseService cmmUseService;
@Resource(name = "propertiesService")
protected EgovPropertyService propertyService;
@Autowired
private DefaultBeanValidator beanValidator;
@Resource(name = "egovAuthorManageService")
private EgovAuthorManageService egovAuthorManageService;
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
@Resource(name = "EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileMngService;
private static final Logger LOGGER = LoggerFactory.getLogger(ResveManageController.class);
/**
* 대관관리 목록을 조회한다.
*
* @param ResveVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/resve/selectResveManageList.do")
public String selectResveManageList(@ModelAttribute("searchVO") ResveVO resveVO, ModelMap model) throws Exception {
resveVO.setPageUnit(propertyService.getInt("pageUnit"));
resveVO.setPageSize(propertyService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(resveVO.getPageIndex());
paginationInfo.setRecordCountPerPage(resveVO.getPageUnit());
paginationInfo.setPageSize(resveVO.getPageSize());
resveVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
resveVO.setLastIndex(paginationInfo.getLastRecordIndex());
resveVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
Map<String, Object> map = resveManageService.selectResveManageList(resveVO);
int totCnt = Integer.parseInt((String) map.get("resultCnt"));
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("resultList", map.get("resultList"));
model.addAttribute("resultCnt", map.get("resultCnt"));
model.addAttribute("paginationInfo", paginationInfo);
return "cop/resve/resveManageList";
}
/**
* 신규 게시판 마스터 등록을 위한 등록페이지로 이동한다.
*
* @param boardMasterVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/resve/addResveManage.do")
public String addResve(@ModelAttribute("searchVO") ResveVO resveVO, @ModelAttribute("resve") Resve resve,
ModelMap model, BindingResult bindingResult, RedirectAttributes redirectAttributes) throws Exception {
// 공통코드 권한목록 Set
setCodeNAuth(model);
return "cop/resve/resveManageRegist";
}
/**
* 신규 대관관리 정보를 등록한다.
*
* @param resveVO
* @param resve
* @param status
* @return
* @throws Exception
*/
@RequestMapping("/cop/resve/insertResveManage.do")
public String insertBBSMasterInf(final MultipartHttpServletRequest multiRequest, @ModelAttribute("searchVO") ResveVO resveVO, @ModelAttribute("resve") Resve resve, BindingResult bindingResult,
SessionStatus status, ModelMap model, RedirectAttributes redirectAttributes) throws Exception {
LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
beanValidator.validate(resve, bindingResult);
if (bindingResult.hasErrors()) {
// 공통코드 권한목록 Set
setCodeNAuth(model);
return "cop/resve/resveManageRegist";
}
// 대관신청 희망일자 가능 여부
int posbleDate = resveManageService.resvePosbleDate(resve);
if (posbleDate > 0) {
// 공통코드 권한목록 Set
setCodeNAuth(model);
model.addAttribute("message", "대관 희망기간일이 가능하지 않습니다.");
return "cop/resve/resveManageRegist";
}
// 파일업로드
final Map<String, MultipartFile> files = multiRequest.getFileMap();
if (!files.isEmpty()) {
String storePath = "Globals.resveFileStorePath";
long posblAtchFileSize = propertyService.getInt("posblAtchFileSize");
int posblResveThumbAtchFileNum = propertyService.getInt("posblResveThumbAtchFileNum");
int posblResveImgAtchFileNum = propertyService.getInt("posblResveImgAtchFileNum");
int posblResvePortpolioAtchFileNum = propertyService.getInt("posblResvePortpolioAtchFileNum");
final Map<String, MultipartFile> thumbFiles = new HashMap<String, MultipartFile>();
final Map<String, MultipartFile> imgFiles = new HashMap<String, MultipartFile>();
final Map<String, MultipartFile> portpolioFiles = new HashMap<String, MultipartFile>();
Set keySet = files.keySet();
Iterator<String> keyItr = keySet.iterator();
while (keyItr.hasNext()) {
String key = keyItr.next();
String fileCnd = !("").equals(key) ? key.split("_")[0] : "";
String orginFileName = files.get(key).getOriginalFilename();
if ("".equals(orginFileName)) continue;
switch (fileCnd) {
case "thumb" : thumbFiles.put(key, files.get(key)); break;
case "img" : imgFiles.put(key, files.get(key)); break;
case "portfolio" : portpolioFiles.put(key, files.get(key)) ; break;
}
}
// 업로드 개수
int atchFileCnt = 0;
// 파일 개수/사이즈/확장자 체크
if (!isPosblAtchFile(thumbFiles, "썸네일", model, atchFileCnt, posblResveThumbAtchFileNum, posblAtchFileSize, true)) {
model.addAttribute("resve", resve);
return "cop/resve/resveManageRegist";
}
if (!isPosblAtchFile(imgFiles, "대표이미지", model, atchFileCnt, posblResveImgAtchFileNum, posblAtchFileSize, true)) {
model.addAttribute("resve", resve);
return "cop/resve/resveManageRegist";
}
if (!isPosblAtchFile(portpolioFiles, "포트폴리오", model, atchFileCnt, posblResvePortpolioAtchFileNum, posblAtchFileSize, false)) {
model.addAttribute("resve", resve);
return "cop/resve/resveManageRegist";
}
List<FileVO> result = new ArrayList<FileVO>();
result = fileUtil.parseFileInf(thumbFiles, "RESVE_", 0, "", storePath, "");
String thumbAtchFileId = fileMngService.insertFileInfs(result);
result = fileUtil.parseFileInf(imgFiles, "RESVE_", 0, "", storePath, "");
String imgAtchFileId = fileMngService.insertFileInfs(result);
result = fileUtil.parseFileInf(portpolioFiles, "RESVE_", 0, "", storePath, "");
String portfolioAtchFileId = fileMngService.insertFileInfs(result);
resve.setThumbAtchFileId(thumbAtchFileId);
resve.setImgAtchFileId(imgAtchFileId);
resve.setPortfolioAtchFileId(portfolioAtchFileId);
}
resve.setMemberId(user.getUniqId()); // 최종수정자ID. (사용없음 참조용)
resveManageService.insertResveManage(resve);
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.insert"));
return "redirect:/cop/resve/selectResveManageList.do";
}
/**
* 대관관리 상세내용을 조회한다.
*
* @param searchVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/resve/selectResveManage.do")
public String selectResveManageInf(@ModelAttribute("searchVO") ResveVO searchVO, ModelMap model, RedirectAttributes redirectAttributes) throws Exception {
ResveVO vo = resveManageService.selectResveManageInf(searchVO);
model.addAttribute("result", vo);
// 공통코드 권한목록 Set
setCodeNAuth(model);
return "cop/resve/resveManageUpdt";
}
/**
* 대관관리 정보를 수정한다.
*
* @param boardMasterVO
* @param boardMaster
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cop/resve/updateResveManageInf.do")
public String updateResveManageInf(@ModelAttribute("searchVO") ResveVO resveVO, @ModelAttribute("resve") Resve resve, BindingResult bindingResult,
ModelMap model, RedirectAttributes redirectAttributes) throws Exception {
// 승인완료 선택 희망일자 가능여부
if (("b").equals(resve.getResState())) {
ResveVO vo = resveManageService.selectResveManageInf(resveVO);
// 대관신청 희망일자 가능 여부
int posbleDate = resveManageService.resvePosbleDate(vo);
if (posbleDate > 0) {
// 공통코드 권한목록 Set
setCodeNAuth(model);
model.addAttribute("message", "대관 희망기간일이 가능하지 않습니다.");
model.addAttribute("result", vo);
return "cop/resve/resveManageUpdt";
}
}
resveManageService.updateResveManageInf(resve);
redirectAttributes.addAttribute("pageIndex", resveVO.getPageIndex());
redirectAttributes.addAttribute("searchCnd", resveVO.getSearchCnd());
redirectAttributes.addAttribute("searchWrd", resveVO.getSearchWrd());
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.update"));
return "redirect:/cop/resve/selectResveManageList.do";
}
/**
* 대관신청 전시기간 시작일 가능 일자 조회
* @param commandMap 파라메터전달용 commandMap
* @param model 화면모델
* @throws Exception
*/
@RequestMapping(value = "/cop/resve/resveResSdateListAjax.do")
public ModelAndView resveResSdateListAjax(@RequestParam Map<String, Object> commandMap) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
String searchYyyyMm = (String) commandMap.get("searchYyyyMm");
String selectExRoom = (String) commandMap.get("selectExRoom");
Resve vo = new Resve();
vo.setSelectExRoom(selectExRoom);
Calendar cal = Calendar.getInstance();
int year = Integer.parseInt(searchYyyyMm.substring(0, 4));
int month = Integer.parseInt(searchYyyyMm.substring(4, 6));
cal.set(year, month-1, 1);
int maxDay = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
String date = sdf.format(cal.getTime());
vo.setSearchDate(date);
date = date.substring(0, 6) + (maxDay<10 ? "0"+maxDay : maxDay );
vo.setSearchDate1(date);
List<EgovMap> result = resveManageService.resveResSdateList(vo);
modelAndView.addObject("result", result);
return modelAndView;
}
/**
* 공통코드 권한목록 Set
* @param model
* @throws Exception
*/
private void setCodeNAuth(ModelMap model) throws Exception {
// 승인상태
ComDefaultCodeVO comDefaultCodeVO = new ComDefaultCodeVO();
comDefaultCodeVO.setCodeId("ITN006");
List<?> codeResult = cmmUseService.selectCmmCodeDetail(comDefaultCodeVO);
model.addAttribute("resStateList", codeResult);
// 신처자 구분
comDefaultCodeVO.setCodeId("ITN007");
codeResult = cmmUseService.selectCmmCodeDetail(comDefaultCodeVO);
model.addAttribute("userTypeList", codeResult);
AuthorManageVO authorManageVO = new AuthorManageVO();
authorManageVO.setAuthorManageList(egovAuthorManageService.selectAuthorAllList(authorManageVO));
model.addAttribute("authorList", authorManageVO.getAuthorManageList());
// 파일개수/사이즈
model.addAttribute("maxThumbFileNum", propertyService.getInt("posblResveThumbAtchFileNum"));
model.addAttribute("maxImgFileNum", propertyService.getInt("posblResveImgAtchFileNum"));
model.addAttribute("maxPortpolioFileNum", propertyService.getInt("posblResvePortpolioAtchFileNum"));
model.addAttribute("maxFileSize", propertyService.getInt("posblAtchFileSize"));
}
/**
* 선택된 대관신청정보를 삭제한다.
* @param applyNums String
* @param resveVO ResveVO
* @return String
* @exception Exception
*/
@RequestMapping(value = "/cop/resve/deleteResveManages.do")
public String deleteBBSMasterInfs(@RequestParam("applyNums") String applyNums, @ModelAttribute("ResveVO") ResveVO resveVO, RedirectAttributes redirectAttributes)
throws Exception {
String[] strApplyNums = applyNums.split(";");
for (int i = 0; i < strApplyNums.length; i++) {
String[] strApplyNumNAtchFileId = strApplyNums[i].split("\\|");
resveVO.setApplyNum(Integer.parseInt(strApplyNumNAtchFileId[0]));
if (!("-").equals(strApplyNumNAtchFileId[1])) resveVO.setThumbAtchFileId(strApplyNumNAtchFileId[1]);
if (!("-").equals(strApplyNumNAtchFileId[2])) resveVO.setImgAtchFileId(strApplyNumNAtchFileId[2]);
if (!("-").equals(strApplyNumNAtchFileId[3])) resveVO.setPortfolioAtchFileId(strApplyNumNAtchFileId[3]);
resveManageService.deleteResveManage(resveVO);
}
resveVO.setPageIndex(1);
redirectAttributes.addAttribute("pageIndex", resveVO.getPageIndex());
redirectAttributes.addAttribute("searchCnd", resveVO.getSearchCnd());
redirectAttributes.addAttribute("searchWrd", resveVO.getSearchWrd());
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.delete"));
return "redirect:/cop/resve/selectResveManageList.do";
}
/**
* 첨부파일 개수, 사이즈, 확장자 체크
* @param fileList 파일리스트
* @param name 파일 항목명
* @param model
* @param atchFileCnt 기업로드된 파일
* @param posblAtchFileCnt 업로드 가능 파일
* @param posblAtchFileSize 업로드 가능 파일 사이즈
* @param isImg 이미지 여부
* @return boolean
* @throws Exception
*/
private boolean isPosblAtchFile(Map<String, MultipartFile> fileList, String name, ModelMap model,
int atchFileCnt, int posblAtchFileCnt, long posblAtchFileSize, boolean isImg) throws Exception {
String flashMessage = "";
boolean posblAtchFileFlag = true;
boolean posblAtchFileSizeFlag = true;
boolean posblAtchFileExtFlag = true;
Iterator<Entry<String, MultipartFile>> itr = fileList.entrySet().iterator();
MultipartFile file;
while (itr.hasNext()) {
Entry<String, MultipartFile> entry = itr.next();
file = entry.getValue();
long fileMg = file.getSize();
String orginFileName = file.getOriginalFilename();
int index = orginFileName.lastIndexOf(".");
String fileExt = orginFileName.substring(index + 1);
if (fileMg > posblAtchFileSize) posblAtchFileSizeFlag = false;
if (isImg) {
String[] imgExts = {"gif", "jpg", "bmp", "jpeg", "png"};
if (ArrayUtils.indexOf(imgExts, fileExt.toLowerCase()) == -1) posblAtchFileExtFlag = false;
}
}
if (!posblAtchFileExtFlag) {
flashMessage += name + ": 이미지 형식의 확장자만 업로드 가능합니다." + "\\n";
posblAtchFileFlag = false;
}
if(!posblAtchFileSizeFlag) {
flashMessage += name + ": 파일사이즈가 초과되었습니다. 최대크기 " + posblAtchFileSize + "mb" + "\\n";
posblAtchFileFlag = false;
}
if ((fileList.size()+atchFileCnt) > posblAtchFileCnt) {
flashMessage += name + ": 파일 개수가 초과되었습니다. 최대개수 " + posblAtchFileCnt + "" + "\\n";
posblAtchFileFlag = false;
}
if (!posblAtchFileFlag) model.addAttribute("message", flashMessage);
return posblAtchFileFlag;
}
/**
* ************************************ 사용자 ************************************
*/
/**
* (사용자)대관현황 목록 데이터를 조회한다. (달력)
*
* @param ResveVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/web/cop/resve/selectResveListAjax.do")
public ModelAndView selectResveListAjaxWeb(@ModelAttribute("searchVO") ResveVO resveVO, ModelMap model, @RequestParam Map<String, Object> commandMap) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
Calendar cal = Calendar.getInstance();
String searchYear = (String) commandMap.get("searchYear");
String searchMonth = (String) commandMap.get("searchMonth");
LOGGER.debug("resveList(web) input searchYear: " + searchYear + " searchMonth: " + searchMonth);
if (searchYear == null || searchMonth == null
|| ("").equals(searchYear) || ("").equals(searchMonth)) {
int iYear = cal.get(java.util.Calendar.YEAR);
int iMonth = cal.get(java.util.Calendar.MONTH);
searchYear = Integer.toString(iYear);
searchMonth = (iMonth+1) < 10 ? "0" + Integer.toString(iMonth+1) : Integer.toString(iMonth+1);
}
resveVO.setSearchDate(searchYear + searchMonth + "01");
// 년월해당 전시관 내역 조회
List<ResveVO> result = resveManageService.selectResveManageListWeb(resveVO);
// 조회 결과 파싱
JSONObject resultList = new JSONObject();
resultList.put("searchYear", searchYear);
resultList.put("searchMonth", searchMonth);
for (ResveVO vo : result) {
String[] exRoomArr = new String[5];
exRoomArr[0] = vo.getExRoom1();
exRoomArr[1] = vo.getExRoom2();
exRoomArr[2] = vo.getExRoom3();
exRoomArr[3] = vo.getExRoom5Am();
exRoomArr[4] = vo.getExRoom5Pm();
JSONObject resveJson = new JSONObject();
for (int i=0; i < exRoomArr.length; i++) {
StringTokenizer strTk = new StringTokenizer(exRoomArr[i], ",");
String tmpExRoom = strTk.hasMoreTokens() ? strTk.nextToken() : "";
String[] tmpArr = tmpExRoom.split("\\|");
JSONObject infoJson = new JSONObject();
if (tmpArr.length == 3) {
infoJson.put("applyNum", tmpArr[0]);
infoJson.put("exName", tmpArr[1]);
infoJson.put("authorName", tmpArr[2]);
} else {
infoJson.put("applyNum", "null");
}
infoJson.put("idx", i);
String exRoomIdx = Integer.toString(i+1);
if (("4").equals(exRoomIdx)) exRoomIdx = "5Am";
else if (("5").equals(exRoomIdx)) exRoomIdx = "5Pm";
resveJson.put("exRoom"+exRoomIdx, infoJson);
}
// LOGGER.debug(vo.getStrDate());
resultList.put(vo.getStrDate(), resveJson);
}
LOGGER.debug("resveList(web) search searchYear: " + searchYear + " searchMonth: " + searchMonth);
// model.addAttribute("resultList", result);
modelAndView.addObject("resultList", resultList);
return modelAndView;
}
/**
* (사용자)대관현황 목록 화면을 조회한다. (달력)
*
* @param searchVO
* @param commandMap
* @param indvdlSchdulManageVO
* @param model
* @return "/cop/smt/sim/EgovIndvdlSchdulManageMonthList"
* @throws Exception
*/
@RequestMapping(value="/web/cop/resve/selectResveList.do")
public String selectResveListWeb(@ModelAttribute("searchVO") ResveVO resveVO, ModelMap model)
throws Exception {
//if (!checkAuthority(model)) return "cmm/uat/uia/EgovLoginUsr"; // server-side 권한 확인
//일정구분 검색 유지
// model.addAttribute("searchKeyword", commandMap.get("searchKeyword") == null ? "" : (String)commandMap.get("searchKeyword"));
// model.addAttribute("searchCondition", commandMap.get("searchCondition") == null ? "" : (String)commandMap.get("searchCondition"));
/*java.util.Calendar cal = java.util.Calendar.getInstance();
String sYear = resveVO.getSearchYear();
String sMonth = resveVO.getSearchMonth();
sYear = "2018";
sMonth = "11";
int iYear = cal.get(java.util.Calendar.YEAR);
int iMonth = cal.get(java.util.Calendar.MONTH);
//int iDate = cal.get(java.util.Calendar.DATE);
//검색 설정
String sSearchDate = "";
if(("").equals(sYear) || ("").equals(sMonth)){
sSearchDate += Integer.toString(iYear);
sSearchDate += Integer.toString(iMonth+1).length() == 1 ? "0" + Integer.toString(iMonth+1) : Integer.toString(iMonth+1);
}else{
iYear = Integer.parseInt(sYear);
iMonth = Integer.parseInt(sMonth);
sSearchDate += sYear;
sSearchDate += Integer.toString(iMonth+1).length() == 1 ? "0" + Integer.toString(iMonth+1) :Integer.toString(iMonth+1);
}
model.addAttribute("schdulSe", null);
model.addAttribute("searchMonth", sSearchDate);
model.addAttribute("searchMode", "MONTH");
model.addAttribute("resultList", null);*/
return "/web/cop/resve/resveList";
}
}

View File

@ -1,103 +0,0 @@
package itn.let.cop.smt.sim.service;
import java.util.List;
import java.util.Map;
import itn.com.cmm.ComDefaultVO;
/**
* 일정관리를 처리하는 서비스인터페이스 클래스
* @since 2009.04.10
* @see
* <pre>
* << 개정이력(Modification Information) >>
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.04.10 장동한 최초 생성
* 2011.05.31 JJY 경량환경 커스터마이징버전 생성
* </pre>
* @author 조재영
* @version 1.0
* @created 09-6-2011 오전 10:08:04
*/
public interface EgovIndvdlSchdulManageService {
/**
* 일정를() 삭제한다.
*
* @param indvdlSchdulManageVO - 일정 정보 담김 VO
* @exception Exception Exception
*/
public void deleteIndvdlSchdulManage(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception;
/**
* 일정를() 등록한다.
*
* @param indvdlSchdulManageVO - 일정 정보 담김 VO
* @exception Exception Exception
*/
public void insertIndvdlSchdulManage(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception;
/**
* 일정를() 상세조회 한다.
* @return List
*
* @param indvdlSchdulManageVO - 일정 정보 담김 VO
* @exception Exception Exception
*/
public List<?> selectIndvdlSchdulManageDetail(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception;
/**
* 일정 목록을 VO(model)형식으로 조회한다.
* @return List
*
* @param indvdlSchdulManageVO - 조회할 정보가 담긴 VO
* @exception Exception Exception
*/
public IndvdlSchdulManageVO selectIndvdlSchdulManageDetailVO(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception;
/**
* 일정 목록을 조회한다.
* @return List
*
* @param searchVO - 조회할 정보가 담긴 VO
* @exception Exception Exception
*/
public List<?> selectIndvdlSchdulManageList(ComDefaultVO searchVO) throws Exception;
/**
* 일정를() 목록 전체 건수를() 조회한다.
* @return int
*
* @param searchVO - 조회할 정보가 담긴 VO
* @exception Exception Exception
*/
public int selectIndvdlSchdulManageListCnt(ComDefaultVO searchVO) throws Exception;
/**
* 메인페이지/일정관리조회
* @return List
*
* @param map - 조회할 정보가 담긴 map
* @exception Exception Exception
*/
public List<?> selectIndvdlSchdulManageMainList(Map<?, ?> map) throws Exception;
/**
* 일정 목록을 Map(map)형식으로 조회한다.
* @param Map(map) - 조회할 정보가 담긴 Map
* @return List
*
* @param map
* @exception Exception Exception
*/
public List<?> selectIndvdlSchdulManageRetrieve(Map<?, ?> map) throws Exception;
/**
* 일정를() 수정한다.
*
* @param indvdlSchdulManageVO - 일정 정보 담김 VO
* @exception Exception Exception
*/
public void updateIndvdlSchdulManage(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception;
}

View File

@ -1,501 +0,0 @@
package itn.let.cop.smt.sim.service;
import java.io.Serializable;
/**
* 일정관리 VO Class 구현
* @since 2009.04.10
* @see
* <pre>
* << 개정이력(Modification Information) >> 수정일 수정자 수정내용 ------- ---
* ----- --------------------------- 2009.04.10 장동한 최초 생성 2011.05.31
* JJY 경량환경 커스터마이징버전 생성
* </pre>
* @author 조재영
* @version 1.0
* @created 09-6-2011 오전 10:08:07
*/
public class IndvdlSchdulManageVO implements Serializable {
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
/** 일정ID */
private String schdulId;
/** 일정구분(회의/교육/세미나/강의 기타) */
private String schdulSe;
/** 일정부서ID */
private String schdulDeptId;
/** 일정종류(부서일정/개인일정) */
private String schdulKindCode;
/** 일정시작일자 */
private String schdulBgnde;
/** 일정종료일자 */
private String schdulEndde;
/** 일정명 */
private String schdulNm;
/** 일정내용 */
private String schdulCn;
/** 일정장소 */
private String schdulPlace;
/** 일정중요도코드 */
private String schdulIpcrCode;
/** 일정담담자ID */
private String schdulChargerId;
/** 첨부파일ID */
private String atchFileId;
/** 반복구분(반복, 연속, 요일반복) */
private String reptitSeCode;
/** 최초등록시점 */
private String frstRegisterPnttm = "";
/** 최초등록자ID */
private String frstRegisterId = "";
/** 최종수정시점 */
private String lastUpdusrPnttm = "";
/** 최종수정ID */
private String lastUpdusrId = "";
/** 일정시작일자(시간) */
private String schdulBgndeHH = "";
/** 일정시작일자(분) */
private String schdulBgndeMM = "";
/** 일정종료일자(시간) */
private String schdulEnddeHH = "";
/** 일정종료일자(분) */
private String schdulEnddeMM = "";
/** 일정시작일자(Year/Month/Day) */
private String schdulBgndeYYYMMDD = "";
/** 일정종료일자(Year/Month/Day) */
private String schdulEnddeYYYMMDD = "";
/** 담당부서 */
private String schdulDeptName = "";
/** 담당자명 */
private String schdulChargerName = "";
/**
* schdulId attribute 리턴한다.
* @return the String
*/
public String getSchdulId() {
return schdulId;
}
/**
* schdulId attribute 값을 설정한다.
* @return schdulId String
*/
public void setSchdulId(String schdulId) {
this.schdulId = schdulId;
}
/**
* schdulSe attribute 리턴한다.
* @return the String
*/
public String getSchdulSe() {
return schdulSe;
}
/**
* schdulSe attribute 값을 설정한다.
* @return schdulSe String
*/
public void setSchdulSe(String schdulSe) {
this.schdulSe = schdulSe;
}
/**
* schdulDeptId attribute 리턴한다.
* @return the String
*/
public String getSchdulDeptId() {
return schdulDeptId;
}
/**
* schdulDeptId attribute 값을 설정한다.
* @return schdulDeptId String
*/
public void setSchdulDeptId(String schdulDeptId) {
this.schdulDeptId = schdulDeptId;
}
/**
* schdulKindCode attribute 리턴한다.
* @return the String
*/
public String getSchdulKindCode() {
return schdulKindCode;
}
/**
* schdulKindCode attribute 값을 설정한다.
* @return schdulKindCode String
*/
public void setSchdulKindCode(String schdulKindCode) {
this.schdulKindCode = schdulKindCode;
}
/**
* schdulBgnde attribute 리턴한다.
* @return the String
*/
public String getSchdulBgnde() {
return schdulBgnde;
}
/**
* schdulBgnde attribute 값을 설정한다.
* @return schdulBgnde String
*/
public void setSchdulBgnde(String schdulBgnde) {
this.schdulBgnde = schdulBgnde;
}
/**
* schdulEndde attribute 리턴한다.
* @return the String
*/
public String getSchdulEndde() {
return schdulEndde;
}
/**
* schdulEndde attribute 값을 설정한다.
* @return schdulEndde String
*/
public void setSchdulEndde(String schdulEndde) {
this.schdulEndde = schdulEndde;
}
/**
* schdulNm attribute 리턴한다.
* @return the String
*/
public String getSchdulNm() {
return schdulNm;
}
/**
* schdulNm attribute 값을 설정한다.
* @return schdulNm String
*/
public void setSchdulNm(String schdulNm) {
this.schdulNm = schdulNm;
}
/**
* schdulCn attribute 리턴한다.
* @return the String
*/
public String getSchdulCn() {
return schdulCn;
}
/**
* schdulCn attribute 값을 설정한다.
* @return schdulCn String
*/
public void setSchdulCn(String schdulCn) {
this.schdulCn = schdulCn;
}
/**
* schdulPlace attribute 리턴한다.
* @return the String
*/
public String getSchdulPlace() {
return schdulPlace;
}
/**
* schdulPlace attribute 값을 설정한다.
* @return schdulPlace String
*/
public void setSchdulPlace(String schdulPlace) {
this.schdulPlace = schdulPlace;
}
/**
* schdulIpcrCode attribute 리턴한다.
* @return the String
*/
public String getSchdulIpcrCode() {
return schdulIpcrCode;
}
/**
* schdulIpcrCode attribute 값을 설정한다.
* @return schdulIpcrCode String
*/
public void setSchdulIpcrCode(String schdulIpcrCode) {
this.schdulIpcrCode = schdulIpcrCode;
}
/**
* schdulChargerId attribute 리턴한다.
* @return the String
*/
public String getSchdulChargerId() {
return schdulChargerId;
}
/**
* schdulChargerId attribute 값을 설정한다.
* @return schdulChargerId String
*/
public void setSchdulChargerId(String schdulChargerId) {
this.schdulChargerId = schdulChargerId;
}
/**
* atchFileId attribute 리턴한다.
* @return the String
*/
public String getAtchFileId() {
return atchFileId;
}
/**
* atchFileId attribute 값을 설정한다.
* @return atchFileId String
*/
public void setAtchFileId(String atchFileId) {
this.atchFileId = atchFileId;
}
/**
* reptitSeCode attribute 리턴한다.
* @return the String
*/
public String getReptitSeCode() {
return reptitSeCode;
}
/**
* reptitSeCode attribute 값을 설정한다.
* @return reptitSeCode String
*/
public void setReptitSeCode(String reptitSeCode) {
this.reptitSeCode = reptitSeCode;
}
/**
* frstRegisterPnttm attribute 리턴한다.
* @return the String
*/
public String getFrstRegisterPnttm() {
return frstRegisterPnttm;
}
/**
* frstRegisterPnttm attribute 값을 설정한다.
* @return frstRegisterPnttm String
*/
public void setFrstRegisterPnttm(String frstRegisterPnttm) {
this.frstRegisterPnttm = frstRegisterPnttm;
}
/**
* frstRegisterId attribute 리턴한다.
* @return the String
*/
public String getFrstRegisterId() {
return frstRegisterId;
}
/**
* frstRegisterId attribute 값을 설정한다.
* @return frstRegisterId String
*/
public void setFrstRegisterId(String frstRegisterId) {
this.frstRegisterId = frstRegisterId;
}
/**
* lastUpdusrPnttm attribute 리턴한다.
* @return the String
*/
public String getLastUpdusrPnttm() {
return lastUpdusrPnttm;
}
/**
* lastUpdusrPnttm attribute 값을 설정한다.
* @return lastUpdusrPnttm String
*/
public void setLastUpdusrPnttm(String lastUpdusrPnttm) {
this.lastUpdusrPnttm = lastUpdusrPnttm;
}
/**
* lastUpdusrId attribute 리턴한다.
* @return the String
*/
public String getLastUpdusrId() {
return lastUpdusrId;
}
/**
* lastUpdusrId attribute 값을 설정한다.
* @return lastUpdusrId String
*/
public void setLastUpdusrId(String lastUpdusrId) {
this.lastUpdusrId = lastUpdusrId;
}
/**
* schdulBgndeHH attribute 리턴한다.
* @return the String
*/
public String getSchdulBgndeHH() {
return schdulBgndeHH;
}
/**
* schdulBgndeHH attribute 값을 설정한다.
* @return schdulBgndeHH String
*/
public void setSchdulBgndeHH(String schdulBgndeHH) {
this.schdulBgndeHH = schdulBgndeHH;
}
/**
* schdulBgndeMM attribute 리턴한다.
* @return the String
*/
public String getSchdulBgndeMM() {
return schdulBgndeMM;
}
/**
* schdulBgndeMM attribute 값을 설정한다.
* @return schdulBgndeMM String
*/
public void setSchdulBgndeMM(String schdulBgndeMM) {
this.schdulBgndeMM = schdulBgndeMM;
}
/**
* schdulEnddeHH attribute 리턴한다.
* @return the String
*/
public String getSchdulEnddeHH() {
return schdulEnddeHH;
}
/**
* schdulEnddeHH attribute 값을 설정한다.
* @return schdulEnddeHH String
*/
public void setSchdulEnddeHH(String schdulEnddeHH) {
this.schdulEnddeHH = schdulEnddeHH;
}
/**
* schdulEnddeMM attribute 리턴한다.
* @return the String
*/
public String getSchdulEnddeMM() {
return schdulEnddeMM;
}
/**
* schdulEnddeMM attribute 값을 설정한다.
* @return schdulEnddeMM String
*/
public void setSchdulEnddeMM(String schdulEnddeMM) {
this.schdulEnddeMM = schdulEnddeMM;
}
/**
* schdulBgndeYYYMMDD attribute 리턴한다.
* @return the String
*/
public String getSchdulBgndeYYYMMDD() {
return schdulBgndeYYYMMDD;
}
/**
* schdulBgndeYYYMMDD attribute 값을 설정한다.
* @return schdulBgndeYYYMMDD String
*/
public void setSchdulBgndeYYYMMDD(String schdulBgndeYYYMMDD) {
this.schdulBgndeYYYMMDD = schdulBgndeYYYMMDD;
}
/**
* schdulEnddeYYYMMDD attribute 리턴한다.
* @return the String
*/
public String getSchdulEnddeYYYMMDD() {
return schdulEnddeYYYMMDD;
}
/**
* schdulEnddeYYYMMDD attribute 값을 설정한다.
* @return schdulEnddeYYYMMDD String
*/
public void setSchdulEnddeYYYMMDD(String schdulEnddeYYYMMDD) {
this.schdulEnddeYYYMMDD = schdulEnddeYYYMMDD;
}
/**
* schdulDeptName attribute 리턴한다.
* @return the String
*/
public String getSchdulDeptName() {
return schdulDeptName;
}
/**
* schdulDeptName attribute 값을 설정한다.
* @return schdulDeptName String
*/
public void setSchdulDeptName(String schdulDeptName) {
this.schdulDeptName = schdulDeptName;
}
/**
* schdulChargerName attribute 리턴한다.
* @return the String
*/
public String getSchdulChargerName() {
return schdulChargerName;
}
/**
* schdulChargerName attribute 값을 설정한다.
* @return schdulChargerName String
*/
public void setSchdulChargerName(String schdulChargerName) {
this.schdulChargerName = schdulChargerName;
}
}

View File

@ -1,134 +0,0 @@
package itn.let.cop.smt.sim.service.impl;
import java.util.List;
import java.util.Map;
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import itn.com.cmm.ComDefaultVO;
import itn.let.cop.smt.sim.service.EgovIndvdlSchdulManageService;
import itn.let.cop.smt.sim.service.IndvdlSchdulManageVO;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
/**
* 일정관리를 처리하는 ServiceImpl Class 구현
* @since 2009.04.10
* @see
* <pre>
* << 개정이력(Modification Information) >> 수정일 수정자 수정내용 ------- ---
* ----- --------------------------- 2009.04.10 장동한 최초 생성 2011.05.31
* JJY 경량환경 커스터마이징버전 생성
* </pre>
* @author 조재영
* @version 1.0
* @created 09-6-2011 오전 10:08:05
*/
@Service("egovIndvdlSchdulManageService")
public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl implements EgovIndvdlSchdulManageService{
@Resource(name="indvdlSchdulManageDao")
private IndvdlSchdulManageDao dao;
/**
* 메인페이지/일정관리조회
* @param map - 조회할 정보가 담긴 map
* @return List
* @throws Exception
*/
@Override
public List<?> selectIndvdlSchdulManageMainList(Map<?, ?> map) throws Exception{
return dao.selectIndvdlSchdulManageMainList(map);
}
/**
* 일정 목록을 Map(map)형식으로 조회한다.
* @param Map(map) - 조회할 정보가 담긴 VO
* @return List
* @throws Exception
*/
@Override
public List<?> selectIndvdlSchdulManageRetrieve(Map<?, ?> map) throws Exception{
return dao.selectIndvdlSchdulManageRetrieve(map);
}
/**
* 일정 목록을 VO(model)형식으로 조회한다.
* @param indvdlSchdulManageVO - 조회할 정보가 담긴 VO
* @return List
* @throws Exception
*/
@Override
public IndvdlSchdulManageVO selectIndvdlSchdulManageDetailVO(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception{
return dao.selectIndvdlSchdulManageDetailVO(indvdlSchdulManageVO);
}
/**
* 일정 목록을 조회한다.
* @param searchVO - 조회할 정보가 담긴 VO
* @return List
* @throws Exception
*/
@Override
public List<?> selectIndvdlSchdulManageList(ComDefaultVO searchVO) throws Exception{
return dao.selectIndvdlSchdulManageList(searchVO);
}
/**
* 일정를() 상세조회 한다.
* @param IndvdlSchdulManage - 회정정보가 담김 VO
* @return List
* @throws Exception
*/
@Override
public List<?> selectIndvdlSchdulManageDetail(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception{
return dao.selectIndvdlSchdulManageDetail(indvdlSchdulManageVO);
}
/**
* 일정를() 목록 전체 건수를() 조회한다.
* @param searchVO - 조회할 정보가 담긴 VO
* @return int
* @throws Exception
*/
@Override
public int selectIndvdlSchdulManageListCnt(ComDefaultVO searchVO) throws Exception{
return dao.selectIndvdlSchdulManageListCnt(searchVO);
}
/**
* 일정를() 등록한다.
* @param indvdlSchdulManageVO - 조회할 정보가 담긴 VO
* @throws Exception
*/
@Override
public void insertIndvdlSchdulManage(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception {
String sMakeId = "ERROR";
indvdlSchdulManageVO.setSchdulId(sMakeId);
dao.insertIndvdlSchdulManage(indvdlSchdulManageVO);
}
/**
* 일정를() 수정한다.
* @param indvdlSchdulManageVO - 조회할 정보가 담긴 VO
* @throws Exception
*/
@Override
public void updateIndvdlSchdulManage(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception{
dao.updateIndvdlSchdulManage(indvdlSchdulManageVO);
}
/**
* 일정를() 삭제한다.
* @param indvdlSchdulManageVO - 조회할 정보가 담긴 VO
* @throws Exception
*/
@Override
public void deleteIndvdlSchdulManage(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception{
dao.deleteIndvdlSchdulManage(indvdlSchdulManageVO);
}
}

View File

@ -1,118 +0,0 @@
package itn.let.cop.smt.sim.service.impl;
import java.util.List;
import java.util.Map;
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
import itn.com.cmm.ComDefaultVO;
import itn.let.cop.smt.sim.service.IndvdlSchdulManageVO;
import org.springframework.stereotype.Repository;
/**
* 일정관리를 처리하는 Dao Class 구현
* @since 2009.04.10
* @see
* <pre>
* << 개정이력(Modification Information) >> 수정일 수정자 수정내용 ------- ---
* ----- --------------------------- 2009.04.10 장동한 최초 생성 2011.05.31
* JJY 경량환경 커스터마이징버전 생성
* </pre>
* @author 조재영
* @version 1.0
* @created 09-6-2011 오전 10:08:07
*/
@Repository("indvdlSchdulManageDao")
public class IndvdlSchdulManageDao extends EgovAbstractDAO {
/**
* 메인페이지/일정관리조회 목록을 Map(map)형식으로 조회한다.
* @param Map(map) - 조회할 정보가 담긴 VO
* @return List
* @throws Exception
*/
public List<?> selectIndvdlSchdulManageMainList(Map<?, ?> map) throws Exception{
return list("IndvdlSchdulManage.selectIndvdlSchdulManageMainList", map);
}
/**
* 일정 목록을 Map(map)형식으로 조회한다.
* @param Map(map) - 조회할 정보가 담긴 VO
* @return List
* @throws Exception
*/
public List<?> selectIndvdlSchdulManageRetrieve(Map<?, ?> map) throws Exception{
return list("IndvdlSchdulManage.selectIndvdlSchdulManageRetrieve", map);
}
/**
* 일정 목록을 VO(model)형식으로 조회한다.
* @param indvdlSchdulManageVO - 조회할 정보가 담긴 VO
* @return IndvdlSchdulManageVO
* @throws Exception
*/
public IndvdlSchdulManageVO selectIndvdlSchdulManageDetailVO(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception{
return (IndvdlSchdulManageVO)select("IndvdlSchdulManage.selectIndvdlSchdulManageDetailVO", indvdlSchdulManageVO);
}
/**
* 일정 목록을 조회한다.
* @param searchVO - 조회할 정보가 담긴 VO
* @return List
* @throws Exception
*/
public List<?> selectIndvdlSchdulManageList(ComDefaultVO searchVO) throws Exception{
return list("IndvdlSchdulManage.selectIndvdlSchdulManage", searchVO);
}
/**
* 일정를() 상세조회 한다.
* @param indvdlSchdulManageVO - 일정 정보 담김 VO
* @return List
* @throws Exception
*/
public List<?> selectIndvdlSchdulManageDetail(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception{
return list("IndvdlSchdulManage.selectIndvdlSchdulManageDetail", indvdlSchdulManageVO);
}
/**
* 일정를() 목록 전체 건수를() 조회한다.
* @param searchVO - 조회할 정보가 담긴 VO
* @return int
* @throws Exception
*/
public int selectIndvdlSchdulManageListCnt(ComDefaultVO searchVO) throws Exception{
return (Integer)select("IndvdlSchdulManage.selectIndvdlSchdulManageCnt", searchVO);
}
/**
* 일정를() 등록한다.
* @param qindvdlSchdulManageVO - 일정 정보 담김 VO
* @throws Exception
*/
public void insertIndvdlSchdulManage(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception{
insert("IndvdlSchdulManage.insertIndvdlSchdulManage", indvdlSchdulManageVO);
}
/**
* 일정를() 수정한다.
* @param indvdlSchdulManageVO - 일정 정보 담김 VO
* @throws Exception
*/
public void updateIndvdlSchdulManage(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception{
insert("IndvdlSchdulManage.updateIndvdlSchdulManage", indvdlSchdulManageVO);
}
/**
* 일정를() 삭제한다.
* @param indvdlSchdulManageVO - 일정 정보 담김 VO
* @throws Exception
*/
public void deleteIndvdlSchdulManage(IndvdlSchdulManageVO indvdlSchdulManageVO) throws Exception{
// 일지 삭제
//delete("IndvdlSchdulManage.deleteDiaryManage", indvdlSchdulManageVO);
// 일정관리 삭제
delete("IndvdlSchdulManage.deleteIndvdlSchdulManage", indvdlSchdulManageVO);
}
}

View File

@ -1,751 +0,0 @@
package itn.let.cop.smt.sim.web;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.Map;
import egovframework.rte.fdl.cmmn.exception.EgovBizException;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import itn.com.cmm.ComDefaultCodeVO;
import itn.com.cmm.ComDefaultVO;
import itn.com.cmm.EgovMessageSource;
import itn.com.cmm.LoginVO;
import itn.com.cmm.service.EgovCmmUseService;
import itn.com.cmm.service.EgovFileMngService;
import itn.com.cmm.service.EgovFileMngUtil;
import itn.com.cmm.service.FileVO;
import itn.let.cop.smt.sim.service.EgovIndvdlSchdulManageService;
import itn.let.cop.smt.sim.service.IndvdlSchdulManageVO;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springmodules.validation.commons.DefaultBeanValidator;
/**
* 일정관리를 처리하는 Controller Class 구현
*
* 사용안함. 달력 일정관리. 대관현황 개발에 참조용. 추후 삭제 필요
*
* @since 2009.04.10
* @see
* <pre>
* << 개정이력(Modification Information) >>
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2009.04.10 장동한 최초 생성
* 2011.05.31 JJY 경량환경 커스터마이징버전 생성
* </pre>
* @author 조재영
* @version 1.0
* @created 09-6-2011 오전 10:08:04
*/
@Controller
public class EgovIndvdlSchdulManageController {
@Autowired
private DefaultBeanValidator beanValidator;
/** EgovMessageSource */
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
@Resource(name = "egovIndvdlSchdulManageService")
private EgovIndvdlSchdulManageService egovIndvdlSchdulManageService;
@Resource(name="EgovCmmUseService")
private EgovCmmUseService cmmUseService;
/** EgovPropertyService */
@Resource(name = "propertiesService")
protected EgovPropertyService propertiesService;
// 첨부파일 관련
@Resource(name="EgovFileMngService")
private EgovFileMngService fileMngService;
@Resource(name="EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
/**
* 일정(일별) 목록을 조회한다.
* @param searchVO
* @param commandMap
* @param indvdlSchdulManageVO
* @param model
* @return "/cop/smt/sim/EgovIndvdlSchdulManageDailyList"
* @throws Exception
*/
@RequestMapping(value="/cop/smt/sim/EgovIndvdlSchdulManageDailyList.do")
public String EgovIndvdlSchdulManageDailyList(
@ModelAttribute("searchVO") ComDefaultVO searchVO,
@RequestParam Map <String, Object> commandMap,
IndvdlSchdulManageVO indvdlSchdulManageVO,
ModelMap model)
throws Exception {
//일정구분 검색 유지
model.addAttribute("searchKeyword", commandMap.get("searchKeyword") == null ? "" : (String)commandMap.get("searchKeyword"));
model.addAttribute("searchCondition", commandMap.get("searchCondition") == null ? "" : (String)commandMap.get("searchCondition"));
//공통코드 일정종류
ComDefaultCodeVO voComCode = new ComDefaultCodeVO();
voComCode = new ComDefaultCodeVO();
voComCode.setCodeId("COM030");
model.addAttribute("schdulSe", cmmUseService.selectCmmCodeDetail(voComCode));
/* *****************************************************************
// 캘런더 설정 로직
****************************************************************** */
Calendar calNow = Calendar.getInstance();
String strYear = (String)commandMap.get("year");
String strMonth = (String)commandMap.get("month");
String strDay =( String)commandMap.get("day");
String strSearchDay = "";
int iNowYear = calNow.get(Calendar.YEAR);
int iNowMonth = calNow.get(Calendar.MONTH);
int iNowDay = calNow.get(Calendar.DATE);
if(strYear != null)
{
iNowYear = Integer.parseInt(strYear);
iNowMonth = Integer.parseInt(strMonth);
iNowDay = Integer.parseInt(strDay);
}
strSearchDay = Integer.toString(iNowYear);
strSearchDay += DateTypeIntForString(iNowMonth+1);
strSearchDay += DateTypeIntForString(iNowDay);
commandMap.put("searchMode", "DAILY");
commandMap.put("searchDay", strSearchDay);
model.addAttribute("year", iNowYear);
model.addAttribute("month", iNowMonth);
model.addAttribute("day", iNowDay);
model.addAttribute("resultList", egovIndvdlSchdulManageService.selectIndvdlSchdulManageRetrieve(commandMap));
return "/cop/smt/sim/EgovIndvdlSchdulManageDailyList";
}
/**
* 일정(주간별) 목록을 조회한다.
* @param searchVO
* @param commandMap
* @param indvdlSchdulManageVO
* @param model
* @return "/cop/smt/sim/EgovIndvdlSchdulManageWeekList"
* @throws Exception
*/
@RequestMapping(value="/cop/smt/sim/EgovIndvdlSchdulManageWeekList.do")
public String EgovIndvdlSchdulManageWeekList(
@ModelAttribute("searchVO") ComDefaultVO searchVO,
@RequestParam Map <String, Object> commandMap,
IndvdlSchdulManageVO indvdlSchdulManageVO,
ModelMap model)
throws Exception {
//일정구분 검색 유지
model.addAttribute("searchKeyword", commandMap.get("searchKeyword") == null ? "" : (String)commandMap.get("searchKeyword"));
model.addAttribute("searchCondition", commandMap.get("searchCondition") == null ? "" : (String)commandMap.get("searchCondition"));
//공통코드 일정종류
ComDefaultCodeVO voComCode = new ComDefaultCodeVO();
voComCode = new ComDefaultCodeVO();
voComCode.setCodeId("COM030");
model.addAttribute("schdulSe", cmmUseService.selectCmmCodeDetail(voComCode));
/* *****************************************************************
// 캘런더 설정 로직
****************************************************************** */
Calendar calNow = Calendar.getInstance();
Calendar calBefore = Calendar.getInstance();
Calendar calNext = Calendar.getInstance();
String strYear = (String)commandMap.get("year");
String strMonth = (String)commandMap.get("month");
String strWeek =( String)commandMap.get("week");
int iNowYear = calNow.get(Calendar.YEAR);
int iNowMonth = calNow.get(Calendar.MONTH);
int iNowDate = calNow.get(Calendar.DATE);
int iNowWeek = 0;
if(strYear != null)
{
iNowYear = Integer.parseInt(strYear);
iNowMonth = Integer.parseInt(strMonth);
iNowWeek = Integer.parseInt(strWeek);
}
//년도/ 셋팅
calNow.set(iNowYear, iNowMonth, 1);
calBefore.set(iNowYear, iNowMonth, 1);
calNext.set(iNowYear, iNowMonth, 1);
calBefore.add(Calendar.MONTH, -1);
calNext.add(Calendar.MONTH, +1);
//int startDay = calNow.getMinimum(Calendar.DATE);
int endDay = calNow.getActualMaximum(Calendar.DAY_OF_MONTH);
int startWeek = calNow.get(Calendar.DAY_OF_WEEK);
ArrayList<ArrayList<String>> listWeekGrop = new ArrayList<ArrayList<String>>();
ArrayList<String> listWeekDate = new ArrayList<String>();
String sUseDate = "";
calBefore.add(Calendar.DATE , calBefore.getActualMaximum(Calendar.DAY_OF_MONTH) - (startWeek-1));
for(int i = 1; i < startWeek ; i++ )
{
sUseDate = Integer.toString(calBefore.get(Calendar.YEAR));
sUseDate += DateTypeIntForString(calBefore.get(Calendar.MONTH)+1);
sUseDate += DateTypeIntForString(calBefore.get(Calendar.DATE));
listWeekDate.add(sUseDate);
calBefore.add(Calendar.DATE, +1);
}
int iBetweenCount = startWeek;
// 주별로 자른다. BETWEEN 구하기
for(int i=1; i <= endDay; i++)
{
sUseDate = Integer.toString(iNowYear);
sUseDate += Integer.toString(iNowMonth+1).length() == 1 ? "0" + Integer.toString(iNowMonth+1) : Integer.toString(iNowMonth+1);
sUseDate += Integer.toString(i).length() == 1 ? "0" + Integer.toString(i) : Integer.toString(i);
listWeekDate.add(sUseDate);
if( iBetweenCount % 7 == 0){
listWeekGrop.add(listWeekDate);
listWeekDate = new ArrayList<String>();
if(strYear == null && i < iNowDate){
iNowWeek++;
}
}
//미지막 7일 자동계산
if(i == endDay){
for(int j=listWeekDate.size(); j < 7;j++){
String sUseNextDate = Integer.toString(calNext.get(Calendar.YEAR));
sUseNextDate += DateTypeIntForString(calNext.get(Calendar.MONTH)+1);
sUseNextDate += DateTypeIntForString(calNext.get(Calendar.DATE));
listWeekDate.add(sUseNextDate);
calNext.add(Calendar.DATE, +1);
}
listWeekGrop.add(listWeekDate);
}
iBetweenCount++;
}
model.addAttribute("year", iNowYear);
model.addAttribute("month", iNowMonth);
model.addAttribute("week", iNowWeek);
model.addAttribute("listWeekGrop", listWeekGrop);
List<?> listWeek = listWeekGrop.get(iNowWeek);
commandMap.put("searchMode", "WEEK");
commandMap.put("schdulBgnde", listWeek.get(0));
commandMap.put("schdulEndde", listWeek.get(listWeek.size()-1));
model.addAttribute("resultList", egovIndvdlSchdulManageService.selectIndvdlSchdulManageRetrieve(commandMap));
return "/cop/smt/sim/EgovIndvdlSchdulManageWeekList";
}
/**
* 일정(월별) 목록을 조회한다.
* @param searchVO
* @param commandMap
* @param indvdlSchdulManageVO
* @param model
* @return "/cop/smt/sim/EgovIndvdlSchdulManageMonthList"
* @throws Exception
*/
@RequestMapping(value="/cop/smt/sim/EgovIndvdlSchdulManageMonthList.do")
public String EgovIndvdlSchdulManageMonthList(@ModelAttribute("searchVO") ComDefaultVO searchVO, @RequestParam Map <String, Object> commandMap,
IndvdlSchdulManageVO indvdlSchdulManageVO, ModelMap model)
throws Exception {
//if (!checkAuthority(model)) return "cmm/uat/uia/EgovLoginUsr"; // server-side 권한 확인
//일정구분 검색 유지
model.addAttribute("searchKeyword", commandMap.get("searchKeyword") == null ? "" : (String)commandMap.get("searchKeyword"));
model.addAttribute("searchCondition", commandMap.get("searchCondition") == null ? "" : (String)commandMap.get("searchCondition"));
java.util.Calendar cal = java.util.Calendar.getInstance();
String sYear = (String)commandMap.get("year");
String sMonth = (String)commandMap.get("month");
int iYear = cal.get(java.util.Calendar.YEAR);
int iMonth = cal.get(java.util.Calendar.MONTH);
//int iDate = cal.get(java.util.Calendar.DATE);
//검색 설정
String sSearchDate = "";
if(sYear == null || sMonth == null){
sSearchDate += Integer.toString(iYear);
sSearchDate += Integer.toString(iMonth+1).length() == 1 ? "0" + Integer.toString(iMonth+1) : Integer.toString(iMonth+1);
}else{
iYear = Integer.parseInt(sYear);
iMonth = Integer.parseInt(sMonth);
sSearchDate += sYear;
sSearchDate += Integer.toString(iMonth+1).length() == 1 ? "0" + Integer.toString(iMonth+1) :Integer.toString(iMonth+1);
}
//공통코드 일정종류
ComDefaultCodeVO voComCode = new ComDefaultCodeVO();
voComCode = new ComDefaultCodeVO();
voComCode.setCodeId("COM030");
model.addAttribute("schdulSe", cmmUseService.selectCmmCodeDetail(voComCode));
commandMap.put("searchMonth", sSearchDate);
commandMap.put("searchMode", "MONTH");
model.addAttribute("resultList", egovIndvdlSchdulManageService.selectIndvdlSchdulManageRetrieve(commandMap));
return "/cop/smt/sim/EgovIndvdlSchdulManageMonthList";
}
/**
* 일정 목록을 상세조회 조회한다.
* @param searchVO
* @param indvdlSchdulManageVO
* @param commandMap
* @param model
* @return "/cop/smt/sim/EgovIndvdlSchdulManageDetail"
* @throws Exception
*/
@RequestMapping(value="/cop/smt/sim/EgovIndvdlSchdulManageDetail.do")
public String EgovIndvdlSchdulManageDetail(
@ModelAttribute("searchVO") ComDefaultVO searchVO,
IndvdlSchdulManageVO indvdlSchdulManageVO,
@RequestParam Map <String, Object> commandMap,
ModelMap model)
throws Exception {
String sLocationUrl = "/cop/smt/sim/EgovIndvdlSchdulManageDetail";
String sCmd = commandMap.get("cmd") == null ? "" : (String)commandMap.get("cmd");
if(sCmd.equals("del")){
egovIndvdlSchdulManageService.deleteIndvdlSchdulManage(indvdlSchdulManageVO);
sLocationUrl = "redirect:/cop/smt/sim/EgovIndvdlSchdulManageMonthList.do";
}else{
//공통코드 중요도 조회
ComDefaultCodeVO voComCode = new ComDefaultCodeVO();
voComCode.setCodeId("COM019");
model.addAttribute("schdulIpcrCode", cmmUseService.selectCmmCodeDetail(voComCode));
//공통코드 일정구분 조회
voComCode = new ComDefaultCodeVO();
voComCode.setCodeId("COM030");
model.addAttribute("schdulSe", cmmUseService.selectCmmCodeDetail(voComCode));
//공통코드 반복구분 조회
voComCode = new ComDefaultCodeVO();
voComCode.setCodeId("COM031");
model.addAttribute("reptitSeCode", cmmUseService.selectCmmCodeDetail(voComCode));
model.addAttribute("resultList", egovIndvdlSchdulManageService.selectIndvdlSchdulManageDetail(indvdlSchdulManageVO));
}
return sLocationUrl;
}
/**
* 일정 수정
* @param searchVO
* @param commandMap
* @param indvdlSchdulManageVO
* @param bindingResult
* @param model
* @return "/cop/smt/sim/EgovIndvdlSchdulManageModify"
* @throws Exception
*/
@RequestMapping(value="/cop/smt/sim/EgovIndvdlSchdulManageModify.do")
public String IndvdlSchdulManageModify(
@ModelAttribute("searchVO") ComDefaultVO searchVO,
@RequestParam Map <String, Object> commandMap,
IndvdlSchdulManageVO indvdlSchdulManageVO,
BindingResult bindingResult,
ModelMap model)
throws Exception {
if (!checkAuthority(model)) return "cmm/uat/uia/EgovLoginUsr"; // server-side 권한 확인
String sLocationUrl = "/cop/smt/sim/EgovIndvdlSchdulManageModify";
//공통코드 중요도 조회
ComDefaultCodeVO voComCode = new ComDefaultCodeVO();
voComCode.setCodeId("COM019");
//List listComCode = cmmUseService.selectCmmCodeDetail(voComCode);
model.addAttribute("schdulIpcrCode", cmmUseService.selectCmmCodeDetail(voComCode));
//공통코드 일정구분 조회
voComCode = new ComDefaultCodeVO();
voComCode.setCodeId("COM030");
//listComCode = cmmUseService.selectCmmCodeDetail(voComCode);
model.addAttribute("schdulSe", cmmUseService.selectCmmCodeDetail(voComCode));
//공통코드 반복구분 조회
voComCode = new ComDefaultCodeVO();
voComCode.setCodeId("COM031");
//listComCode = cmmUseService.selectCmmCodeDetail(voComCode);
model.addAttribute("reptitSeCode", cmmUseService.selectCmmCodeDetail(voComCode));
//일정시작일자()
model.addAttribute("schdulBgndeHH", getTimeHH());
//일정시작일자()
model.addAttribute("schdulBgndeMM", getTimeMM());
//일정종료일자()
model.addAttribute("schdulEnddeHH", getTimeHH());
//일정정료일자()
model.addAttribute("schdulEnddeMM", getTimeMM());
IndvdlSchdulManageVO resultIndvdlSchdulManageVOReuslt = egovIndvdlSchdulManageService.selectIndvdlSchdulManageDetailVO(indvdlSchdulManageVO);
String sSchdulBgnde = resultIndvdlSchdulManageVOReuslt.getSchdulBgnde();
String sSchdulEndde = resultIndvdlSchdulManageVOReuslt.getSchdulEndde();
resultIndvdlSchdulManageVOReuslt.setSchdulBgndeYYYMMDD(sSchdulBgnde.substring(0, 4) +"-"+sSchdulBgnde.substring(4, 6)+"-"+sSchdulBgnde.substring(6, 8) );
resultIndvdlSchdulManageVOReuslt.setSchdulBgndeHH(sSchdulBgnde.substring(8, 10));
resultIndvdlSchdulManageVOReuslt.setSchdulBgndeMM(sSchdulBgnde.substring(10, 12));
resultIndvdlSchdulManageVOReuslt.setSchdulEnddeYYYMMDD(sSchdulEndde.substring(0, 4) +"-"+sSchdulEndde.substring(4, 6)+"-"+sSchdulEndde.substring(6, 8) );
resultIndvdlSchdulManageVOReuslt.setSchdulEnddeHH(sSchdulEndde.substring(8, 10));
resultIndvdlSchdulManageVOReuslt.setSchdulEnddeMM(sSchdulEndde.substring(10, 12));
//팝업정보창 사용하여 셋팅하지 않고 고정하여 설정함(템플릿에서 기능 축소)
resultIndvdlSchdulManageVOReuslt.setSchdulDeptName("관리자부서");
resultIndvdlSchdulManageVOReuslt.setSchdulChargerName("관리자");
model.addAttribute("indvdlSchdulManageVO", resultIndvdlSchdulManageVOReuslt);
return sLocationUrl;
}
/**
* 일정를 수정 처리 한다.
* @param multiRequest
* @param searchVO
* @param commandMap
* @param indvdlSchdulManageVO
* @param bindingResult
* @param model
* @return "/cop/smt/sim/EgovIndvdlSchdulManageModifyActor"
* @throws Exception
*/
@RequestMapping(value="/cop/smt/sim/EgovIndvdlSchdulManageModifyActor.do")
public String IndvdlSchdulManageModifyActor(
final MultipartHttpServletRequest multiRequest,
ComDefaultVO searchVO,
@RequestParam Map <String, Object> commandMap,
@ModelAttribute("indvdlSchdulManageVO") IndvdlSchdulManageVO indvdlSchdulManageVO,
BindingResult bindingResult,
ModelMap model,
HttpServletRequest request)
throws Exception {
if (!checkAuthority(model)) return "cmm/uat/uia/EgovLoginUsr"; // server-side 권한 확인
//로그인 객체 선언
LoginVO user = (LoginVO)request.getSession().getAttribute("LoginVO");
Boolean isAuthenticated = (LoginVO)request.getSession().getAttribute("LoginVO") == null ? false:true;
if(!isAuthenticated) {
model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
return "cmm/uat/uia/EgovLoginUsr";
}
String sLocationUrl = "/cop/smt/sim/EgovIndvdlSchdulManageModify";
String sCmd = commandMap.get("cmd") == null ? "" : (String)commandMap.get("cmd");
if(sCmd.equals("save")){
//서버 validate 체크
beanValidator.validate(indvdlSchdulManageVO, bindingResult);
if(bindingResult.hasErrors()){
//공통코드 중요도 조회
ComDefaultCodeVO voComCode = new ComDefaultCodeVO();
voComCode.setCodeId("COM019");
model.addAttribute("schdulIpcrCode", cmmUseService.selectCmmCodeDetail(voComCode));
//공통코드 일정구분 조회
voComCode = new ComDefaultCodeVO();
voComCode.setCodeId("COM030");
model.addAttribute("schdulSe", cmmUseService.selectCmmCodeDetail(voComCode));
//공통코드 반복구분 조회
voComCode = new ComDefaultCodeVO();
voComCode.setCodeId("COM031");
model.addAttribute("reptitSeCode", cmmUseService.selectCmmCodeDetail(voComCode));
//일정시작일자()
model.addAttribute("schdulBgndeHH", getTimeHH());
//일정시작일자()
model.addAttribute("schdulBgndeMM", getTimeMM());
//일정종료일자()
model.addAttribute("schdulEnddeHH", getTimeHH());
//일정정료일자()
model.addAttribute("schdulEnddeMM", getTimeMM());
return sLocationUrl;
}
/* *****************************************************************
// 아이디 설정
****************************************************************** */
indvdlSchdulManageVO.setFrstRegisterId(user.getUniqId());
indvdlSchdulManageVO.setLastUpdusrId(user.getUniqId());
/* *****************************************************************
// 첨부파일 관련 ID 생성 start....
****************************************************************** */
String _atchFileId = indvdlSchdulManageVO.getAtchFileId();
final Map<String, MultipartFile> files = multiRequest.getFileMap();
if(!files.isEmpty()){
String atchFileAt = commandMap.get("atchFileAt") == null ? "" : (String)commandMap.get("atchFileAt");
if("N".equals(atchFileAt)){
List<FileVO> _result = fileUtil.parseFileInf(files, "DSCH_", 0, _atchFileId, "" , "");
_atchFileId = fileMngService.insertFileInfs(_result);
// 첨부파일 ID 셋팅
indvdlSchdulManageVO.setAtchFileId(_atchFileId); // 첨부파일 ID
}else{
FileVO fvo = new FileVO();
fvo.setAtchFileId(_atchFileId);
int _cnt = fileMngService.getMaxFileSN(fvo);
List<FileVO> _result = fileUtil.parseFileInf(files, "DSCH_", _cnt, _atchFileId, "" , "");
fileMngService.updateFileInfs(_result);
}
}
/* *****************************************************************
// 일정관리정보 업데이트 처리
****************************************************************** */
egovIndvdlSchdulManageService.updateIndvdlSchdulManage(indvdlSchdulManageVO);
sLocationUrl = "redirect:/cop/smt/sim/EgovIndvdlSchdulManageMonthList.do";
}
return sLocationUrl;
}
/**
* 일정를 등록
* @param searchVO
* @param commandMap
* @param indvdlSchdulManageVO
* @param bindingResult
* @param model
* @return "/cop/smt/sim/EgovIndvdlSchdulManageRegist"
* @throws Exception
*/
@RequestMapping(value="/cop/smt/sim/EgovIndvdlSchdulManageRegist.do")
public String IndvdlSchdulManageRegist(@ModelAttribute("searchVO") ComDefaultVO searchVO, @RequestParam Map <String, Object> commandMap,
@ModelAttribute("indvdlSchdulManageVO") IndvdlSchdulManageVO indvdlSchdulManageVO, BindingResult bindingResult, ModelMap model, HttpServletRequest request)
throws Exception {
String sLocationUrl = "/cop/smt/sim/EgovIndvdlSchdulManageRegist";
//공통코드 중요도 조회
ComDefaultCodeVO voComCode = new ComDefaultCodeVO();
voComCode.setCodeId("COM019");
model.addAttribute("schdulIpcrCode", cmmUseService.selectCmmCodeDetail(voComCode));
//공통코드 일정구분 조회
voComCode = new ComDefaultCodeVO();
voComCode.setCodeId("COM030");
model.addAttribute("schdulSe", cmmUseService.selectCmmCodeDetail(voComCode));
//공통코드 반복구분 조회
voComCode = new ComDefaultCodeVO();
voComCode.setCodeId("COM031");
model.addAttribute("reptitSeCode", cmmUseService.selectCmmCodeDetail(voComCode));
//일정시작일자()
model.addAttribute("schdulBgndeHH", getTimeHH());
//일정시작일자()
model.addAttribute("schdulBgndeMM", getTimeMM());
//일정종료일자()
model.addAttribute("schdulEnddeHH", getTimeHH());
//일정정료일자()
model.addAttribute("schdulEnddeMM", getTimeMM());
//팝업정보창 사용하여 셋팅하지 않고 고정하여 설정함(템플릿에서 기능 축소)
indvdlSchdulManageVO.setSchdulDeptName("관리자부서");
indvdlSchdulManageVO.setSchdulDeptId("ORGNZT_0000000000000");
indvdlSchdulManageVO.setSchdulChargerName("관리자");
indvdlSchdulManageVO.setSchdulChargerId("USRCNFRM_00000000000");
return sLocationUrl;
}
/**
* 일정를 등록 처리 한다.
* @param multiRequest
* @param searchVO
* @param commandMap
* @param indvdlSchdulManageVO
* @param bindingResult
* @param model
* @return "/cop/smt/sim/EgovIndvdlSchdulManageRegistActor"
* @throws Exception
*/
@RequestMapping(value="/cop/smt/sim/EgovIndvdlSchdulManageRegistActor.do")
public String IndvdlSchdulManageRegistActor(
final MultipartHttpServletRequest multiRequest,
@ModelAttribute("searchVO") ComDefaultVO searchVO,
@RequestParam Map <String, Object> commandMap,
@ModelAttribute("indvdlSchdulManageVO") IndvdlSchdulManageVO indvdlSchdulManageVO,
BindingResult bindingResult,
ModelMap model,
HttpServletRequest request)
throws Exception {
//LoginVO user = (LoginVO)request.getSession().getAttribute("LoginVO");
LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
String sLocationUrl = "/cop/smt/sim/EgovIndvdlSchdulManageRegist";
String sCmd = commandMap.get("cmd") == null ? "" : (String)commandMap.get("cmd");
//log.info("cmd =>" + sCmd);
if(sCmd.equals("save")){
//서버 validate 체크
beanValidator.validate(indvdlSchdulManageVO, bindingResult);
if(bindingResult.hasErrors()){
return sLocationUrl;
}
// 첨부파일 관련 첨부파일ID 생성
List<FileVO> _result = null;
String _atchFileId = "";
final Map<String, MultipartFile> files = multiRequest.getFileMap();
if(!files.isEmpty()){
_result = fileUtil.parseFileInf(files, "DSCH_", 0, "", "", "");
_atchFileId = fileMngService.insertFileInfs(_result); //파일이 생성되고나면 생성된 첨부파일 ID를 리턴한다.
}
// 리턴받은 첨부파일ID를 셋팅한다..
indvdlSchdulManageVO.setAtchFileId(_atchFileId); // 첨부파일 ID
//아이디 설정
indvdlSchdulManageVO.setFrstRegisterId(user.getUniqId());
indvdlSchdulManageVO.setLastUpdusrId(user.getUniqId());
egovIndvdlSchdulManageService.insertIndvdlSchdulManage(indvdlSchdulManageVO);
sLocationUrl = "redirect:/cop/smt/sim/EgovIndvdlSchdulManageMonthList.do";
}
return sLocationUrl;
}
/**
* 시간을 LIST를 반환한다.
* @return List
* @throws
*/
private List<ComDefaultCodeVO> getTimeHH (){
ArrayList<ComDefaultCodeVO> listHH = new ArrayList<ComDefaultCodeVO>();
//HashMap hmHHMM;
for(int i=0;i < 24; i++){
String sHH = "";
String strI = String.valueOf(i);
if(i<10){
sHH = "0" + strI;
}else{
sHH = strI;
}
ComDefaultCodeVO codeVO = new ComDefaultCodeVO();
codeVO.setCode(sHH);
codeVO.setCodeNm(sHH);
listHH.add(codeVO);
}
return listHH;
}
/**
* 분을 LIST를 반환한다.
* @return List
* @throws
*/
private List<ComDefaultCodeVO> getTimeMM (){
ArrayList<ComDefaultCodeVO> listMM = new ArrayList<ComDefaultCodeVO>();
//HashMap hmHHMM;
for(int i=0;i < 60; i++){
String sMM = "";
String strI = String.valueOf(i);
if(i<10){
sMM = "0" + strI;
}else{
sMM = strI;
}
ComDefaultCodeVO codeVO = new ComDefaultCodeVO();
codeVO.setCode(sMM);
codeVO.setCodeNm(sMM);
listMM.add(codeVO);
}
return listMM;
}
/**
* 0을 붙여 반환
* @return String
* @throws
*/
public String DateTypeIntForString(int iInput){
String sOutput = "";
if(Integer.toString(iInput).length() == 1){
sOutput = "0" + Integer.toString(iInput);
}else{
sOutput = Integer.toString(iInput);
}
return sOutput;
}
/**
* 운영자 권한을 확인한다.(로그인 여부를 확인한다.)
*
* @param boardMaster
* @throws EgovBizException
*/
protected boolean checkAuthority(ModelMap model) throws Exception {
// 사용자권한 처리
if(!EgovUserDetailsHelper.isAuthenticated()) {
model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
return false;
}else{
return true;
}
}
}

View File

@ -1,95 +0,0 @@
package itn.let.crypto.web;
import java.util.Map;
import javax.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import itn.let.utl.fcc.service.EgovCryptoUtil;
/**
* 암호화/복호화 관한 controller 클래스를 정의한다.
* @author 공통서비스 개발팀 신용호
* @since 2018.12.03
* @version 3.8
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ---------- -------- ---------------------------
* 2018.12.03 신용호 최초 생성
* </pre>
*/
@Controller
public class EgovCryptoController {
/** 로그설정 */
private static final Logger LOGGER = LoggerFactory.getLogger(EgovCryptoController.class);
/** 암호화서비스 */
//@Resource(name = "egovEnvCryptoService")
//EgovEnvCryptoService cryptoService;
//@Resource(name = "egovEnvPasswordEncoderService")
//EgovPasswordEncoder egovPasswordEncoder;
@Resource(name = "egovCryptoUtil")
EgovCryptoUtil egovCryptoUtil;
/** EgovMessageSource */
//@Resource(name="egovMessageSource")
//EgovMessageSource egovMessageSource;
/**
* 암호화/복호화 입력 요청 페이지를 호출한다.
*
* @return
*/
//@IncludedInfo(name="암호화/복호화", listUrl="/sec/pki/EgovCryptoInfo.do", order = 2200 ,gid = 90)
@RequestMapping(value="/web/sample/EgovCryptoInfo.do")
public String displayCryptoInfo( @RequestParam Map<?, ?> commandMap,
ModelMap model) throws Exception {
// 0. Spring Security 사용자권한 처리
/*
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
if(!isAuthenticated) {
model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
return "egovframework/com/uat/uia/EgovLoginUsr";
}
*/
System.out.println();
String plainText = (String)commandMap.get("plainText");
if ( plainText != null ) {
int plainTextLen = plainText.length();
//String cryptText = encrypt(plainText);
String cryptText = egovCryptoUtil.encrypt(plainText);
String decryptText = egovCryptoUtil.decrypt(cryptText);
int decryptTextLen = decryptText.length();
model.addAttribute("plainText", plainText);
model.addAttribute("plainTextLen", plainTextLen);
model.addAttribute("cryptText", cryptText);
model.addAttribute("decryptText", decryptText);
model.addAttribute("decryptTextLen", decryptTextLen);
}
return "web/sample/EgovCryptoInfo";
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,594 +0,0 @@
package itn.let.fax.addr.web;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import itn.com.cmm.EgovMessageSource;
import itn.com.cmm.LoginVO;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.fax.addr.service.FaxAddrGroupService;
import itn.let.fax.addr.service.FaxAddrGroupVO;
import itn.let.fax.addr.service.FaxAddrService;
import itn.let.fax.addr.service.FaxAddrVO;
import itn.let.mjo.msgsent.service.MjonMsgSentService;
import itn.let.mjo.pay.service.KmcVO;
import itn.let.uat.uia.service.AuthCertVO;
import itn.let.uat.uia.web.KmcCertChecker;
import itn.let.uss.umt.service.EgovMberManageService;
import itn.let.uss.umt.service.MberManageVO;
@Controller
public class FaxAddrGroupController {
@Resource(name = "MjonMsgSentService")
private MjonMsgSentService mjonMsgSentService;
@Resource (name = "FaxAddrGroupService")
private FaxAddrGroupService faxAddrGroupService;
@Resource (name = "FaxAddrService")
private FaxAddrService faxAddrService;
/** EgovMessageSource */
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
/** mberManageService */
@Resource(name = "mberManageService")
private EgovMberManageService mberManageService;
/**
* 팩스 주소록 그룹 리스트
* @param FaxAddrGroupVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/web/mjon/fax/addr/selectFaxAddrGroupListAjax.do")
public String selectFaxAddrGroupListAjax(@ModelAttribute("searchVO") FaxAddrGroupVO addrGroupVO, FaxAddrVO addrVO
,ModelMap model, RedirectAttributes redirectAttributes) throws Exception {
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId != "") {
addrGroupVO.setMberId(userId);
addrVO.setMberId(userId);
} else {
redirectAttributes.addFlashAttribute("fail", true);
return "redirect:/web/user/login/login.do";
}
if(addrGroupVO.getPageUnit() != 10) {
addrGroupVO.setPageUnit(addrGroupVO.getPageUnit());
}
if("".equals(addrGroupVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
addrGroupVO.setSearchSortCnd("grpOrder");
addrGroupVO.setSearchSortOrd("desc");
}
addrGroupVO.setSiteId("web");
List<FaxAddrGroupVO> addrGroupList = faxAddrGroupService.selectFaxAddrGroupList(addrGroupVO);
// //회원별 주소록 전체 갯수 조회
// int addrTotalCount = faxAddrService.selectFaxAddrTotalCount(addrVO);
addrVO.setType("bookmark");
List<FaxAddrVO> addrBookmarkList = faxAddrService.selectFaxAddrBasicGrpList(addrVO);
addrVO.setType("noGrp");
List<FaxAddrVO> addrNoGrpList = faxAddrService.selectFaxAddrBasicGrpList(addrVO);
int totalGrpCount = addrGroupList.stream()
.mapToInt(group -> {
String grpCountStr = group.getGrpCount();
if (grpCountStr != null && !grpCountStr.isEmpty()) {
try {
return Integer.parseInt(grpCountStr);
} catch (NumberFormatException e) {
// 파싱에 실패한 경우 0을 반환하거나 예외 처리를 합니다.
return 0;
}
} else {
return 0;
}
})
.sum();
int addrTotalCount = (addrNoGrpList.size() >0 ? addrNoGrpList.get(0).getTotcnt() : 0)
+ (addrBookmarkList.size() >0 ? addrBookmarkList.get(0).getTotcnt() : 0)
+ totalGrpCount
;
model.addAttribute("addrTotalCount", addrTotalCount);
model.addAttribute("addrGroupList", addrGroupList);
model.addAttribute("addrBookmarkList", addrBookmarkList);
model.addAttribute("addrNoGrpList", addrNoGrpList);
model.addAttribute("userId", userId);
return "/web/fax/addr/FaxAddrGroupListAjax";
}
/**
* 주소록 합치기 팝업 리스트
* @param addrGroupVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/web/mjon/fax/addr/selectFaxAddrGroupMergetAjax.do")
public ModelAndView selectFaxAddrGroupMergetAjax(@ModelAttribute("searchVO") FaxAddrGroupVO addrGroupVO, FaxAddrVO addrVO
, ModelMap model) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId != "") {
addrGroupVO.setMberId(userId);
addrVO.setMberId(userId);
}
if(addrGroupVO.getPageUnit() != 10) {
addrGroupVO.setPageUnit(addrGroupVO.getPageUnit());
}
if("".equals(addrGroupVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
addrGroupVO.setSearchSortCnd("addrGrpId");
addrGroupVO.setSearchSortOrd("desc");
}
addrGroupVO.setSiteId("web");
List<FaxAddrGroupVO> addrGroupList = faxAddrGroupService.selectFaxAddrGroupList(addrGroupVO);
model.addAttribute("addrGroupList", addrGroupList);
modelAndView.addObject("status", "success");
return modelAndView;
}
/**
* 팩스 주소록 등록 페이지(ajax)
* @param FaxAddrGroupVO
* @param redirectAttributes
* @param request
* @return
* @throws Exception
*/
@RequestMapping("/web/mjon/fax/addr/selectFaxAddrGroupAjax.do")
public String selectFaxAddrGroupAjax(HttpServletRequest request, ModelMap model,
FaxAddrGroupVO addrGroupVO, FaxAddrVO addrVO, RedirectAttributes redirectAttributes
) throws Exception {
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId != "") {
addrGroupVO.setMberId(userId);
addrVO.setMberId(userId);
} else {
redirectAttributes.addFlashAttribute("fail", true);
return "redirect:/web/user/login/login.do";
}
if(addrGroupVO.getPageUnit() != 10) {
addrGroupVO.setPageUnit(addrGroupVO.getPageUnit());
}
addrGroupVO.setSiteId("web");
List<FaxAddrGroupVO> faxAddrGroupList = faxAddrGroupService.selectFaxAddrGroupList(addrGroupVO);
model.addAttribute("addrGroupList", faxAddrGroupList);
return "/web/fax/addr/FaxAddrGroupSelectAjax";
}
/**
* 주소록 그룹 등록 로직 (ajax)
* @param addrGroupVO
* @param request
* @return
* @throws Exception
*/
@RequestMapping("/web/mjon/fax/addr/insertFaxAddrGroupAjax.do")
public ModelAndView insertFaxAddrGroup(HttpServletRequest request, ModelMap model,
FaxAddrGroupVO addrGroupVO
) throws Exception {
ModelAndView mv = new ModelAndView();
mv.setViewName("jsonView");
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
addrGroupVO.setMberId(userId);
int usedCnt = faxAddrGroupService.selectDuplFaxAddrGroupCnt(addrGroupVO);
if(usedCnt > 0) {
mv.addObject("result","dupl");
}else {
if(userId != "") {
try {
faxAddrGroupService.insertFaxAddrGroup(addrGroupVO);
mv.addObject("result","success");
} catch (Exception e) {
e.printStackTrace();
mv.addObject("result","fail");
}
} else {
mv.addObject("result","fail");
}
}
return mv;
}
/**
* 주소록 그룹 중복체크 로직 (ajax)
* @param addrGroupVO
* @param request
* @return
* @throws Exception
*/
@RequestMapping("/web/mjon/fax/addr/getFaxAddrGroupDuplCheckAjax.do")
public ModelAndView getFaxAddrGroupDuplCheckAjax(HttpServletRequest request, ModelMap model,
FaxAddrGroupVO addrGroupVO
) throws Exception {
ModelAndView mv = new ModelAndView();
mv.setViewName("jsonView");
boolean isSuccess = true;
boolean isDupl = false;
String msg = "";
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
try {
addrGroupVO.setMberId(userId);
int usedCnt = faxAddrGroupService.selectDuplFaxAddrGroupCnt(addrGroupVO);
if(usedCnt > 0) {
isDupl = true;
}
}
catch(Exception e) {
isSuccess = false;
msg = e.getMessage();
}
mv.addObject("isSuccess", isSuccess);
mv.addObject("isDupl", isDupl);
mv.addObject("msg", msg);
return mv;
}
/**
* 주소록 그룹 수정 로직 Ajax
*
* @param request
* @param addrGroupVO
* @param redirectAttributes
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/web/mjon/fax/addr/updateFaxAddrGroupAjax.do")
public ModelAndView updateFaxAddrGroupAjax(@RequestParam("addrGrpNms") String[] addrGrpNms,
@RequestParam("addrGrpIds") String[] addrGrpIds,
HttpServletRequest request,
@ModelAttribute("searchVO") FaxAddrGroupVO addrGroupVO, Model model
,RedirectAttributes redirectAttributes
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
addrGroupVO.setLastUpdusrId(user.getId());
addrGroupVO.setMberId(user.getId());
boolean dupl = false;
for (int i=0; i<addrGrpNms.length; i++) {
String str1 = addrGrpNms[i];
for (int j=0; j<addrGrpNms.length; j++) {
if (i == j) continue;
String str2 = addrGrpNms[j];
if (str1.equals(str2)) {
dupl = true;
break;
}
}
}
if(dupl) {
modelAndView.addObject("result", "dupl");
} else {
for(int i=0; i<addrGrpIds.length; i++) {
try {
addrGroupVO.setAddrGrpNm(addrGrpNms[i]);
addrGroupVO.setAddrGrpId(addrGrpIds[i]);
addrGroupVO.setGrpOrder(i+1);
faxAddrGroupService.updateFaxAddrGroup(addrGroupVO);
} catch (Exception e) {
e.printStackTrace();
modelAndView.addObject("result", "fail");
return modelAndView;
}
}
}
return modelAndView;
}
/**
* 주소록 그룹 삭제 로직 Ajax
*
* @param request
* @param addrGroupVO
* @param redirectAttributes
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/web/mjon/fax/addr/deleteFaxAddrGroupAjax.do")
public ModelAndView deleteFaxAddrGroupAjax(@RequestParam("grpCheck") String[] grpCheck, HttpServletRequest request,
@ModelAttribute("searchVO") FaxAddrGroupVO addrGroupVO, Model model
,RedirectAttributes redirectAttributes
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
addrGroupVO.setLastUpdusrId(user.getId());
addrGroupVO.setMberId(user.getId());
for(String id:grpCheck) {
try {
addrGroupVO.setAddrGrpId(id);
addrGroupVO.setMberId(user.getId());
addrGroupVO.setLastUpdusrId(user.getId());
faxAddrService.deleteFaxAddr_advc(addrGroupVO);
modelAndView.addObject("result", "success");
} catch (Exception e) {
e.printStackTrace();
modelAndView.addObject("result", "fail");
return modelAndView;
}
}
return modelAndView;
}
/**
* 주소록 그룹명 중복체크
*
* @param addrGroupVO
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/fax/addr/selectDuplAddrGroupNameAjax.do"})
@ResponseBody
public ModelAndView selectDuplFaxAddrGroupAjax(FaxAddrGroupVO addrGroupVO
,HttpServletRequest request
,ModelMap model
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
int usedCnt = faxAddrGroupService.selectDuplFaxAddrGroupCnt(addrGroupVO);
if(usedCnt > 0) {
modelAndView.addObject("result1", "dupl");
} else {
modelAndView.addObject("result1", "success");
}
modelAndView.addObject("status1", "success");
return modelAndView;
}
/**
* 주소록 합치기
* @param addrGrpNewNm
* @param request
* @param addrGroupVO
* @param addrVO
* @param model
* @param redirectAttributes
* @return
* @throws Exception
*/
@RequestMapping("/web/mjon/fax/addr/mergeFaxAddrGroupAjax.do")
public ModelAndView mergeFaxAddrGroupAjax(@RequestParam("addrGrpNewNm") String addrGrpNewNm
,HttpServletRequest request
,@ModelAttribute("searchVO") FaxAddrGroupVO addrGroupVO
,FaxAddrVO addrVO
,Model model
,RedirectAttributes redirectAttributes
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
addrGroupVO.setLastUpdusrId(user.getId());
addrGroupVO.setMberId(user.getId());
addrGroupVO.setFrstRegisterId(user.getId());
addrGroupVO.setAddrGrpNm(addrGrpNewNm);
int usedCnt = faxAddrGroupService.selectDuplFaxAddrGroupCnt(addrGroupVO);
if(usedCnt > 0) {
modelAndView.addObject("result", "dupl");
}else {
addrVO.setMberId(user.getId());
addrVO.setLastUpdusrId(user.getId());
try {
faxAddrGroupService.mergeFaxAddrGroupAjax(addrGroupVO, addrVO);
modelAndView.addObject("result", "success");
} catch (Exception e) {
e.printStackTrace();
modelAndView.addObject("result", "fail");
return modelAndView;
}
}
return modelAndView;
}
/**
* 주소록 그룹 복사하기
* @param addrGrpNewNm
* @param request
* @param addrGroupVO
* @param addrVO
* @param model
* @param redirectAttributes
* @return
* @throws Exception
*/
@RequestMapping("/web/mjon/fax/addr/copyFaxAddrGroupAjax.do")
public ModelAndView copyFaxAddrGroupAjax(@RequestParam("addrGrpNewNm") String addrGrpNewNm
,HttpServletRequest request
,@ModelAttribute("searchVO") FaxAddrGroupVO addrGroupVO
,FaxAddrVO addrVO
,Model model
,RedirectAttributes redirectAttributes
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
addrGroupVO.setLastUpdusrId(user.getId());
addrGroupVO.setMberId(user.getId());
addrGroupVO.setFrstRegisterId(user.getId());
addrGroupVO.setAddrGrpNm(addrGrpNewNm);
int usedCnt = faxAddrGroupService.selectDuplFaxAddrGroupCnt(addrGroupVO);
if(usedCnt > 0) {
modelAndView.addObject("result", "dupl");
}else {
addrVO.setMberId(user.getId());
addrVO.setLastUpdusrId(user.getId());
try {
faxAddrGroupService.copyFaxAddrGroupAjax(addrGroupVO, addrVO);
modelAndView.addObject("result", "success");
} catch (Exception e) {
e.printStackTrace();
modelAndView.addObject("result", "fail");
return modelAndView;
}
}
return modelAndView;
}
// 주소록 내보내기 kmc본인인증
@RequestMapping(value = "/web/mjon/fax/addr/kmcPopupFaxAddrSubmitPramAjax.do")
public ModelAndView kmcPopupIdPwPramAjax(@ModelAttribute("mberManageVO") MberManageVO mberManageVO,
HttpServletRequest request) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
try {
KmcCertChecker kmcCertCheck = new KmcCertChecker();
// mberId null일경우 ""
mberManageVO.setMberId(EgovStringUtil.isNullToString(mberManageVO.getMberId()));
// kmc 본인인증 /개발 서버 구분
String serverNm = "";
if (request.getServerName().contains("219.240.88.15") || request.getServerName().contains("localhost")) {
serverNm = request.getScheme() + "://219.240.88.15:8095";
} else {
serverNm = request.getScheme() + "://www.munjaon.co.kr";
}
AuthCertVO certVO = kmcCertCheck.authCertCheckEight(serverNm + "/web/cop/kmc/authRequestAddrSubmitAjax.do",
mberManageVO.getMberId());
modelAndView.addObject("tr_cert", certVO.getTr_cert());
modelAndView.addObject("tr_url", certVO.getTr_url());
modelAndView.addObject("tr_add", certVO.getTr_add());
modelAndView.addObject("result", "success");
} catch (Exception e) {
modelAndView.addObject("result", "fail");
modelAndView.addObject("message", "기타 시스템 오류 : " + e.getMessage());
}
return modelAndView;
}
// 파라미터 유효성 검증 --------------------------------------------
public Boolean paramChk(String patn, String param) {
Pattern pattern = Pattern.compile(patn);
Matcher matcher = pattern.matcher(param);
boolean b = matcher.matches();
return b;
}
// 파라미터 유효성 검증 --------------------------------------------
public String returnPage(ModelMap model, String errMessage, KmcVO kmcVO) {
kmcVO.setErrMessage(errMessage);
model.addAttribute("kmcVO", kmcVO);
return "web/cop/nicepay/payRequestAjax";
}
}

View File

@ -1,81 +0,0 @@
package itn.let.fax.addr.web;
import java.time.LocalDateTime;
import java.util.List;
import javax.annotation.Resource;
import org.apache.commons.vfs2.util.DelegatingFileSystemOptionsBuilder;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import itn.com.cmm.EgovMessageSource;
import itn.com.cmm.LoginVO;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.fax.addr.service.FaxAddrGroupService;
import itn.let.fax.addr.service.FaxAddrService;
import itn.let.fax.addr.service.FaxAddrVO;
import itn.let.mail.service.StatusResponse;
/**
* 팩스 주소록 관한 controller 클래스를 정의한다.
* @author ITN
* @since 2024.11.08
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2021.04.08 ITN 최초 생성
*
* </pre>
*/
@RestController
public class FaxAddrRestController {
@Resource (name = "FaxAddrService")
private FaxAddrService faxAddrService;
@Resource (name = "FaxAddrGroupService")
private FaxAddrGroupService faxAddrGroupService;
/** EgovMessageSource */
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
/**
* 팩스 주소록 대량등록 저장
* @param searchVO
* @param model
* @return "/web/mjon/addr/addrMassInsertByTempAjax_advc.do"
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/fax/addr/faxAddrMassInsertByTempAjax_advc.do"})
public ResponseEntity<StatusResponse> faxAddrMassInsertByTempAjax_advc(
@RequestBody List<FaxAddrVO> faxAddrListVO
,ModelMap model) throws Exception{
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId.equals("")) {
return ResponseEntity.ok(
new StatusResponse(HttpStatus.UNAUTHORIZED
, "로그인을 하셔야 이용 가능합니다."
, LocalDateTime.now()
)
);
}
return ResponseEntity.ok().body(faxAddrService.faxAddrMassInsertByTempAjax_advc(faxAddrListVO, userId));
}
}

View File

@ -1,265 +0,0 @@
package itn.let.fax.addr.web;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.LoginVO;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.fax.addr.service.FaxAddrTransHistService;
import itn.let.fax.addr.service.FaxAddrTransHistVO;
@Controller
public class FaxAddrTransHistController {
@Resource (name = "FaxAddrTransHistService")
private FaxAddrTransHistService faxAddrTransHistService;
/**
* 주소록 리스트
* @param addrVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/web/mjon/fax/addr/selectFaxAddrTransHistListAjax.do")
public String selectFaxAddrTransHistListAjax(@ModelAttribute("searchVO") FaxAddrTransHistVO addrTransHistVO
,ModelMap model) throws Exception {
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId != "") {
addrTransHistVO.setSendMberId(userId);
}
addrTransHistVO.setPageUnit(5);
/** paging */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(addrTransHistVO.getPageIndex());
paginationInfo.setRecordCountPerPage(addrTransHistVO.getPageUnit());
paginationInfo.setPageSize(addrTransHistVO.getPageSize());
addrTransHistVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
addrTransHistVO.setLastIndex(paginationInfo.getLastRecordIndex());
addrTransHistVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
addrTransHistVO.setSearchSortCnd("sendDate");
addrTransHistVO.setSearchSortOrd("desc");
List<FaxAddrTransHistVO> addrTransHistList = faxAddrTransHistService.selectFaxAddrTransHistList(addrTransHistVO);
int totCnt = 0;
if(addrTransHistList.size() > 0) {
totCnt = addrTransHistList.get(0).getTotcnt();
}
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("addrTransHistList", addrTransHistList);
model.addAttribute("paginationInfo", paginationInfo);
model.addAttribute("totCnt", totCnt);
return "/web/fax/addr/FaxAddrTransHistListAjax";
}
/**
* 주소록 리스트 인쇄페이지
* @param addrVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/web/mjon/fax/addr/selectFaxAddrTransHistPrint.do")
public String selectFaxAddrTransHistPrint(@ModelAttribute("searchVO") FaxAddrTransHistVO addrTransHistVO
,ModelMap model) throws Exception {
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId != "") {
addrTransHistVO.setSendMberId(userId);
}
addrTransHistVO.setRecordCountPerPage(100000);
addrTransHistVO.setFirstIndex(0);
List<FaxAddrTransHistVO> addrTransHistList = faxAddrTransHistService.selectFaxAddrTransHistList(addrTransHistVO);
model.addAttribute("addrTransHistList", addrTransHistList);
return "/web/fax/addr/FaxAddrTransHistPrint";
}
//주소록 엑셀 다운로드
@RequestMapping("/web/mjon/fax/addr/faxAddrTransHistExcelDownload.do")
public void faxAddrTransHistExcelDownload(FaxAddrTransHistVO addrTransHistVO,
HttpServletRequest request,
HttpServletResponse response ,
ModelMap model) throws Exception {
addrTransHistVO.setRecordCountPerPage(100000);
addrTransHistVO.setFirstIndex(0);
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
// 메모리에 100개의 행을 유지합니다. 행의 수가 넘으면 디스크에 적습니다.
SXSSFWorkbook wb = new SXSSFWorkbook(100);
CellStyle style = wb.createCellStyle();
style.setBorderBottom(CellStyle.BORDER_THIN); //테두리 두껍게
style.setBorderLeft(CellStyle.BORDER_THIN);
style.setBorderRight(CellStyle.BORDER_THIN);
style.setBorderTop(CellStyle.BORDER_THIN);
Font font = wb.createFont();
font.setBoldweight(Font.BOLDWEIGHT_BOLD); //글씨 bold
Cell cell = null;
Row row = null;
String fileName ="주소록 내보내기 관리";
String sheetTitle = "";
try{
if("".equals(addrTransHistVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
addrTransHistVO.setSearchSortOrd("desc");
}
addrTransHistVO.setSendMberId(loginVO.getId());
List<FaxAddrTransHistVO> addrTransHistList = faxAddrTransHistService.selectFaxAddrTransHistList(addrTransHistVO);
{
// row, cell 개수 순서대로 증가용 필드
int rowNumber = 0;
int celNumber = 0;
//화면 리스트
sheetTitle = "주소록" ; //제목
Sheet sheet = wb.createSheet(sheetTitle);
row = sheet.createRow(rowNumber++);
cell = row.createCell(celNumber++);
cell.setCellValue("번호");
cell.setCellStyle(style);
cell = row.createCell(celNumber++);
cell.setCellValue("보낸주소록(그룹)명");
cell.setCellStyle(style);
cell = row.createCell(celNumber++);
cell.setCellValue("보낸날짜");
cell.setCellStyle(style);
cell = row.createCell(celNumber++);
cell.setCellValue("수신날짜");
cell.setCellStyle(style);
cell = row.createCell(celNumber++);
cell.setCellValue("수신인ID");
cell.setCellStyle(style);
cell = row.createCell(celNumber++);
cell.setCellValue("수신상태");
cell.setCellStyle(style);
for(int i=0; i < addrTransHistList.size(); i++){
row = sheet.createRow(rowNumber++); //줄추가
celNumber = 0;
cell = row.createCell(celNumber++);
cell.setCellStyle(style);
cell.setCellValue(i+1); //번호
cell = row.createCell(celNumber++);
cell.setCellStyle(style);
cell.setCellValue(((FaxAddrTransHistVO)addrTransHistList.get(i)).getAddrGrpNm()); // 보낸주소록 그룹명
cell = row.createCell(celNumber++);
cell.setCellStyle(style);
cell.setCellValue(((FaxAddrTransHistVO)addrTransHistList.get(i)).getSendDate()); // 보낸주소록 그룹명
cell = row.createCell(celNumber++);
cell.setCellStyle(style);
cell.setCellValue(((FaxAddrTransHistVO)addrTransHistList.get(i)).getRecvDate()); // 수신날짜
cell = row.createCell(celNumber++);
cell.setCellStyle(style);
cell.setCellValue(((FaxAddrTransHistVO)addrTransHistList.get(i)).getRecvMberId()); // 수신인
cell = row.createCell(celNumber++);
cell.setCellStyle(style);
String recvStatus = "";
if("Y".equals(((FaxAddrTransHistVO)addrTransHistList.get(i)).getRecvStatus())) {
recvStatus = "수신완료";
} else if("W".equals(((FaxAddrTransHistVO)addrTransHistList.get(i)).getRecvStatus())) {
recvStatus = "수신대기";
} else if("N".equals(((FaxAddrTransHistVO)addrTransHistList.get(i)).getRecvStatus())) {
recvStatus = "수신거부";
} else {
recvStatus = "-";
}
cell.setCellValue(recvStatus); // 수신상태
}
}
response.setHeader("Set-Cookie", "fileDownload=true; path=/");
SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat ( "yyyy_MM_dd_HH_mm_ss", Locale.KOREA );
Date currentTime = new Date ();
String mTime = mSimpleDateFormat.format ( currentTime );
fileName = fileName+"("+mTime+")";
response.setHeader("Content-Disposition", String.format("attachment; filename=\""+new String((fileName).getBytes("KSC5601"),"8859_1")+".xlsx"));
wb.write(response.getOutputStream());
}catch(Exception e) {
response.setHeader("Set-Cookie", "fileDownload=false; path=/");
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
response.setHeader("Content-Type","text/html; charset=utf-8");
OutputStream out = null;
try {
out = response.getOutputStream();
byte[] data = new String("fail..").getBytes();
out.write(data, 0, data.length);
} catch(Exception ignore) {
ignore.printStackTrace();
} finally {
if(out != null) try { out.close(); } catch(Exception ignore) {}
}
}finally {
// 디스크 적었던 임시파일을 제거합니다.
wb.dispose();
try { wb.close(); } catch(Exception ignore) {}
}
}
}

View File

@ -108,7 +108,7 @@ public class FaxAdmController {
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(StringUtils.isEmpty(userId)) {
return "redirect:/web/user/login/login.do";
return "redirect:/cmm/main/mainPage.do";
}
model.addAttribute("loginVO", loginVO);
@ -174,7 +174,7 @@ public class FaxAdmController {
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(StringUtils.isEmpty(userId)) {
return "redirect:/web/user/login/login.do";
return "redirect:/cmm/main/mainPage.do";
}
model.addAttribute("loginVO", loginVO);
@ -208,7 +208,7 @@ public class FaxAdmController {
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(StringUtils.isEmpty(userId)) {
return "redirect:/web/user/login/login.do";
return "redirect:/cmm/main/mainPage.do";
}
model.addAttribute("loginVO", loginVO);

View File

@ -1,375 +0,0 @@
package itn.let.fax.user.web;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.LoginVO;
import itn.com.cmm.util.FileUtil;
import itn.com.cmm.util.PdfUtil;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.fax.addr.service.FaxAddrService;
import itn.let.fax.addr.service.FaxAddrVO;
import itn.let.fax.user.service.FaxConvertVO;
import itn.let.fax.user.service.FaxGroupDataVO;
import itn.let.fax.user.service.FaxService;
import itn.let.mjo.msgdata.service.MjonMsgDataService;
@Controller
public class FaxController {
private static final Logger logger = LoggerFactory.getLogger(FaxController.class);
@Resource(name = "faxService")
private FaxService faxService;
@Resource (name = "FaxAddrService")
private FaxAddrService faxAddrService;
@Resource(name = "MjonMsgDataService")
private MjonMsgDataService mjonMsgDataService;
/** fax 변환 파일 저장 경로*/
@Value("#{globalSettings['Globals.fax.file.convert.path']}")
private String FAX_CONVERT_FILE_PATH;
/**
* @methodName : selectFaxDataView
* @author : 이호영
* @date : 2023.02.07
* @description :
* @param cateCode
* @param request
* @param model
* @param redirectAttributes
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/fax/faxDataView.do"})
public String faxDataView(HttpServletRequest request, ModelMap model
,FaxAddrVO faxAddrVO, RedirectAttributes redirectAttributes) throws Exception{
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(StringUtils.isEmpty(userId)) {
//return "redirect:/web/user/login/login.do";
}
// TODO 미로그인 로그인 페이지로 이동 처리
model.addAttribute("loginVO", loginVO);
//주소록에서 전달 받은 주소록 정보 조회하기
String moveAddrFlag = faxAddrVO.getMoveAddrFlag();
String moveAddrAllFlag = faxAddrVO.getMoveAddrAllFlag();
if(moveAddrFlag == null || moveAddrFlag.equals("")) {
moveAddrFlag = "N";
}
if(moveAddrAllFlag == null || moveAddrAllFlag.equals("")) {
moveAddrAllFlag = "N";
}
List<String> addrIdList = faxAddrVO.getAddrIdList();
List<String> tempList = new ArrayList<String>();
List<FaxAddrVO> resultFaxAddrList = new ArrayList<FaxAddrVO>();
List<String> addrNmList = new ArrayList<String>();
List<String> addrPhoneNoList = new ArrayList<String>();
int listCnt = 0;
//주소록 선택 전송시
if(moveAddrFlag.equals("Y")) {
for(String seqStr : addrIdList) {
String seqId = seqStr.replace("[", "");
seqId = seqId.replace("]", "");
tempList.add(seqId);
}
if (null != userId && !userId.equals("")) {
faxAddrVO.setAddrIdList(tempList);
faxAddrVO.setMberId(userId);
resultFaxAddrList = faxAddrService.selectFaxAddrDataList(faxAddrVO);
}
for(FaxAddrVO tmp : resultFaxAddrList) {
addrNmList.add(tmp.getAddrNm());
addrPhoneNoList.add(tmp.getAddrPhoneNo());
}
listCnt = resultFaxAddrList.size();
}
//주소록 전체 전송시
if(moveAddrAllFlag.equals("Y")) {
FaxAddrVO faxAddrAllVO = new FaxAddrVO();
faxAddrAllVO.setMberId(userId);
faxAddrAllVO.setRecordCountPerPage(100000);
faxAddrAllVO.setFirstIndex(0);
faxAddrAllVO.setSearchAddrGrpId(request.getParameter("searchAddrGrpId"));
faxAddrAllVO.setSearchCondition(request.getParameter("searchCondition"));
faxAddrAllVO.setSearchKeyword(request.getParameter("searchKeyword"));
faxAddrAllVO.setStartKeyword(request.getParameter("startKeyword"));
List<FaxAddrVO> reaultaddrAllList = faxAddrService.selectFaxAddrList(faxAddrAllVO);
for(FaxAddrVO tmpAll : reaultaddrAllList) {
addrNmList.add(tmpAll.getAddrNm());
addrPhoneNoList.add(tmpAll.getAddrPhoneNo());
}
listCnt = reaultaddrAllList.size();
}
/* 목록을 가져 온다 */
Map<String, Object> faxDataViewMap = new HashMap<String, Object>();
if (null != userId && !userId.equals("")) {
faxDataViewMap = faxService.selectFaxDataView(userId);
}
//최근 전송내역
model.addAttribute("resultLatestMsgList", faxDataViewMap.get("resultLatestMsgList"));
//자주보내는 번호
model.addAttribute("resultBookMarkMsgList", faxDataViewMap.get("resultBookMarkMsgList"));
//사용자 보유 잔액
model.addAttribute("userMoney", faxDataViewMap.get("userMoney"));
//단가
model.addAttribute("faxPrice", faxDataViewMap.get("faxPrice"));
//주소록에서 전달 받은 주소록 정보
model.addAttribute("addrNmList", addrNmList);
model.addAttribute("addrPhoneNoList", addrPhoneNoList);
model.addAttribute("resultFaxAddrListCnt", listCnt);
model.addAttribute("moveAddrFlag", moveAddrFlag);
model.addAttribute("moveAddrAllFlag", moveAddrAllFlag);
return "/web/fax/faxDataView";
}
@RequestMapping(value= {"/web/mjon/fax/faxSendList.do"})
public String faxSendList(@ModelAttribute("searchVO") FaxGroupDataVO faxGroupDataVO
, ModelMap model) throws Exception{
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(StringUtils.isEmpty(userId)) {
return "redirect:/web/user/login/login.do";
}
model.addAttribute("loginVO", loginVO);
try {
/* 목록을 가져 온다 */
faxGroupDataVO.setUserId(userId);
Map<String, Object> faxSendListMap = faxService.selectFaxSendList(faxGroupDataVO);
// 전송내역
model.addAttribute("faxGroupListVO", faxSendListMap.get("faxGroupListVO"));
model.addAttribute("searchKeyword", faxSendListMap.get("searchKeyword"));
model.addAttribute("paginationInfo", faxSendListMap.get("paginationInfo"));
// 건수
model.addAttribute("totalEaSum" ,faxSendListMap.get("totalEaSum"));
// 대기 건수
model.addAttribute("holdEaSum" ,faxSendListMap.get("holdEaSum"));
// 성공 건수
model.addAttribute("sentEaSum" ,faxSendListMap.get("sentEaSum"));
// 실패 건수
model.addAttribute("errorEaSum" ,faxSendListMap.get("errorEaSum"));
// 기타 건수
model.addAttribute("unSendEaSum" ,faxSendListMap.get("unSendEaSum"));
} catch (Exception e) {
e.printStackTrace();
// TODO: handle exception
}
return "/web/fax/faxSendList";
}
/**
* @methodName : faxSendDetailList
* @author : 이호영
* @date : 2023.04.05
* @description : 상세 팝업
* @param faxGroupDataVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/fax/faxSendDetailPopup.do"})
public String faxSendDetailList(@ModelAttribute("searchVO") FaxGroupDataVO faxGroupDataVO
, ModelMap model) throws Exception{
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(StringUtils.isEmpty(userId)) {
return "redirect:/web/user/login/login.do";
}
model.addAttribute("loginVO", loginVO);
/** pageing */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(faxGroupDataVO.getPageIndex());
paginationInfo.setRecordCountPerPage(faxGroupDataVO.getPageUnit());
paginationInfo.setPageSize(faxGroupDataVO.getPageSize());
faxGroupDataVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
faxGroupDataVO.setLastIndex(paginationInfo.getLastRecordIndex());
faxGroupDataVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
//전체 발송 리스트 불러오기
/* 목록을 가져 온다 */
faxGroupDataVO.setUserId(userId);
Map<String, Object> resultMap = faxService.selectFaxSendDetailList(faxGroupDataVO);
// 전송내역
model.addAttribute("faxDetailListVO", resultMap.get("faxDetailListVO"));
model.addAttribute("paginationInfo", resultMap.get("paginationInfo"));
return "/web/fax/faxSendDetailPopup";
}
/**
* @methodName : pdfPreview
* @author : 이호영
* @date : 2023.04.06
* @description : pdf 미리보기 / [상세 팝업]문서보기
* @param response
* @param faxConvertVO
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/fax/pdfPreview.do"})
public void pdfPreview(HttpServletResponse response, FaxConvertVO faxConvertVO) throws Exception{
String pdfFileName = faxConvertVO.getFaxConvertFilePath();
if(pdfFileName.indexOf("/") < 0)
pdfFileName = FAX_CONVERT_FILE_PATH+"/" + pdfFileName;
PdfUtil.showPdf(response, pdfFileName);
}
/**
* @methodName : tifDownload
* @author : 이호영
* @date : 2023.04.06
* @description : tif 파일 다운로드
* @param response
* @param faxConvertVO
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/fax/tifDownload.do"})
public void tifDownload(HttpServletResponse response, FaxConvertVO faxConvertVO) throws Exception{
String fileInfo = faxConvertVO.getFaxConvertFilePath();
if(fileInfo.indexOf("/") < 0)
fileInfo = FAX_CONVERT_FILE_PATH+"/" + fileInfo;
FileUtil.downLoad(response, fileInfo, "");
}
/**
* @methodName : getExcelForFaxSendList
* @author : 이호영
* @date : 2023.04.07
* @description : 팩스 전송리스트 엑셀 다운로드
* @param faxGroupDataVO
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/fax/getExcelForFaxSendList.do"})
public void getExcelForFaxSendList( FaxGroupDataVO faxGroupDataVO) throws Exception{
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
/* 목록을 가져 온다 */
faxGroupDataVO.setUserId(userId);
faxService.getExcelForFaxSendList(faxGroupDataVO);
}
/**
* @methodName : printfaxSentDataAjax
* @author : 이호영
* @date : 2023.04.07
* @description : 팩스 전송결과 출력하기
* @param faxGroupDataVO
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/fax/printfaxSentDataAjax.do"})
public String printfaxSentDataAjax( FaxGroupDataVO faxGroupDataVO
, ModelMap model) throws Exception{
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
String userNm = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getName());
/* 목록을 가져 온다 */
faxGroupDataVO.setUserId(userId);
Map<String, Object> resultMap = faxService.printfaxSentDataAjax(faxGroupDataVO);
model.addAttribute("faxGroupListVO", resultMap.get("faxGroupListVO"));
model.addAttribute("dateMap", resultMap.get("dateMap"));
model.addAttribute("userNm", userNm);
return "web/fax/faxSentPrintListPopUp";
}
@RequestMapping(value= {"/web/mjon/fax/faxSendListAjax.do"})
public String faxSendListAjax(@ModelAttribute("searchVO") FaxGroupDataVO faxGroupDataVO
, ModelMap model) throws Exception{
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(StringUtils.isEmpty(userId)) {
return "redirect:/web/user/login/login.do";
}
model.addAttribute("loginVO", loginVO);
/* 목록을 가져 온다 */
faxGroupDataVO.setUserId(userId);
FaxGroupDataVO faxFileInfo = faxService.selectFaxSendDetailInfo(faxGroupDataVO);
// 전송내역
model.addAttribute("faxFileInfo", faxFileInfo);
return "/web/fax/faxSentListPopAjax";
}
}

View File

@ -1,220 +0,0 @@
package itn.let.fax.user.web;
import java.awt.image.BufferedImage;
import java.io.File;
import java.time.LocalDateTime;
import javax.annotation.Resource;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.rendering.ImageType;
import org.apache.pdfbox.rendering.PDFRenderer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import itn.com.cmm.JsonResult;
import itn.com.cmm.LoginVO;
import itn.com.cmm.util.FaxUtil;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.fax.user.service.FaxConvertMngVO;
import itn.let.fax.user.service.FaxConvertVO;
import itn.let.fax.user.service.FaxService;
import itn.let.fax.user.service.FaxTranVO;
import itn.let.mail.service.StatusResponse;
import itn.let.uss.umt.service.EgovUserManageService;
/**
*
* @author : 이호영
* @fileName : FaxRestController.java
* @date : 2023.03.20
* @description : 팩스 Rest Controller
* ===========================================================
* DATE AUTHOR NOTE
* ----------------------------------------------------------- *
* 2023.03.20 이호영 최초 생성
*
*
*
*/
@RestController
public class FaxRestController {
@Resource(name = "faxService")
private FaxService faxService;
/** userManageService */
@Resource(name = "userManageService")
private EgovUserManageService userManageService;
private static final Logger logger = LoggerFactory.getLogger(FaxRestController.class);
/**
* @methodName : selectMsgDataView
* @author : 이호영
* @date : 2023.02.07
* @description :
* @param cateCode
* @param request
* @param model
* @param redirectAttributes
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/fax/faxFileConvertAjax.do"})
public ResponseEntity<StatusResponse> selectMsgDataView(final MultipartHttpServletRequest multiRequest, FaxConvertMngVO faxMngVO) throws Exception{
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
// 로그인 안되어있음 return
if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now()));
faxMngVO.setUserId(userId);
try {
return ResponseEntity.ok().body(faxService.faxFileConvert(multiRequest, faxMngVO));
} catch (Exception e) {
e.printStackTrace();
// TODO: handle exception
return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "파일 변환중 에러가 발생하였습니다.", LocalDateTime.now()));
}
}
/**
* @methodName : findByConvertTbStatus
* @author : 이호영
* @date : 2023.03.13
* @description :
* @param faxConvertVO
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/fax/findByConvertTbStatus.do"})
public ResponseEntity<StatusResponse> findByConvertTbStatus(FaxConvertVO faxConvertVO) throws Exception{
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
// 로그인 안되어있음 return
if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now()));
System.out.println("faxConvertVO.getFaxConvertSeq() : "+ faxConvertVO.getFaxConvertSeq());
try {
return ResponseEntity.ok().body(faxService.findByConvertTbStatus(faxConvertVO.getFaxConvertSeq()));
} catch (Exception e) {
e.printStackTrace();
// TODO: handle exception
return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "파일 변환 체크 중 에러가 발생하였습니다.", LocalDateTime.now()));
}
}
/**
* @methodName : sendData
* @author : 이호영
* @date : 2023.03.21
* @description : 팩스 발송
* @param faxConvertVO
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/fax/sendData.do"})
public ResponseEntity<StatusResponse> sendData(FaxTranVO faxTranVO, HttpServletRequest request) throws Exception{
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
// 로그인 안되어있음 return
if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now()));
/**
* 회원 정지된 상태이면 팩스 발송이되지 않도록 처리
* */
boolean mberSttus = userManageService.selectUserStatusInfo(userId);
if(!mberSttus) {
request.getSession().invalidate();
return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "현재 고객님께서는 문자온 서비스 이용이 정지된 상태로 팩스를 발송하실 수 없습니다. 이용정지 해제를 원하시면 고객센터로 연락주시기 바랍니다.", LocalDateTime.now()));
}
try {
return ResponseEntity.ok().body(faxService.sendData(faxTranVO, userId));
// return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "임시 성공.", LocalDateTime.now()));
} catch (Exception e) {
e.printStackTrace();
// TODO: handle exception
return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "발송 요청 중 오류가 발생하였습니다.", LocalDateTime.now()));
}
}
/**
* @methodName : sendExelFilePhoneNumAjax
* @author : 이준호
* @date : 2023.03.20
* @description :
* @param multiRequest
* @return
* @throws Exception
*/
@RequestMapping(value = "/web/mjon/fax/sendExelFileFaxNumAjax.do")
public Object sendExelFileFaxNumAjax(final MultipartHttpServletRequest multiRequest) throws Exception {
JsonResult jr = FaxUtil.exelFileConvertForFax(multiRequest);
return jr;
}
/**
* @methodName : test
* @author : 이호영
* @date : 2023.04.06
* @description : pdf -> image 변환 추후 진행 예정
* @throws Exception
*/
@RequestMapping(value = "/web/mjon/fax/test.do")
public void test() throws Exception {
File file = new File("D:\\usr\\local\\tomcat\\file\\sht\\fax\\Convert\\00000000602.pdf");
PDDocument document = PDDocument.load(file);
try {
int pageCount = document.getNumberOfPages();
PDFRenderer pdfRenderer = new PDFRenderer(document);
System.out.println("pageCount : "+ pageCount);
for (int i = 0; i < pageCount; i++) {
BufferedImage imageObj = pdfRenderer.renderImageWithDPI(i, 100, ImageType.RGB);
File outputfile = new File("D:\\usr\\local\\tomcat\\file\\sht\\fax\\Convert\\images\\00000000602_"+i+".jpg");
ImageIO.write(imageObj, "jpg", outputfile);
}
} catch (Exception e) {
e.printStackTrace();
// TODO: handle exception
}finally {
if (document != null) {
document.close();
}
}
}
}

View File

@ -20,7 +20,6 @@ import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.ComDefaultCodeVO;
import itn.com.cmm.LoginVO;
import itn.com.cmm.service.EgovCmmUseService;
import itn.com.cmm.service.FileVO;
import itn.com.cmm.util.MJUtil;
import itn.com.cmm.util.StringUtil;
import itn.let.kakao.admin.kakaoAt.service.ChannelIDVO;
@ -33,8 +32,6 @@ import itn.let.kakao.kakaoComm.kakaoApi.service.KakaoApiService;
import itn.let.mjo.msg.service.MjonMsgResultCodeVO;
import itn.let.mjo.msg.service.MjonMsgService;
import itn.let.mjo.msg.service.MjonMsgVO;
import itn.let.mjo.reservmsg.service.MjonReservMsgService;
import itn.let.uss.umt.service.EgovMberCmpHstService;
import itn.let.uss.umt.service.EgovMberManageService;
import itn.let.uss.umt.service.MberManageVO;
import itn.let.utl.fcc.service.EgovStringUtil;
@ -69,14 +66,6 @@ public class MjonKakaoATController {
@Resource(name = "EgovCmmUseService")
private EgovCmmUseService cmmUseService;
@Resource(name = "egovMberCmpHstService")
private EgovMberCmpHstService egovMberCmpHstService;
@Resource(name = "MjonReservMsgService")
private MjonReservMsgService mjonReservMsgService;
/** mberManageService */
@Resource(name = "mberManageService")
private EgovMberManageService mberManageService;
@ -90,103 +79,6 @@ public class MjonKakaoATController {
@Autowired
KakaoApiTemplate kakaoApiTemplate;
/*
//문자발송테스트
@Resource(name = "mjonMsgSentTestService")
private MjonMsgSentTestService mjonMsgSentTestService;
//문자수신테스트
@Resource(name = "mjonMsgRecvTestService")
private MjonMsgRecvTestService mjonMsgRecvTestService;
/** EgovMessageSource */
/*
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
@Resource(name = "mjonPayService")
private MjonPayService mjonPayService;
@Resource(name = "certService")
private CertService certService;
//문자발송 서비스
@Resource(name = "MjonMsgDataService")
private MjonMsgDataService mjonMsgDataService;
@Resource(name = "MjonReservMsgService")
private MjonReservMsgService mjonReservMsgService;
@Resource(name="EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name="EgovFileMngService")
private EgovFileMngService fileMngService;
/** mberManageService */
/*
@Resource(name = "mberManageService")
private EgovMberManageService mberManageService;
/** 첨부파일 저장경로 */
/*
@Value("#{globalSettings['Globals.file.saveDir']}")
private String fileSaveDir;
/** userManageService */
/*
@Resource(name = "userManageService")
private EgovUserManageService userManageService;
*/
/*
//배열 정의{"컬럼순차번호, 컬럼이름, 컬럼내용, 컬럼이름에 붙여야할 내용(엑셀코드양식다운로드시 필요)"}
private String[][] sendMsgExcelValue ={
{"0" ,"번호" , "1" , "" },
{"1", "아이디" , "itn" , ""},
{"2", "발신번호" , "01012345678", ""},
{"3", "발송건수" , "3", ""},
{"4", "요청시간" , "2021-06-01 19:05:12", ""},
{"5", "내용" , "문자메시지 내용", ""},
{"6", "메시지타입" , "SMS전송", ""},
{"7", "접속기기" , "", ""},
{"8", "메시지타입" , "NPRO(아이하트)", ""}
};
//배열 정의{"컬럼순차번호, 컬럼이름, 컬럼내용, 컬럼이름에 붙여야할 내용(엑셀코드양식다운로드시 필요)"}
private String[][] sendMsgDtlExcelValue ={
{"0" ,"번호" , "1" , "" },
{"1", "아이디" , "itn" , ""},
{"2", "발신번호" , "01012345678", ""},
{"3", "수신번호" , "01012345678", ""},
{"4", "전송시간" , "2021-06-01 19:19:57", ""},
{"5", "내용" , "문자메시지 내용", ""},
{"6", "현재상태" , "결과수신", ""},
{"7", "처리결과" , "410/i", ""},
{"8", "메시지타입" , "SMS전송", ""},
{"9", "접속기기" , "", ""},
{"10", "메시지타입" , "NPRO(아이하트)", ""},
{"11", "통신사" , "ETC", ""} ,
{"12", "삭제여부" , "미삭제", ""}
} ;
//회원정보 팝업 최근 발송 문자 리스트 엑셀 다운로드
private String[][] sendMsgUsrExcelValue ={
{"0" ,"번호" , "1" , "" },
{"1", "아이디" , "itn" , ""},
{"2", "발신번호" , "01012345678", ""},
{"3", "요청시간" , "2021-06-01 19:05:12", ""},
{"4", "내용" , "문자메시지 내용", ""},
{"5", "문자종류" , "SMS전송", ""},
{"6", "건수" , "", ""},
{"7", "금액" , "", ""},
{"8", "발송결과" , "", ""},
{"9", "전송사" , "", ""}
};
*/
/**
* 알림톡전송 리스트
* @param searchVO
@ -1236,26 +1128,4 @@ public class MjonKakaoATController {
//return "cmm/uss/umt/EgovGnrlUserSelectMsgDataListPop";
}
//파일 이름을 이용하여 첨부파일 아이디(atchFileId), 첨부파일 순번(fileExtsn) 찾는 함수
private FileVO getFilePathToAtchFileId(String filePath) throws Exception{
//마지막 / 인덱스 +1을 기준으로 문자열을 짤라줌
String strFilePath = filePath.substring(filePath.lastIndexOf("/")+1);
FileVO returnFileVO = new FileVO();
//파일 이름과 확장자를 분리해줌
String[] arrFileNm = strFilePath.split("\\.");
String fileNm = arrFileNm[0];
String fileExtsn = arrFileNm[1];
FileVO fileVO = new FileVO();
fileVO.setStreFileNm(fileNm);
fileVO.setFileExtsn(fileExtsn);
returnFileVO = mjonReservMsgService.selectFileNmToAtchFileIdInfo(fileVO);
return returnFileVO;
}
}

View File

@ -21,32 +21,22 @@ import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.EgovMessageSource;
import itn.com.cmm.LoginVO;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.kakao.admin.kakaoAt.service.MjonKakaoATService;
import itn.let.kakao.admin.kakaoAt.service.MjonKakaoSampleTemplateService;
import itn.let.kakao.admin.kakaoAt.service.MjonKakaoSampleTemplateVO;
import itn.let.kakao.kakaoComm.KakaoVO;
import itn.let.kakao.kakaoComm.kakaoApi.KakaoApiImageUpload;
import itn.let.kakao.kakaoComm.kakaoApi.service.KakaoApiService;
import itn.let.mjo.msg.service.MjonMsgService;
import itn.let.mjo.symbol.service.MjonSymbolService;
import itn.let.mjo.symbol.service.MjonSymbolVO;
@Controller
public class MjonKakaoTemplateSampleController {
//알림톡
@Resource(name = "mjonKakaoATService")
private MjonKakaoATService mjonKakaoATService;
//알림톡
@Resource(name = "mjonKakaoSampleTemplateService")
private MjonKakaoSampleTemplateService mjonKakaoSampleTemplateService;
//문자발송
@Resource(name = "mjonMsgService")
private MjonMsgService mjonMsgService;
@Resource(name = "kakaoApiService")
private KakaoApiService kakaoApiService;

View File

@ -18,7 +18,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import itn.com.cmm.util.StringUtil;
import itn.let.kakao.kakaoComm.kakaoApi.KakaoApiJsonSave;
import itn.let.kakao.kakaoComm.kakaoApi.KakaoApiTemplate;
@ -45,9 +44,6 @@ public class KakaoSendUtil {
@Autowired
KakaoApiTemplate kakaoApiTemplate;
@Autowired
private PriceAndPoint priceAndPoint;
@Autowired
private MjonCommon mjonCommon;

View File

@ -1,406 +0,0 @@
package itn.let.kakao.user.kakaoAt.web;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import itn.com.cmm.EgovMessageSource;
import itn.com.cmm.LoginVO;
import itn.com.cmm.service.EgovCmmUseService;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.kakao.kakaoComm.KakaoReturnVO;
import itn.let.kakao.kakaoComm.KakaoVO;
import itn.let.kakao.kakaoComm.kakaoApi.KakaoApiProfile;
import itn.let.kakao.kakaoComm.kakaoApi.KakaoApiProfileCategory;
import itn.let.kakao.kakaoComm.kakaoApi.service.KakaoApiService;
import itn.let.kakao.user.kakaoAt.service.KakaoAlimTalkService;
import itn.let.uss.umt.service.EgovUserManageService;
@Controller
public class KakaoAlimTalkController {
@Resource(name = "EgovCmmUseService")
private EgovCmmUseService cmmUseService;
@Resource(name = "kakaoApiService")
private KakaoApiService kakaoApiService;
@Resource(name = "kakaoAlimTalkService")
private KakaoAlimTalkService kakaoAlimTalkService;
/** userManageService */
@Resource(name = "userManageService")
private EgovUserManageService userManageService;
/** EgovMessageSource */
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
@Autowired
KakaoApiProfile kakaoApiProfile;
@Autowired
KakaoApiProfileCategory kakaoApiProfileCategory;
// 카카오 발신 프로필 등록 페이지
@RequestMapping(value= {"/web/mjon/kakao/profile/selectKaKaoProfileList.do"})
public String selectKaKaoProfileList(KakaoVO paramKakaoVO, ModelMap model) throws Exception {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId == "") {
return "redirect:/web/user/login/login.do";
}
model.addAttribute("loginVO", loginVO);
/**
* 회원 정지된 상태이면 알림톡 설정화면으로 이동되지 않도록 처리
* */
boolean mberSttus = userManageService.selectUserStatusInfo(userId);
if(!mberSttus) {
return "redirect:/web/uat/uia/actionLogout.do";
}
KakaoVO kakaoVO = new KakaoVO();
kakaoVO.setUserId(userId);
kakaoVO.setCategoryDepth("1");
kakaoVO.setCategoryType("P");
List<KakaoVO> firstCatagoryList = kakaoApiService.selectKakaoCategory(kakaoVO);
model.addAttribute("firstCatagoryList", firstCatagoryList);
//사용자 등록 발신프로필 정보 조회해오기
List<KakaoVO> resultProfileList = kakaoApiService.selectKakaoProfileList(kakaoVO);
model.addAttribute("resultProfileList", resultProfileList);
List<KakaoReturnVO> resultApiProfileList = new ArrayList<KakaoReturnVO>();
for(int i=0; i < resultProfileList.size(); i++) {
KakaoVO kakaoProfileVO = new KakaoVO();
String senderKey = resultProfileList.get(i).getSenderKey();
String profileId = resultProfileList.get(i).getProfileId();
kakaoProfileVO.setSenderKey(senderKey);
kakaoProfileVO.setProfileId(profileId);
KakaoReturnVO tmpProfileVO = kakaoApiProfile.kakaoApiProfileList(kakaoProfileVO);
resultApiProfileList.add(tmpProfileVO);
}
model.addAttribute("resultApiProfileList", resultApiProfileList);
model.addAttribute("paramKakaoVO", paramKakaoVO);
return "/web/kakao/profile/KakaoProfileList";
}
// 발신프로필 카테고리 선택 조회
@RequestMapping(value= {"/web/mjon/kakao/profile/selectKakaoProfileCategoryAjax.do"})
public ModelAndView selectKakaoProfileCategoryAjax(
@ModelAttribute("kakaoVO") KakaoVO kakaoVO
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
kakaoVO.setCategoryType("P");
List<KakaoVO> selectCatagoryList = kakaoApiService.selectKakaoCategory(kakaoVO);
modelAndView.addObject("selectCatagoryList", selectCatagoryList);
return modelAndView;
}
// 카카오 발신 프로필 인증토큰 요청
@RequestMapping(value= {"/web/mjon/kakao/profile/kakaoApiProfileTokenSendAjax.do"})
public ModelAndView kakaoApiProfileTokenSendAjax(
KakaoVO kakaoVO
, ModelAndView modelAndView
) throws Exception {
//json 알림
modelAndView.setViewName("jsonView");
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
try {
KakaoReturnVO kakaoInfo = kakaoApiProfile.kakaoApiProfileToken(kakaoVO); //발신프로필 인증 토큰 요청하기
String bizReturnCd = kakaoInfo.getBizReturnCode();
String bizReturnMsg = kakaoInfo.getBizReturnMsg();
List<KakaoVO> delProfileList = new ArrayList<KakaoVO>();
if(bizReturnCd.equals("310") && bizReturnMsg.equals("이미 등록되어 있는 발신프로필 입니다")) {
kakaoVO.setUserId(userId);
delProfileList = kakaoAlimTalkService.selectDeleteProfileInfo(kakaoVO);
}
int listSize = delProfileList.size();
modelAndView.addObject("kakaoInfo", kakaoInfo);
modelAndView.addObject("result", "success");
modelAndView.addObject("delInfoCnt", listSize);
}catch(Exception ex){
ex.printStackTrace();
modelAndView.addObject("message", egovMessageSource.getMessage("fail.common.update"));
modelAndView.addObject("result", "fail");
return modelAndView;
}
return modelAndView;
}
// 삭제된 발신프로필 복구 해주기
@RequestMapping(value= {"/web/mjon/kakao/profile/updateKaKaoProfileStatusAjax.do"})
public ModelAndView updateKaKaoProfileStatusAjax(
@ModelAttribute("kakaoVO") KakaoVO kakaoVO
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
try {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId == "") {
modelAndView.addObject("result", "loginFail");
return modelAndView;
}else {
kakaoVO.setUserId(userId);
/*
* 기존에 등록된 발신프로필이라고 결과가 오는 경우 데이터베이스에서 삭제 기록을 조회해 본다.
* 삭제 기록이 있는 경우 복구를 해주고(deleteYn 값을 'N'으로 변경)
* 기록이 없는 경우 사이트에 등록되었을 있음.
*
* */
List<KakaoVO> delProfileList = new ArrayList<KakaoVO>();
delProfileList = kakaoAlimTalkService.selectDeleteProfileInfo(kakaoVO);
//삭제처리된 발신프로필이 있는 경우
if(delProfileList != null) {
int resultCnt = 0;
for(int i=0; i< delProfileList.size(); i++) {
KakaoVO tmpKakaoVO = new KakaoVO();
tmpKakaoVO.setUserId(userId);
tmpKakaoVO.setProfileId(delProfileList.get(i).getProfileId());
tmpKakaoVO.setDeleteYn("N");
int count = kakaoAlimTalkService.updateKakaoProfileStatus(tmpKakaoVO);
resultCnt = resultCnt + count;
}
KakaoReturnVO kakaoReturnVO = new KakaoReturnVO();
if(resultCnt > 0) {
kakaoReturnVO.setBizReturnCode("200");
kakaoReturnVO.setBizReturnMsg("삭제 발신프로필의 복구가 완료 되었습니다.");
modelAndView.addObject("kakaoInfo", kakaoReturnVO);
modelAndView.addObject("result", "success");
}else {
kakaoReturnVO.setBizReturnCode("200");
kakaoReturnVO.setBizReturnMsg("삭제 발신프로필의 복구에 오류가 발생하였습니다.");
modelAndView.addObject("kakaoInfo", kakaoReturnVO);
modelAndView.addObject("result", "zeroUpdate");
}
}else {//삭제된 내역이 없는 경우 사이트에 발신프로필이 등록되어 있을 있다.
modelAndView.addObject("message", "이미 등록된 채널ID 입니다. 타 사이트에 등록된 채널ID인지 확인 부탁드리겠습니다.");
modelAndView.addObject("result", "reuseFail");
}
}
}catch(Exception ex){
ex.printStackTrace();
modelAndView.addObject("message", egovMessageSource.getMessage("fail.common.update"));
modelAndView.addObject("result", "fail");
return modelAndView;
}
return modelAndView;
}
// 카카오 발신 프로필 카테고리 등록
@RequestMapping(value= {"/web/mjon/kakao/profile/kakaoApiProfileCreateAjax.do"})
public ModelAndView kakaoApiProfileCreateAjax(
@ModelAttribute("kakaoVO") KakaoVO kakaoVO
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
try {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId == "") {
modelAndView.addObject("result", "loginFail");
return modelAndView;
}else {
kakaoVO.setUserId(userId);
kakaoVO.setFrstRegisterId(userId);
kakaoVO.setLastUpdusrId(userId);
KakaoReturnVO kakaoInfo = kakaoApiProfile.kakaoApiProfileCreate(kakaoVO);
String bizReturnCd = kakaoInfo.getBizReturnCode();
String bizReturnMsg = kakaoInfo.getBizReturnMsg();
System.out.println(bizReturnCd);
System.out.println(bizReturnMsg);
/*
* 기존에 등록된 발신프로필이라고 결과가 오는 경우 데이터베이스에서 삭제 기록을 조회해 본다.
* 삭제 기록이 있는 경우 복구를 해주고(deleteYn 값을 'N'으로 변경)
* 기록이 없는 경우 사이트에 등록되었을 있음.
*
* */
List<KakaoVO> delProfileList = new ArrayList<KakaoVO>();
if((bizReturnCd.equals("509") && bizReturnMsg.equals("이미 사용중인 카카오톡 채널입니다.")) || (bizReturnCd.equals("310") && bizReturnMsg.equals("이미 등록되어 있는 발신프로필 입니다"))) {
delProfileList = kakaoAlimTalkService.selectDeleteProfileInfo(kakaoVO);
}
//삭제처리된 발신프로필이 있는 경우
if(delProfileList != null && delProfileList.size() > 0) {
int resultCnt = 0;
for(int i=0; i< delProfileList.size(); i++) {
KakaoVO tmpKakaoVO = new KakaoVO();
tmpKakaoVO.setUserId(userId);
tmpKakaoVO.setProfileId(delProfileList.get(i).getProfileId());
tmpKakaoVO.setDeleteYn("N");
int count = kakaoAlimTalkService.updateKakaoProfileStatus(tmpKakaoVO);
resultCnt = resultCnt + count;
}
KakaoReturnVO kakaoReturnVO = new KakaoReturnVO();
if(resultCnt > 0) {
kakaoReturnVO.setBizReturnCode("200");
kakaoReturnVO.setBizReturnMsg("삭제 발신프로필의 복구가 완료 되었습니다.");
modelAndView.addObject("kakaoInfo", kakaoReturnVO);
modelAndView.addObject("result", "success");
}else {
kakaoReturnVO.setBizReturnCode("200");
kakaoReturnVO.setBizReturnMsg("삭제 발신프로필의 복구에 오류가 발생하였습니다.");
modelAndView.addObject("kakaoInfo", kakaoReturnVO);
modelAndView.addObject("result", "zeroUpdate");
}
}else {//삭제된 내역이 없는 경우 사이트에 발신프로필이 등록되어 있을 있다.
modelAndView.addObject("kakaoInfo", kakaoInfo);
modelAndView.addObject("result", "success");
}
}
}catch(Exception ex){
ex.printStackTrace();
modelAndView.addObject("message", egovMessageSource.getMessage("fail.common.update"));
modelAndView.addObject("result", "fail");
return modelAndView;
}
return modelAndView;
}
// 카카오 발신 프로필 카테고리 등록
@RequestMapping(value= {"/web/mjon/kakao/profile/deleteKakaoProfileDataAjax.do"})
public ModelAndView deleteKakaoProfileDataAjax(
@ModelAttribute("kakaoVO") KakaoVO kakaoVO
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
try {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
int resultCnt = 0;
if(userId == "") {
modelAndView.addObject("result", "loginFail");
return modelAndView;
}else {
System.out.println(kakaoVO.getProfileId());
String[] arrProfileId = kakaoVO.getProfileId().split(",");
kakaoVO.setUserId(userId);
kakaoVO.setDeleteYn("Y");
if(arrProfileId.length > 0) {
for(String profileId : arrProfileId) {
kakaoVO.setProfileId(profileId);
int count = kakaoAlimTalkService.updateKakaoProfileStatus(kakaoVO);
resultCnt = resultCnt + count;
}
}
if(resultCnt > 0) {
modelAndView.addObject("resultCnt", resultCnt);
modelAndView.addObject("message", "발신프로필 삭제가 완료 되었습니다.");
modelAndView.addObject("result", "success");
}else {
modelAndView.addObject("resultCnt", resultCnt);
modelAndView.addObject("message", "삭제된 발신프로필이 없습니다.");
modelAndView.addObject("result", "zeroUpdate");
}
}
}catch(Exception ex){
ex.printStackTrace();
modelAndView.addObject("message", egovMessageSource.getMessage("fail.common.update"));
modelAndView.addObject("result", "fail");
return modelAndView;
}
return modelAndView;
}
}

View File

@ -1,761 +0,0 @@
package itn.let.kakao.user.kakaoFt.web;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import itn.com.cmm.EgovMessageSource;
import itn.com.cmm.LoginVO;
import itn.com.cmm.util.MJUtil;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.kakao.kakaoComm.KakaoSendUtil;
import itn.let.kakao.kakaoComm.KakaoVO;
import itn.let.kakao.kakaoComm.kakaoApi.service.KakaoApiService;
import itn.let.kakao.user.kakaoAt.service.KakaoAlimTalkService;
import itn.let.kakao.user.kakaoFt.service.KakaoFriendsTalkTemplateService;
import itn.let.mjo.mjocommon.MjonCommon;
import itn.let.mjo.mjocommon.MjonHolidayApi;
import itn.let.mjo.msgdata.service.MjonMsgDataService;
import itn.let.mjo.msgdata.service.MjonMsgDataVO;
import itn.let.mjo.msgdata.service.MjonMsgReturnVO;
import itn.let.mjo.msgholiday.service.MsgAlarmSetVO;
import itn.let.mjo.msgholiday.service.MsgHolidayService;
import itn.let.mjo.msgholiday.service.MsgHolidayVO;
import itn.let.mjo.symbol.service.MjonSymbolService;
import itn.let.mjo.symbol.service.MjonSymbolVO;
import itn.let.sym.site.service.EgovSiteManagerService;
import itn.let.sym.site.service.JoinSettingVO;
import itn.let.uss.umt.service.EgovUserManageService;
import itn.let.uss.umt.service.MberManageVO;
import itn.let.uss.umt.service.UserManageVO;
@Controller
public class KakaoFriendsTalkSendController {
@Resource(name = "egovMjonMsgGroupIdGnrService")
private EgovIdGnrService idgenMjonMsgGroupId;
/** EgovMessageSource */
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
@Resource(name = "mjonSymbolService")
private MjonSymbolService mjonSymbolService;
@Resource(name = "kakaoApiService")
private KakaoApiService kakaoApiService;
@Resource(name = "MjonMsgDataService")
private MjonMsgDataService mjonMsgDataService;
@Resource(name = "kakaoFriendsTalkTemplateService")
private KakaoFriendsTalkTemplateService kakaoFtTemplateService;
/** userManageService */
@Resource(name = "userManageService")
private EgovUserManageService userManageService;
@Resource(name = "kakaoAlimTalkService")
private KakaoAlimTalkService kakaoAlimTalkService;
/** 사이트 설정 */
@Resource(name = "egovSiteManagerService")
EgovSiteManagerService egovSiteManagerService;
@Resource(name = "MsgHolidayService")
private MsgHolidayService msgHolidayService;
@Autowired
KakaoSendUtil kakaoSendUtil;
/**
* @methodName : kakaoFriendsTalkMsgDataView
* @author : 우영두
* @date : 2024.01.05
* @description : kakaoFriendsTalkMsgDataView 카카오 친구톡 발송 화면
* @param kakaoVO
* @param model
* @param response
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/kakao/friendstalk/kakaoFriendsTalkMsgDataView.do"})
public String KakaoAlimtalkMsgDataView(ModelMap model
, @ModelAttribute("kakaoVO") KakaoVO kakaoVO) throws Exception {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String author = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getAuthority());
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
/*if(userId == "") {
return "redirect:/web/user/login/login.do";
}*/
model.addAttribute("loginVO", loginVO);
try {
if(!userId.equals("") && !author.equals("ROLE_ADMIN")) {
//사용자 등록 발신프로필 정보 조회해오기
kakaoVO.setUserId(userId);
List<KakaoVO> resultProfileList = kakaoApiService.selectKakaoProfileList(kakaoVO);
model.addAttribute("resultProfileList", resultProfileList);
// 특수문자 리스트 불러오기
MjonSymbolVO symbolVO = new MjonSymbolVO();
List<MjonSymbolVO> symbolList = mjonSymbolService.selectMjonSymbolList(symbolVO);
model.addAttribute("symbolList", symbolList);
//아이디 발신번호 리스트 불러오기.
List<String> resultSendPhonList = mjonMsgDataService.selectSendPhonNumList(userId);
List<String> resultPhonList = new ArrayList<String>();
MJUtil mjUtil = new MJUtil();
for(String phone : resultSendPhonList) {
resultPhonList.add(mjUtil.addDash(phone));
}
model.addAttribute("resultPhonList", resultPhonList);
MberManageVO mberManageVO = mjonMsgDataService.selectMberManageInfo(userId);
model.addAttribute("atSmishingYn", mberManageVO.getAtSmishingYn());
//3.사용자 개인단가 정보가 0이 아니면 개인단가 사용, 없으면 시스템 기본 단가 사용
/*Float shortPrice = mberManageVO.getShortPrice();
Float longPrice = mberManageVO.getLongPrice();
Float picturePrice = mberManageVO.getPicturePrice();
Float picture2Price = mberManageVO.getPicture2Price();
Float picture3Price = mberManageVO.getPicture3Price();*/
BigDecimal userMoney = new BigDecimal(mberManageVO.getUserMoney()).setScale(2, RoundingMode.HALF_EVEN);
model.addAttribute("userMoney", userMoney);
//////////////////////////////////////////////////////////////////
//최근 전송 내역
MjonMsgDataVO searchVO = new MjonMsgDataVO();
Calendar cal = Calendar.getInstance();
Date now = new Date();
SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
cal.setTime(now);
cal.add(Calendar.DATE, -3);
String chkDate = format.format(cal.getTime());
searchVO.setUserId(userId);
searchVO.setMyMsgStDt(chkDate); //검색 시작일 저장 - 현재날짜로 부터 3일 이전 날짜로 시작
model.addAttribute("resultLatestMsgList", mjonMsgDataService.selectLatestMsgList(searchVO));
//자주보내는 번호
model.addAttribute("resultBookMarkMsgList", mjonMsgDataService.selectBookMarkMsgList(searchVO));
// 사용자 정의 단가 정보 불러오기(시스템 단가 혹은 협의 단가)
model.addAttribute("sendPrice", kakaoSendUtil.selectSendPriceOfKakaoAtAndSmsAndMms(userId));
//사용자 템플릿 정보 조회
String friendId = kakaoVO.getFriendId();
KakaoVO resultTemplateVO = new KakaoVO();
if(friendId != null) {
resultTemplateVO = kakaoFtTemplateService.selectKakaoFriendsTemplateDetail(kakaoVO);
}
model.addAttribute("resultTemplateVO", resultTemplateVO);
//친구톡 발송시간 체크 하기 - 20:50 ~ 익일 08:00 사이에는 발송 금지
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date nows = new Date();
String nowDate = sdf1.format(nows);
cal.setTime(nows);
int hours = cal.get(Calendar.HOUR_OF_DAY);
int minuts = cal.get(Calendar.MINUTE);
boolean sendStatus = true;
if(hours >= 20) {
if(minuts >= 50) {
System.out.println("발송금지 시간" + hours + ":" + minuts);
sendStatus = false;
}
}
if(hours < 8) {
System.out.println("발송금지 시간" + hours + ":" + minuts);
sendStatus = false;
}
System.out.println("발송상태는 ::: "+sendStatus);
model.addAttribute("sendStatus", sendStatus);
}
} catch (Exception e) {
System.out.println(" kakaoFriendsTalkMsgDataViewDataRegist Error ::: " + e);
}
return "web/kakao/msgdata/ft/KakaoFriendsTalkMsgDataView";
}
/**
* @Method Name : selectSpamKakaoFriendsTalkMsgChkAjax
* @작성일 : 2024. 1. 15.
* @작성자 : 우영두
* @Method 설명 : 카카오 친구톡 전송시 스팸문구 확인 체크
*/
@RequestMapping(value= {"/web/mjon/kakao/friendstalk/selectSpamKakaoFriendsTalkMsgChkAjax.do"})
public ModelAndView selectSpamKakaoFriendsTalkMsgChkAjax(ModelMap model
, @ModelAttribute("kakaoVO") KakaoVO kakaoVO) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
try {
List<String> resultSpamTxt = mjonMsgDataService.selectSpamKeywordList();
System.out.println("친구톡 스팸 필터링");
if(resultSpamTxt == null) {
modelAndView.addObject("result", "listEmpty");
return modelAndView;
}else {
//변환변수 포함(Y) 미포함(N)
String spmFilterTxt = "";
if(kakaoVO.getTxtReplYn().equals("Y")) {
List<String[]> varValList = kakaoVO.getVarValList(); // value
String resultSpam = kakaoSendUtil.getKakaoFTCntRepToSpamFilter(varValList, resultSpamTxt, kakaoVO.getTemplateContent());
if(resultSpam.length() > 0) {
modelAndView.addObject("result", "spams");
return modelAndView;
}
if(kakaoVO.getSubMsgSendYn().equals("Y")) {
String resultSmsTxtSpam = kakaoSendUtil.getKakaoFTCntRepToSpamFilter(varValList, resultSpamTxt, kakaoVO.getSmsTxtArea());
if(resultSmsTxtSpam.length() > 0) {
modelAndView.addObject("result", "spams");
return modelAndView;
}
}
}else {//치환문자가 없는 경우 스팸 필터링
String resultSpam = kakaoSendUtil.getKakaoFTCntToSpamFilter(resultSpamTxt, kakaoVO.getTemplateContent());
if(resultSpam.length() > 0) {
modelAndView.addObject("result", "spams");
return modelAndView;
}
if(kakaoVO.getSubMsgSendYn().equals("Y")) {
String resultSmsTxtSpam = kakaoSendUtil.getKakaoFTCntToSpamFilter(resultSpamTxt, kakaoVO.getSmsTxtArea());
if(resultSmsTxtSpam.length() > 0) {
modelAndView.addObject("result", "spams");
return modelAndView;
}
}
}
}
}catch (Exception e) {
e.printStackTrace();
modelAndView.addObject("message", egovMessageSource.getMessage("fail.common.select"));
modelAndView.addObject("result", "fail");
return modelAndView;
}
return modelAndView;
}
/**
* @Method Name : kakaoFriendsTalkMsgSendAjax
* @작성일 : 2024. 1. 16.
* @작성자 : 우영두
* @Method 설명 : 카카오 친구톡 전송
*/
@RequestMapping(value= {"/web/mjon/kakao/friendstalk/kakaoFriendsTalkMsgSendAjax.do"})
public ModelAndView kakaoFriendsTalkMsgSendAjax(ModelMap model
, HttpServletRequest request
, @ModelAttribute("kakaoVO") KakaoVO kakaoVO) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
int resultSts = 0; //발송결과 건수
int resultBlockSts = 0; //수신거부 등록번호로 발송을 안한 건수
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
try {
if(userId == "") {
modelAndView.addObject("message", "로그인 후 이용이 가능합니다.");
modelAndView.addObject("result", "loginFail");
return modelAndView;
}else {
/**
* 회원 정지된 상태이면 알림톡 발송이 안되도록 처리함
* 현재 로그인 세션도 만료 처리함
* */
boolean mberSttus = userManageService.selectUserStatusInfo(userId);
if(!mberSttus) {
modelAndView.addObject("message", "현재 고객님께서는 문자온 서비스 이용이 정지된 상태로 알림톡을 발송하실 수 없습니다. 이용정지 해제를 원하시면 고객센터로 연락주시기 바랍니다.");
modelAndView.addObject("result", "authFail");
request.getSession().invalidate();
return modelAndView;
}
}
/** 카카오톡 전송 기본 설정 -------------------------------------------*/
kakaoVO.setSendType("FT");
kakaoVO.setMsgType("9");
kakaoVO.setUserId(userId);
/** 전송금액 설정 --------------------------------------------------*/
KakaoVO priceSet = kakaoSendUtil.kakaoFTSendPrice(kakaoVO);
if(priceSet.getResultCode() != null && priceSet.getResultCode().equals("2000")) {
modelAndView.addObject("message", "대체문자 치환 후 전송 문자 길이를 초과하였습니다.");
modelAndView.addObject("result", "fail");
return modelAndView;
}
BigDecimal befCash = new BigDecimal(priceSet.getBefCash()).setScale(2, RoundingMode.HALF_EVEN);
BigDecimal totMsgPrice = new BigDecimal(priceSet.getTotPrice()).setScale(2, RoundingMode.HALF_EVEN);
kakaoVO.setEachPrice(priceSet.getEachPrice());
kakaoVO.setBefCash(befCash.toString());
kakaoVO.setTotPrice(totMsgPrice.toString());
//현재 보유 금액이 발송 문자 금액보다 경우만 문자 발송
//BigDecimal 비교 연산
// befCash(현재 보유금액) 값이 totMsgPrice(문자전송 금액) 보다 많으면 문자 전송
if(befCash.compareTo(totMsgPrice) != -1) { // -1 : befCash < totMsgPrice, 0 : befCash = totMsgPrice, 1 : befCash > totMsgPrice,
kakaoVO.setMsgGroupId(idgenMjonMsgGroupId.getNextStringId()); // 문자 그룹ID 설정
/** 카카오톡 전송 분할 설정 ----------------------------------------------*/
String[] tempPhoneList = new String[200]; //임시 수신번호 리스트 저장용 배열
List<String[]> tempVarValList = new ArrayList<String[]>(); //임시 변수 리스트 저장용
String[] phoneList = kakaoVO.getCallToList();
List<String[]> varValList = null;
//치환문자 포함 여부
if(kakaoVO.getTxtReplYn().equals("Y")) {
varValList = kakaoVO.getVarValList();
}
System.out.println("+++++++++++++++++ 회원 스미싱 의심 온/오프 ::: "+kakaoVO.getAtSmishingYn());
//스팸 스미싱 여부 - 내용에 스팸 문자열 유무 체크
if(kakaoVO.getSpamStatus().equals("Y") || kakaoVO.getAtSmishingYn().equals("Y")) {
kakaoVO.setAtSmishingYn("Y");
}else {
kakaoVO.setAtSmishingYn("N");
}
//스미싱 의심이 아니면 delayYn 셋팅
if(kakaoVO.getAtSmishingYn().equals("N")) {
kakaoVO.setAtDelayYn("N");
}else {
kakaoVO.setAtDelayYn("Y");
}
//분할발송 여부 - 친구톡은 분할 발송이 없기애 N으로 픽스
kakaoVO.setDivideChk("N");
int callToListCnt = kakaoVO.getCallToList().length;
kakaoVO.setTotalCallCnt(callToListCnt);
/** 예약 문자인 경우 설정 ----------------------------------------------*/
//분할문자 시간에 간격시간 더해주기
String dividDay = null;
Calendar cal = Calendar.getInstance();
//예약시간 변환
SimpleDateFormat transFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
int turmMin = 0;
int totalCallCnt = 0; // 수신자 전체 갯수
int divideCnt = 0;
int count = 1; //분할 카운트
if(!kakaoVO.getReserveYn().equals("N")) {//예약문자인 경우 시간 셋팅
Date toDate = transFormat.parse(kakaoVO.getReqDate());
cal.setTime(toDate); //예약 시간 캘린터 변수에 입력
//turmMin = Integer.parseInt(kakaoVO.getDivideTime()); //분할발송 시간 간격
//dividDay = transFormat.format(cal.getTime());
totalCallCnt = kakaoVO.getCallToList().length; // 수신자 전체 갯수
//divideCnt = Integer.parseInt(kakaoVO.getDivideCnt()); //분할 발송 갯수
}
//분할 예약 시간 저장 리스트 생성
List<String> dividDayList = new ArrayList<String>();
if(callToListCnt > 200) {
int sendCnt = 0;
/** 카카오톡 전송 200개 이상일때 ----------------------------------------------*/
for(int i =0; i < callToListCnt; i++) {
//분할 발송을 체크 경우
/*if(kakaoVO.getDivideChk().equals("Y")) {
if(count > divideCnt) {
count = 1;
cal.add(Calendar.MINUTE, turmMin); //분할 시간 간격을 증가시켜 준다.
dividDay = transFormat.format(cal.getTime());
dividDayList.add(dividDay);
count++;
}else {
dividDayList.add(dividDay);
count++;
}
}*/
if((i < callToListCnt -1) && sendCnt == 199) {
tempPhoneList[sendCnt] = phoneList[i];
if(varValList != null) {
tempVarValList.add(varValList.get(i));
}
List<String> arrPhoneList = new ArrayList<String>();
for(String temp : tempPhoneList) {
if(temp != null) {
arrPhoneList.add(temp);
}
}
String[] sendPhoneList = new String[arrPhoneList.size()];
for(int j=0; j< arrPhoneList.size(); j++) {
sendPhoneList[j] = arrPhoneList.get(j);
}
/** 카카오톡 전송 메시지 설정 ----------------------------------------------*/
kakaoVO.setCallToList(sendPhoneList);
kakaoVO.setVarValList(tempVarValList);
KakaoVO kakaoSendMsgSet = kakaoSendUtil.kakaoFTSendMsg(kakaoVO);
kakaoVO.setKakaoSendList(kakaoSendMsgSet.getKakaoSendList());
/** 카카오톡 발송 처리 --------------------------------------------------*/
kakaoVO.setDividDay(dividDayList);
MjonMsgReturnVO returnVO = kakaoAlimTalkService.insertKakaoFtSendAjax(kakaoVO);
resultSts = resultSts + Integer.parseInt(returnVO.getSendMsgCnt());
//전송 초기화
sendCnt = 0;
Arrays.fill(tempPhoneList, null);
tempVarValList.clear();
dividDayList.clear();
}else if((i == callToListCnt -1) && sendCnt < 200){//200개의 마지막일 경우 처리
tempPhoneList[sendCnt] = phoneList[i];
if(varValList != null) {
tempVarValList.add(varValList.get(i));
}
List<String> arrPhoneList = new ArrayList<String>();
for(String temp : tempPhoneList) {
if(temp != null) {
arrPhoneList.add(temp);
}
}
String[] sendPhoneList = new String[arrPhoneList.size()];
for(int j=0; j< arrPhoneList.size(); j++) {
sendPhoneList[j] = arrPhoneList.get(j);
}
/** 카카오톡 전송 메시지 설정 ----------------------------------------------*/
kakaoVO.setCallToList(sendPhoneList);
kakaoVO.setVarValList(tempVarValList);
KakaoVO kakaoSendMsgSet = kakaoSendUtil.kakaoFTSendMsg(kakaoVO);
kakaoVO.setKakaoSendList(kakaoSendMsgSet.getKakaoSendList());
kakaoVO.setKakaoSubMagOrgnlTxt(kakaoSendMsgSet.getKakaoSubMagOrgnlTxt());
/** 카카오톡 발송 처리 --------------------------------------------------*/
kakaoVO.setDividDay(dividDayList);
MjonMsgReturnVO returnVO = kakaoAlimTalkService.insertKakaoFtSendAjax(kakaoVO);
resultSts = resultSts + Integer.parseInt(returnVO.getSendMsgCnt());
}else {//198개가 될때까지 배열에 데이터를 쌓는다
tempPhoneList[sendCnt] = phoneList[i];
if(varValList != null && varValList.get(i).length > 0) {
tempVarValList.add(varValList.get(i));
}
sendCnt++;
}
}
}else {
/** 카카오톡 전송 200개 미만일때 ----------------------------------------------*/
//분할 발송을 체크 경우
/*if(kakaoVO.getDivideChk().equals("Y")) {
for(int i =0; i < callToListCnt; i++) {
if(count > divideCnt) {
count = 1;
cal.add(Calendar.MINUTE, turmMin); //분할 시간 간격을 증가시켜 준다.
dividDay = transFormat.format(cal.getTime());
dividDayList.add(dividDay);
count++;
}else {
dividDayList.add(dividDay);
count++;
}
}
}*/
/** 카카오톡 전송 메시지 설정 ----------------------------------------------*/
KakaoVO kakaoSendMsgSet = kakaoSendUtil.kakaoFTSendMsg(kakaoVO);
kakaoVO.setKakaoSendList(kakaoSendMsgSet.getKakaoSendList());
kakaoVO.setKakaoSubMagOrgnlTxt(kakaoSendMsgSet.getKakaoSubMagOrgnlTxt());
/** 카카오톡 발송 처리 --------------------------------------------------*/
kakaoVO.setDividDay(dividDayList);
MjonMsgReturnVO returnVO = kakaoAlimTalkService.insertKakaoFtSendAjax(kakaoVO);
resultSts = Integer.parseInt(returnVO.getSendMsgCnt());
}
/** 카카오톡 결과 처리 --------------------------------------------------*/
}else {
modelAndView.addObject("message", "친구톡 발송에 필요한 보유 잔액이 부족 합니다.");
modelAndView.addObject("result", "fail");
return modelAndView;
}
} catch (Exception e) {
System.out.println("kakaoFriendsTalkMsgSendAjax Controller Error !!!! "+e);
modelAndView.addObject("message", egovMessageSource.getMessage("fail.common.update"));
modelAndView.addObject("result", "fail");
return modelAndView;
}
modelAndView.addObject("message", "친구톡 전송이 완료되었습니다.");
modelAndView.addObject("result", "success");
modelAndView.addObject("resultSts", resultSts);
/** 카카오 친구톡 발송 내용 법인폰, 친구톡 결과 처리 --------------------------------------------------*/
try {
String adminSmsNoticeYn = "Y";
String spamStatus = kakaoVO.getAtSmishingYn(); // 스미싱 의심으로 체크된 고객 정보
UserManageVO userManageVO = new UserManageVO();
userManageVO.setMberId(userId);
if(!userId.equals("")) {
userManageVO = userManageService.selectAdminSmsNoticeYn(userManageVO);
adminSmsNoticeYn = userManageVO.getAdminSmsNoticeYn();
}
//법인폰 알림 이거나 스미싱의심 문자인 경우 법인폰으로 발송
if(adminSmsNoticeYn.equals("Y") || spamStatus.equals("Y")) {
if(spamStatus.equals("Y")) {
kakaoVO.setAtDelayYn("Y");
}
// 법인폰 알람여부 체크
JoinSettingVO joinSettingVO = new JoinSettingVO();
joinSettingVO = egovSiteManagerService.selectAdminNotiDetail();
String holiSmishingNoti = joinSettingVO.getHoliSmishingNoti();
//야간 스미싱의심 알림이 활성화 되어있는 경우 예외 알림 시간대가 아닌경우 슬랙 알림 발송 처리한다.
if(holiSmishingNoti.equals("Y")) {
// SLACK 체크
if (joinSettingVO != null && joinSettingVO.getSlackNoti().equals("Y")) {
MsgAlarmSetVO msgAlarmSetVO = new MsgAlarmSetVO();
msgAlarmSetVO.setUseYn("Y");
msgAlarmSetVO.setFirstIndex(0);
List<MsgAlarmSetVO> resultAlarmList = msgHolidayService.selectAlarmSettingList(msgAlarmSetVO);
Calendar calendar = Calendar.getInstance();
int year = calendar.get(Calendar.YEAR);
MsgHolidayVO msgHolidayVO = new MsgHolidayVO();
msgHolidayVO.setFirstIndex(0);
msgHolidayVO.setRecordCountPerPage(100);
msgHolidayVO.setSearchHoliYear(Integer.toString(year));
List<MsgHolidayVO> resultHolidayList = msgHolidayService.selectMsgHolidayList(msgHolidayVO);
MjonHolidayApi mjonHolidayApi = new MjonHolidayApi();
boolean smishingAlarmPassSts = mjonHolidayApi.getHolidaySmishingPassStatus(resultAlarmList, resultHolidayList);
if(!smishingAlarmPassSts) {//평일,주말, 공휴일 알림설정 시간에 포함되지 않는 경우 슬랙 알림 발송
MjonCommon comm = new MjonCommon();
// comm.getAdminKakaoAtSendSlack(kakaoVO);
}
}
}
// SLACK 체크
/*if (joinSettingVO != null && joinSettingVO.getSlackNoti().equals("Y")) {
//Slack으로 메세지 전송 처리
MjonCommon comm = new MjonCommon();
comm.getAdminKakaoAtSandSlack(kakaoVO);
}*/
}
} catch (Exception e) {
throw new Exception("++++++++++++++++++++++ getAdminPhoneSendMsgData Error !!! " + e);
}
return modelAndView;
}
/**
* @Method Name : kakaoFriendsTalkMsgSendRefundTestAjax
* @작성일 : 2024. 1. 18.
* @작성자 : 우영두
* @Method 설명 : 카카오 친구톡 전송 환불 스케줄러 서비스 테스트
*/
@RequestMapping(value= {"/web/mjon/kakao/friendstalk/kakaoFriendsTalkMsgSendRefundTestAjax.do"})
public ModelAndView kakaoFriendsTalkMsgSendRefundTestAjax(ModelMap model
, HttpServletRequest request
, @ModelAttribute("kakaoVO") KakaoVO kakaoVO) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
kakaoAlimTalkService.selectKakaoFtSentRefundList();
modelAndView.addObject("result", "success");
return modelAndView;
}
/**
* @Method Name : kakaoFriendsTalkMsgSendRefundTestAjax
* @작성일 : 2024. 1. 18.
* @작성자 : 우영두
* @Method 설명 : 카카오 친구톡 전송 환불 스케줄러 서비스 테스트
*/
@RequestMapping(value= {"/web/mjon/kakao/friendstalk/selectKakaoFriendsTalkTestSendPopup.do"})
public String selectKakaoFriendsTalkTestSendPopup(ModelMap model
, @ModelAttribute("kakaoVO") KakaoVO kakaoVO) throws Exception {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId == "") {
return "redirect:/web/user/login/login.do";
}else {
//1.시스템 기본 단가 정보 불러오기
JoinSettingVO sysJoinSetVO = mjonMsgDataService.selectJoinSettingInfo();
//2.사용자 개인 단가 정보 불러오기
MberManageVO mberManageVO = mjonMsgDataService.selectMberManageInfo(userId);
Float kakaoFtPrice = mberManageVO.getKakaoFtPrice();
if(kakaoFtPrice < 1) {
kakaoFtPrice = sysJoinSetVO.getKakaoFtPrice();
}
BigDecimal userMoney = new BigDecimal(mberManageVO.getUserMoney()).setScale(2, RoundingMode.HALF_EVEN);
model.addAttribute("userMoney", userMoney);
model.addAttribute("kakaoFtPrice", kakaoFtPrice);
}
String tmpContents = kakaoVO.getTemplateContent();
String txtReplYn = kakaoVO.getTxtReplYn();
if(txtReplYn.equals("Y")) {
String[] varValStr = kakaoVO.getVarValList().get(0);
tmpContents = kakaoSendUtil.getKakaoFTCntReplace(varValStr[0], tmpContents);
kakaoVO.setTemplateContent(tmpContents);
}
model.addAttribute("kakaoVO", kakaoVO);
return "web/kakao/msgdata/ft/KakaoFriendsTalkMsgDataTestPop";
}
}

View File

@ -1,667 +0,0 @@
package itn.let.kakao.user.kakaoFt.web;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.EgovMessageSource;
import itn.com.cmm.LoginVO;
import itn.com.cmm.service.EgovCmmUseService;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.kakao.kakaoComm.KakaoReturnVO;
import itn.let.kakao.kakaoComm.KakaoVO;
import itn.let.kakao.kakaoComm.kakaoApi.KakaoApiImageUpload;
import itn.let.kakao.kakaoComm.kakaoApi.KakaoApiProfile;
import itn.let.kakao.kakaoComm.kakaoApi.KakaoApiProfileCategory;
import itn.let.kakao.kakaoComm.kakaoApi.KakaoApiTemplate;
import itn.let.kakao.kakaoComm.kakaoApi.KakaoFTJsonSave;
import itn.let.kakao.kakaoComm.kakaoApi.service.KakaoApiService;
import itn.let.kakao.user.kakaoFt.service.KakaoFriendsTalkTemplateService;
import itn.let.mjo.symbol.service.MjonSymbolService;
import itn.let.mjo.symbol.service.MjonSymbolVO;
import itn.let.uss.umt.service.EgovUserManageService;
@Controller
public class KakaoFriendsTalkTemplateController {
@Resource(name = "kakaoFriendsTalkTemplateService")
private KakaoFriendsTalkTemplateService kakaoFtTemplateService;
@Resource(name = "EgovCmmUseService")
private EgovCmmUseService cmmUseService;
@Resource(name = "kakaoApiService")
private KakaoApiService kakaoApiService;
/** EgovMessageSource */
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
@Resource(name = "mjonSymbolService")
private MjonSymbolService mjonSymbolService;
/** userManageService */
@Resource(name = "userManageService")
private EgovUserManageService userManageService;
@Autowired
KakaoApiProfile kakaoApiProfile;
@Autowired
KakaoApiProfileCategory kakaoApiProfileCategory;
@Autowired
KakaoApiTemplate kakaoApiTemplate;
@Autowired
KakaoApiImageUpload kakaoApiImageUpload;
@Autowired
KakaoFTJsonSave kakaoFTJsonSave;
/**
* @methodName : selectKakaoFriendsTemplateDataRegist
* @author : 우영두
* @date : 2023.03.20
* @description : selectKakaoFriendsTemplateDataRegist 카카오 친구톡 템플릿 등록 화면
* @param kakaoVO
* @param model
* @param response
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/kakao/template/selectKakaoFriendsTemplateDataRegist.do"})
public String selectKakaoFriendsTemplateDataRegist(
@ModelAttribute("kakaoVO") KakaoVO kakaoVO, ModelMap model, HttpServletResponse response
) throws Exception {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId == "") {
return "redirect:/web/user/login/login.do";
}
model.addAttribute("loginVO", loginVO);
try {
//사용자 등록 발신프로필 정보 조회해오기
kakaoVO.setUserId(userId);
List<KakaoVO> resultProfileList = kakaoApiService.selectKakaoProfileList(kakaoVO);
model.addAttribute("resultProfileList", resultProfileList);
// 특수문자 리스트 불러오기
MjonSymbolVO symbolVO = new MjonSymbolVO();
List<MjonSymbolVO> symbolList = mjonSymbolService.selectMjonSymbolList(symbolVO);
model.addAttribute("symbolList", symbolList);
} catch (Exception e) {
System.out.println(" selectKakaoFriendsTemplateDataRegist Error ::: " + e);
}
return "/web/kakao/template/ft/KakaoFriendstalkTemplateRegist";
}
// 카카오 친구톡 이미지 등록요청
/**
* @methodName : sendKakaoFriendsTemplateImageUploadAjax
* @author : 우영두
* @date : 2023.03.20
* @description : sendKakaoFriendsTemplateImageUploadAjax 카카오 친구톡 이미지 등록요청
* @param kakaoVO
* @param model
* @param response
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/kakao/template/sendKakaoFriendsTemplateImageUploadAjax.do"})
public ModelAndView sendKakaoFriendsTemplateImageUploadAjax(
@ModelAttribute("kakaoVO") KakaoVO kakaoVO
, final MultipartHttpServletRequest multiRequest
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
try {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId == "") {
modelAndView.addObject("result", "loginFail");
return modelAndView;
}else {
final Map<String, MultipartFile> files = multiRequest.getFileMap();
if (!files.isEmpty()){
Map<String, String> resultMap = kakaoApiImageUpload.kakaoApiImageUpload(kakaoVO, files, 0);
//테스트
modelAndView.addObject("code", resultMap.get("code"));
modelAndView.addObject("msg", resultMap.get("msg"));
modelAndView.addObject("imgUrl", resultMap.get("imgUrl"));
}
modelAndView.addObject("result", "success");
}
}catch(Exception ex){
ex.printStackTrace();
modelAndView.addObject("message", egovMessageSource.getMessage("fail.common.update"));
modelAndView.addObject("result", "fail");
return modelAndView;
}
return modelAndView;
}
// 카카오 친구톡 템플릿 등록요청
/**
* @methodName : insertKakaoFriendsTemplateDataAjax
* @author : 우영두
* @date : 2023.03.22
* @description : insertKakaoFriendsTemplateDataAjax 카카오 친구톡 템플릿 등록요청
* @param kakaoVO
* @param model
* @param response
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/kakao/template/insertKakaoFriendsTemplateDataAjax.do"})
public ModelAndView insertKakaoFriendsTemplateDataAjax(
@ModelAttribute("kakaoVO") KakaoVO kakaoVO
, final MultipartHttpServletRequest multiRequest
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
try {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId == "") {
modelAndView.addObject("result", "loginFail");
return modelAndView;
}else {
kakaoVO.setUserId(userId);
kakaoVO.setUserCallbackYn(userId);
kakaoVO.setFrstRegisterId(userId);
kakaoVO.setLastUpdusrId(userId);
kakaoVO.setSendType("FT");
String imgUrl = kakaoVO.getTemplateImageUrl();
int buttonSize = kakaoVO.getButtonVOList().size();
if(!imgUrl.equals("") || buttonSize > 0) {
//json 파일 생성 처리
String resultJsonPath = kakaoFTJsonSave.kakaoApiJsonSave(kakaoVO);
kakaoVO.setBizJsonName(resultJsonPath);
}
int result = kakaoFtTemplateService.insertKakaoFriendsTemplateData(kakaoVO);
if(result > 0) {
modelAndView.addObject("result", "success");
}else {
modelAndView.addObject("result", "fail");
}
}
}catch(Exception ex){
ex.printStackTrace();
modelAndView.addObject("message", egovMessageSource.getMessage("fail.common.update"));
modelAndView.addObject("result", "fail");
return modelAndView;
}
return modelAndView;
}
/**
* @methodName : deleteKakaoFriendsImageDataAjax
* @author : 우영두
* @date : 2023.03.23
* @description : deleteKakaoFriendsImageDataAjax 카카오 친구톡 이미지 삭제요청
* @param kakaoVO
* @param model
* @param response
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/kakao/template/deleteKakaoFriendsImageDataAjax.do"})
public ModelAndView deleteKakaoFriendsImageDataAjax(
@ModelAttribute("kakaoVO") KakaoVO kakaoVO
, final MultipartHttpServletRequest multiRequest
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
try {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId == "") {
modelAndView.addObject("result", "loginFail");
return modelAndView;
}else {
KakaoReturnVO result = kakaoApiImageUpload.kakaoApiImageDelete(kakaoVO);
String code = result.getBizReturnCode();
if(code.equals("200")) {//이미지 삭제 성공시 템플릿 디비에 있는 이미지 정보도 함께 지워준다.
kakaoVO.setUserId(userId);
kakaoVO.setLastUpdusrId(userId);
kakaoFtTemplateService.updateKakaoFriendsTemplateImageDataDel(kakaoVO);
}
modelAndView.addObject("code", result.getBizReturnCode());
modelAndView.addObject("msg", result.getBizReturnMsg());
modelAndView.addObject("result", "success");
}
}catch(Exception ex){
ex.printStackTrace();
modelAndView.addObject("message", egovMessageSource.getMessage("fail.common.update"));
modelAndView.addObject("result", "fail");
return modelAndView;
}
return modelAndView;
}
/**
* @methodName : selectKakaoFriendsTemplateList
* @author : 우영두
* @date : 2023.03.23
* @description : selectKakaoFriendsTemplateList 카카오 친구톡 템플릿 리스트 화면
* @param kakaoVO
* @param model
* @param response
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/kakao/template/selectKakaoFriendsTemplateList.do"})
public String selectKakaoFriendsTemplateList(@ModelAttribute("searchVO") KakaoVO searchVO,
HttpServletRequest request ,
ModelMap model) throws Exception{
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId == "") {
return "redirect:/web/user/login/login.do";
}
model.addAttribute("loginVO", loginVO);
try {
/**
* 회원 정지된 상태이면 알림톡 템플릿 등록 화면으로 이동되지 않도록 처리
* */
boolean mberSttus = userManageService.selectUserStatusInfo(userId);
if(!mberSttus) {
return "redirect:/web/uat/uia/actionLogout.do";
}
//사용자 등록 발신프로필 정보 조회해오기
searchVO.setUserId(userId);
List<KakaoVO> resultProfileList = kakaoApiService.selectKakaoProfileList(searchVO);
model.addAttribute("resultProfileList", resultProfileList);
if(resultProfileList.size() > 0) {
model.addAttribute("profileYellowId", resultProfileList.get(0).getYellowId());
model.addAttribute("profileSenderkey", resultProfileList.get(0).getSenderKey());
}
} catch (Exception e) {
System.out.println("selectKakaoFriendsTemplateList Controller Error !!! " + e);
}
return "/web/kakao/template/ft/KakaoFriendstalkTemplateList";
}
/**
* @methodName : selectKakaoFriendsTemplateListAjax
* @author : 우영두
* @date : 2023.03.23
* @description : selectKakaoFriendsTemplateListAjax 카카오 친구톡 템플릿 하단 리스트 정보 조회
* @param kakaoVO
* @param model
* @param response
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/kakao/template/selectKakaoFriendsTemplateListAjax.do"})
public String selectKakaoFriendsTemplateListAjax(@ModelAttribute("searchVO") KakaoVO searchVO,
HttpServletRequest request ,
ModelMap model) throws Exception{
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId == "") {
return "redirect:/uat/uia/EgovLoginUsr.do";
}
try {
/** pageing */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(9);
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(9);
if("".equals(searchVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
searchVO.setSearchSortCnd("FRIEND_ID");
searchVO.setSearchSortOrd("desc");
}
List<KakaoVO> kakaoTemplateInfoList = new ArrayList<KakaoVO>();
// 문자발송 완료건은 모두 보이도록 처리
searchVO.setUserId(userId);
kakaoTemplateInfoList = kakaoFtTemplateService.selectKakaoFriendsTemplateList(searchVO);
model.addAttribute("kakaoTemplateInfoList", kakaoTemplateInfoList);
model.addAttribute("searchVO", searchVO);
paginationInfo.setTotalRecordCount(kakaoTemplateInfoList.size() > 0 ? ((KakaoVO)kakaoTemplateInfoList.get(0)).getTotCnt() : 0);
model.addAttribute("paginationInfo", paginationInfo);
} catch (Exception e) {
System.out.println("selectKakaoFriendsTemplateListAjax Controller Error !!! " + e);
}
return "/web/kakao/template/ft/KakaoFriendstalkTemplateListAjax";
}
/**
* @Method Name : deleteKakaoFriendstalkTemplateAjax
* @Project : mjon
* @Date : 2023. 3. 24.
* @작성자 : 우영두
* @프로그램 설명 :카카오 친구톡 템플릿 삭제 처리
*/
@RequestMapping(value= {"/web/mjon/kakao/template/deleteKakaoFriendstalkTemplateAjax.do"})
public ModelAndView deleteKakaoFriendstalkTemplateAjax(
@ModelAttribute("kakaoVO") KakaoVO kakaoVO
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
try {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
int resultCnt = 0;
int resultFailCnt = 0;
String returnMessage = "";
if(userId == "") {
modelAndView.addObject("result", "notLogin");
return modelAndView;
}else {
//화면에서 넘어온 템플릿 코드 값을 배열로 저장
String[] arrTemplateCode = kakaoVO.getArrTemplateCode();
// 배열의 템플릿 코드 값으로 검수 요청 처리
for(String tmpId : arrTemplateCode) {
kakaoVO.setFriendId(tmpId);
kakaoVO.setUserId(userId);
int cnt = kakaoFtTemplateService.deleteKakaoFriendstalkTemplate(kakaoVO);
if(cnt > 0) {
resultCnt++;
}else {
resultFailCnt++;
}
}
if(resultCnt > 0 && resultFailCnt == 0) {
modelAndView.addObject("result", "success");
modelAndView.addObject("resultCnt", resultCnt);
modelAndView.addObject("resultFailCnt", resultFailCnt);
modelAndView.addObject("message", "친구톡 템플릿 삭제가 완료되었습니다.");
}else if(resultCnt == 0 && resultFailCnt == 0){
modelAndView.addObject("result", "success");
modelAndView.addObject("resultCnt", resultCnt);
modelAndView.addObject("resultFailCnt", resultFailCnt);
modelAndView.addObject("message", "친구톡 템플릿 삭제에 오류가 발생하였습니다.");
}else {
modelAndView.addObject("result", "success");
modelAndView.addObject("resultCnt", resultCnt);
modelAndView.addObject("resultFailCnt", resultFailCnt);
modelAndView.addObject("message", "친구톡 템플릿 삭제가 완료되었습니다.");
}
}
}catch(Exception ex){
ex.printStackTrace();
modelAndView.addObject("message", egovMessageSource.getMessage("fail.common.update"));
modelAndView.addObject("result", "fail");
return modelAndView;
}
return modelAndView;
}
/**
* @methodName : selectKakaoFriendsTemplateDataDetail
* @author : 우영두
* @date : 2024.01.04
* @description : selectKakaoFriendsTemplateDataDetail 카카오 친구톡 템플릿 상세 화면
* @param kakaoVO
* @param model
* @param response
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/kakao/template/selectKakaoFriendsTemplateDataDetail.do"})
public String selectKakaoFriendsTemplateDataDetail(
@ModelAttribute("kakaoVO") KakaoVO kakaoVO, ModelMap model, HttpServletResponse response
) throws Exception {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId == "") {
return "redirect:/web/user/login/login.do";
}
model.addAttribute("loginVO", loginVO);
try {
//사용자 등록 발신프로필 정보 조회해오기
kakaoVO.setUserId(userId);
List<KakaoVO> resultProfileList = kakaoApiService.selectKakaoProfileList(kakaoVO);
model.addAttribute("resultProfileList", resultProfileList);
// 특수문자 리스트 불러오기
MjonSymbolVO symbolVO = new MjonSymbolVO();
List<MjonSymbolVO> symbolList = mjonSymbolService.selectMjonSymbolList(symbolVO);
model.addAttribute("symbolList", symbolList);
KakaoVO resultTemplateVO = kakaoFtTemplateService.selectKakaoFriendsTemplateDetail(kakaoVO);
System.out.println("++++++++++++++++++ templateCode ::: "+kakaoVO.getFriendId());
System.out.println("++++++++++++++++++ senderKey ::: "+kakaoVO.getSenderKey());
model.addAttribute("resultTemplateVO", resultTemplateVO);
} catch (Exception e) {
System.out.println(" selectKakaoFriendsTemplateDataDetail Error ::: " + e);
}
return "/web/kakao/template/ft/KakaoFriendstalkTemplateDetail";
}
// 카카오 친구톡 템플릿 수정요청
/**
* @methodName : updateKakaoFriendsTemplateDataAjax
* @author : 우영두
* @date : 2024.01.05
* @description : updateKakaoFriendsTemplateDataAjax 카카오 친구톡 템플릿 수정요청
* @param kakaoVO
* @param model
* @param response
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/kakao/template/updateKakaoFriendsTemplateDataAjax.do"})
public ModelAndView updateKakaoFriendsTemplateDataAjax(
@ModelAttribute("kakaoVO") KakaoVO kakaoVO
, final MultipartHttpServletRequest multiRequest
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
try {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId == "") {
modelAndView.addObject("result", "loginFail");
return modelAndView;
}else {
kakaoVO.setUserId(userId);
kakaoVO.setUserCallbackYn(userId);
kakaoVO.setFrstRegisterId(userId);
kakaoVO.setLastUpdusrId(userId);
kakaoVO.setSendType("FT");
String imgUrl = kakaoVO.getTemplateImageUrl();
int buttonSize = kakaoVO.getButtonVOList().size();
if(!imgUrl.equals("") || buttonSize > 0) {
//json 파일 생성 처리
String resultJsonPath = kakaoFTJsonSave.kakaoApiJsonSave(kakaoVO);
kakaoVO.setBizJsonName(resultJsonPath);
}
int result = kakaoFtTemplateService.updateKakaoFriendsTemplateData(kakaoVO);
if(result > 0) {
modelAndView.addObject("result", "success");
}else {
modelAndView.addObject("result", "fail");
}
}
}catch(Exception ex){
ex.printStackTrace();
modelAndView.addObject("message", egovMessageSource.getMessage("fail.common.update"));
modelAndView.addObject("result", "fail");
return modelAndView;
}
return modelAndView;
}
/**
* @methodName : selectKakaoFriendsTemplateListPopupAjax
* @author : 우영두
* @date : 2024.01.05
* @description : selectKakaoFriendsTemplateListPopupAjax 카카오 친구톡 발송화면 템플릿 팝업 리스트 화면
* @param kakaoVO
* @param model
* @param response
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/kakao/template/selectKakaoFriendsTemplateListPopupAjax.do"})
public String selectKakaoFriendsTemplateListPopupAjax(@ModelAttribute("searchVO") KakaoVO searchVO,
HttpServletRequest request ,
ModelMap model) throws Exception{
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId == "") {
return "redirect:/uat/uia/EgovLoginUsr.do";
}
try {
searchVO.setUserId(userId);
/** pageing */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(6);
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
if("".equals(searchVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
searchVO.setSearchSortCnd("FRIEND_ID");
searchVO.setSearchSortOrd("desc");
}
List<KakaoVO> kakaoTemplateInfoList = new ArrayList<KakaoVO>();
// 문자발송 완료건은 모두 보이도록 처리
searchVO.setUserId(userId);
kakaoTemplateInfoList = kakaoFtTemplateService.selectKakaoFriendsTemplateList(searchVO);
model.addAttribute("kakaoTemplateInfoList", kakaoTemplateInfoList);
model.addAttribute("searchVO", searchVO);
paginationInfo.setTotalRecordCount(kakaoTemplateInfoList.size() > 0 ? ((KakaoVO)kakaoTemplateInfoList.get(0)).getTotCnt() : 0);
model.addAttribute("paginationInfo", paginationInfo);
//사용자 등록 발신프로필 정보 조회해오기
searchVO.setUserId(userId);
List<KakaoVO> resultProfileList = kakaoApiService.selectKakaoProfileList(searchVO);
model.addAttribute("resultProfileList", resultProfileList);
} catch (Exception e) {
System.out.println("selectKakaoFriendsTemplateListAjax Controller Error !!! " + e);
}
return "/web/kakao/template/ft/KakaoFriendstalkTemplateListPopupAjax";
}
}

View File

@ -1,236 +0,0 @@
package itn.let.kakao.user.stepInfo.web;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.EgovMessageSource;
import itn.com.cmm.LoginVO;
import itn.com.cmm.service.EgovFileMngService;
import itn.com.cmm.service.FileVO;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.cop.bbs.service.BoardMasterVO;
import itn.let.cop.bbs.service.BoardVO;
import itn.let.cop.bbs.service.EgovBBSAttributeManageService;
import itn.let.cop.bbs.service.EgovBBSManageService;
import itn.let.uss.umt.service.EgovUserManageService;
@Controller
public class KakaoStepInfoController {
/** EgovMessageSource */
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
@Resource(name = "EgovBBSAttributeManageService")
private EgovBBSAttributeManageService bbsAttrbService;
@Resource(name = "EgovBBSManageService")
private EgovBBSManageService bbsMngService;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileService;
/** userManageService */
@Resource(name = "userManageService")
private EgovUserManageService userManageService;
/**
* @Method Name : selectKaKaoStepInfo
* @Project : mjon
* @Date : 2023. 2. 21.
* @작성자 : 우영두
* @프로그램 설명 :카카오 사용안내 화면
*/
@RequestMapping(value= {"/web/mjon/kakao/stepinfo/selectKaKaoStepInfo.do"})
public String selectKaKaoStepInfo(HttpServletRequest request,
@ModelAttribute("searchVO") BoardMasterVO boardMasterVO, ModelMap model , BoardVO boardVO ,
RedirectAttributes redirectAttributes) throws Exception {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId == "") {
return "redirect:/web/user/login/login.do";
}
model.addAttribute("loginVO", loginVO);
/**
* 회원 정지된 상태이면 알림톡 사용안내 화면으로 이동되지 않도록 처리
* */
boolean mberSttus = userManageService.selectUserStatusInfo(userId);
if(!mberSttus) {
return "redirect:/web/uat/uia/actionLogout.do";
}
BoardMasterVO bmVO = new BoardMasterVO();
PaginationInfo paginationInfo = new PaginationInfo();
Map<String, Object> map = new HashMap<String, Object>();
String bbsId = "";
String serverName = request.getServerName();//URL 도메인정보 받아오기
if(serverName.equals("www.munjaon.co.kr")) {//운영서버 카카오 사용안내 FAQ 게시판 번호 셋팅해주기
bbsId = "BBSMSTR_000000000782";
}else {//개발서버 카카오 사용안내 FAQ 게시판 번호 셋팅해주기
bbsId = "BBSMSTR_000000000791";
}
boardVO.setBbsId(bbsId);
bmVO.setBbsId(bbsId);
bmVO = bbsAttrbService.selectBBSMasterInf(bmVO);
//UserVO userVO = (UserVO)request.getSession().getAttribute("userVO"); // 사용자 정보
if(boardMasterVO.getPageUnit() != 10) {
bmVO.setPageUnit(boardMasterVO.getPageUnit());
}
boardVO.setPageUnit(Integer.parseInt(bmVO.getListNum()));
boardVO.setPageSize(Integer.parseInt(bmVO.getPageNum()));
paginationInfo.setCurrentPageNo(boardVO.getPageIndex());
paginationInfo.setRecordCountPerPage(boardVO.getPageUnit());
paginationInfo.setPageSize(boardVO.getPageSize());
boardVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
boardVO.setLastIndex(paginationInfo.getLastRecordIndex());
//boardVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
boardVO.setRecordCountPerPage(100);
map = bbsMngService.selectBoardArticlesWeb(boardVO, null);
int totCnt = Integer.parseInt((String) map.get("resultCnt"));
paginationInfo.setTotalRecordCount(totCnt);
List<BoardVO> resultList = (List<BoardVO>)map.get("resultList");
for (BoardVO bvo: resultList) {
Document doc = Jsoup.parse(bvo.getNttCn());
String text = doc.text();
bvo.setNttCn2(text);
if(bvo.getAtchFileCnt() > 0) {
FileVO fileVO = new FileVO();
fileVO.setAtchFileId(bvo.getAtchFileId());
List<FileVO> fileList = fileService.selectFileInfs(fileVO);
bvo.setFileList(fileList);
}
}
//게시판 마스터 옵션 정보
BoardMasterVO searchVO = new BoardMasterVO();
searchVO.setBbsId(boardVO.getBbsId());
BoardMasterVO bbsMasterInfo = bbsAttrbService.selectBBSMasterInf(searchVO);
/**
* FAQ 타이틀 내용에 대한 XSS 변환 태그 원복
* faqUnscript() 이용하여 디비에 변환 태그로 되어있는 코드를 다시 원복 시킴
* ret.replaceAll("&lt;", "<").replaceAll("&gt;", ">");
*
* */
for(int i=0; i<resultList.size(); i++) {
String nttSj = resultList.get(i).getNttSj();
String nttCn = resultList.get(i).getNttCn();
nttSj = faqUnscript(nttSj);
nttCn = faqUnscript(nttCn);
resultList.get(i).setNttSj(nttSj);
resultList.get(i).setNttCn(nttCn);
}
model.addAttribute("bbsMasterInfo", bbsMasterInfo);
model.addAttribute("resultList", resultList);
model.addAttribute("resultCnt", map.get("resultCnt"));
model.addAttribute("paginationInfo", paginationInfo);
return "/web/kakao/stepinfo/KakaoStepInfo";
}
/**
* @Method Name : kakaoAlimtalkIntrdView
* @Project : mjon
* @Date : 2023. 5. 30
* @작성자 : 원영현
* @프로그램 설명 :카카오 알림톡 소개페이지
*/
@RequestMapping(value= {"/web/mjon/kakao/alimtalk/kakaoAlimtalkIntrdView.do"})
public String kakaoAlimtalkIntrdView(HttpServletRequest request,
@ModelAttribute("searchVO") BoardMasterVO boardMasterVO, ModelMap model , BoardVO boardVO ,
RedirectAttributes redirectAttributes) throws Exception {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId == "") {
return "redirect:/web/user/login/login.do";
}
model.addAttribute("loginVO", loginVO);
return "/web/kakao/intrd/KakaoAllimtalkIntro";
}
/**
* XSS 방지 처리.
*
* @param data
* @return
*/
protected String faqUnscript(String data) {
if (data == null || data.trim().equals("")) {
return "";
}
String ret = data;
ret = ret.replaceAll("<(S|s)(C|c)(R|r)(I|i)(P|p)(T|t)", "&lt;script");
ret = ret.replaceAll("</(S|s)(C|c)(R|r)(I|i)(P|p)(T|t)", "&lt;/script");
ret = ret.replaceAll("<(O|o)(B|b)(J|j)(E|e)(C|c)(T|t)", "&lt;object");
ret = ret.replaceAll("</(O|o)(B|b)(J|j)(E|e)(C|c)(T|t)", "&lt;/object");
ret = ret.replaceAll("<(A|a)(P|p)(P|p)(L|l)(E|e)(T|t)", "&lt;applet");
ret = ret.replaceAll("</(A|a)(P|p)(P|p)(L|l)(E|e)(T|t)", "&lt;/applet");
ret = ret.replaceAll("<(E|e)(M|m)(B|b)(E|e)(D|d)", "&lt;embed");
ret = ret.replaceAll("</(E|e)(M|m)(B|b)(E|e)(D|d)", "&lt;embed");
ret = ret.replaceAll("<(F|f)(O|o)(R|r)(M|m)", "&lt;form");
ret = ret.replaceAll("</(F|f)(O|o)(R|r)(M|m)", "&lt;form");
//ret = ret.replaceAll("<", "&lt;");
//ret = ret.replaceAll(">", "&gt;");
ret = ret.replaceAll("alert", "");
ret = ret.replaceAll("iframe", "");
ret = ret.replaceAll("&lt;", "<").replaceAll("&gt;", ">");
ret = ret.replaceAll("&#40;", "\\(").replaceAll("&#41;", "\\)");
ret = ret.replaceAll("'", "&#39;");
ret = ret.replaceAll("eval\\((.*)\\)", "");
ret = ret.replaceAll("[\\\"\\\'][\\s]*javascript:(.*)[\\\"\\\']", "\"\"");
ret = ret.replaceAll("script", "");
return ret;
}
}

View File

@ -1,253 +0,0 @@
package itn.let.komoran;
import java.util.ArrayList;
import java.util.List;
import itn.com.cmm.util.MJUtil;
import kr.co.shineware.nlp.komoran.constant.DEFAULT_MODEL;
import kr.co.shineware.nlp.komoran.core.Komoran;
import kr.co.shineware.nlp.komoran.model.KomoranResult;
import kr.co.shineware.nlp.komoran.model.Token;
public class KomoranUtils {
public List<String> parseKomoranTextByList(String ocrText, String filePath) throws Exception {
Komoran komoran = new Komoran(DEFAULT_MODEL.FULL);
/*
* 사용자 지정 단아를 추가 학습하기 위해 아래 파일을 추가 적용해 준다.
* 파일은 dic.user 이름으로 확장자까지 만들어 준다(확장자를 .user로 해야한다)
* 파일 내용으로는 적용할 단어와 품사를 구분으로 입력하면 된다.
* Ex) 톡줘 NNP
* */
komoran.setUserDic(filePath + "komoran/dic.user");
String strToAnalyze = ocrText;
KomoranResult analyzeResultList = komoran.analyze(strToAnalyze); //형태소 분석 전체 문장
String resultText = analyzeResultList.getPlainText();
//형태소 분석 단어별 토큰화 시킴
List<Token> tokenList = analyzeResultList.getTokenList();
List<String> resultTokenList = new ArrayList<String>();
String[] split = resultText.split("\n");
//String[] split = resultText.split(System.getProperty("line.separator").toString());
/*for(String text : split) {
//text = text.replace(System.getProperty("line.separator").toString(), "");
text = text.replace("\r", "");
text = text.replaceAll("/SW ", "");
resultTokenList.add(text);
}*/
for (Token token : tokenList) {
//System.out.format("(%2d, %2d) %s/%s\n", token.getBeginIndex(), token.getEndIndex(), token.getMorph(), token.getPos());
String pos = token.getPos(); //형태소 종류
String mor = token.getMorph(); //분석 단어
/* NNG 일반명사
* NNP 고유명사
* NNB 의존명사
* NP 대명사
* NR 수사
* VV 동사
* VA 형용사
* SL 외국어
* SH 한자
* NF 명사추정범주
*
*/
if(pos.contains("NNG") ||
pos.contains("NNP") ||
pos.contains("NP") ||
pos.contains("VV") ||
pos.contains("VA") ||
pos.contains("SL") ||
pos.contains("SH") ||
pos.contains("NF")) {
resultTokenList.add(mor);
}
}
//토큰 단어에서 중복 단어는 제거 리턴
return MJUtil.getDuplicateList(resultTokenList);
}
public List<String> parseKomoranTextTypeNNGByList(String ocrText, String filePath) throws Exception {
Komoran komoran = new Komoran(DEFAULT_MODEL.FULL);
/*
* 사용자 지정 단아를 추가 학습하기 위해 아래 파일을 추가 적용해 준다.
* 파일은 dic.user 이름으로 확장자까지 만들어 준다(확장자를 .user로 해야한다)
* 파일 내용으로는 적용할 단어와 품사를 구분으로 입력하면 된다.
* Ex) 톡줘 NNP
* */
komoran.setUserDic(filePath + "komoran/dic.user");
String strToAnalyze = ocrText;
KomoranResult analyzeResultList = komoran.analyze(strToAnalyze); //형태소 분석 전체 문장
String resultText = analyzeResultList.getPlainText();
//형태소 분석 단어별 토큰화 시킴
List<Token> tokenList = analyzeResultList.getTokenList();
List<String> resultTokenList = new ArrayList<String>();
String[] split = resultText.split("\n");
//String[] split = resultText.split(System.getProperty("line.separator").toString());
for(String text : split) {
//text = text.replace(System.getProperty("line.separator").toString(), "");
/*
text = text.replace("\r", "");
text = text.replaceAll("/SW ", "");
resultTokenList.add(text);*/
}
for (Token token : tokenList) {
//System.out.format("(%2d, %2d) %s/%s\n", token.getBeginIndex(), token.getEndIndex(), token.getMorph(), token.getPos());
String pos = token.getPos(); //형태소 종류
String mor = token.getMorph(); //분석 단어
/* NNG 일반명사
* NNP 고유명사
* NNB 의존명사
* NP 대명사
* NR 수사
* VV 동사
* VA 형용사
* SL 외국어
* SH 한자
* NF 명사추정범주
*
*/
if(pos.contains("NNG") ||
pos.contains("NNP") ||
pos.contains("NP") ||
pos.contains("SL") ||
pos.contains("NF")) {
resultTokenList.add(mor);
}
}
//토큰 단어에서 중복 단어는 제거 리턴
return MJUtil.getDuplicateList(resultTokenList);
}
public String parseKomoranTextByString(String ocrText, String filePath) throws Exception {
Komoran komoran = new Komoran(DEFAULT_MODEL.FULL);
/*
* 사용자 지정 단아를 추가 학습하기 위해 아래 파일을 추가 적용해 준다.
* 파일은 dic.user 이름으로 확장자까지 만들어 준다(확장자를 .user로 해야한다)
* 파일 내용으로는 적용할 단어와 품사를 구분으로 입력하면 된다.
* Ex) 톡줘 NNP
* */
komoran.setUserDic(filePath + "komoran/dic.user");
String strToAnalyze = ocrText;
KomoranResult analyzeResultList = komoran.analyze(strToAnalyze); //형태소 분석 전체 문장
String resultText = analyzeResultList.getPlainText();
//형태소 분석 단어별 토큰화 시킴
List<Token> tokenList = analyzeResultList.getTokenList();
List<String> resultTokenList = new ArrayList<String>();
String[] split = resultText.split("\n");
for(String text : split) {
text = text.replace("\r", "");
text = text.replaceAll("/SW ", "");
resultText = text;
}
//System.out.println(resultText);
return resultText;
}
public List<String> parseKomoranWordCloudNNGByList(String ocrText, String filePath) throws Exception {
List<String> resultTokenList = new ArrayList<String>();
try {
Komoran komoran = new Komoran(DEFAULT_MODEL.FULL);
/*
* 사용자 지정 단아를 추가 학습하기 위해 아래 파일을 추가 적용해 준다.
* 파일은 dic.user 이름으로 확장자까지 만들어 준다(확장자를 .user로 해야한다)
* 파일 내용으로는 적용할 단어와 품사를 구분으로 입력하면 된다.
* Ex) 톡줘 NNP
* */
komoran.setUserDic(filePath + "komoran/dic.user");
String strToAnalyze = ocrText;
KomoranResult analyzeResultList = komoran.analyze(strToAnalyze); //형태소 분석 전체 문장
String resultText = analyzeResultList.getPlainText();
//System.out.println("=============start====================");
//System.out.println(strToAnalyze);
//System.out.println("+++++++++");
//System.out.println(resultText);
//System.out.println("==============end=====================");
//형태소 분석 단어별 토큰화 시킴
List<Token> tokenList = analyzeResultList.getTokenList();
for (Token token : tokenList) {
String pos = token.getPos(); //형태소 종류
String mor = token.getMorph(); //분석 단어
/* NNG 일반명사
* NNP 고유명사
* NNB 의존명사
* NP 대명사
* NR 수사
* VV 동사
* VA 형용사
* SL 외국어
* SH 한자
* NF 명사추정범주
*
*/
if(mor.length() > 1 && (pos.contains("NNG") ||
pos.contains("NNP") ||
pos.contains("NNB") ||
pos.contains("NP") ||
pos.contains("SL") ||
pos.contains("VV") ||
pos.contains("VA") ||
pos.contains("NF"))) {
resultTokenList.add(mor);
}
}
} catch (Exception e) {
System.out.println("+++++++++++++++ parseKomoranWordCloudNNGByList Error !!! " + e);
}
//토큰 단어에서 중복 단어는 제거 리턴
return resultTokenList;
}
}

View File

@ -35,8 +35,6 @@ import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import org.springframework.web.servlet.support.RequestContextUtils;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
@ -48,7 +46,6 @@ import itn.com.cmm.service.FileVO;
import itn.com.cmm.util.EgovDoubleSubmitHelper;
import itn.com.cmm.util.RedirectUrlMaker;
import itn.com.cmm.util.StringUtil;
import itn.com.uss.ion.fms.service.FmsFileService;
import itn.com.uss.ion.fms.service.FmsFileVO;
import itn.let.lett.service.CateConfVO;
import itn.let.lett.service.HashConfVO;
@ -57,38 +54,23 @@ import itn.let.lett.service.LetterVO;
import itn.let.mjo.msgagent.service.MjonMsgAgentStsService;
import itn.let.mjo.msgagent.service.MjonMsgAgentStsVO;
import itn.let.sym.ccm.cde.service.CateCode;
import itn.let.uss.umt.service.EgovUserManageService;
import itn.let.uss.umt.service.UserDefaultVO;
@Controller
public class LetterController {
/** userManageService */
@Resource(name = "userManageService")
private EgovUserManageService userManageService;
@Resource(name = "LetterService")
private LetterService letterService;
/** EgovPropertyService */
@Resource(name = "propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
@Resource(name = "fmsFileService")
private FmsFileService fmsFileService;
@Resource(name="EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name="EgovFileMngService")
private EgovFileMngService fileMngService;
@Resource(name = "egovFmsFileGnrService")
private EgovIdGnrService idgenService;
/** 첨부파일 저장경로 */
@Value("#{globalSettings['Globals.file.saveDir']}")
private String fileSaveDir;
@ -98,25 +80,6 @@ public class LetterController {
//카테고리 배열 정의{"컬럼순차번호, 컬럼이름, 컬럼내용, 컬럼이름에 붙여야할 내용(엑셀코드양식다운로드시 필요)"}
private String[][] categoryExcelValue ={
{"0" ,"번호" , "1" , "" },
{"1", "카테고리 타입" , "ITN" , "[코드]"},
{"2", "카테고리 이름" , "선거", "[코드]"},
{"3", "순서" , "1", ""},
{"4", "사용 유무" , "사용", ""},
{"5", "등록일" ,"2019-10-31", ""}
} ;
//해쉬태그 배열 정의{"컬럼순차번호, 컬럼이름, 컬럼내용, 컬럼이름에 붙여야할 내용(엑셀코드양식다운로드시 필요)"}
private String[][] hashTagExcelValue ={
{"0" ,"번호" , "1" , "" },
{"1", "해쉬테그 이름" , "ITN" ,""},
{"2", "순서" , "1", ""},
{"3", "사용 유무" , "사용", ""},
{"4", "등록일" ,"2019-10-31", ""}
} ;
/**
*
* 단문/장문 문자 목록 화면
@ -2709,7 +2672,27 @@ public class LetterController {
System.out.println("modelAndView.getViewName(): " + modelAndView.getViewName()) ;
return modelAndView;
}
}
//카테고리 배열 정의{"컬럼순차번호, 컬럼이름, 컬럼내용, 컬럼이름에 붙여야할 내용(엑셀코드양식다운로드시 필요)"}
private String[][] categoryExcelValue ={
{"0" ,"번호" , "1" , "" },
{"1", "카테고리 타입" , "ITN" , "[코드]"},
{"2", "카테고리 이름" , "선거", "[코드]"},
{"3", "순서" , "1", ""},
{"4", "사용 유무" , "사용", ""},
{"5", "등록일" ,"2019-10-31", ""}
} ;
//해쉬태그 배열 정의{"컬럼순차번호, 컬럼이름, 컬럼내용, 컬럼이름에 붙여야할 내용(엑셀코드양식다운로드시 필요)"}
private String[][] hashTagExcelValue ={
{"0" ,"번호" , "1" , "" },
{"1", "해쉬테그 이름" , "ITN" ,""},
{"2", "순서" , "1", ""},
{"3", "사용 유무" , "사용", ""},
{"4", "등록일" ,"2019-10-31", ""}
} ;
}

View File

@ -1,60 +0,0 @@
package itn.let.mail.web;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import itn.let.mail.service.MailTemplateService;
import itn.let.utl.user.service.MjonNoticeSendUtil;
@Controller
public class MailTemplateController {
@Resource (name = "MailTemplateService")
private MailTemplateService mailTemplateService;
/** 알림전송 Util */
@Resource(name = "mjonNoticeSendUtil")
private MjonNoticeSendUtil mjonNoticeSendUtil;
// 휴면회원 메일발송
@RequestMapping("/mail/mailTmplSendMemberDormantAjax.do")
public ModelAndView mailTmplSendMemberDormant(
HttpServletRequest request
) throws Exception{
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
boolean isSuccess = true;
String msg = "";
try {
// 시스템 문자발송 테스트
String callTo = "01087872615";
String smsTxt = "시스템발송 테스트";
//mjonNoticeSendUtil.userSmsSendBySystem(callTo, smsTxt);
// 휴면회원 메일발송
//mailTemplateService.mailSendMemberDormant();
// 휴면회원 지정
mailTemplateService.setMemberDormantUpdate();
}
catch(Exception e) {
isSuccess = false;
msg = "에러메시지 : " + e.getMessage();
e.printStackTrace();
}
modelAndView.addObject("isSuccess", isSuccess);
modelAndView.addObject("msg", msg);
return modelAndView;
}
}

View File

@ -6,8 +6,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.ResponseEntity;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

View File

@ -1,99 +0,0 @@
package itn.let.main.service;
import java.io.Serializable;
/**
* 템플릿 메인화면 작업 List 항목 VO(Sample 소스)
* @author 실행환경 개발팀 JJY
* @since 2011.08.31
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2011.08.31 JJY 최초 생성
*
* </pre>
*/
public class EgovMainContentsVO implements Serializable {
/**
* serialVersionUID
*/
private static final long serialVersionUID = -2202175699511921484L;
/**
* 작업항목 이름
*/
private String workItemName;
/**
* To-Do List 항목 업무화면 URL
*/
private String workItemURL;
public EgovMainContentsVO(){
}
/**
*
* @exception Throwable
*/
public void finalize()
throws Throwable{
}
/**
* getItemCount 항목 개수 getter
* @return
*/
public int getItemCount(){
return 0;
}
/**
* getWorkItemName To-Do List 항목 getter
* @return To-Do List 항목
*/
public String getWorkItemName(){
return workItemName;
}
/**
* getWorkItemURL 업무화면 URL getter
* @return 업무화면 URL
*/
public String getWorkItemURL(){
return workItemURL;
}
/**
* setItemCount 항목 개수 setter
*
* @param itemCount itemCount
*/
public void setItemCount(int itemCount){
}
/**
* setWorkItemName To-Do List 항목 Setter
*
* @param workItemName To-Do List 항목
*/
public void setWorkItemName(String workItemName){
}
/**
* setWorkItemURL 업무화면 URL setter
*
* @param workItemURL 업무화면 URL
*/
public void setWorkItemURL(String workItemURL){
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,166 +0,0 @@
/*
* Copyright 2008-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package itn.let.main.web;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.JSONValue;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
/**
* @Class Name : FacebookAPI.java
* @Description : 페이스북 API Class
* @Modification Information
* @
* @ 수정일 수정자 수정내용
* @ --------- --------- -------------------------------
* @ 2015.04.06 최초생성
*
* @author ()드림웨어
* @version 1.0
* @see
*
*
*/
public class FacebookAPI{
private static FacebookAPI facebookAPI = null;
private static String CLIENT_ID = "846197678724759";
private static String CLIENT_SECRET="75180f5cd6b38cd21ba7f756566e30e5";
//private static String REDIRECT_URI="http://YOUR_REDIRECT_URI";
private String getAccessToken()
{
URL url;
InputStream is = null;
try {
url = new URL("https://graph.facebook.com/oauth/access_token"
+"?client_id="+CLIENT_ID
+"&client_secret=" +CLIENT_SECRET
+"&grant_type=client_credentials");
HttpURLConnection request = (HttpURLConnection) url.openConnection();
is = request.getInputStream();
} catch (MalformedURLException e) {
System.out.println("페이스북에러");
} catch (IOException e) {
System.out.println("페이스북에러");
}
int result;
StringBuffer buffer = new StringBuffer();
Scanner scan = new Scanner(is, "UTF-8");
while(scan.hasNextLine())
{
buffer.append(scan.nextLine());
}
//String access_token = buffer.substring(13);
JSONObject jsonObj = (JSONObject) JSONValue.parse(buffer.toString());
String strAccess_token = jsonObj.get("access_token").toString() ;
//System.out.println("access_token : "+access_token);
//return access_token;
return strAccess_token ;
}
public String getPosts()
{
URL url;
InputStream is = null;
String access_token = getAccessToken();
try {
/*url = new URL("https://graph.facebook.com/v2.3/457530414275899/posts"
+"?access_token="+access_token
+"&locale=ko_KR"
+"&limit=10");*/
access_token = "EAAMBnMAM1pcBAPZBlJUe2lP0CkXAbNoAyZBbZAjhZCZBVKI04p6ZA3Bu6z538bvh81IHM2HvZAP77DksglvH3SwJ8Sb0Rw3KTggGI21KYVaiNzshnRY8UOKUX8HpfnhEy1Gyu6ZB1YuDxvQq22KTiZAVpbXycH6x29tnJ6JIGQ6a7gKZAZBbBuvzwHd" ;
String fields = "type,picture,from,caption,message,description,story,name,link,permalink_url" ;
url = new URL("https://graph.facebook.com/v2.6/457530414275899/feed"
+"?access_token="+access_token
+"&fields="+fields + "&limit=10" );
HttpURLConnection request = (HttpURLConnection) url.openConnection();
is = request.getInputStream();
} catch (IOException e) {
System.out.println("페이스북에러");
}
StringBuffer buffer = new StringBuffer();
Scanner scan = new Scanner(is, "UTF-8");
while(scan.hasNextLine())
{
buffer.append(scan.nextLine());
}
return buffer.toString();
}
public String getPhoto()
{
URL url;
InputStream is = null;
try {
url = new URL("https://graph.facebook.com/v2.3/457530414275899/picture?redirect=false");
HttpURLConnection request = (HttpURLConnection) url.openConnection();
is = request.getInputStream();
} catch (IOException e) {
System.out.println("페이스북에러");
}
StringBuffer buffer = new StringBuffer();
Scanner scan = new Scanner(is, "UTF-8");
while(scan.hasNextLine())
{
buffer.append(scan.nextLine());
}
return buffer.toString();
}
public static FacebookAPI getInstance()
{
if(facebookAPI==null)
{
facebookAPI = new FacebookAPI();
}
return facebookAPI;
}
private FacebookAPI() {}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,103 +0,0 @@
package itn.let.mjo.addr.web;
import java.nio.charset.Charset;
import java.time.LocalDateTime;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.annotation.Resource;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import itn.com.cmm.EgovMessageSource;
import itn.com.cmm.LoginVO;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.mail.service.StatusResponse;
import itn.let.mjo.addr.service.AddrGroupService;
import itn.let.mjo.addr.service.AddrGroupVO;
import itn.let.mjo.addr.service.AddrService;
import itn.let.mjo.addr.service.AddrVO;
/**
* 주소록 관한 controller 클래스를 정의한다.
* @author ITN
* @since 2021.04.08
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2021.04.08 ITN 최초 생성
*
* </pre>
*/
@RestController
public class AddrRestController {
@Resource (name = "AddrService")
private AddrService addrService;
@Resource (name = "AddrGroupService")
private AddrGroupService addrGroupService;
/** EgovMessageSource */
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
/**
* 주소록 대량등록 저장
* @param searchVO
* @param model
* @return "/web/mjon/addr/addrMassInsertByTempAjax_advc.do"
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/addr/addrMassInsertByTempAjax_advc.do"})
public ResponseEntity<StatusResponse> addrMassInsertByTempAjax_advc(@RequestBody List<AddrVO> addrListVO
,ModelMap model) throws Exception{
try {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId.equals("")) {
return ResponseEntity.ok(
new StatusResponse(HttpStatus.UNAUTHORIZED
, "로그인을 하셔야 이용 가능합니다."
, LocalDateTime.now()
)
);
}
return ResponseEntity.ok().body(addrService.addrMassInsertByTempAjax_advc(addrListVO, userId));
} catch (Exception e) {
e.printStackTrace();
// TODO: handle exception
return ResponseEntity.ok().body(new StatusResponse(
HttpStatus.BAD_REQUEST
, "오류가 발생하였습니다."
, ""
));
}
// return ResponseEntity.ok().body(addrService.addrMassInsertByTempAjax_advc(addrListVO, userId));
}
//
}

View File

@ -1,265 +0,0 @@
package itn.let.mjo.addr.web;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.LoginVO;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.mjo.addr.service.AddrTransHistService;
import itn.let.mjo.addr.service.AddrTransHistVO;
@Controller
public class AddrTransHistController {
@Resource (name = "AddrTransHistService")
private AddrTransHistService addrTransHistService;
/**
* 주소록 리스트
* @param addrVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/web/mjon/addr/selectAddrTransHistListAjax.do")
public String selectAddrTransHistListAjax(@ModelAttribute("searchVO") AddrTransHistVO addrTransHistVO
,ModelMap model) throws Exception {
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId != "") {
addrTransHistVO.setSendMberId(userId);
}
addrTransHistVO.setPageUnit(5);
/** paging */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(addrTransHistVO.getPageIndex());
paginationInfo.setRecordCountPerPage(addrTransHistVO.getPageUnit());
paginationInfo.setPageSize(addrTransHistVO.getPageSize());
addrTransHistVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
addrTransHistVO.setLastIndex(paginationInfo.getLastRecordIndex());
addrTransHistVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
addrTransHistVO.setSearchSortCnd("sendDate");
addrTransHistVO.setSearchSortOrd("desc");
List<AddrTransHistVO> addrTransHistList = addrTransHistService.selectAddrTransHistList(addrTransHistVO);
int totCnt = 0;
if(addrTransHistList.size() > 0) {
totCnt = addrTransHistList.get(0).getTotcnt();
}
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("addrTransHistList", addrTransHistList);
model.addAttribute("paginationInfo", paginationInfo);
model.addAttribute("totCnt", totCnt);
return "/web/addr/AddrTransHistListAjax";
}
/**
* 주소록 리스트 인쇄페이지
* @param addrVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/web/mjon/addr/selectAddrTransHistPrint.do")
public String selectAddrTransHistPrint(@ModelAttribute("searchVO") AddrTransHistVO addrTransHistVO
,ModelMap model) throws Exception {
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId != "") {
addrTransHistVO.setSendMberId(userId);
}
addrTransHistVO.setRecordCountPerPage(100000);
addrTransHistVO.setFirstIndex(0);
List<AddrTransHistVO> addrTransHistList = addrTransHistService.selectAddrTransHistList(addrTransHistVO);
model.addAttribute("addrTransHistList", addrTransHistList);
return "/web/addr/AddrTransHistPrint";
}
//주소록 엑셀 다운로드
@RequestMapping("/web/addr/addrTransHistExcelDownload.do")
public void addrTransHistExcelDownload(AddrTransHistVO addrTransHistVO,
HttpServletRequest request,
HttpServletResponse response ,
ModelMap model) throws Exception {
addrTransHistVO.setRecordCountPerPage(100000);
addrTransHistVO.setFirstIndex(0);
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
// 메모리에 100개의 행을 유지합니다. 행의 수가 넘으면 디스크에 적습니다.
SXSSFWorkbook wb = new SXSSFWorkbook(100);
CellStyle style = wb.createCellStyle();
style.setBorderBottom(CellStyle.BORDER_THIN); //테두리 두껍게
style.setBorderLeft(CellStyle.BORDER_THIN);
style.setBorderRight(CellStyle.BORDER_THIN);
style.setBorderTop(CellStyle.BORDER_THIN);
Font font = wb.createFont();
font.setBoldweight(Font.BOLDWEIGHT_BOLD); //글씨 bold
Cell cell = null;
Row row = null;
String fileName ="주소록 내보내기 관리";
String sheetTitle = "";
try{
if("".equals(addrTransHistVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
addrTransHistVO.setSearchSortOrd("desc");
}
addrTransHistVO.setSendMberId(loginVO.getId());
List<AddrTransHistVO> addrTransHistList = addrTransHistService.selectAddrTransHistList(addrTransHistVO);
{
// row, cell 개수 순서대로 증가용 필드
int rowNumber = 0;
int celNumber = 0;
//화면 리스트
sheetTitle = "주소록" ; //제목
Sheet sheet = wb.createSheet(sheetTitle);
row = sheet.createRow(rowNumber++);
cell = row.createCell(celNumber++);
cell.setCellValue("번호");
cell.setCellStyle(style);
cell = row.createCell(celNumber++);
cell.setCellValue("보낸주소록(그룹)명");
cell.setCellStyle(style);
cell = row.createCell(celNumber++);
cell.setCellValue("보낸날짜");
cell.setCellStyle(style);
cell = row.createCell(celNumber++);
cell.setCellValue("수신날짜");
cell.setCellStyle(style);
cell = row.createCell(celNumber++);
cell.setCellValue("수신인ID");
cell.setCellStyle(style);
cell = row.createCell(celNumber++);
cell.setCellValue("수신상태");
cell.setCellStyle(style);
for(int i=0; i < addrTransHistList.size(); i++){
row = sheet.createRow(rowNumber++); //줄추가
celNumber = 0;
cell = row.createCell(celNumber++);
cell.setCellStyle(style);
cell.setCellValue(i+1); //번호
cell = row.createCell(celNumber++);
cell.setCellStyle(style);
cell.setCellValue(((AddrTransHistVO)addrTransHistList.get(i)).getAddrGrpNm()); // 보낸주소록 그룹명
cell = row.createCell(celNumber++);
cell.setCellStyle(style);
cell.setCellValue(((AddrTransHistVO)addrTransHistList.get(i)).getSendDate()); // 보낸주소록 그룹명
cell = row.createCell(celNumber++);
cell.setCellStyle(style);
cell.setCellValue(((AddrTransHistVO)addrTransHistList.get(i)).getRecvDate()); // 수신날짜
cell = row.createCell(celNumber++);
cell.setCellStyle(style);
cell.setCellValue(((AddrTransHistVO)addrTransHistList.get(i)).getRecvMberId()); // 수신인
cell = row.createCell(celNumber++);
cell.setCellStyle(style);
String recvStatus = "";
if("Y".equals(((AddrTransHistVO)addrTransHistList.get(i)).getRecvStatus())) {
recvStatus = "수신완료";
} else if("W".equals(((AddrTransHistVO)addrTransHistList.get(i)).getRecvStatus())) {
recvStatus = "수신대기";
} else if("N".equals(((AddrTransHistVO)addrTransHistList.get(i)).getRecvStatus())) {
recvStatus = "수신거부";
} else {
recvStatus = "-";
}
cell.setCellValue(recvStatus); // 수신상태
}
}
response.setHeader("Set-Cookie", "fileDownload=true; path=/");
SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat ( "yyyy_MM_dd_HH_mm_ss", Locale.KOREA );
Date currentTime = new Date ();
String mTime = mSimpleDateFormat.format ( currentTime );
fileName = fileName+"("+mTime+")";
response.setHeader("Content-Disposition", String.format("attachment; filename=\""+new String((fileName).getBytes("KSC5601"),"8859_1")+".xlsx"));
wb.write(response.getOutputStream());
}catch(Exception e) {
response.setHeader("Set-Cookie", "fileDownload=false; path=/");
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
response.setHeader("Content-Type","text/html; charset=utf-8");
OutputStream out = null;
try {
out = response.getOutputStream();
byte[] data = new String("fail..").getBytes();
out.write(data, 0, data.length);
} catch(Exception ignore) {
ignore.printStackTrace();
} finally {
if(out != null) try { out.close(); } catch(Exception ignore) {}
}
}finally {
// 디스크 적었던 임시파일을 제거합니다.
wb.dispose();
try { wb.close(); } catch(Exception ignore) {}
}
}
}

View File

@ -30,8 +30,6 @@ import itn.com.cmm.util.RedirectUrlMaker;
import itn.let.cop.bbs.service.Board;
import itn.let.cop.bbs.service.BoardMasterVO;
import itn.let.cop.bbs.service.EgovBBSAttributeManageService;
import itn.let.mjo.addr.service.AddrGroupService;
import itn.let.mjo.addr.service.AddrService;
import itn.let.mjo.addragency.service.AddrAgencyService;
import itn.let.mjo.addragency.service.AddrAgencyVO;
import itn.let.mjo.mjocommon.MjonCommon;
@ -46,15 +44,6 @@ import itn.let.utl.user.service.MjonNoticeSendUtil;
@Controller
public class AddrAgencyController {
/*
@Resource(name = "MjonMsgSentService")
private MjonMsgSentService mjonMsgSentService;
@Resource(name = "EgovCmmUseService")
private EgovCmmUseService cmmUseService;
*/
@Resource(name="addrAgencyService")
private AddrAgencyService addrAgencyService;
@ -78,12 +67,6 @@ public class AddrAgencyController {
@Resource(name="EgovFileMngService")
private EgovFileMngService fileMngService;
@Resource(name="AddrService")
private AddrService addrService;
@Resource(name="AddrGroupService")
private AddrGroupService addrGroupService;
/** 알림전송 Util */
@Resource(name = "mjonNoticeSendUtil")
@ -98,105 +81,6 @@ public class AddrAgencyController {
private static final Logger logger = LoggerFactory.getLogger(AddrAgencyController.class);
/////////////////////////////////////////////////////////////////////////////////////////
//
//
// USER
//
//
/**
* 주소록 입력 대행(무료) 등록 리스트 화면
* @param addrVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/addragency/selectAddrAgencyList.do"})
public String selectAddrAgencyListUser(
HttpServletRequest request
, @ModelAttribute("searchVO") AddrAgencyVO addrAgencyVO
, ModelMap model
, RedirectAttributes redirectAttributes
) throws Exception {
logger.debug("AddrAgencyController-selectAddrAgencyListUser");
//사용자 로그인 여부 체크
String isLogin = checkLoginUtil.isUserLogin4PageMove(redirectAttributes);
if (!"Y".equals(isLogin)) return isLogin;
//login 정보 전달
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
model.addAttribute("loginVO", loginVO);
//ajax를 위한 현재 URL 정보 전달
addrAgencyVO.setUrl(request.getRequestURI());
return "/web/addragency/AddrAgencyList";
}
/**
* 주소록 입력 대행(무료) 등록 리스트 ajax 부분
* @param addrVO
* @param model
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/addragency/selectAddrAgencyListAjax.do"})
public String selectAddrAgencyListAjax(
HttpServletRequest request
, @ModelAttribute("searchVO") AddrAgencyVO addrAgencyVO
, ModelMap model
, RedirectAttributes redirectAttributes
) throws Exception {
logger.debug("AddrAgencyController-selectAddrAgencyListAjax");
//사용자 로그인 여부 체크
String isLogin = checkLoginUtil.isLoginCheck4JsonPage(redirectAttributes);
if (!"Y".equals(isLogin)) return "/web/mjon/addragency/selectAddrAgencyList"; //호출하는 base 페이지로 return 해야 한다.
//로그인 정보 획득
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
// pageing step1
PaginationInfo paginationInfo = this.setPagingStep1(addrAgencyVO);
// pageing step2
addrAgencyVO = this.setPagingStep2(addrAgencyVO, paginationInfo);
//대상 리스트 가져오기
addrAgencyVO.setSiteNm(loginVO.getId());
List<AddrAgencyVO> addrList = addrAgencyService.selectList(addrAgencyVO);
// pageing step3
paginationInfo = this.setPagingStep3(addrList, paginationInfo);
//대상 리스트, 페이징 정보 전달
model.addAttribute("resultList", addrList);
model.addAttribute("paginationInfo", paginationInfo);
return "/web/addragency/AddrAgencyListAjax";
}
/**
* (사용자)게시물을 등록한다.
*
@ -206,12 +90,7 @@ public class AddrAgencyController {
* @return
* @throws Exception
*/
@RequestMapping(value=
{
"/web/mjon/addragency/insertAddrAgencyAjax.do"
, "/uss/ion/addragency/insertAddrAgencyAjax.do"
}
)
@RequestMapping(value={"/uss/ion/addragency/insertAddrAgencyAjax.do"})
public ModelAndView insertAddrAgencyAjax(
HttpServletRequest request
, @ModelAttribute("insertAgency") AddrAgencyVO addrAgencyVO
@ -484,165 +363,6 @@ public class AddrAgencyController {
if ("N".equals(isLogin)) return modelAndView;
try {
/*
//1. 주소록 그룹 등록하기
AddrGroupVO addrGroupVO = new AddrGroupVO();
addrGroupVO.setMberId(addrAgencyVO.getRegisterId());
addrGroupVO.setAddrGrpNm(addrAgencyVO.getAddrGrpNm());
String addrNewGrpId = addrGroupService.insertAddrGroup(addrGroupVO);
AddrVO addrVO = new AddrVO();
//주소록 대행 신청자 아이디 SET
addrVO.setMberId(addrAgencyVO.getRegisterId());
addrVO.setFrstRegisterId(loginVO.getUniqId());
//새로 생성한 그룹 아이디 SET
addrVO.setAddrGrpId(addrNewGrpId);
//2. 엑셀 업로드하기
//final Map<String, MultipartFile> files = multiRequest.getFileMap();
List<MultipartFile> files = (List<MultipartFile>) multiRequest.getFiles("file0");
String errMessage = "";
String cellValue = "";
//String phoneRegExp = "^01(?:0|1|[6-9])[.-]?(\\d{3}|\\d{4})[.-]?(\\d{4})$";
String phoneRegExp = "^(050[234567]{1}|01[016789]{1})-?[0-9]{3,4}-?[0-9]{4}$";
int errPhoneCnt = 0;
if(!files.isEmpty()) {
if (files.get(0).getSize() > 0
&& (files.get(0).getContentType().indexOf("spreadsheetml") > -1)
|| files.get(0).getContentType().indexOf("ms-excel") > -1
|| files.get(0).getOriginalFilename().split("[.]")[1].indexOf("xlsx") > -1
|| files.get(0).getOriginalFilename().split("[.]")[1].indexOf("xls") > -1) {
String Ext = files.get(0).getOriginalFilename().split("[.]")[1];
//엑셀 확장자에 따른 처리 로직 분리
if(Ext.equals("xls")) {
HSSFWorkbook workbook = new HSSFWorkbook(files.get(0).getInputStream());
HSSFSheet sheet = workbook.getSheetAt(0);
if(sheet.getLastRowNum() > 100000) { //
errMessage = "100000줄 이상의 업로드는 데이터 부하로 업로드 할수 없습니다.";
modelAndView.addObject("errMessage", errMessage);
modelAndView.addObject("result", "fail");
return modelAndView;
}
for(int i=2; i< sheet.getLastRowNum() + 2; i++){ //먼저 밸리데이션 체크(1줄은 생략)
HSSFRow row = sheet.getRow(i); //열읽기
if(null == row) {
continue;
}
HashMap<String, String> jm = new HashMap<>();
// 행의 두번째 (핸드폰부터 받아오기)
HSSFCell cell = null;
for(int j=0 ; j<2; j++){ //행읽기(6행까지나 2행까지만 필요)
cellValue = "";
cell = row.getCell(j); //핸드폰/이름/info1/info2/info3/info4/메모
// 핸드폰, 이름만 공백체크
if(j <= 1 && (cell == null || !StringUtils.isNotBlank(cell.toString().trim()))) { //셀에 값이 없으면
//System.out.println("Cell 데이터가 없습니다.");
errMessage = "Cell 데이터가 없습니다.";
modelAndView.addObject("errMessage", errMessage);
modelAndView.addObject("result", "fail");
return modelAndView;
}
if(null != cell){
switch(cell.getCellType()){ //숫자타임을 문자로 변환
case Cell.CELL_TYPE_NUMERIC:
cell.setCellType(Cell.CELL_TYPE_STRING);
}
cellValue = StringUtil.getString(cell.getStringCellValue().trim()) ;
}
if(j == 0) {
//전화번호
if(cellValue.matches(phoneRegExp)) {
addrVO.setAddrPhoneNo(cellValue);
}else {
errPhoneCnt++;
}
}
if(j == 1) addrVO.setAddrNm(cellValue); //이름
}
addrService.insertAddr(addrVO);
}
modelAndView.addObject("result", "success");
if(errPhoneCnt > 0) {
modelAndView.addObject("errPhoneCnt", errPhoneCnt);
}
}else { //확장자가 xlsx
OPCPackage opcPackage = OPCPackage.open(files.get(0).getInputStream());
XSSFWorkbook workbook = new XSSFWorkbook(opcPackage);
XSSFSheet sheet = workbook.getSheetAt(0); // 첫번째 시트 불러오기
opcPackage.close();
if(sheet.getLastRowNum() > 100000) { //
errMessage = "100000줄 이상의 업로드는 데이터 부하로 업로드 할수 없습니다.";
modelAndView.addObject("errMessage", errMessage);
modelAndView.addObject("result", "fail");
return modelAndView;
}
for(int i=2; i<sheet.getLastRowNum()+2; i++){ //먼저 밸리데이션 체크(1줄은 생략)
XSSFRow row = sheet.getRow(i); //열읽기
if(null == row) {
continue;
}
// 행의 두번째 (핸드폰부터 받아오기)
XSSFCell cell = null;
for(int j=0 ; j<2; j++){ //행읽기(6행까지나 2행까지만 필요)
cellValue = "";
cell = row.getCell(j); //핸드폰/이름/info1/info2/info3/info4/메모
// 핸드폰, 이름만 공백체크
if(j <= 1 && (cell == null || !StringUtils.isNotBlank(cell.toString().trim()))) { //셀에 값이 없으면
//System.out.println("Cell 데이터가 없습니다.");
errMessage = "Cell 데이터가 없습니다.";
modelAndView.addObject("errMessage", errMessage);
modelAndView.addObject("result", "fail");
return modelAndView;
}
if(null != cell){
switch(cell.getCellType()){ //숫자타임을 문자로 변환
case Cell.CELL_TYPE_NUMERIC:
cell.setCellType(Cell.CELL_TYPE_STRING);
}
cellValue = StringUtil.getString(cell.getStringCellValue().trim()) ;
}
if(j == 0) {
//전화번호
if(cellValue.matches(phoneRegExp)) {
addrVO.setAddrPhoneNo(cellValue);
}else {
errPhoneCnt++;
}
}
if(j == 1) addrVO.setAddrNm(cellValue); //이름
}
addrService.insertAddr(addrVO);
}
modelAndView.addObject("result", "success");
if(errPhoneCnt > 0) {
modelAndView.addObject("errPhoneCnt", errPhoneCnt);
}
} //xlsx 처리
}
}
*/
//3. 주소록 무료대행 처리상태 변경
addrAgencyVO.setProcessStatus("E");
addrAgencyService.update(addrAgencyVO);

View File

@ -1,37 +1,13 @@
package itn.let.mjo.api.sms.web;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.HandlerMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.EgovMessageSource;
import itn.com.cmm.LoginVO;
import itn.com.cmm.util.RedirectUrlMaker;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.mjo.apikey.service.ApiCallInfoMngService;
import itn.let.mjo.apikey.service.ApiKeyMngService;
import itn.let.mjo.apikey.service.ApiKeyVO;
import itn.let.mjo.mjocommon.MjonCommon;
import itn.let.mjo.msg.service.MjonMsgService;
import itn.let.sym.site.service.EgovSiteManagerService;
import itn.let.sym.site.service.JoinSettingVO;
import itn.let.uss.umt.service.EgovUserManageService;
import itn.let.utl.user.service.MjonNoticeSendUtil;
import itn.let.utl.user.service.SecuKeyUtil;
/**
*

View File

@ -26,10 +26,8 @@ import itn.let.mjo.apikey.service.ApiCallInfoMngService;
import itn.let.mjo.apikey.service.ApiKeyMngService;
import itn.let.mjo.apikey.service.ApiKeyVO;
import itn.let.mjo.mjocommon.MjonCommon;
import itn.let.mjo.msg.service.MjonMsgService;
import itn.let.sym.site.service.EgovSiteManagerService;
import itn.let.sym.site.service.JoinSettingVO;
import itn.let.uss.umt.service.EgovUserManageService;
import itn.let.utl.user.service.MjonNoticeSendUtil;
import itn.let.utl.user.service.SecuKeyUtil;
@ -50,9 +48,6 @@ import itn.let.utl.user.service.SecuKeyUtil;
@Controller
public class ApiKeyMngController {
@Resource(name = "mjonMsgService")
private MjonMsgService mjonMsgService;
//api key 정보
@Resource(name = "apiKeyMngService")
private ApiKeyMngService apiKeyMngService;
@ -65,10 +60,6 @@ public class ApiKeyMngController {
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
/** userManageService */
@Resource(name = "userManageService")
private EgovUserManageService userManageService;
/** 사이트 설정 */
@Resource(name = "egovSiteManagerService")
EgovSiteManagerService egovSiteManagerService;
@ -80,54 +71,6 @@ public class ApiKeyMngController {
@Resource(name="MjonCommon")
private MjonCommon mjonCommon;
/*
//문자발송테스트
@Resource(name = "mjonMsgSentTestService")
private MjonMsgSentTestService mjonMsgSentTestService;
//문자수신테스트
@Resource(name = "mjonMsgRecvTestService")
private MjonMsgRecvTestService mjonMsgRecvTestService;
/** EgovMessageSource */
/*
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
@Resource(name = "mjonPayService")
private MjonPayService mjonPayService;
@Resource(name = "certService")
private CertService certService;
//문자발송 서비스
@Resource(name = "MjonMsgDataService")
private MjonMsgDataService mjonMsgDataService;
@Resource(name = "MjonReservMsgService")
private MjonReservMsgService mjonReservMsgService;
@Resource(name="EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name="EgovFileMngService")
private EgovFileMngService fileMngService;
/** mberManageService */
/*
@Resource(name = "mberManageService")
private EgovMberManageService mberManageService;
/** 첨부파일 저장경로 */
/*
@Value("#{globalSettings['Globals.file.saveDir']}")
private String fileSaveDir;
/** userManageService */
/*
@Resource(name = "userManageService")
private EgovUserManageService userManageService;
/**
* 신규회원 문자전송 리스트
* @param searchVO
@ -163,15 +106,6 @@ public class ApiKeyMngController {
model.addAttribute("resultList", resultList);
/*
//문자발송 실패 결과 코드정보 리스트 불러오기
MjonMsgResultCodeVO mjonMsgResultCodeVO = new MjonMsgResultCodeVO();
apiKeyMngService.selectMberList(userSearchVO);
*/
//List<MjonMsgResultCodeVO> resultMsgCodeList = mjonMsgService.selectMsgResultCodeAllList(mjonMsgResultCodeVO);
//model.addAttribute("resultMsgCodeList", resultMsgCodeList);
paginationInfo.setTotalRecordCount(resultList.size() > 0 ? ((ApiKeyVO)resultList.get(0)).getTotCnt() : 0);
model.addAttribute("paginationInfo", paginationInfo);

File diff suppressed because it is too large Load Diff

View File

@ -143,8 +143,90 @@ public class CertController {
return "uss/ion/cert/CertEtcList";
}
public void execute(String cmd) {
/**
* 기타서류관리 등록/수정
* @param searchVO
* @param model
* @return "/uss/ion/cert/CertSentModify.do"
* @throws Exception
*/
@RequestMapping(value = {"/uss/ion/cert/CertSentModify.do" , "/uss/ion/cert/CertEtcModify.do"})
public String CashModify(
@ModelAttribute("searchVO") CertVO searchVO,
HttpServletRequest request ,
Model model) throws Exception {
String pattern = (String) request.getAttribute(
HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE) ;
List<CertVO> certFileList = new ArrayList<CertVO>();
if(pattern.equals("/uss/ion/cert/CertSentModify.do")){ //발신인증서류
searchVO.setCertEtcType("01");
}
if(pattern.equals("/uss/ion/cert/CertEtcModify.do")){ //기타인증서류
searchVO.setCertEtcType("09");
}
if(null != searchVO.getCertId() && !"".equals(searchVO.getCertId())) { //수정
certFileList = certService.selectCertFileList(searchVO);
}
model.addAttribute("certFileList", certFileList); //CertFile파일정보
List<CertVO> fileList = new ArrayList<>();
//첨부파일정보
if(certFileList !=null){
if(1==certFileList.size() && ((CertVO)certFileList.get(0)).getOrignlFileNm() == null) {
}else {
fileList.addAll(certFileList);
}
}
model.addAttribute("fileList", fileList);
model.addAttribute("searchVO", searchVO);
if(pattern.equals("/uss/ion/cert/CertSentModify.do")){ //발신번호 인증
searchVO.setCertEtcType("01");
return "/uss/ion/cert/CertSentModify";
}
return "/uss/ion/cert/CertEtcModify";
}
/*기타서류 삭제 */
@RequestMapping({"/uss/ion/cert/CertEtcDelete.do" , "/uss/ion/cert/CertSentDelete.do"})
public String deleteCertEtc(@RequestParam("del") String[] del,
RedirectAttributes redirectAttributes ,
HttpServletRequest request ,
Model model) throws Exception {
CertVO tempCertVO = new CertVO();
boolean delete = false;
List<CertVO> certFileList = new ArrayList<>();
String whFile = "";
for(String id:del) {
tempCertVO.setCertId(id);
List<FileVO> fileDelList = new ArrayList<>(); //파일테이블 삭제 조회
fileDelList = certService.selectCertDetailFileList(tempCertVO);
for(FileVO delCertFileVo : fileDelList){
whFile = delCertFileVo.getWhFile() ;
if(whFile !=null){
File delFile = new File(whFile);
delete = delFile.delete();
}
}
fileService.deleteFileInfs(fileDelList);
certService.deleteCertEtc(tempCertVO);
}
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.delete"));
String pattern = (String) request.getAttribute(
HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE) ;
if(pattern.equals("/uss/ion/cert/CertSentDelete.do")){ //발신번호 인증
RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/uss/ion/cert/CertSentList.do");
return redirectUrlMaker.getRedirectUrl();
}
RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/uss/ion/cert/CertEtcList.do");
return redirectUrlMaker.getRedirectUrl();
}
public void execute(String cmd) {
Process process = null;
Runtime runtime = Runtime.getRuntime();
StringBuffer successOutput = new StringBuffer(); // 성공 스트링 버퍼
@ -231,88 +313,5 @@ public class CertController {
System.out.println(line);
}
}
/**
* 기타서류관리 등록/수정
* @param searchVO
* @param model
* @return "/uss/ion/cert/CertSentModify.do"
* @throws Exception
*/
@RequestMapping(value = {"/uss/ion/cert/CertSentModify.do" , "/uss/ion/cert/CertEtcModify.do"})
public String CashModify(
@ModelAttribute("searchVO") CertVO searchVO,
HttpServletRequest request ,
Model model) throws Exception {
String pattern = (String) request.getAttribute(
HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE) ;
List<CertVO> certFileList = new ArrayList<CertVO>();
if(pattern.equals("/uss/ion/cert/CertSentModify.do")){ //발신인증서류
searchVO.setCertEtcType("01");
}
if(pattern.equals("/uss/ion/cert/CertEtcModify.do")){ //기타인증서류
searchVO.setCertEtcType("09");
}
if(null != searchVO.getCertId() && !"".equals(searchVO.getCertId())) { //수정
certFileList = certService.selectCertFileList(searchVO);
}
model.addAttribute("certFileList", certFileList); //CertFile파일정보
List<CertVO> fileList = new ArrayList<>();
//첨부파일정보
if(certFileList !=null){
if(1==certFileList.size() && ((CertVO)certFileList.get(0)).getOrignlFileNm() == null) {
}else {
fileList.addAll(certFileList);
}
}
model.addAttribute("fileList", fileList);
model.addAttribute("searchVO", searchVO);
if(pattern.equals("/uss/ion/cert/CertSentModify.do")){ //발신번호 인증
searchVO.setCertEtcType("01");
return "/uss/ion/cert/CertSentModify";
}
return "/uss/ion/cert/CertEtcModify";
}
/*기타서류 삭제 */
@RequestMapping({"/uss/ion/cert/CertEtcDelete.do" , "/uss/ion/cert/CertSentDelete.do"})
public String deleteCertEtc(@RequestParam("del") String[] del,
RedirectAttributes redirectAttributes ,
HttpServletRequest request ,
Model model) throws Exception {
CertVO tempCertVO = new CertVO();
boolean delete = false;
List<CertVO> certFileList = new ArrayList<>();
String whFile = "";
for(String id:del) {
tempCertVO.setCertId(id);
List<FileVO> fileDelList = new ArrayList<>(); //파일테이블 삭제 조회
fileDelList = certService.selectCertDetailFileList(tempCertVO);
for(FileVO delCertFileVo : fileDelList){
whFile = delCertFileVo.getWhFile() ;
if(whFile !=null){
File delFile = new File(whFile);
delete = delFile.delete();
}
}
fileService.deleteFileInfs(fileDelList);
certService.deleteCertEtc(tempCertVO);
}
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.delete"));
String pattern = (String) request.getAttribute(
HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE) ;
if(pattern.equals("/uss/ion/cert/CertSentDelete.do")){ //발신번호 인증
RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/uss/ion/cert/CertSentList.do");
return redirectUrlMaker.getRedirectUrl();
}
RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/uss/ion/cert/CertEtcList.do");
return redirectUrlMaker.getRedirectUrl();
}
}

View File

@ -14,50 +14,13 @@ import itn.com.cmm.util.StringUtil;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.mjo.conf.service.MjonConfService;
import itn.let.mjo.conf.service.MjonConfVO;
import itn.let.mjo.msgagent.service.MjonMsgAgentStsService;
import itn.let.mjo.msgagent.service.MjonMsgAgentStsVO;
@Controller
public class MjonConfController {
@Resource(name = "mjonConfService")
private MjonConfService mjonConfService;
@Resource(name = "mjonMsgAgentStsService")
private MjonMsgAgentStsService mjonMsgAgentStsService;
/**
* @Method Name : updateMjonConfAjax
* @작성일 : 2023. 2. 22.
* @작성자 : anjooyoung
* @Method 설명 : 문자온 설정 수정 Ajax
*/
@RequestMapping(value = "/web/mjon/conf/selectMjonMsgUseConfAjax.do")
public ModelAndView selectMjonMsgUseConfAjax(@ModelAttribute MjonConfVO confVO, Model model) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
try {
MjonConfVO vo = mjonConfService.selectConfDetail("CONF01"); //문자발송 사용여부
if(vo == null || "".equals(vo.getConfCode()) || !"Y".equals(vo.getConfCode())) {
modelAndView.addObject("message", "문자 발송 불가");
modelAndView.addObject("result", "fail");
} else {
modelAndView.addObject("message", "문자 발송 가능");
modelAndView.addObject("result", "success");
}
}catch (Exception e) {
modelAndView.addObject("message", "오류가 발생하였습니다.");
modelAndView.addObject("result", "fail");
}
return modelAndView;
}
/**
* @Method Name : updateMjonConfAjax
* @작성일 : 2023. 2. 22.
@ -98,39 +61,4 @@ public class MjonConfController {
return modelAndView;
}
@RequestMapping(value = "/web/mjon/conf/selectBlineSendCheckAjax.do")
public ModelAndView selectBlineSendCheckAjax(
@ModelAttribute MjonMsgAgentStsVO mjonMsgAgentStsVO
, Model model) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
try {
System.out.println(mjonMsgAgentStsVO.getAgentCode());
if(mjonMsgAgentStsVO.getAgentCode().equals("b1")||mjonMsgAgentStsVO.getAgentCode().equals("B1")) {
mjonMsgAgentStsVO.setAgentCode("08");
}else if(mjonMsgAgentStsVO.getAgentCode().equals("b2")||mjonMsgAgentStsVO.getAgentCode().equals("B2")) {
mjonMsgAgentStsVO.setAgentCode("09");
}
MjonMsgAgentStsVO vo = mjonMsgAgentStsService.selectMsgAgentBlineYnInfo(mjonMsgAgentStsVO);
if(vo == null || "".equals(vo.getUseYn()) || !"Y".equals(vo.getUseYn())) {
modelAndView.addObject("message", "문자 발송 불가");
modelAndView.addObject("result", "fail");
} else {
modelAndView.addObject("message", "문자 발송 가능");
modelAndView.addObject("result", "success");
}
}catch (Exception e) {
modelAndView.addObject("message", "오류가 발생하였습니다.");
modelAndView.addObject("result", "fail");
}
return modelAndView;
}
}

View File

@ -1,444 +0,0 @@
package itn.let.mjo.event.web;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.HandlerMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.LoginVO;
import itn.com.cmm.util.StringUtil;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.cop.bbs.service.BoardVO;
import itn.let.mjo.event.service.MjonEventService;
import itn.let.mjo.event.service.MjonEventVO;
import itn.let.mjo.msgcampain.service.MjonCandidateService;
import itn.let.mjo.msgcampain.service.MjonCandidateVO;
import itn.let.mjo.pay.service.MjonPayService;
import itn.let.mjo.pay.service.MjonPayVO;
import itn.let.mjo.pay.service.MjonVaMsgLogVO;
import itn.let.mjo.payva.service.VacsVactService;
import itn.let.mjo.payva.service.VacsVactVO;
import itn.let.uss.umt.service.EgovMberManageService;
import itn.let.uss.umt.service.MberManageVO;
@Controller
public class MjonEventController {
@Resource(name = "MjonEventService")
private MjonEventService mjonEventService;
@Resource(name = "mberManageService")
private EgovMberManageService mberManageService;
@Resource(name = "mjonCandidateService")
private MjonCandidateService mjonCandidateService;
//전용계좌 서비스
@Resource(name = "vacsVactService")
private VacsVactService vacsVactService;
@Resource(name = "mjonPayService")
private MjonPayService mjonPayService;
@RequestMapping("/web/event/selectEventPopAjax.do")
public String selectEventPopAjas(MjonEventVO mjonEventVO, ModelMap model ) throws Exception{
try {
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
model.addAttribute("loginVO", loginVO);
if(loginVO != null) {
System.out.println("+++++++++++++++++++++++ mberId ::: "+loginVO.getId());
}
String nttSj = "[첫결제 이벤트] 첫 결제 시, 누구나 조건 없이 인생 최저가!";
BoardVO boardVO = new BoardVO();
boardVO.setBbsId("BBSMSTR_000000000731");
boardVO.setNttSj(nttSj);
BoardVO resultEvent = mjonEventService.selectEventInfoByNttSj(boardVO);
model.addAttribute("resultEvent", resultEvent);
} catch (Exception e) {
throw new Exception(e);
}
return "web/event/eventMsgFrstPop";
}
/**
* 이벤트 회원 정보 테이블에 기본 정보 입력해 주기.
* 회원아이디, 회원이름, 이벤트 게시판 번호, 이벤트 게시글 번호, 회원 단가 정보, 이벤트 수신동의, 이벤트 유효 상태값(미진행 : N 으로 셋팅)
*
* */
@RequestMapping("/web/event/insertEventDefaultMberInfoAjax.do")
public ModelAndView insertEventDefaultMberInfoAjax(MjonEventVO mjonEventVO) throws Exception{
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
if(loginVO == null) {
modelAndView.addObject("resultSts", "loginFail");
return modelAndView;
}else {
/**
* 이벤트 컨텐츠 정보 불러오기
* 이벤트 게시글 제목 카테고리로 검색해서 불러온다.
*
* */
float nttId = 0;
String bbsId = "BBSMSTR_000000000731"; //이벤트 게시판 번호
String nttSj = "[첫결제 이벤트] 첫 결제 시, 누구나 조건 없이 인생 최저가!";
BoardVO resultEvent = selectEventBoardInfo(bbsId, nttSj);
if(resultEvent != null) {//이벤트 게시판의 이벤트 게시글 번호 셋팅
mjonEventVO.setEventNttId(Float.toString(resultEvent.getNttId()));
}else {//이벤트 게시글 정보가 없으면 0으로 셋팅.
modelAndView.addObject("resultSts", "eventEnded");
return modelAndView;
}
// Step 0. B선 전송사 이용고객 => 이벤트대상 제외처리
MberManageVO mberManageVO = new MberManageVO();
mberManageVO.setMberId(loginVO.getId());
String blineCode = mberManageService.selectBlineCodeByMberId(mberManageVO);
if (blineCode != null && blineCode.equals("N")) {
//이벤트 회원 정보 조회
MjonEventVO eventMberInfo = selectEventMsgMberDefaultInfo(mjonEventVO, resultEvent.getNttId(), bbsId, loginVO.getId(), loginVO.getName());
int resultCnt = 0;
if(eventMberInfo == null) {//등록된 회원정보가 없으면 정보 입력
mjonEventVO.setEventStatus("N");
resultCnt = mjonEventService.insertEventMsgMberDefaultInfo(mjonEventVO);
}else {//등록된 회원정보가 있으면 화면 이동 메세지 처리
String status = eventMberInfo.getEventStatus();
if(status.equals("Y")) {//이벤트가 진행중인 경우
modelAndView.addObject("resultSts", "eventJoined");
}else if(status.equals("E")) {//이벤트가 종료된 경우
modelAndView.addObject("resultSts", "eventEnded");
}else {//이벤트 미진행인 경우 성공으로 결제페이지로 이동되도록 한다.
modelAndView.addObject("resultSts", "success");
}
return modelAndView;
}
}
else {
modelAndView.addObject("resultSts", "eventBline");
return modelAndView;
}
modelAndView.addObject("resultSts", "success");
}
return modelAndView;
}
/**
* 이벤트 회원 정보 테이블에 기본 정보 입력해 주기.
* 회원아이디, 회원이름, 이벤트 게시판 번호, 이벤트 게시글 번호, 회원 단가 정보, 이벤트 수신동의, 이벤트 유효 상태값(미진행 : N 으로 셋팅)
*
* */
@RequestMapping("/web/event/updateEventPolicyMberInfoAjax.do")
public ModelAndView updateEventPolicyMberInfoAjax(MjonEventVO mjonEventVO) throws Exception{
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
if(loginVO == null) {
modelAndView.addObject("message", "문자온 서비스는 로그인 후 이용 가능합니다.");
modelAndView.addObject("resultSts", "loginFail");
return modelAndView;
}else {
//결제내역 카운트 조회
int payCnt = mjonPayService.selectMemerPayCount(loginVO.getId());
//System.out.println("첫 결제 회원만 이벤트 신청이 가능합니다.");
//System.out.println(payCnt);
//System.out.println(payCnt);
//System.out.println(payCnt);
if (payCnt > 0) {
modelAndView.addObject("message", "첫 결제 회원만 이벤트 신청이 가능합니다.");
modelAndView.addObject("resultSts", "statusAlreadyPayedFail");
return modelAndView;
}
mjonEventVO.setMberId(loginVO.getId());
mjonEventVO.setMberNm(loginVO.getName());
//이벤트 회원정보 존재여부 확인 회원 정보 불러오기
MjonEventVO eventMberInfo = mjonEventService.selectEventMsgMberDefaultInfo(mjonEventVO);
int resultCnt = 0;
if(eventMberInfo == null) {//등록된 회원정보가 없으면 오류 발생
//mjonEventVO.setEventStatus("N");
//resultCnt = mjonEventService.insertEventMsgMberDefaultInfo(mjonEventVO);
modelAndView.addObject("message", "이벤트 회원 정보가 없습니다.");
modelAndView.addObject("resultSts", "emptyMber");
return modelAndView;
}else if(!eventMberInfo.getEventStatus().equals("N")){//이벤트가 진행중이거나, 종료된 회원인 경우
modelAndView.addObject("message", "현재 이벤트를 진행 중이시거나 완료하신 회원입니다.");
modelAndView.addObject("resultSts", "statusFail");
return modelAndView;
}else {//등록된 회원정보가 있으면 유의사항 문자 수신 동의 정보 업데이트 처리
resultCnt = mjonEventService.updateEventPolicyMberInfo(mjonEventVO);
if(resultCnt > 0) {//수정이 정상적으로 경우
modelAndView.addObject("resultSts", "success");
}else {//이벤트 미진행인 경우 성공으로 결제페이지로 이동되도록 한다.
modelAndView.addObject("resultSts", "updateFail");
}
return modelAndView;
}
}
}
/**
* 이벤트 결제하기 화면
* @param searchVO
* @param model
* @return "/web/pay/PayView.do"
* @throws Exception
*/
@RequestMapping(value= {"/web/event/member/pay/PayView_OLD.do"})
public String PayView(@ModelAttribute("mjonPayVO") MjonPayVO mjonPayVO,
HttpServletRequest request, RedirectAttributes redirectAttributes,
ModelMap model) throws Exception{
String pattern = (String) request.getAttribute(
HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE) ;
//로그인 정보 획득
// LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(loginVO == null) {
//redirectAttributes.addFlashAttribute("message", "문자온 서비스는 로그인 후 이용 가능합니다.");
return "redirect:/web/user/login/login.do";
}
//기존 결제 내역이 있는 회원인지 확인
int payCnt = 0;
if(StringUtil.isNotEmpty(userId)) {
//결제내역 카운트 조회
payCnt = mjonPayService.selectMemerPayCount(userId);
if(payCnt > 0) {
redirectAttributes.addFlashAttribute("message", "고객님께서는 첫결제 이벤트 대상이 아닙니다.");
return "redirect:/web/main/mainPage.do";
}else {
String bbsId = "BBSMSTR_000000000731"; //이벤트 게시판 번호
String nttSj = "[첫결제 이벤트] 첫 결제 시, 누구나 조건 없이 인생 최저가!";
BoardVO resultEvent = selectEventBoardInfo(bbsId, nttSj);
if(resultEvent != null) {//진행중 이벤트 이면 이벤트 게시글 번호 셋팅
// Step 0. B선 전송사 이용고객 => 이벤트대상 제외처리
MberManageVO mberManageVO = new MberManageVO();
mberManageVO.setMberId(userId);
String blineCode = mberManageService.selectBlineCodeByMberId(mberManageVO);
if (blineCode != null && blineCode.equals("N")) {
//이벤트 회원 정보 조회
MjonEventVO mjonEventVO = new MjonEventVO();
MjonEventVO eventMberInfo = selectEventMsgMberDefaultInfo(mjonEventVO, resultEvent.getNttId(), bbsId, loginVO.getId(), loginVO.getName());
int resultCnt = 0;
if(eventMberInfo == null) {//등록된 회원정보가 없으면 정보 입력
mjonEventVO.setEventStatus("N");
resultCnt = mjonEventService.insertEventMsgMberDefaultInfo(mjonEventVO);
}else {//등록된 회원정보가 있으면 화면 이동 메세지 처리
String status = eventMberInfo.getEventStatus();
if(status.equals("Y")) {//이벤트가 진행중인 경우
redirectAttributes.addFlashAttribute("message", "현재 첫 결제 이벤트를 진행중입니다.");
return "redirect:/web/main/mainPage.do";
}else if(status.equals("E")) {//이벤트가 종료된 경우
redirectAttributes.addFlashAttribute("message", "현재 첫 결제 이벤트를 완료 하였습니다.");
return "redirect:/web/main/mainPage.do";
}
}
}
else {
redirectAttributes.addFlashAttribute("message", "이벤트 대상자가 아닙니다.");
return "redirect:/web/main/mainPage.do";
}
}else {//이벤트 게시글 정보가 없으면 0으로 셋팅.
redirectAttributes.addFlashAttribute("message", "첫 결제 이벤트는 종료 되었습니다.");
return "redirect:/web/main/mainPage.do";
}
}
}
MberManageVO mberManageVO = mberManageService.selectMber(loginVO.getId());
model.addAttribute("mberManageVO", mberManageVO);
MjonCandidateVO mjonCandidateVO = new MjonCandidateVO();
if(userId != "") {
mjonCandidateVO = mjonCandidateService.selectCandidateDataInfo(userId);
model.addAttribute("mjonCandidateVO",mjonCandidateVO);
}
mjonPayVO.setReturnURL(request.getRequestURL().toString().split("pay")[0] + "nicepay/payResultAjax.do") ;
/** pageing */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(mjonPayVO.getPageIndex());
paginationInfo.setRecordCountPerPage(mjonPayVO.getPageUnit());
paginationInfo.setPageSize(mjonPayVO.getPageSize());
mjonPayVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
mjonPayVO.setLastIndex(paginationInfo.getLastRecordIndex());
mjonPayVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
if("".equals(mjonPayVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
mjonPayVO.setSearchSortCnd("moid");
mjonPayVO.setSearchSortOrd("desc");
}
mjonPayVO.setUserId(loginVO.getId());
/*List<MjonPayVO> resultList = mjonPayService.selectPayList(mjonPayVO);*/
/*model.addAttribute("resultList", resultList);
paginationInfo.setTotalRecordCount(resultList.size() > 0 ? ((MjonPayVO)resultList.get(0)).getTotCnt() : 0);*/
/*model.addAttribute("paginationInfo", paginationInfo);*/
//대상 리스트 가져오기
VacsVactVO vacsVactVO = new VacsVactVO();
vacsVactVO.setMberId(loginVO.getId());
//List<?> bankList = vacsVactService.selectBankAcctList(tempVO); //할당 가능한 계좌 수량 리스트 받아오기
List<?> bankList = vacsVactService.selectBankAcctAllList(vacsVactVO); //할당 가능한 계좌 수량 리스트 받아오기
List<?> myBankList = vacsVactService.selectMyBankAcctList(vacsVactVO); //내가 할당받은 전용계좌 리스트 받아오기
MjonVaMsgLogVO vaMsgLogVO = new MjonVaMsgLogVO();
vaMsgLogVO.setMberId(loginVO.getId());
Date now = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
String date = sdf.format(now);
vaMsgLogVO.setSendDate(date);
MjonVaMsgLogVO resultMsgInfo = mjonPayService.selectMyAcctSendCnt(vaMsgLogVO);
//대상 리스트, 페이징 정보 전달
model.addAttribute("resultList", bankList);
model.addAttribute("resultMyList", myBankList);
model.addAttribute("resultMsgInfo", resultMsgInfo);
model.addAttribute("mjonPayVO", mjonPayVO);
// 탭이동
String tabType = "1";
if(request.getParameter("tabType") != null) {
tabType = request.getParameter("tabType");
}
model.addAttribute("tabType", tabType);
return "/web/event/pay/EventPayView_OLD";
}
//이벤트 게시글 정보 불러오기 함수
public BoardVO selectEventBoardInfo(String bbsId, String nttSj) throws Exception{
BoardVO boardVO = new BoardVO();
boardVO.setBbsId(bbsId);
boardVO.setNttSj(nttSj);
BoardVO resultEvent = mjonEventService.selectEventInfoByNttSj(boardVO);
return resultEvent;
}
//이벤트 회원 정보 불러오기 함수
public MjonEventVO selectEventMsgMberDefaultInfo(MjonEventVO mjonEventVO, float nttId, String bbsId, String mberId, String mberNm) throws Exception{
mjonEventVO.setEventNttId(Float.toString(nttId));
mjonEventVO.setEventBbsId(bbsId);
mjonEventVO.setMberId(mberId);
mjonEventVO.setMberNm(mberNm);
mjonEventVO.setEventShortPrice("7.5");
mjonEventVO.setEventLongPrice("32");
mjonEventVO.setEventPicturePrice("59");
mjonEventVO.setEventPicture2Price("67");
mjonEventVO.setEventPicture3Price("70");
//이벤트 회원정보 존재여부 확인 회원 정보 불러오기
MjonEventVO eventMberInfo = mjonEventService.selectEventMsgMberDefaultInfo(mjonEventVO);
return eventMberInfo;
}
}

View File

@ -1,253 +0,0 @@
package itn.let.mjo.event.web;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.HandlerMapping;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.LoginVO;
import itn.com.cmm.util.StringUtil;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.cop.bbs.service.BoardVO;
import itn.let.mjo.event.service.MjonEventService;
import itn.let.mjo.event.service.MjonEventVO;
import itn.let.mjo.msgcampain.service.MjonCandidateService;
import itn.let.mjo.msgcampain.service.MjonCandidateVO;
import itn.let.mjo.pay.service.MjonPayService;
import itn.let.mjo.pay.service.MjonPayVO;
import itn.let.mjo.pay.service.MjonVaMsgLogVO;
import itn.let.mjo.payva.service.VacsVactService;
import itn.let.mjo.payva.service.VacsVactVO;
import itn.let.uss.umt.service.EgovMberManageService;
import itn.let.uss.umt.service.MberManageVO;
@Controller
public class MjonEventPayV2Controller {
@Resource(name = "MjonEventService")
private MjonEventService mjonEventService;
@Resource(name = "mberManageService")
private EgovMberManageService mberManageService;
@Resource(name = "mjonCandidateService")
private MjonCandidateService mjonCandidateService;
//전용계좌 서비스
@Resource(name = "vacsVactService")
private VacsVactService vacsVactService;
@Resource(name = "mjonPayService")
private MjonPayService mjonPayService;
/**
* 이벤트 결제하기 화면
* @param searchVO
* @param model
* @return "/web/event/member/pay/PayView.do"
* @throws Exception
*/
@RequestMapping(value= {"/web/event/member/pay/PayView.do"})
public String PayViewV2(@ModelAttribute("mjonPayVO") MjonPayVO mjonPayVO,
HttpServletRequest request, RedirectAttributes redirectAttributes,
ModelMap model) throws Exception{
String pattern = (String) request.getAttribute(
HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE) ;
//로그인 정보 획득
// LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(loginVO == null) {
//redirectAttributes.addFlashAttribute("message", "문자온 서비스는 로그인 후 이용 가능합니다.");
return "redirect:/web/user/login/login.do";
}
// 하드코딩
//if(!userId.equals("nobledeco")) {
// if(!userId.equals("nobledeco2")) {
// if(!userId.equals("nopay")) {
// return "redirect:/web/main/mainPage.do";
// }
// }
//}
//기존 결제 내역이 있는 회원인지 확인
int payCnt = 0;
if(StringUtil.isNotEmpty(userId)) {
//결제내역 카운트 조회
payCnt = mjonPayService.selectMemerPayCount(userId);
if(payCnt > 0) {
redirectAttributes.addFlashAttribute("message", "고객님께서는 첫결제 이벤트 대상이 아닙니다.");
return "redirect:/web/main/mainPage.do";
}else {
String bbsId = "BBSMSTR_000000000731"; //이벤트 게시판 번호
String nttSj = "[첫결제 이벤트] 첫 결제 시, 누구나 조건 없이 인생 최저가!";
BoardVO resultEvent = selectEventBoardInfo(bbsId, nttSj);
if(resultEvent != null) {//진행중 이벤트 이면 이벤트 게시글 번호 셋팅
// Step 0. B선 전송사 이용고객 => 이벤트대상 제외처리
MberManageVO mberManageVO = new MberManageVO();
mberManageVO.setMberId(userId);
String blineCode = mberManageService.selectBlineCodeByMberId(mberManageVO);
if (blineCode != null && blineCode.equals("N")) {
//이벤트 회원 정보 조회
MjonEventVO mjonEventVO = new MjonEventVO();
MjonEventVO eventMberInfo = selectEventMsgMberDefaultInfo(mjonEventVO, resultEvent.getNttId(), bbsId, loginVO.getId(), loginVO.getName());
int resultCnt = 0;
if(eventMberInfo == null) {//등록된 회원정보가 없으면 정보 입력
mjonEventVO.setEventStatus("N");
resultCnt = mjonEventService.insertEventMsgMberDefaultInfo(mjonEventVO);
}else {//등록된 회원정보가 있으면 화면 이동 메세지 처리
String status = eventMberInfo.getEventStatus();
if(status.equals("Y")) {//이벤트가 진행중인 경우
redirectAttributes.addFlashAttribute("message", "현재 첫 결제 이벤트를 진행중입니다.");
return "redirect:/web/main/mainPage.do";
}else if(status.equals("E")) {//이벤트가 종료된 경우
redirectAttributes.addFlashAttribute("message", "현재 첫 결제 이벤트를 완료 하였습니다.");
return "redirect:/web/main/mainPage.do";
}
}
}
else {
redirectAttributes.addFlashAttribute("message", "이벤트 대상자가 아닙니다.");
return "redirect:/web/main/mainPage.do";
}
}else {//이벤트 게시글 정보가 없으면 0으로 셋팅.
redirectAttributes.addFlashAttribute("message", "첫 결제 이벤트는 종료 되었습니다.");
return "redirect:/web/main/mainPage.do";
}
}
}
MberManageVO mberManageVO = mberManageService.selectMber(loginVO.getId());
model.addAttribute("mberManageVO", mberManageVO);
MjonCandidateVO mjonCandidateVO = new MjonCandidateVO();
if(userId != "") {
mjonCandidateVO = mjonCandidateService.selectCandidateDataInfo(userId);
model.addAttribute("mjonCandidateVO",mjonCandidateVO);
}
mjonPayVO.setReturnURL(request.getRequestURL().toString().split("pay")[0] + "nicepay/payResultAjax.do") ;
/** pageing */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(mjonPayVO.getPageIndex());
paginationInfo.setRecordCountPerPage(mjonPayVO.getPageUnit());
paginationInfo.setPageSize(mjonPayVO.getPageSize());
mjonPayVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
mjonPayVO.setLastIndex(paginationInfo.getLastRecordIndex());
mjonPayVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
if("".equals(mjonPayVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
mjonPayVO.setSearchSortCnd("moid");
mjonPayVO.setSearchSortOrd("desc");
}
mjonPayVO.setUserId(loginVO.getId());
/*List<MjonPayVO> resultList = mjonPayService.selectPayList(mjonPayVO);*/
/*model.addAttribute("resultList", resultList);
paginationInfo.setTotalRecordCount(resultList.size() > 0 ? ((MjonPayVO)resultList.get(0)).getTotCnt() : 0);*/
/*model.addAttribute("paginationInfo", paginationInfo);*/
//대상 리스트 가져오기
VacsVactVO vacsVactVO = new VacsVactVO();
vacsVactVO.setMberId(loginVO.getId());
//List<?> bankList = vacsVactService.selectBankAcctList(tempVO); //할당 가능한 계좌 수량 리스트 받아오기
List<?> bankList = vacsVactService.selectBankAcctAllList(vacsVactVO); //할당 가능한 계좌 수량 리스트 받아오기
List<?> myBankList = vacsVactService.selectMyBankAcctList(vacsVactVO); //내가 할당받은 전용계좌 리스트 받아오기
MjonVaMsgLogVO vaMsgLogVO = new MjonVaMsgLogVO();
vaMsgLogVO.setMberId(loginVO.getId());
Date now = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
String date = sdf.format(now);
vaMsgLogVO.setSendDate(date);
MjonVaMsgLogVO resultMsgInfo = mjonPayService.selectMyAcctSendCnt(vaMsgLogVO);
//대상 리스트, 페이징 정보 전달
model.addAttribute("resultList", bankList);
model.addAttribute("resultMyList", myBankList);
model.addAttribute("resultMsgInfo", resultMsgInfo);
model.addAttribute("mjonPayVO", mjonPayVO);
// 탭이동
String tabType = "1";
if(request.getParameter("tabType") != null) {
tabType = request.getParameter("tabType");
}
model.addAttribute("tabType", tabType);
return "/web/event/pay/EventPayView";
}
//이벤트 게시글 정보 불러오기 함수
public BoardVO selectEventBoardInfo(String bbsId, String nttSj) throws Exception{
BoardVO boardVO = new BoardVO();
boardVO.setBbsId(bbsId);
boardVO.setNttSj(nttSj);
BoardVO resultEvent = mjonEventService.selectEventInfoByNttSj(boardVO);
return resultEvent;
}
//이벤트 회원 정보 불러오기 함수
public MjonEventVO selectEventMsgMberDefaultInfo(MjonEventVO mjonEventVO, float nttId, String bbsId, String mberId, String mberNm) throws Exception{
mjonEventVO.setEventNttId(Float.toString(nttId));
mjonEventVO.setEventBbsId(bbsId);
mjonEventVO.setMberId(mberId);
mjonEventVO.setMberNm(mberNm);
mjonEventVO.setEventShortPrice("7.5");
mjonEventVO.setEventLongPrice("32");
mjonEventVO.setEventPicturePrice("59");
mjonEventVO.setEventPicture2Price("67");
mjonEventVO.setEventPicture3Price("70");
//이벤트 회원정보 존재여부 확인 회원 정보 불러오기
MjonEventVO eventMberInfo = mjonEventService.selectEventMsgMberDefaultInfo(mjonEventVO);
return eventMberInfo;
}
}

View File

@ -1,98 +0,0 @@
package itn.let.mjo.human.web;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import itn.let.mjo.msgdata.web.MjonMsgDataController;
import itn.let.uss.umt.service.EgovMberManageService;
import itn.let.uss.umt.service.EgovUserManageService;
import itn.let.uss.umt.service.MberManageVO;
import itn.let.uss.umt.service.UserManageVO;
@Controller
public class MjonHumanPageController {
/** userManageService */
@Resource(name = "userManageService")
private EgovUserManageService userManageService;
/** mberManageService */
@Resource(name = "mberManageService")
private EgovMberManageService mberManageService;
private static final Logger logger = LoggerFactory.getLogger(MjonMsgDataController.class);
@RequestMapping(value="/web/user/humanPage.do")
public String humanPageIndex() throws Exception {
return "web/login/humanPage";
}
@RequestMapping(value="/web/user/humanPageAuthenticatedPage.do")
public String humanPageAuthenticatedUser() throws Exception {
return "web/login/humanPageAuthenticatedPage";
}
@RequestMapping(value="/web/user/humanCertifiedAjax.do")
public ModelAndView humanCertifiedAjax(
HttpServletRequest request, HttpServletResponse response, ModelMap model,
@ModelAttribute("userManageVO") UserManageVO userManageVO) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
try {
UserManageVO userInfoVO = new UserManageVO();
userInfoVO.setEmplyrNm(userManageVO.getEmplyrNm()); // 이름
userInfoVO.setMblDn(userManageVO.getMblDn()); // Dn
List<UserManageVO> usedNmList = userManageService.selectUserIdAjax(userInfoVO);
boolean TorF = usedNmList.size() > 0 ? true : false;
if (!TorF) {
System.out.println(TorF);
System.out.println(TorF);
modelAndView.addObject("message", "입력하신 아이디/이름 정보에 맞는 회원이 없습니다.");
modelAndView.addObject("result", "fail-check");
modelAndView.addObject("resultSts", "0");
modelAndView.addObject("resultBlockSts", "0");
return modelAndView;
}
MberManageVO mberManageVO = new MberManageVO();
// 회원 휴면회원에서 일반회원으로 업데이트
mberManageVO.setMberId(usedNmList.get(0).getEmplyrId()); //탈퇴사유 직접입력으로 타입 지정
mberManageVO.setDormantYn("N");
int updateCount = mberManageService.updateUserDormant(mberManageVO);
if(updateCount != 0) {
modelAndView.addObject("result", "success");
}else {
modelAndView.addObject("result", "fail");
}
}catch (Exception e) {
logger.error(e.getMessage(), e);
}
return modelAndView;
}
}

View File

@ -62,9 +62,6 @@ public class KisaController {
@Resource(name="EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name="EgovFileMngService")
private EgovFileMngService fileMngService;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileService;
@ -250,7 +247,7 @@ public class KisaController {
final Map<String, MultipartFile> files = multiRequest.getFileMap();
if (!files.isEmpty()) {
List<FileVO> result = fileUtil.parseFileInf(files, "KISA_", 0, "", "", "");
atchFileId = fileMngService.insertFileInfs(result);
atchFileId = fileService.insertFileInfs(result);
kisaVO.setAtchFileId(atchFileId);
}
@ -284,15 +281,15 @@ public class KisaController {
if ("".equals(atchFileId)) {
List<FileVO> result = fileUtil.parseFileInf(files, "KISA_", 0, atchFileId, "", "");
atchFileId = fileMngService.insertFileInfs(result);
atchFileId = fileService.insertFileInfs(result);
kisaVO.setAtchFileId(atchFileId);
} else {
FileVO fvo = new FileVO();
fvo.setAtchFileId(atchFileId);
int cnt = fileMngService.getMaxFileSN(fvo);
int cnt = fileService.getMaxFileSN(fvo);
List<FileVO> result = fileUtil.parseFileInf(files, "KISA_", cnt, atchFileId, "", "");
fileMngService.updateFileInfs(result);
fileService.updateFileInfs(result);
}
}

View File

@ -349,71 +349,6 @@ public class MjonCommon {
return mjonMsgVO;
}
/*
@SuppressWarnings("unchecked")
public void getAdminKakaoAtSandSlack(KakaoVO kakaoVO) {
HttpClient client = new HttpClient();
PostMethod post = new PostMethod(SLACK_URL);
JSONObject json = new JSONObject();
try {
String reserveYn = kakaoVO.getReserveYn();
String atDelayYn = kakaoVO.getAtDelayYn();
String smsTxt = kakaoVO.getTemplateContent();
String reservSmsTxt = "";
String smisingSmsTxt = "";
//예약문자를 발송하는 경우 문자 내용 앞에 "[예약]" 표시되도록 처리
if(reserveYn.equals("Y")) {
if(atDelayYn.equals("Y")) {//예약문자 스미싱의심 경우
reservSmsTxt = "[스미싱의심][예약]" + smsTxt;
}else {
reservSmsTxt = "[예약]" + smsTxt;
}
smsTxt = reservSmsTxt;
}else if(atDelayYn.equals("Y")) {
smisingSmsTxt = "[스미싱의심]" + smsTxt;
smsTxt = smisingSmsTxt;
}
String sandName = kakaoVO.getCallFrom();
String userId = kakaoVO.getUserId();
String msgType = "";
if(kakaoVO.getMsgType().equals("8")) {
msgType = "[알림톡]";
}else if(kakaoVO.getMsgType().equals("9")){
msgType = "[친구톡]";
}
sandName = "[" + userId + "]" + "[" + sandName + "]" + msgType;
json.put("channel", SLACK_CHANNEL);
json.put("text", smsTxt);
json.put("username", sandName);
post.addParameter("payload", json.toString());
// 처음에 utf-8로 content-type안넣어주니까 한글은 깨져서 content-type넣어줌
post.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
int responseCode = client.executeMethod(post);
String response = post.getResponseBodyAsString();
if (responseCode != HttpStatus.SC_OK) {
System.out.println("Response: " + response);
}
} catch (IllegalArgumentException e) {
System.out.println("IllegalArgumentException posting to Slack " + e);
} catch (IOException e) {
System.out.println("IOException posting to Slack " + e);
} catch (Exception e) {
System.out.println("Exception posting to Slack " + e);
} finally {
post.releaseConnection();
}
}
*/
public String getCreateMsgUserIdgen(String subUserId, String lastId) throws Exception{
@ -449,42 +384,36 @@ public class MjonCommon {
}
private String formatSandName(MjonMsgVO mjonMsgVO) {
String userId = mjonMsgVO.getUserId();
String callFrom = mjonMsgVO.getCallFrom();
String msgType = getMessageTypeLabel(mjonMsgVO);
return String.format("[%s][%s]%s", userId, callFrom, msgType);
}
private String getMessageTypeLabel(MjonMsgVO mjonMsgVO) {
String msgType = mjonMsgVO.getMsgType();
int fileCount = parseIntOrDefault(mjonMsgVO.getFileCnt(), 0);
switch (msgType) {
case "4":
return "[단문]";
case "6":
return fileCount == 0 ? "[장문]" : "[그림]";
default:
return "";
}
}
private int parseIntOrDefault(String value, int defaultValue) {
try {
return Integer.parseInt(value);
} catch (NumberFormatException e) {
return defaultValue;
}
}
private String formatSandName(MjonMsgVO mjonMsgVO) {
String userId = mjonMsgVO.getUserId();
String callFrom = mjonMsgVO.getCallFrom();
String msgType = getMessageTypeLabel(mjonMsgVO);
return String.format("[%s][%s]%s", userId, callFrom, msgType);
}
private String getMessageTypeLabel(MjonMsgVO mjonMsgVO) {
String msgType = mjonMsgVO.getMsgType();
int fileCount = parseIntOrDefault(mjonMsgVO.getFileCnt(), 0);
switch (msgType) {
case "4":
return "[단문]";
case "6":
return fileCount == 0 ? "[장문]" : "[그림]";
default:
return "";
}
}
private int parseIntOrDefault(String value, int defaultValue) {
try {
return Integer.parseInt(value);
} catch (NumberFormatException e) {
return defaultValue;
}
}
/**
* @methodName : processUserAndCheckSms
@ -549,10 +478,6 @@ private int parseIntOrDefault(String value, int defaultValue) {
// 사용자 정보 조회 기본값 처리
public UserManageVO getUserManageInfo(String userId) throws Exception {
// UserManageVO userManageVO = new UserManageVO();
// userManageVO.setAdminSmsNoticeYn("Y"); // 기본값
// userManageVO.setSmishingYn("N"); // 기본값
//
return userManageService.selectAdminSmsNoticeYn(new UserManageVO(userId));
}
@ -744,8 +669,4 @@ private int parseIntOrDefault(String value, int defaultValue) {
return result;
}
}

View File

@ -124,9 +124,6 @@ public class MjonMsgController {
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
@Resource(name = "mjonPayService")
private MjonPayService mjonPayService;
@Resource(name = "certService")
private CertService certService;
@ -161,57 +158,11 @@ public class MjonMsgController {
@Resource(name = "egovMberCmpHstService")
private EgovMberCmpHstService egovMberCmpHstService;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileService;
//전용계좌 서비스
@Resource(name = "vacsVactService")
private VacsVactService vacsVactService;
//배열 정의{"컬럼순차번호, 컬럼이름, 컬럼내용, 컬럼이름에 붙여야할 내용(엑셀코드양식다운로드시 필요)"}
private String[][] sendMsgExcelValue ={
{"0" ,"번호" , "1" , "" },
{"1", "아이디" , "itn" , ""},
{"2", "발신번호" , "01012345678", ""},
{"3", "발송건수" , "3", ""},
{"4", "요청시간" , "2021-06-01 19:05:12", ""},
{"5", "내용" , "문자메시지 내용", ""},
{"6", "메시지타입" , "SMS전송", ""},
{"7", "접속기기" , "", ""},
{"8", "메시지타입" , "NPRO(아이하트)", ""}
};
//배열 정의{"컬럼순차번호, 컬럼이름, 컬럼내용, 컬럼이름에 붙여야할 내용(엑셀코드양식다운로드시 필요)"}
private String[][] sendMsgDtlExcelValue ={
{"0" ,"번호" , "1" , "" },
{"1", "아이디" , "itn" , ""},
{"2", "발신번호" , "01012345678", ""},
{"3", "수신번호" , "01012345678", ""},
{"4", "전송시간" , "2021-06-01 19:19:57", ""},
{"5", "내용" , "문자메시지 내용", ""},
{"6", "현재상태" , "결과수신", ""},
{"7", "처리결과" , "410/i", ""},
{"8", "메시지타입" , "SMS전송", ""},
{"9", "접속기기" , "", ""},
{"10", "메시지타입" , "NPRO(아이하트)", ""},
{"11", "통신사" , "ETC", ""} ,
{"12", "삭제여부" , "미삭제", ""}
} ;
//회원정보 팝업 최근 발송 문자 리스트 엑셀 다운로드
private String[][] sendMsgUsrExcelValue ={
{"0" ,"번호" , "1" , "" },
{"1", "아이디" , "itn" , ""},
{"2", "발신번호" , "01012345678", ""},
{"3", "요청시간" , "2021-06-01 19:05:12", ""},
{"4", "내용" , "문자메시지 내용", ""},
{"5", "문자종류" , "SMS전송", ""},
{"6", "건수" , "", ""},
{"7", "금액" , "", ""},
{"8", "발송결과" , "", ""},
{"9", "전송사" , "", ""}
};
/**
* 문자전송 리스트
@ -1762,7 +1713,7 @@ public class MjonMsgController {
* @return "/uss/ion/msg/SendNumberList"
* @throws Exception
*/
@RequestMapping(value= {"/uss/ion/msg/SendNumberList.do" , "/web/msg/SendNumberList.do","/uss/ion/msg/BlockNumberList.do" , "/web/msg/SendNumberList.do"})
@RequestMapping(value= {"/uss/ion/msg/SendNumberList.do"})
public String MjonNumberList(@ModelAttribute("searchVO") MjPhoneMemberVO searchVO,
HttpServletRequest request,
ModelMap model) throws Exception{
@ -1812,14 +1763,6 @@ public class MjonMsgController {
searchVO.setPhmType("01"); //발신조회
}
/*
if(pattern.equals("/uss/ion/msg/SendNumberList.do") || pattern.equals("/web/msg/SendNumberList.do")) {
searchVO.setPhmType("01"); //발신조회
}else {
searchVO.setPhmType("03"); //거부조회
}
*/
if(pattern.equals("/uss/ion/msg/SendNumberList.do") || pattern.equals("/web/msg/SendNumberList.do")) {
// searchVO.setPhmType("01"); //발신조회
}else {
@ -2713,237 +2656,6 @@ public class MjonMsgController {
return "/uss/ion/msg/ReceiveNumberList";
}
/**
* 전화인증
* @param searchVO
* @param model
* @return "/uss/ion/msg/LankSendNumber"
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/ArsAuthAjax.do"})
public ModelAndView ArsAuthAjax(@ModelAttribute("searchVO") MjPhoneMemberVO searchVO,
HttpServletRequest request,
HttpSession session,
ModelMap model) throws Exception{
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
boolean isSuccess = true;
String msg = "";
String result ="";
String userid = "itn0202"; //ARS 관리자 가입 Id
String type = "0"; //0=음성인증 : 인증번호를 듣고 화면에 입력, 1=SMS 문자인증 : 기존 문자인증과 동일한 기능, 2=음성인증(단순확인):음성안내 폰에 1자리 번호 입력, 3=음성인증(인증번호):인증번호를 화면 또는 전화 음성 확인 폰에 인증번호 입력
String callee = searchVO.getPhoneNumber(); //고객 전화번호
String code = ""; //4~6자리 인증번호(음성 ARS 에서 인증하라고 하는 번호: ITN에서 임의로 생성)
String svcnumber = "221"; //개통 별도 안내 ( hjhauth.jar JDK 1.8 사용조건)
String command = "API_101000"; //요청코드 고정값
boolean is1MinutePass = true;
// Start
SendLogVO sendLogVO2 = new SendLogVO();
sendLogVO2.setReceive(callee);
sendLogVO2 = mjonMsgDataService.selectSysMsgLog(sendLogVO2);
if (sendLogVO2 == null) {
// Pass : 1분 경과
} else {
// 시간 비교
Date nowDate = new Date();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date compareDate = format.parse(sendLogVO2.getFrstSendPnttm());
Calendar cal = Calendar.getInstance();
cal.setTime(compareDate);
// 1분 추가
cal.add(Calendar.MINUTE, +1);
compareDate = cal.getTime();
if (compareDate.compareTo(nowDate) < 0) {
// Pass : 1분 경과
} else if (compareDate.compareTo(nowDate) > 0) {
// 제한 : 1분 미만
is1MinutePass = false;
}
}
// 1분 경과
if (is1MinutePass == true) {
//인증번호 랜덤 생성
long seed = System.currentTimeMillis();
Random random = new Random(seed);
//code = Integer.toString(random.nextInt(4));
StringBuffer randomCode = new StringBuffer();
for(int i=0; i<6; i++) {
code = randomCode.append(Integer.toString(random.nextInt(10))).toString();
}
try{
Authentication auth = new Authentication();
auth.setUserid(userid);
auth.setType("0");
auth.setCallee(callee);
auth.setCode(code);
auth.setSvcnumber(svcnumber); //jdk 1.8 버전부터 적용
//boolean bool_rtn = auth.send_Auth_Seed();
//전달 받은 전화번호로 전화를 걸어준다.
boolean bool_rtn = auth.send_Auth_Stan();
result = auth.getResult();
//접속 아이피 정보를 받아온다.
ClientIP clientIp = new ClientIP();
String ip = clientIp.getClientIP(request);
//세션에 인증 정보를 저장해 준다.
AuthCertVO certVO = new AuthCertVO();
certVO.setCertPhone(callee);
certVO.setCertCode(code);
certVO.setCertIpaddr(ip);
certVO.setCertType("ARS전화인증");
certVO.setCertResult(result);
Date now = new Date();
SimpleDateFormat transFormat = new SimpleDateFormat("yyyyMMddHHmmss");
//현재 날짜 저장하기
certVO.setCertDate(transFormat.format(now));
request.getSession().setAttribute("AuthARSCertVO", certVO);
// 본인인증 확인용
/*session = request.getSession();
AuthCertVO certArsVO = (AuthCertVO) session.getAttribute("AuthARSCertVO");
System.out.println("++++++++++++++++ code ::: "+certArsVO.getCertCode());
System.out.println("++++++++++++++++ phone ::: "+certArsVO.getCertPhone());
System.out.println("++++++++++++++++ ip ::: "+certArsVO.getCertIpaddr());*/
model.addAttribute("result", result);
model.addAttribute("certCode", code);
// Step1. 문자발송
Map<String, Object> mapInfo = new HashMap<String, Object>();
mapInfo = sendMsgData("system", code, "15518011", callee);
isSuccess = Boolean.parseBoolean((mapInfo.get("IsSuccess").toString()));
msg = mapInfo.get("Msg").toString();
}catch(Exception e) {
//throw new AppException(new ErrorHandler("AuthVoice",e.getMessage()).getMessage());
System.out.print(e);
}
}
else {
isSuccess = false;
msg = "1분후 인증번호 발송해주세요.";
}
model.addAttribute("result", result);
model.addAttribute("certCode", code);
model.addAttribute("isSuccess", isSuccess);
model.addAttribute("msg", msg);
return modelAndView;
}
// 문자발송
public Map<String, Object> sendMsgData(String userId, String code, String fromMobile, String toMobile) throws Exception{
boolean isSuccess = true;
String msg = "인증번호 문자 전송이 완료되었습니다.";
String resultSts = "0";
String resultBlockSts = "0";
boolean is1MinutePass = true;
String smsTxt = "[문자온] 인증번호 : " + code;
try {
Date nowDate = new Date();
SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
MjonMsgVO mjonMsgVO = new MjonMsgVO();
mjonMsgVO.setUserId("system");
String msgType = "4";
// 전송사 전송 배분
MjonMsgVO pramVO = new MjonMsgVO();
List<MjonMsgVO> sendRateList = mjonMsgService.selectTodayAgentSendCntList(pramVO); // 전송사 전송 배분률 현재 전송건수
// 조회
for (MjonMsgVO tmpVO : sendRateList) {
float cnt = Float.parseFloat(tmpVO.getMsgGroupCnt());
float totCnt = tmpVO.getTotCnt();
tmpVO.setSendRateInfo(Float.parseFloat(tmpVO.getSendRate()) - (cnt / totCnt * 100)); // 배분률 - 현재전송 비율
}
String sendAgent = sendRateList.get(0).getAgentCode();
float maxRate = sendRateList.get(0).getSendRateInfo();
for (MjonMsgVO tmpVO : sendRateList) { // 배분률 대비 현재전송 비율이 가장 적은거 찾기
if (maxRate < tmpVO.getSendRateInfo()) {
maxRate = tmpVO.getSendRateInfo();
sendAgent = tmpVO.getAgentCode();
}
}
mjonMsgVO.setMsgDiv("S"); // 단문
// 문자타입별 대표전송사 정보
MjonMsgVO mjonMsgVO2 = new MjonMsgVO();
mjonMsgVO2 = mjonMsgService.selectRepMsgAgetnInfo(mjonMsgVO);
// 전송사 구분 코드 - 01 : 아이하트, 02 : 현대 퓨쳐넷, 03 : 아이엠오, 04 : 다우기술
mjonMsgVO.setAgentCode(mjonMsgVO2.getAgentCode()); //전송사 선택
// 전송금액
mjonMsgVO.setTotPrice(mjonMsgVO2.getAgentPrice().toString()); //총금액
mjonMsgVO.setEachPrice(mjonMsgVO2.getAgentPrice().toString()); //한건 금액
mjonMsgVO.setMsgType("4");
mjonMsgVO.setSmsTxt(smsTxt);
mjonMsgVO.setCallFrom(fromMobile);
mjonMsgVO.setCallTo(toMobile);
mjonMsgVO.setReserveYn("N"); // 즉시 전송
mjonMsgVO.setMsgGroupCnt("0");
mjonMsgVO.setUserId(userId);
mjonMsgVO.setMsgPayCode("SMS");
mjonMsgVO.setReqDate(simpleDateFormat2.format(nowDate));
MjonMsgReturnVO returnVO = mjonMsgDataService.insertSysMsgDataInfo(mjonMsgVO);
mjonMsgVO.setAgentCode(returnVO.getAgentCode());
resultSts = returnVO.getSendMsgCnt();
resultBlockSts = returnVO.getSendMsgBlockCnt();
// 시스템 발송 로그
SendLogVO sendLogVO = new SendLogVO();
// SendType 1:문자로 발송 2:이메일로 발송
sendLogVO.setSendId(returnVO.getMsgGroupId());
sendLogVO.setSendType("1");
sendLogVO.setFrstSendInfo(mjonMsgVO.getCallFrom());
sendLogVO.setReceive(mjonMsgVO.getCallTo());
sendLogVO.setCheckNo(code);
sendLogVO.setContents(smsTxt);
mjonMsgDataService.insertSysMsgLog(sendLogVO);
if (!resultSts.equals("0")) {
isSuccess = true;
msg = "문자 전송이 완료되었습니다.";
} else {
isSuccess = false;
msg = "문자 전송에 오류가 발생하였습니다.";
}
} catch (Exception e) {
isSuccess = false;
msg = e.getMessage();
}
Map<String, Object> mapInfo = new HashMap<String, Object>();
mapInfo.put("IsSuccess", isSuccess);
mapInfo.put("Msg", msg);
return mapInfo;
}
/**
* 전송사 발송 결과 코드 리스트
* @param MjonMsgResultCodeVO
@ -4281,54 +3993,6 @@ public class MjonMsgController {
return modelAndView;
}
public boolean getCompareReqDateList(String[] arrMsgGroupId, String userId) throws Exception {
boolean compareStatus = true;
try {
MjonResvMsgVO mjonResvMsgVO = new MjonResvMsgVO();
mjonResvMsgVO.setUserId(userId);//회원 아이디
int resultSts = 0;
//문자 그룹 정보 체크하기
List<String> groupIdList = new ArrayList<String>();
for(String msgGId : arrMsgGroupId) {
groupIdList.add(msgGId);
}
mjonResvMsgVO.setMsgGroupIdList(groupIdList);
List<MjonResvMsgVO> resultMsgReqDateList = mjonMsgService.selectMsgGroupDataReqDateList(mjonResvMsgVO);
String compareDate = "";
for(int i=0; i < resultMsgReqDateList.size(); i++) {
System.out.println(resultMsgReqDateList.get(i).getStrReqDate());
String toDate = resultMsgReqDateList.get(i).getStrReqDate();
compareDate = MJUtil.getCompareDateToSeconds(toDate);
if(compareDate.equals("after")) {//발송 예정 일자가 현재시간 이전이면 false를 리턴함.
compareStatus = false;
return compareStatus;
}
}
} catch (Exception e) {
System.out.println("+++++++++++++++++++++++++++++++++++ getCompareReqDateList Controller Error !!!! "+e);
return compareStatus;
}
return compareStatus;
}
/**
* 관리자 이메일 발송 처리
@ -5426,7 +5090,7 @@ public class MjonMsgController {
fileVO.setAtchFileId(workAtchFileId);
}
FileVO fvo = fileService.selectFileInf(fileVO);
FileVO fvo = fileMngService.selectFileInf(fileVO);
String path = "";
String fileType = "";
String[] imgExtArray = {"bmp", "gif", "jpeg", "jpg", "png", "tif", "tiff", "psd", "rle"};
@ -5484,7 +5148,7 @@ public class MjonMsgController {
, ModelMap model
, HttpServletRequest request) throws Exception {
FileVO fvo = fileService.selectFileInf(fileVO);
FileVO fvo = fileMngService.selectFileInf(fileVO);
String path = "";
String fileType = "";
String[] imgExtArray = {"bmp", "gif", "jpeg", "jpg", "png", "tif", "tiff", "psd", "rle"};
@ -5507,7 +5171,7 @@ public class MjonMsgController {
// 첨부파일 목록
List<FileVO> fileList = fileService.selectFileInfs(fileVO);
List<FileVO> fileList = fileMngService.selectFileInfs(fileVO);
model.addAttribute("fileList", fileList);
// 파라미터
@ -5634,4 +5298,194 @@ public class MjonMsgController {
return "/uss/ion/msg/pdfViewPhone";
}
// 문자발송
public Map<String, Object> sendMsgData(String userId, String code, String fromMobile, String toMobile) throws Exception{
boolean isSuccess = true;
String msg = "인증번호 문자 전송이 완료되었습니다.";
String resultSts = "0";
String resultBlockSts = "0";
boolean is1MinutePass = true;
String smsTxt = "[문자온] 인증번호 : " + code;
try {
Date nowDate = new Date();
SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
MjonMsgVO mjonMsgVO = new MjonMsgVO();
mjonMsgVO.setUserId("system");
String msgType = "4";
// 전송사 전송 배분
MjonMsgVO pramVO = new MjonMsgVO();
List<MjonMsgVO> sendRateList = mjonMsgService.selectTodayAgentSendCntList(pramVO); // 전송사 전송 배분률 현재 전송건수
// 조회
for (MjonMsgVO tmpVO : sendRateList) {
float cnt = Float.parseFloat(tmpVO.getMsgGroupCnt());
float totCnt = tmpVO.getTotCnt();
tmpVO.setSendRateInfo(Float.parseFloat(tmpVO.getSendRate()) - (cnt / totCnt * 100)); // 배분률 - 현재전송 비율
}
String sendAgent = sendRateList.get(0).getAgentCode();
float maxRate = sendRateList.get(0).getSendRateInfo();
for (MjonMsgVO tmpVO : sendRateList) { // 배분률 대비 현재전송 비율이 가장 적은거 찾기
if (maxRate < tmpVO.getSendRateInfo()) {
maxRate = tmpVO.getSendRateInfo();
sendAgent = tmpVO.getAgentCode();
}
}
mjonMsgVO.setMsgDiv("S"); // 단문
// 문자타입별 대표전송사 정보
MjonMsgVO mjonMsgVO2 = new MjonMsgVO();
mjonMsgVO2 = mjonMsgService.selectRepMsgAgetnInfo(mjonMsgVO);
// 전송사 구분 코드 - 01 : 아이하트, 02 : 현대 퓨쳐넷, 03 : 아이엠오, 04 : 다우기술
mjonMsgVO.setAgentCode(mjonMsgVO2.getAgentCode()); //전송사 선택
// 전송금액
mjonMsgVO.setTotPrice(mjonMsgVO2.getAgentPrice().toString()); //총금액
mjonMsgVO.setEachPrice(mjonMsgVO2.getAgentPrice().toString()); //한건 금액
mjonMsgVO.setMsgType("4");
mjonMsgVO.setSmsTxt(smsTxt);
mjonMsgVO.setCallFrom(fromMobile);
mjonMsgVO.setCallTo(toMobile);
mjonMsgVO.setReserveYn("N"); // 즉시 전송
mjonMsgVO.setMsgGroupCnt("0");
mjonMsgVO.setUserId(userId);
mjonMsgVO.setMsgPayCode("SMS");
mjonMsgVO.setReqDate(simpleDateFormat2.format(nowDate));
MjonMsgReturnVO returnVO = mjonMsgDataService.insertSysMsgDataInfo(mjonMsgVO);
mjonMsgVO.setAgentCode(returnVO.getAgentCode());
resultSts = returnVO.getSendMsgCnt();
resultBlockSts = returnVO.getSendMsgBlockCnt();
// 시스템 발송 로그
SendLogVO sendLogVO = new SendLogVO();
// SendType 1:문자로 발송 2:이메일로 발송
sendLogVO.setSendId(returnVO.getMsgGroupId());
sendLogVO.setSendType("1");
sendLogVO.setFrstSendInfo(mjonMsgVO.getCallFrom());
sendLogVO.setReceive(mjonMsgVO.getCallTo());
sendLogVO.setCheckNo(code);
sendLogVO.setContents(smsTxt);
mjonMsgDataService.insertSysMsgLog(sendLogVO);
if (!resultSts.equals("0")) {
isSuccess = true;
msg = "문자 전송이 완료되었습니다.";
} else {
isSuccess = false;
msg = "문자 전송에 오류가 발생하였습니다.";
}
} catch (Exception e) {
isSuccess = false;
msg = e.getMessage();
}
Map<String, Object> mapInfo = new HashMap<String, Object>();
mapInfo.put("IsSuccess", isSuccess);
mapInfo.put("Msg", msg);
return mapInfo;
}
public boolean getCompareReqDateList(String[] arrMsgGroupId, String userId) throws Exception {
boolean compareStatus = true;
try {
MjonResvMsgVO mjonResvMsgVO = new MjonResvMsgVO();
mjonResvMsgVO.setUserId(userId);//회원 아이디
int resultSts = 0;
//문자 그룹 정보 체크하기
List<String> groupIdList = new ArrayList<String>();
for(String msgGId : arrMsgGroupId) {
groupIdList.add(msgGId);
}
mjonResvMsgVO.setMsgGroupIdList(groupIdList);
List<MjonResvMsgVO> resultMsgReqDateList = mjonMsgService.selectMsgGroupDataReqDateList(mjonResvMsgVO);
String compareDate = "";
for(int i=0; i < resultMsgReqDateList.size(); i++) {
System.out.println(resultMsgReqDateList.get(i).getStrReqDate());
String toDate = resultMsgReqDateList.get(i).getStrReqDate();
compareDate = MJUtil.getCompareDateToSeconds(toDate);
if(compareDate.equals("after")) {//발송 예정 일자가 현재시간 이전이면 false를 리턴함.
compareStatus = false;
return compareStatus;
}
}
} catch (Exception e) {
System.out.println("+++++++++++++++++++++++++++++++++++ getCompareReqDateList Controller Error !!!! "+e);
return compareStatus;
}
return compareStatus;
}
//배열 정의{"컬럼순차번호, 컬럼이름, 컬럼내용, 컬럼이름에 붙여야할 내용(엑셀코드양식다운로드시 필요)"}
private String[][] sendMsgExcelValue ={
{"0" ,"번호" , "1" , "" },
{"1", "아이디" , "itn" , ""},
{"2", "발신번호" , "01012345678", ""},
{"3", "발송건수" , "3", ""},
{"4", "요청시간" , "2021-06-01 19:05:12", ""},
{"5", "내용" , "문자메시지 내용", ""},
{"6", "메시지타입" , "SMS전송", ""},
{"7", "접속기기" , "", ""},
{"8", "메시지타입" , "NPRO(아이하트)", ""}
};
//배열 정의{"컬럼순차번호, 컬럼이름, 컬럼내용, 컬럼이름에 붙여야할 내용(엑셀코드양식다운로드시 필요)"}
private String[][] sendMsgDtlExcelValue ={
{"0" ,"번호" , "1" , "" },
{"1", "아이디" , "itn" , ""},
{"2", "발신번호" , "01012345678", ""},
{"3", "수신번호" , "01012345678", ""},
{"4", "전송시간" , "2021-06-01 19:19:57", ""},
{"5", "내용" , "문자메시지 내용", ""},
{"6", "현재상태" , "결과수신", ""},
{"7", "처리결과" , "410/i", ""},
{"8", "메시지타입" , "SMS전송", ""},
{"9", "접속기기" , "", ""},
{"10", "메시지타입" , "NPRO(아이하트)", ""},
{"11", "통신사" , "ETC", ""} ,
{"12", "삭제여부" , "미삭제", ""}
} ;
//회원정보 팝업 최근 발송 문자 리스트 엑셀 다운로드
private String[][] sendMsgUsrExcelValue ={
{"0" ,"번호" , "1" , "" },
{"1", "아이디" , "itn" , ""},
{"2", "발신번호" , "01012345678", ""},
{"3", "요청시간" , "2021-06-01 19:05:12", ""},
{"4", "내용" , "문자메시지 내용", ""},
{"5", "문자종류" , "SMS전송", ""},
{"6", "건수" , "", ""},
{"7", "금액" , "", ""},
{"8", "발송결과" , "", ""},
{"9", "전송사" , "", ""}
};
}

View File

@ -49,9 +49,6 @@ public class MjonMsgCustomController {
@Resource(name = "EgovCmmUseService")
private EgovCmmUseService cmmUseService;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileService;
@Resource(name = "mjonPayService")
private MjonPayService mjonPayService;
@ -145,7 +142,7 @@ public class MjonMsgCustomController {
if("05".equals(mjonMsgCustomInfo.getCustomPaymentYn())) {
FileVO fileVO = new FileVO();
fileVO.setAtchFileId(mjonMsgCustomInfo.getCustomResultImg());
List<FileVO> fileList = fileService.selectFileInfs(fileVO);
List<FileVO> fileList = fileMngService.selectFileInfs(fileVO);
model.addAttribute("fileList", fileList);
}
return "/uss/ion/custom/MsgCustomInfo";
@ -176,7 +173,7 @@ public class MjonMsgCustomController {
fileVO.setAtchFileId(sampleId[i]);
fileVO.setFileSn(sampleFileSn[i]);
// fileVO.setFileSn(fileSn);
List<FileVO> result = fileService.selectImageFileList(fileVO);
List<FileVO> result = fileMngService.selectImageFileList(fileVO);
imgList.addAll(result);
}
@ -200,7 +197,7 @@ public class MjonMsgCustomController {
String customPaymentYn = (String) commandMap.get("customPaymentYn");
fileVO.setAtchFileId(atchFileId);
List<FileVO> result = fileService.selectFileInfs(fileVO);
List<FileVO> result = fileMngService.selectFileInfs(fileVO);
model.addAttribute("fileList", result);
model.addAttribute("updateFlag", "N");
model.addAttribute("fileListCnt", result.size());

View File

@ -1,573 +0,0 @@
package itn.let.mjo.msgCustom.web;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.ibm.icu.text.DecimalFormat;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.ComDefaultCodeVO;
import itn.com.cmm.LoginVO;
import itn.com.cmm.service.EgovCmmUseService;
import itn.com.cmm.service.EgovFileMngService;
import itn.com.cmm.service.EgovFileMngUtil;
import itn.com.cmm.service.FileVO;
import itn.com.cmm.util.DateUtils;
import itn.com.cmm.util.StringUtil;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.lett.service.HashConfVO;
import itn.let.lett.service.LetterService;
import itn.let.mjo.mjocommon.MjonCommon;
import itn.let.mjo.msg.service.MjonMsgVO;
import itn.let.mjo.msgCustom.service.MjonMsgCustomService;
import itn.let.mjo.msgCustom.service.MjonMsgCustomVO;
import itn.let.mjo.msgdata.service.MjonMsgDataService;
import itn.let.sym.ccm.cde.service.CateCode;
import itn.let.sym.site.service.EgovSiteManagerService;
import itn.let.sym.site.service.JoinSettingVO;
import itn.let.uss.umt.service.MberManageVO;
import itn.let.utl.user.service.MjonNoticeSendUtil;
@Controller
public class MjonMsgCustomWebController {
@Resource(name = "mjonMsgCustomService")
private MjonMsgCustomService mjonMsgCustomService;
@Resource(name = "MjonMsgDataService")
private MjonMsgDataService mjonMsgDataService;
@Resource(name = "LetterService")
private LetterService letterService;
@Resource(name = "EgovCmmUseService")
private EgovCmmUseService cmmUseService;
@Resource(name = "EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileMngService;
/** 첨부파일 저장경로 */
@Value("#{globalSettings['Globals.file.saveDir']}")
private String fileSaveDir;
/** 알림전송 Util */
@Resource(name = "mjonNoticeSendUtil")
private MjonNoticeSendUtil mjonNoticeSendUtil;
@Resource(name="MjonCommon")
private MjonCommon mjonCommon;
/** 사이트 설정 */
@Resource(name = "egovSiteManagerService")
EgovSiteManagerService egovSiteManagerService;
/** 사용자 맞춤제작 화면*/
@RequestMapping(value= {"/web/mjon/custom/selectMsgCustomView.do"})
public String selectMsgCustomView(@ModelAttribute("searchVO") MjonMsgCustomVO mjonMsgCustomVO
, HttpServletRequest request
, ModelMap model) throws Exception{
String url = request.getHeader("REFERER");
if(url != null) {
if(url.contains("web/mjon/msgcampain/selectMsgDataView.do")) {
model.addAttribute("msgcampain", request.getParameter("pageType"));
}
}
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
// 맞춤문자 설정
mjonMsgCustomVO.setLetterType("C");
String categoryType = "C";
// 문자 카테고리 리스트 불러오기
List<CateCode> cateConfList = letterService.selectCateConfWithList(categoryType);
model.addAttribute("cateCodeList", cateConfList);
// 문자 해쉬태그 리스트 불러오기
String msgType = "C";
List<HashConfVO> hashTagList = letterService.selectHashTagWithList(msgType);
model.addAttribute("hashTagList", hashTagList);
model.addAttribute("mjonMsgCustomVO", mjonMsgCustomVO);
model.addAttribute("loginVO", loginVO);
for(int i=0 ; i < cateConfList.size(); i++) {
if("선거".equals(cateConfList.get(i).getCateNm())) {
mjonMsgCustomVO.setCategoryCode(cateConfList.get(i).getCateCode());
}
}
//1.시스템 기본 단가 정보 불러오기
JoinSettingVO sysJoinSetVO = mjonMsgDataService.selectJoinSettingInfo();
String customSamplePrice = "0"; // 문자온 샘플 수정(글자, 색상, 폰트 )
String customEditPrice = "0"; // 이미지 편집(첨부이미지 1장)
String customEdit3Price = "0"; // 이미지 편집(첨부이미지 3장이하)
String customTextPrice = "0"; // 텍스트 단순수정
DecimalFormat df = new DecimalFormat("###,###");
customSamplePrice = df.format(sysJoinSetVO.getCustomSamplePrice());
customEditPrice = df.format(sysJoinSetVO.getCustomEditPrice());
customEdit3Price = df.format(sysJoinSetVO.getCustomEdit3Price());
customTextPrice = df.format(sysJoinSetVO.getCustomTextPrice());
model.addAttribute("customSamplePrice", customSamplePrice);
model.addAttribute("customEditPrice", customEditPrice);
model.addAttribute("customEdit3Price", customEdit3Price);
model.addAttribute("customTextPrice", customTextPrice);
// 보관함 - 기본 날짜 검색 셋팅
// 오늘 날짜에서 365일 날짜 가져와서
// 검색날짜에 입력
model.addAttribute("myStartDate", DateUtils.getDateMonthsAgo(12));
model.addAttribute("myEndDate", DateUtils.getCurrentDate());
return "/web/custom/MsgCustomView";
}
/** 사용자 맞춤제작 샘플 이미지 리스트*/
@RequestMapping(value= {"/web/mjon/custom/selectMsgCustomSampleListAjax.do"})
public String selectMsgCustomSampleListAjax(@ModelAttribute("searchVO") MjonMsgCustomVO mjonMsgCustomVO
, ModelMap model) throws Exception{
//그림 문자 리스트 불러오기
//LetterVO letterVO = new LetterVO();
if(mjonMsgCustomVO.getPageUnit() != 10) {
mjonMsgCustomVO.setPageUnit(mjonMsgCustomVO.getPageUnit());
}
if ("best".equals(mjonMsgCustomVO.getCategoryCode())) {
mjonMsgCustomVO.setBestCategory("Y");
mjonMsgCustomVO.setCategoryCode("");
}
/** pageing */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(mjonMsgCustomVO.getPageIndex());
paginationInfo.setRecordCountPerPage(mjonMsgCustomVO.getPageUnit());
paginationInfo.setPageSize(mjonMsgCustomVO.getPageSize());
mjonMsgCustomVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
mjonMsgCustomVO.setLastIndex(paginationInfo.getLastRecordIndex());
mjonMsgCustomVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
// 문자 종류 정보가 없으면 단문문자로 셋팅
mjonMsgCustomVO.setLetterType("C");
// 그림 문자 리스트
List<?> resultCustomList = mjonMsgDataService.selectPhotoLetterList(mjonMsgCustomVO);
model.addAttribute("resultCustomList", resultCustomList);
paginationInfo.setTotalRecordCount( resultCustomList.size()> 0 ? ((Long)((EgovMap)resultCustomList.get(0)).get("totCnt")).intValue() : 0);
model.addAttribute("paginationInfo", paginationInfo);
model.addAttribute("mjonMsgCustomVO", mjonMsgCustomVO);
return "/web/custom/MsgCustomListAjax";
}
/** 사용자 맞춤제작 내보관함 리스트*/
@RequestMapping(value= {"/web/mjon/custom/selectMsgMyCustomListAjax.do"})
public String selectMsgMyCustomListAjax(@ModelAttribute("searchVO") MjonMsgCustomVO mjonMsgCustomVO
, RedirectAttributes redirectAttributes
, ModelMap model) throws Exception{
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId == "") {
redirectAttributes.addFlashAttribute("message", "맞춤제작 내보관함 서비스는 로그인 후 이용 가능합니다.");
return "redirect:/web/user/login/login.do";
}
if(mjonMsgCustomVO.getPageUnit() != 10) {
mjonMsgCustomVO.setPageUnit(mjonMsgCustomVO.getPageUnit());
}
/** pageing */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(mjonMsgCustomVO.getPageIndex());
paginationInfo.setRecordCountPerPage(mjonMsgCustomVO.getPageUnit());
paginationInfo.setPageSize(mjonMsgCustomVO.getPageSize());
mjonMsgCustomVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
mjonMsgCustomVO.setLastIndex(paginationInfo.getLastRecordIndex());
mjonMsgCustomVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
// 문자 종류 정보가 없으면 단문문자로 셋팅
mjonMsgCustomVO.setLetterType("C");
// 검색 데이터가 없거나
// 시작일자가 종료일자보다 이후이거나
// 기간이 365일이 넘으면 현재일부터 365일 날짜를 넣어서 검색
if(!DateUtils.dateChkAndValueChk(mjonMsgCustomVO.getSearchStartDate(),mjonMsgCustomVO.getSearchEndDate(), 12 )) {
mjonMsgCustomVO.setSearchStartDate(DateUtils.getDateMonthsAgo(12));
mjonMsgCustomVO.setSearchEndDate(DateUtils.getCurrentDate());
};
// 보관함 이미지 목록 조회
mjonMsgCustomVO.setUserId(userId);
List<MjonMsgCustomVO> resultCustomImgList = mjonMsgCustomService.selectMjonMsgMyCustomImgList(mjonMsgCustomVO);
model.addAttribute("resultCustomList", resultCustomImgList);
paginationInfo.setTotalRecordCount( resultCustomImgList.size()> 0 ? resultCustomImgList.get(0).getTotCnt() : 0);
model.addAttribute("paginationInfo", paginationInfo);
model.addAttribute("mjonMsgCustomVO", mjonMsgCustomVO);
return "/web/custom/MsgMyCustomListAjax";
}
/** 사용자 맞춤제작 내보관함 삭제 - LETTNFILEDETAIL 테이블 FILE_DELETE_YN 컬럼 업데이트*/
@RequestMapping(value= {"/web/mjon/custom/deleteMsgMyCustomAjax.do"})
public ModelAndView deleteMsgMyCustomAjax(@RequestParam("chk") String[] chk, @ModelAttribute("searchVO") MjonMsgCustomVO mjonMsgCustomVO
, ModelMap model) throws Exception{
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
//최종수정 ID - 로그인 ID
LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
mjonMsgCustomVO.setLastUpdusrId(user.getId());
try {
for(String target : chk) {
mjonMsgCustomVO.setAttachFileId(target.split("\\|")[0]);
mjonMsgCustomVO.setFileSn(target.split("\\|")[1]);
mjonMsgCustomService.deleteMsgMyCustomAjax(mjonMsgCustomVO);
}
modelAndView.addObject("result", "success");
}catch (Exception e) {
modelAndView.addObject("message", "다시 시도 부탁드립니다.");
modelAndView.addObject("result", "fail");
}
return modelAndView;
}
/** 사용자 맞춤제작 팝업*/
@RequestMapping(value= {"/web/mjon/custom/selectMsgCustomPopupAjax.do"})
public String selectMsgCustomPopupAjax(@ModelAttribute("searchVO") MjonMsgCustomVO mjonMsgCustomVO
, ModelMap model) throws Exception{
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
String author = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getAuthority());
if(!userId.equals("") && !author.equals("ROLE_ADMIN")) {
//2.사용자 개인 단가 정보 불러오기
MberManageVO mberManageVO = new MberManageVO();
mberManageVO = mjonMsgDataService.selectMberManageInfo(userId);
double money = mberManageVO.getUserMoney();
BigDecimal userMoney = new BigDecimal(money).setScale(0, RoundingMode.HALF_DOWN);
model.addAttribute("userMoney", userMoney);
}
String categoryType = "C";
// 문자 카테고리 리스트 불러오기
List<CateCode> cateConfList = letterService.selectCateConfWithList(categoryType);
model.addAttribute("cateConfList", cateConfList);
ComDefaultCodeVO comDefaultCodeVO = new ComDefaultCodeVO();
//제작형태 코드 조회
comDefaultCodeVO.setCodeId("ITN030");
List<?> codeResult = cmmUseService.selectCmmCodeDetail(comDefaultCodeVO);
model.addAttribute("codeResult", codeResult);
return "/web/custom/MsgCustomPopupAjax";
}
/** 사용자 맞춤제작 팝업 이미지 리스트*/
@RequestMapping(value= {"/web/mjon/custom/selectCustomPopupImgListAjax.do"})
public ModelAndView selectgCustomPopupImgListAjax(@ModelAttribute("searchVO") MjonMsgCustomVO mjonMsgCustomVO
, ModelMap model) throws Exception{
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
if ("best".equals(mjonMsgCustomVO.getCategoryCode())) {
mjonMsgCustomVO.setBestCategory("Y");
mjonMsgCustomVO.setCategoryCode("");
}
// 샘플그림 리스트 조회
List<?> resultCustomList = mjonMsgDataService.selectCustomPopupImgList(mjonMsgCustomVO);
model.addAttribute("resultCustomList", resultCustomList);
modelAndView.addObject("status", "success");
return modelAndView;
}
/** 첨부파일 포함하여 맞춤제작요청 등록*/
@RequestMapping(value = {"/web/mjon/custom/insertCustomImgInfoAjax.do"})
public ModelAndView insertCustomImgInfoAjax(final MultipartHttpServletRequest multiRequest
, MjonMsgCustomVO mjonMsgCustomVO
, HttpServletRequest request) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
MjonMsgVO mjonMsgVO = new MjonMsgVO();
mjonMsgVO.setUserId(userId); // 조회 아이디 등록
String userMoney = mjonMsgDataService.selectBeforeCashData(mjonMsgVO); // 현재 보유금액 조회
BigDecimal befCash = new BigDecimal(userMoney).setScale(0, RoundingMode.HALF_EVEN); // 현재 보유금액 변환
BigDecimal totMsgPrice = new BigDecimal(mjonMsgCustomVO.getCustomAmount()).setScale(0, RoundingMode.HALF_EVEN); // 맞춤문자 결제 예상 금액
// befCash(현재 보유금액) 값이 totMsgPrice(맞춤문자전송 금액) 보다 많으면 문자 전송
//if(befCash.compareTo(totMsgPrice) < 0 || befCash.compareTo(totMsgPrice) == 0) {
if(befCash.compareTo(totMsgPrice) < 0) {
modelAndView.addObject("result", "notMoney");
return modelAndView;
}
// 맞춤문자 첨부 이미지 업로드
String customSampleImg = "";
String customSampleImgFileSn = "";
/*if(!mjonMsgCustomVO.getTempImg1().equals("")) {
customSampleImg = mjonMsgCustomVO.getTempImg1();
customSampleImgFileSn= mjonMsgCustomVO.getTempImg1FileSn();
}
if(!mjonMsgCustomVO.getTempImg2().equals("")) {
if(customSampleImg != "" ) {
customSampleImg += "/"+mjonMsgCustomVO.getTempImg2();
customSampleImgFileSn += "/"+mjonMsgCustomVO.getTempImg2FileSn();
}else {
customSampleImg += mjonMsgCustomVO.getTempImg2();
customSampleImgFileSn += "/"+mjonMsgCustomVO.getTempImg2FileSn();
}
}
if(!mjonMsgCustomVO.getTempImg3().equals("")) {
if(customSampleImg != "" ) {
customSampleImg += "/"+mjonMsgCustomVO.getTempImg3();
customSampleImgFileSn += "/"+mjonMsgCustomVO.getTempImg3FileSn();
}else {
customSampleImg += mjonMsgCustomVO.getTempImg3();
customSampleImgFileSn += "/"+mjonMsgCustomVO.getTempImg3FileSn();
}
}*/
// 첨부파일 ID 생성 구분자 등록
String atchFileId = "";
final Map<String, MultipartFile> files = multiRequest.getFileMap();
if (!files.isEmpty()) {
String imagePath = "";
Date now = new Date();
SimpleDateFormat formatDate = new SimpleDateFormat("yyyyMMdd");
String fdlDate = formatDate.format(now);
//로컬 개발서버의 이미지 저장 경로 분기처리
if(request.getServerName().equals("localhost")) {
imagePath = fileSaveDir+"src/main/webapp/MMS/" + fdlDate;
}else{
/*imagePath = "/usr/local/tomcat_mjon/webapps/mjon/MMS/" + fdlDate;*/
imagePath = fileSaveDir+"/file/MMS/" + fdlDate;
}
List<FileVO> result = fileUtil.parseImageFileInf(files, "CUSTOM_", 0, "", imagePath, "");
atchFileId = fileMngService.insertFileInfs(result);
for(int i=0; i < result.size(); i++) {
if(customSampleImgFileSn != "" ) {
// customSampleImg += "/"+atchFileId;
customSampleImgFileSn += "/"+i;
}else {
// customSampleImg += atchFileId;
customSampleImgFileSn += i;
}
}
}
mjonMsgCustomVO.setCustomUploadImg(atchFileId);
mjonMsgCustomVO.setCustomUploadImgFileSn(customSampleImgFileSn);
mjonMsgCustomVO.setUserId(userId);
mjonMsgCustomVO.setFrstRegisterId(userId);
mjonMsgCustomVO.setLastUpdusrId(userId);
// 요청사항 길이 체크
mjonMsgCustomVO.setCustomRequest(
StringUtil.getLengthChkAndSubString(mjonMsgCustomVO.getCustomRequest(), 2000)
);
mjonMsgCustomService.insertMjonMsgCustomInfo(mjonMsgCustomVO);
// 법인폰 알람여부 체크
JoinSettingVO joinSettingVO = new JoinSettingVO();
joinSettingVO = egovSiteManagerService.selectAdminNotiDetail();
// 이메일 체크
if (joinSettingVO != null && joinSettingVO.getEmailNoti().equals("Y")) {
String emailTitle = "문자관리 > 문자맞춤제작 요청";
// CS관리자 이메일 알림전송
mjonNoticeSendUtil.csAdminEmailNoticeSend(loginVO.getName(), loginVO.getId(), emailTitle);
}
// SLACK 체크
if (joinSettingVO != null && joinSettingVO.getSlackNoti().equals("Y")) {
// Slack 메시지 발송(단순본문)
String msg = "[문자온] 문자맞춤제작 요청 - " + loginVO.getName() +"("+ loginVO.getId() + ")";
mjonCommon.sendSimpleSlackMsg(msg);
}
modelAndView.addObject("result", "success");
return modelAndView;
}
/** 첨부파일 없이 맞춤제작요청 등록*/
@RequestMapping(value = {"/web/mjon/custom/insertCustomImgInfoNoFileAjax.do"})
public ModelAndView insertCustomImgInfoNoFileAjax( MjonMsgCustomVO mjonMsgCustomVO
, HttpServletRequest request) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
MjonMsgVO mjonMsgVO = new MjonMsgVO();
mjonMsgVO.setUserId(userId); // 조회 아이디 등록
String userMoney = mjonMsgDataService.selectBeforeCashData(mjonMsgVO); // 현재 보유금액 조회
BigDecimal befCash = new BigDecimal(userMoney).setScale(0, RoundingMode.HALF_EVEN); // 현재 보유금액 변환
BigDecimal totMsgPrice = new BigDecimal(mjonMsgCustomVO.getCustomAmount()).setScale(0, RoundingMode.HALF_EVEN); // 맞춤문자 결제 예상 금액
// befCash(현재 보유금액) 값이 totMsgPrice(맞춤문자전송 금액) 보다 많으면 문자 전송
//if(befCash.compareTo(totMsgPrice) < 0 || befCash.compareTo(totMsgPrice) == 0) {
if(befCash.compareTo(totMsgPrice) < 0) {
modelAndView.addObject("result", "notMoney");
return modelAndView;
}
mjonMsgCustomVO.setUserId(userId);
mjonMsgCustomVO.setFrstRegisterId(userId);
mjonMsgCustomVO.setLastUpdusrId(userId);
mjonMsgCustomService.insertMjonMsgCustomInfo(mjonMsgCustomVO);
// 법인폰 알람여부 체크
JoinSettingVO joinSettingVO = new JoinSettingVO();
joinSettingVO = egovSiteManagerService.selectAdminNotiDetail();
// 이메일 체크
if (joinSettingVO != null && joinSettingVO.getEmailNoti().equals("Y")) {
String emailTitle = "문자관리 > 문자맞춤제작 요청";
// CS관리자 이메일 알림전송
mjonNoticeSendUtil.csAdminEmailNoticeSend(loginVO.getName(), loginVO.getId(), emailTitle);
}
// SLACK 체크
if (joinSettingVO != null && joinSettingVO.getSlackNoti().equals("Y")) {
// Slack 메시지 발송(단순본문)
String msg = "[문자온] 문자맞춤제작 요청 - " + loginVO.getName() +"("+ loginVO.getId() + ")";
mjonCommon.sendSimpleSlackMsg(msg);
}
modelAndView.addObject("result", "success");
return modelAndView;
}
/** 사용자 맞춤제작 팝업*/
@RequestMapping(value= {"/web/mjon/custom/MsgCustomVeiwPopupAjax.do"})
public String selectMsgCustomPopupDetailAjax(@ModelAttribute("searchVO") MjonMsgCustomVO mjonMsgCustomVO
, ModelMap model) throws Exception{
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
String author = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getAuthority());
return "/web/custom/MsgCustomVeiwPopupAjax";
}
/** 맞춤제작 상세보기 팝업 리스트 조회*/
@RequestMapping(value= {"/web/mjon/custom/selectMyCustomImgRequestListAjax.do"})
public ModelAndView selectMyCustomImgRequestListAjax(@ModelAttribute("searchVO") MjonMsgCustomVO mjonMsgCustomVO
, ModelMap model) throws Exception{
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
try {
List<MjonMsgCustomVO> customList = mjonMsgCustomService.selectMyCustomImgRequestList(mjonMsgCustomVO);
for(int i=0; i < customList.size(); i++) {
if("Y".equals(customList.get(i).getCustomUploadYn())) {
String sampleFileSn[] = customList.get(i).getCustomUploadImgFileSn().split("/");
FileVO fileVO = new FileVO();
String fileName = "";
for(int j=0; j< sampleFileSn.length; j++) {
fileVO.setAtchFileId(customList.get(i).getCustomUploadImg());
fileVO.setFileSn(sampleFileSn[j]);
FileVO result = fileMngService.selectFileInf(fileVO);
// JSPark 2023.03.07 => 체크 추가
if (result != null) {
if(j != 0 ) {
fileName = fileName +", ";
}
fileName = fileName + result.getOrignlFileNm();
}
}
customList.get(i).setTempImg1(fileName);
}
}
modelAndView.addObject("customList", customList);
modelAndView.addObject("result", "success");
}catch (Exception e) {
modelAndView.addObject("message", "다시 시도 부탁드립니다.");
modelAndView.addObject("result", "fail");
}
return modelAndView;
}
}

View File

@ -226,65 +226,4 @@ public class MjonMsgAgentStsController {
return "agent/MjonMsgAgentStsMultiUpdate";
}
/**
* @Method Name : updateMultiMjonMsgAgentStsData
* @작성일 : 2023.05.19
* @작성자 : Hans
* @Method 설명 : 전송사별 전송 비율 수정
*/
/*
@RequestMapping(value={"/let/mjo/msgagent/updateMultiMjonMsgAgentStsDataAjax.do"})
public ModelAndView updateMultiMjonMsgAgentStsDataAjax(@ModelAttribute("mjonMsgAgentStsVO") MjonMsgAgentStsVO mjonMsgAgentStsVO) throws Exception {
//public ModelAndView updateMultiMjonMsgAgentStsData(@ModelAttribute MjonMsgAgentStsVO mjonMsgAgentStsVO, Model model) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
boolean isSuccess = true;
String msg = "";
// 로그인VO에서 사용자 정보 가져오기
//LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
// String frstRegisterId = loginVO == null ? "" : loginVO.getId();
mjonMsgAgentStsVO.setLastUpdtPnttm("ss"); // 최초등록자ID
System.out.print("\n updateMultiMjonMsgAgentStsData 1==== \n");
System.out.print("updateMultiMjonMsgAgentStsData 2==== getSelectAgentCode: " + mjonMsgAgentStsVO.getSelectAgentCode() + ":===end=== \n");
System.out.print("mjonMsgAgentStsVO.getUseYns().size() 3==== : " + mjonMsgAgentStsVO.getUseYns().size() + ":===end===\n");
System.out.print("mjonMsgAgentStsVO.getMsgTypes().get(0) 4==== :" + mjonMsgAgentStsVO.getMsgTypes().get(0)+ ":===end===\n");
System.out.print("mjonMsgAgentStsVO.getSelectAgentCode() 5==== : " + mjonMsgAgentStsVO.getSelectAgentCode() + ":===end===\n");
System.out.print("mjonMsgAgentStsVO.getAgentCodes().size() 6 ==== : " +mjonMsgAgentStsVO.getAgentCodes().get(0) + ":===end===\n");
try{
for(int i = 0; i < mjonMsgAgentStsVO.getAgentCodes().size(); i++){
System.out.println("getAgentCodes: " + mjonMsgAgentStsVO.getAgentCodes().get(i));
// System.out.println("getMsgTypes: " + mjonMsgAgentStsVO.getMsgTypes().get(i)) ;
}
// 제목, 해쉬태그 일괄변경
System.out.print("==== updateMultiMjonMsgAgentStsDataAjax controller ==== \n");
mjonMsgAgentStsService.updateMjonMsgAgentStsDataList(mjonMsgAgentStsVO);
// letterService.updateHashTagList(mjonMsgAgentStsVO);
System.out.print("==== updateMultiMjonMsgAgentStsDataAjax controller try - catch ==== \n");
}
catch(Exception e) {
isSuccess = false;
msg = e.getMessage();
}
modelAndView.addObject("result", "success");
modelAndView.addObject("isSuccess", isSuccess);
modelAndView.addObject("msg", msg);
System.out.println("modelAndView.getViewName(): " + modelAndView.getViewName()) ;
return modelAndView;
}
*/
}

View File

@ -1,178 +0,0 @@
package itn.let.mjo.msgcampain.web;
import java.lang.reflect.Field;
public class MjonVOParamXssValues {
/**
* Build URI from VO and Host, Path
*
* @param paramObj VO
* @param host Host
* @param path Path
* @return URI
* @throws IllegalAccessException
* @throws IllegalArgumentException
*/
public int buildUri(Object paramObj) {
int XssCnt = buildParamMap(paramObj);
return XssCnt;
}
/**
* Build MultiValueMap - VO에 담긴 모든 변수의 값을 확인
*
* @param paramObj VO
* @return MultiValueMap
* @throws IllegalAccessException
* @throws IllegalArgumentException
*/
private int buildParamMap(Object paramObj) {
int XssCnt = 0;
for(Field field : paramObj.getClass().getDeclaredFields()) { // 변수를 하나씩 불러옴
field.setAccessible(true);
Object value;
try {
value = field.get(paramObj);
if(value != null) {
String paramValue = value.toString(); //변수 값을 받아옴
//String paramName = field.getName();
int cnt = cleanXSS(paramValue); //XSS 체크해보기
XssCnt = XssCnt + cnt;
}
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("IllegalArgumentException Error ::: " + e);
} catch (IllegalAccessException e) {
throw new IllegalArgumentException("IllegalArgumentException Error ::: " + e);
}
}
return XssCnt;
}
/**
* Get values from fields of VO *
* @param field
* @param clazz
* @param obj
* @return
*/
/* private Object getValueFromField(Field field, Class<?> clazz, Object obj) {
for(Method method : clazz.getMethods()) {
String methodName = method.getName();
if( (methodName.startsWith("get") && methodName.length() == field.getName().length() + 3)
|| (methodName.startsWith("is") && methodName.length() == field.getName().length() + 2) ) {
if(methodName.toLowerCase().endsWith(field.getName().toLowerCase())) {
try {
return method.invoke(obj);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
return null;
}*/
/**
* XSS 문자열이 있는지 체크
* @param field
* @param clazz
* @param obj
* @return
*/
private int cleanXSS(String test_str) {
String test_str_low= test_str.toLowerCase();
int cnt = 0;
if(test_str_low.contains("union")||
test_str_low.contains("select") ||
test_str_low.contains("insert") ||
test_str_low.contains("drop") ||
test_str_low.contains("update") ||
test_str_low.contains("delete") ||
test_str_low.contains("join") ||
test_str_low.contains("from") ||
test_str_low.contains("where") ||
test_str_low.contains("substr") ||
test_str_low.contains("user_tables")||
test_str_low.contains("script")||
test_str_low.contains("<")||
test_str_low.contains(">")||
test_str_low.contains("alert")||
test_str_low.contains("javascript")||
test_str_low.contains("=")||
test_str_low.contains("!")||
test_str_low.contains("or")||
test_str_low.contains("user_tables")||
test_str_low.contains("\\(")||
test_str_low.contains("\\)")||
test_str_low.contains("user_tables")||
test_str_low.contains("&lt;") ||
test_str_low.contains("\"") ||
test_str_low.contains("%") ||
test_str_low.contains("()") ||
test_str_low.contains("+") ||
test_str_low.contains("%") ||
test_str_low.contains("&gt;")
)
{
/*try {
context.getRequestDispatcher("/blank.do").forward(request, response);
} catch (ServletException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}*/
/*test_str = test_str_low;
test_str = test_str.replaceAll("union", "q-union");
test_str = test_str.replaceAll("select", "q-select");
test_str = test_str.replaceAll("insert", "q-insert");
test_str = test_str.replaceAll("drop", "q-drop");
test_str = test_str.replaceAll("update", "q-update");
test_str = test_str.replaceAll("delete", "q-delete");
test_str = test_str.replaceAll("and", "q-and");
test_str = test_str.replaceAll("or", "q-or");
test_str = test_str.replaceAll("join", "q-join");
test_str = test_str.replaceAll("substr", "q-substr");
test_str = test_str.replaceAll("from", "q-from");
test_str = test_str.replaceAll("where", "q-where");
test_str = test_str.replaceAll("declare", "q-declare");
test_str = test_str.replaceAll("openrowset", "q-openrowset");
test_str = test_str.replaceAll("user_tables","q-user_tables");
test_str = test_str.replaceAll("user_tab_columns","q-user_tab_columns");
test_str = test_str.replaceAll("table_name","q-table_name");
test_str = test_str.replaceAll("column_name","q-column_name");
test_str = test_str.replaceAll("row_num","q-row_num");*/
//xss 문자열이 포함되어 있으면 카운트
cnt++;
}
return cnt ;
}
}

View File

@ -1,15 +1,9 @@
package itn.let.mjo.pay.web;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.URLDecoder;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -17,79 +11,20 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
//import com.mobilians.mcCancel_v0001.MC_Cancel;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.EgovMessageSource;
import itn.com.cmm.LoginVO;
import itn.com.cmm.service.EgovCmmUseService;
import itn.com.cmm.service.EgovFileMngService;
import itn.com.cmm.service.EgovFileMngUtil;
import itn.com.cmm.service.FileVO;
import itn.let.cop.bbs.service.BoardMasterVO;
import itn.let.mjo.addragency.service.AddrAgencyService;
import itn.let.mjo.addragency.service.AddrAgencyVO;
import itn.let.mjo.mjocommon.MjonCommon;
import itn.let.mjo.msg.service.MjonMsgService;
import itn.let.mjo.msgdata.service.MjonMsgDataService;
import itn.let.mjo.pay.service.MjonPayService;
import itn.let.mjo.pay.service.MjonPayVO;
import itn.let.mjo.pay.service.RefundService;
import itn.let.sym.site.service.EgovSiteManagerService;
import itn.let.sym.site.service.JoinSettingVO;
import itn.let.uss.umt.service.EgovMberManageService;
import itn.let.uss.umt.service.EgovUserManageService;
import itn.let.uss.umt.service.MberManageVO;
import itn.let.uss.umt.service.UserManageVO;
import itn.let.utl.fcc.service.EgovCryptoUtil;
import itn.let.utl.sim.service.EgovClntInfo;
import itn.let.utl.user.service.CheckBoardUtil;
import itn.let.utl.user.service.CheckFileUtil;
import itn.let.utl.user.service.CheckLoginUtil;
import itn.let.utl.user.service.MjonNoticeSendUtil;
@Controller
public class MjonKGMPayController {
@Resource(name = "mjonPayService")
private MjonPayService mjonPayService;
/** EgovMessageSource */
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
/** userManageService */
@Resource(name = "userManageService")
private EgovUserManageService userManageService;
/** refundService */
@Resource(name = "refundService")
private RefundService refundService;
@Resource(name = "mjonMsgService")
private MjonMsgService mjonMsgService;
@Resource(name = "MjonMsgDataService")
private MjonMsgDataService mjonMsgDataService;
@Resource(name = "mberManageService")
private EgovMberManageService mberManageService;
@Resource(name = "EgovCmmUseService")
private EgovCmmUseService cmmUseService;
//암호화
@Resource(name = "egovCryptoUtil")
EgovCryptoUtil egovCryptoUtil;
//로그인 처리
@Resource(name = "checkLoginUtil")
private CheckLoginUtil checkLoginUtil;
@ -97,483 +32,9 @@ public class MjonKGMPayController {
//무료 대행 관련 쿼리
@Resource(name="addrAgencyService")
private AddrAgencyService addrAgencyService;
//게시판 체크
@Resource(name = "checkBoardUtil")
private CheckBoardUtil checkBoardUtil;
//첨부 파일 체크
@Resource(name = "checkFileUtil")
private CheckFileUtil checkFileUtil;
//파일 체크 & 관리
@Resource(name="EgovFileMngUtil")
private EgovFileMngUtil egovFileMngUtil;
//파일 정보 관리
@Resource(name="EgovFileMngService")
private EgovFileMngService fileMngService;
/** 알림전송 Util */
@Resource(name = "mjonNoticeSendUtil")
private MjonNoticeSendUtil mjonNoticeSendUtil;
@Resource(name="MjonCommon")
private MjonCommon mjonCommon;
/** 사이트 설정 */
@Resource(name = "egovSiteManagerService")
EgovSiteManagerService egovSiteManagerService;
private static final Logger logger = LoggerFactory.getLogger(MjonKGMPayController.class);
/////////////////////////////////////////////////////////////////////////////////////////
//
//
// USER
//
//
/**
* KGM mobile 결제 Action 페이지
* @param searchVO
* @param model
* @throws Exception
*/
@RequestMapping(value= {"/web/kgm/pay/KGMPayActionAjax.do"})
public String KGMPayActionAjax(@ModelAttribute("mjonPayVO") MjonPayVO mjonPayVO,
HttpServletRequest request,
ModelMap model) throws Exception{
String userId = "";
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
if(EgovUserDetailsHelper.isAuthenticated() && loginVO != null) {
userId = loginVO.getId();
}
mjonPayVO.setMoid(userId);
model.addAttribute("mjonPayVO", mjonPayVO);
return "web/cop/kgm/mc_web";
}
/**
* KGM mobile 결제 okurl 페이지
* @param searchVO
* @param model
* @throws Exception
*/
@RequestMapping(value= {"/web/kgm/pay/NotiUrlAjax.do"})
public String NotiUrlAjax(
HttpServletRequest request
, ModelMap model
) throws Exception{
System.out.println("request.toString()");
System.out.println(request.toString());
return "web/cop/kgm/notiurl";
}
/**
* KGM mobile 결제 okurl 페이지
* @param searchVO
* @param model
* @throws Exception
*/
@RequestMapping(value= {"/web/kgm/pay/OkUrlAjax.do"})
public String OkUrlAjax(
HttpServletRequest request
, HttpSession session
, HttpServletResponse response
, ModelMap model
, RedirectAttributes redirect
) throws Exception{
//크롬 SameSite정책 방지 - 도메인이 다른 타사로 이동 크롬 정책에 의해 세션 유실이 일어나는 경우가 있는데, 이를 방지하기 위해 samesite 보안을 none처리
response.setHeader("Set-Cookie", "mberSession=mberSession; Secure; SameSite=None");
String Resultcd = request.getParameter("Resultcd"); //[ 4byte 고정] 결과코드
String Resultmsg = URLDecoder.decode(request.getParameter("Resultmsg"), "euc-kr"); //[ 100byte 이하] 결과메세지
String AutoBillKey = request.getParameter("AutoBillKey"); //[ 15byte 이하] 자동결제 최초등록키
String CASH_GB = request.getParameter("CASH_GB"); //[ 2byte 고정] 결제수단(MC)
String Commid = request.getParameter("Commid"); //[ 3byte 고정] 이통사
String Mobilid = request.getParameter("Mobilid"); //[ 15byte 이하] 모빌리언스 거래번호
String Mrchid = request.getParameter("Mrchid"); //[ 8byte 고정] 상점ID
String MSTR = request.getParameter("MSTR"); //[2000byte 이하] 가맹점 전달 콜백변수
String No = request.getParameter("No"); //[ 11byte 이하] 폰번호
String Payeremail = request.getParameter("Payeremail"); //[ 30byte 이하] 결제자 이메일
String Prdtnm = URLDecoder.decode(request.getParameter("Prdtnm"), "euc-kr"); //[ 50byte 이하] 상품명
String Prdtprice = request.getParameter("Prdtprice"); //[ 10byte 이하] 상품가격
String Signdate = request.getParameter("Signdate"); //[ 14byte 이하] 결제일자
String Svcid = request.getParameter("Svcid"); //[ 12byte 고정] 서비스ID
String Tradeid = request.getParameter("Tradeid"); //[ 40byte 이하] 상점거래번호
String Userid = request.getParameter("Userid"); //[ 20byte 이하] 사용자ID
String USERKEY = request.getParameter("USERKEY"); //[ 15byte 이하] 휴대폰정보(이통사, 휴대폰번호, 주민번호) 대체용 USERKEY
String MC_EZ_KEY = request.getParameter("Ezkey"); //[ 20byte 고정] 간소화결제 사용자키
// 사용자 정보
String mberNm = "";
String moblphonNo = "";
String mberEmailAdres = "";
MberManageVO mberManageVO = new MberManageVO();
mberManageVO.setMberId(Userid);
MberManageVO userInfo = userManageService.selectUserInfo(mberManageVO);
if (userInfo != null) {
mberNm = userInfo.getMberNm();
moblphonNo = userInfo.getMoblphonNo();
mberEmailAdres = userInfo.getMberEmailAdres();
}
// MjonPayVO
MjonPayVO mjonPayVO = new MjonPayVO();
mjonPayVO.setResultCd(Resultcd);
mjonPayVO.setResultMsg(Resultmsg);
mjonPayVO.setAutoBillKey(AutoBillKey);
mjonPayVO.setCashGb(CASH_GB);
mjonPayVO.setAutoYn("");
mjonPayVO.setCommId(Commid);
mjonPayVO.setMobileId(Mobilid);
mjonPayVO.setMrchId(Mrchid);
mjonPayVO.setPno(No);
mjonPayVO.setPayerEmail(Payeremail);
mjonPayVO.setPrdtNm(Prdtnm);
mjonPayVO.setPrdtPrice(Prdtprice);
mjonPayVO.setSignDate(Signdate);
mjonPayVO.setSvcId(Svcid);
mjonPayVO.setTradeId(Tradeid);
mjonPayVO.setUserId(Userid);
mjonPayVO.setUserKey(USERKEY);
mjonPayVO.setMcEzKey(MC_EZ_KEY);
// 추가정보(mj_pg)
String pgStatus = "";
if("0000".equals(Resultcd)) {
pgStatus = "1"; // 1:결제완료
}
else {
pgStatus = "4"; // 4.결제오류
}
mjonPayVO.setPgStatus(pgStatus); // 결제 상태 - 0:입금대기, 1:결제완료, 4.결제오류, 9:취소완료
mjonPayVO.setRcptType("9"); // 현금영수증 유형-0:미발행, 1:소득공제, 2:지출증빙, 9:세금계산서[PG에 없는 ]
mjonPayVO.setResultCode(Resultcd);
mjonPayVO.setResultMsg(Resultmsg);
mjonPayVO.setAmt(Prdtprice); // 결제금액
mjonPayVO.setPayMethod("CELLPHONE"); // 결제방법
mjonPayVO.setPgCode("KGM"); //
mjonPayVO.setGoodsName("KG 모빌리언스"); //
mjonPayVO.setPhone(No); // 모바일
mjonPayVO.setMobile(No); // 모바일
mjonPayVO.setEmail(mberEmailAdres); // 이메일(회원정보)
mjonPayVO.setTid(Tradeid); // Tid
mjonPayVO.setMid(Mrchid); // Mid
// 회원정보
mjonPayVO.setBuyerName(mberNm);
mjonPayVO.setBuyerEmail(moblphonNo);
mjonPayVO.setBuyerTel(mberEmailAdres);
// 로그인정보
/*
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
if(EgovUserDetailsHelper.isAuthenticated() && loginVO != null) {
mjonPayVO.setBuyerName(loginVO.getName());
mjonPayVO.setBuyerEmail(loginVO.getEmail());
mjonPayVO.setBuyerTel(loginVO.getTel());
}
else {
// 재로그인 처리
//Userid
}
*/
// 인서트
mjonPayService.insertKgmAll(mjonPayVO);
// 휴대폰 15만원결제 => 법인폰 알림
if (mjonPayVO.getAmt().equals("165000")) {
// 법인폰 알람여부 체크
JoinSettingVO joinSettingVO = new JoinSettingVO();
joinSettingVO = egovSiteManagerService.selectAdminNotiDetail();
// SMS 체크
if (joinSettingVO != null && joinSettingVO.getSmsNoti().equals("Y")) {
// 스미싱의심 SMS 알림전송
mjonNoticeSendUtil.smishingSmsNoticeSend("스미싱의심/휴대폰 15만원 결제", Userid, mberNm);
}
// SLACK 체크
if (joinSettingVO != null && joinSettingVO.getSlackNoti().equals("Y")) {
// Slack 메시지 발송(단순본문)
String msg = "[문자온] 스미싱의심/휴대폰 15만원 결제 - " + mberNm +"("+ Userid + ")";
mjonCommon.sendSimpleSlackMsg(msg);
}
// 스미싱 의심회원으로 변경
UserManageVO userManageVO = new UserManageVO();
userManageVO.setSmishingYn("Y");
userManageVO.setMberId(Userid);
userManageService.updateOneUserSmishingYnNotAlert(userManageVO);
}
else {
// 대상 : 휴대폰결제, 즉시이체, 전용계좌
// Step 1. 스미싱의심 지정 여부
JoinSettingVO joinSettingVO = new JoinSettingVO();
joinSettingVO = egovSiteManagerService.selectAdminNotiDetail();
if (joinSettingVO != null && joinSettingVO.getSmishingNoti().equals("Y")) {
// Step 1. 개인회원 여부 체크
int isPersnalMemberCnt = egovSiteManagerService.selectPersnalMemberCnt(Userid);
if (isPersnalMemberCnt == 1) {
// Step 2. 첫결제 여부 체크
int isFirstPayCnt = egovSiteManagerService.selectFirstPayCnt(Userid);
if (isFirstPayCnt == 1) {
// SMS 체크
if (joinSettingVO != null && joinSettingVO.getSmsNoti().equals("Y")) {
// 스미싱의심 SMS 알림전송
mjonNoticeSendUtil.smishingSmsNoticeSend("스미싱의심/휴대폰 첫결제", Userid, mberNm);
}
// SLACK 체크
if (joinSettingVO != null && joinSettingVO.getSlackNoti().equals("Y")) {
// Slack 메시지 발송(단순본문)
String msg = "[문자온] 스미싱의심/휴대폰 첫결제 - " + mberNm +"("+ Userid + ")";
mjonCommon.sendSimpleSlackMsg(msg);
}
// 스미싱 의심회원으로 변경
UserManageVO userManageVO = new UserManageVO();
userManageVO.setSmishingYn("Y");
userManageVO.setMberId(Userid);
userManageService.updateOneUserSmishingYnNotAlert(userManageVO);
}
}
}
}
redirect.addAttribute("Resultcd", Resultcd);
redirect.addAttribute("Tradeid", Tradeid);
redirect.addAttribute("Prdtprice", Prdtprice);
//return "web/cop/kgm/okurl";
return "redirect:/web/kgm/pay/kgmResultAjax.do";
}
static String convert(String str, String encoding) throws IOException {
ByteArrayOutputStream requestOutputStream = new ByteArrayOutputStream();
requestOutputStream.write(str.getBytes(encoding));
return requestOutputStream.toString(encoding);
}
/**
* KGM mobile 결제 Result 페이지
* @param searchVO
* @param model
* @throws Exception
*/
@RequestMapping(value= {"/web/kgm/pay/kgmResultAjax"}, method=RequestMethod.GET)
public String kgmResultAjax(HttpServletRequest request
, ModelMap model
) throws Exception{
String Resultmsg = "";
String Prdtprice = "";
if("0000".equals(request.getParameter("Resultcd"))) {
Prdtprice = request.getParameter("Prdtprice");
/*
MjonPayVO mjonPayVO = new MjonPayVO();
mjonPayVO.setTradeId(request.getParameter("Tradeid"));
mjonPayVO = mjonPayService.selectKgmVO(mjonPayVO);
if (!mjonPayVO.equals(null)) {
}
*/
// 로그인정보
/*
String userId = "";
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
if(EgovUserDetailsHelper.isAuthenticated() && loginVO != null) {
}
else {
// 재로그인 처리
userId = mjonPayVO.getUserId();
}
*/
Resultmsg = "휴대폰결제 정상처리 되었습니다.";
}
else {
Resultmsg = "휴대폰결제 실패 했습니다.";
}
model.addAttribute("Resultcd", request.getParameter("Resultcd"));
model.addAttribute("Resultmsg", Resultmsg);
model.addAttribute("Prdtprice", Prdtprice);
return "web/cop/kgm/result";
}
/**
* KGM mobile 결제 okurl 페이지
* @param searchVO
* @param model
* @throws Exception
*/
@RequestMapping(value= {"/web/kgm/pay/kgmCancelAjax.do"}, method=RequestMethod.GET)
public String kgmCancelAjax(HttpServletRequest request
, HttpServletResponse response
, ModelMap model
) throws Exception {
Boolean isSuccess = true;
String msg = "";
String resultCd = ""; // 리턴코드
String resultMsg = ""; // 리턴메시지
try {
// 아래정보가 맞지 않을 경우 취소정보 불일치 0045 리턴됩니다.
String Mrchid=""; //모빌리언스가 부여한 상점아이디 8자리
String Svcid=""; //모빌리언스가 부여한 서비스아이디 12자리
String Tradeid = ""; //결제된 상점거래번호
String Prdtprice = ""; //결제된 금액
String Mobilid = ""; //결제된 모빌리언스 거래번호
Mrchid = request.getParameter("Mrchid");
Svcid = request.getParameter("Svcid");
Tradeid = request.getParameter("Tradeid");
Prdtprice = request.getParameter("Prdtprice");
Mobilid = request.getParameter("Mobilid");
// MOID : MOID_000000000000630
Mrchid = "17062204";
Svcid = "170622040674";
Tradeid = "170622040674_202204191748300618";
Prdtprice = "3000";
Mobilid = "5002140398";
String kgmServerIp = ""; // 메인서버아이피
int kgmServerPort = 0; // 서버포트
String kgmSwitchIp = ""; // 백업서버아이피
int kgmRecvTimeOut = 0; // 전문수신타임아웃
String kgmLogDir = ""; // 로그경로
String serverName = request.getServerName().toLowerCase();
int serverPort = request.getServerPort();
System.out.println("serverName : "+ serverName);
System.out.println("serverPort : "+ serverPort);
if (serverName.lastIndexOf("localhost") > -1 || serverName.lastIndexOf("127.0.0.1") > -1) {
System.out.println("KGM 연결서버 : 개발서버1");
// 개발서버
kgmServerIp = "175.158.12.131";
kgmServerPort = 7500;
kgmSwitchIp = "175.158.12.131";
kgmRecvTimeOut = 30000;
kgmLogDir = "c:\\cancel_log\\";
}
else if (serverPort != 80 || serverPort != 443) {
System.out.println("KGM 연결서버 : 개발서버2");
// 개발서버
kgmServerIp = "175.158.12.131";
kgmServerPort = 7500;
kgmSwitchIp = "175.158.12.131";
kgmRecvTimeOut = 30000;
kgmLogDir = "c:\\cancel_log\\";
}
else {
System.out.println("KGM 연결서버 : 운영서버");
// 운영서버
kgmServerIp = "175.158.12.140";
kgmServerPort = 7500;
kgmSwitchIp = "218.50.55.107";
kgmRecvTimeOut = 30000;
kgmLogDir = "/cancel_log/";
}
// MC Cancel
/*
MC_Cancel cancel = new MC_Cancel();
cancel.setServerInfo(kgmServerIp, kgmServerPort, kgmSwitchIp, kgmRecvTimeOut, kgmLogDir);
resultCd = cancel.cancel_attempt(Mrchid, Svcid, Tradeid, Prdtprice, Mobilid); // 결제취소요청
resultMsg = getMobiliansCancelReturnMsg(resultCd);
if (resultCd.equals("0000") ) {
// 결제취소 성공
} else {
// 결제취소 실패
}
// KG 모빌리언스 취소 리턴메시지
System.out.println("<h3>결과코드 : "+ resultCd +"</h3>" );
System.out.println("<h3>결과메시지 : "+ getMobiliansCancelReturnMsg(resultCd) +"</h3>" );
if (resultCd.equals("0000") ) {
System.out.println("<h3>결제취소 성공</h3>");
} else {
System.out.println("<h3>결제취소 실패</h3>");
}
*/
} catch (Exception e) {
e.printStackTrace();
isSuccess = false;
msg = "Err : " + e.getMessage();
}
model.clear();
model.addAttribute("isSuccess", isSuccess);
model.addAttribute("msg", msg);
model.addAttribute("resultCd", resultCd);
model.addAttribute("resultMsg", resultMsg);
return "";
}
// KG 모빌리언스 취소 리턴메시지
public static String getMobiliansCancelReturnMsg(String val) {
String rtnVal = "";
switch (val.trim().toUpperCase()) {
case "0000":
rtnVal = "정상취소처리";
break;
case "0011":
rtnVal = "통신사미등록폰";
break;
case "0014":
rtnVal = "해지된 폰";
break;
case "0020":
rtnVal = "SKT,LGT 경우 휴대폰정보 변경으로 인한 취소실패";
break;
case "0041":
rtnVal = "거래내역 없음";
break;
case "0042":
rtnVal = "취소기간경과";
break;
case "0044":
rtnVal = "이미 취소된 자료";
break;
case "0045":
rtnVal = "취소 자료 정보 불일치";
break;
case "0097":
rtnVal = "요청자료 오류";
break;
case "0098":
rtnVal = "통신사 통신오류";
break;
case "0099":
rtnVal = "기타";
break;
}
return rtnVal;
}
/////////////////////////////////////////////////////////////////////////////////////////
//
//
@ -722,131 +183,4 @@ public class MjonKGMPayController {
return p_paginationInfo;
}
//사용자 업로드 파일 처리 - 하나의 파일만 처리
private String takeFile(
MultipartHttpServletRequest p_multiRequest
, ModelAndView p_modelAndView
, BoardMasterVO p_bmVO
) throws Exception{
//Map<String, Object> p_map = new Map<>();
//Map<String, Object> in_map = new HashMap<>();
boolean in_bool = true;
List<FileVO> result = null;
String atchFileId = "";
String isThumbFile = "";
//String isThumbFile = "thumbFile"; //"thumbFile" - 썸네일을 생성한다.
final Map<String, MultipartFile> files = p_multiRequest.getFileMap();
if (!files.isEmpty()) {
result = egovFileMngUtil.parseFileInf(files, "ADDRAGENCY_", 0, "", "", isThumbFile);
// 파일 사이즈, 개수, 확장자 체크. model에 체크 오류 메세지 set
//관리자에서 게시판 설정시 업로드 파일 사이즈와 수량 체크용
if(!checkFileUtil.isPosblAtchFileMvWithBoardMaster(result, p_modelAndView, 0, "xlsx|xls|zip|hwp|txt|doc|docx|csv", p_bmVO)) {
// 공통코드 Set
//setBBSCommCd(model, bmVO);
//model.addAttribute("bdMstr", bmVO);
//return "web/cop/bbs/EgovNoticeRegist";
//modelAndView.addObject("bdMstr", bmVO);
p_modelAndView.addObject("result", "fail");
in_bool = false;
}
atchFileId = fileMngService.insertFileInfs(result); //첨부 파일
}
if (!in_bool) atchFileId = "ERROR";
return atchFileId;
}
//addragency 게시물에 남기기
private ModelAndView insertAddrAgencyBoard(
ModelAndView p_modelAndView
//, Map<String, Object> p_fileResult
, String p_atchFileId
, AddrAgencyVO p_addrAgencyVO
, String p_content
, String p_registerId
//, String p_processStatus
, MultipartHttpServletRequest p_multiRequest
) throws Exception{
//게시판 등록하기
try {
String p_processStatus = "";
p_processStatus = p_addrAgencyVO.getProcessStatus();
if ("".equals(p_processStatus) || p_processStatus==null) p_processStatus = "B";
p_addrAgencyVO.setAtchFileId(p_atchFileId);
p_addrAgencyVO.setRequestTxt(unscript(p_content)); // XSS 방지
p_addrAgencyVO.setProcessStatus(p_processStatus); //처리상태 B/I/E
p_addrAgencyVO.setRegisterId(p_registerId);
String userIp = EgovClntInfo.getClntIP(p_multiRequest);
p_addrAgencyVO.setNtcrIp(userIp);
addrAgencyService.insert(p_addrAgencyVO);
p_modelAndView.addObject("message", egovMessageSource.getMessage("success.common.insert"));
p_modelAndView.addObject("result", "success");
}catch(Exception ex){
ex.printStackTrace();
p_modelAndView.addObject("message", egovMessageSource.getMessage("fail.common.insert"));
p_modelAndView.addObject("result", "fail");
}
return p_modelAndView;
}
/**
* XSS 방지 처리.
*
* @param data
* @return
*/
protected String unscript(String data) {
if (data == null || data.trim().equals("")) {
return "";
}
String ret = data;
ret = ret.replaceAll("<(S|s)(C|c)(R|r)(I|i)(P|p)(T|t)", "&lt;script");
ret = ret.replaceAll("</(S|s)(C|c)(R|r)(I|i)(P|p)(T|t)", "&lt;/script");
ret = ret.replaceAll("<(O|o)(B|b)(J|j)(E|e)(C|c)(T|t)", "&lt;object");
ret = ret.replaceAll("</(O|o)(B|b)(J|j)(E|e)(C|c)(T|t)", "&lt;/object");
ret = ret.replaceAll("<(A|a)(P|p)(P|p)(L|l)(E|e)(T|t)", "&lt;applet");
ret = ret.replaceAll("</(A|a)(P|p)(P|p)(L|l)(E|e)(T|t)", "&lt;/applet");
ret = ret.replaceAll("<(E|e)(M|m)(B|b)(E|e)(D|d)", "&lt;embed");
ret = ret.replaceAll("</(E|e)(M|m)(B|b)(E|e)(D|d)", "&lt;embed");
ret = ret.replaceAll("<(F|f)(O|o)(R|r)(M|m)", "&lt;form");
ret = ret.replaceAll("</(F|f)(O|o)(R|r)(M|m)", "&lt;form");
//ret = ret.replaceAll("<", "&lt;");
ret = ret.replaceAll("alert", "");
//ret = ret.replaceAll("iframe", "");
return ret;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -8,9 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
@ -20,7 +18,6 @@ import itn.com.cmm.util.StringUtil;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.mjo.pay.service.MjonPayTypeService;
import itn.let.mjo.pay.service.MjonPayTypeVO;
import itn.let.uss.umt.service.EgovUserManageService;
@Controller
public class MjonPayTypeController {
@ -28,9 +25,6 @@ public class MjonPayTypeController {
@Resource(name = "mjonPayTypeService")
private MjonPayTypeService mjonPayTypeService;
@Resource(name = "userManageService")
private EgovUserManageService userManageService;
//결제 수단 정보 조회
@RequestMapping(value={"/let/mjo/pay/selectMjonPayTypeView.do"})
public String selectMjonPayTypeView(HttpServletRequest request, HttpServletResponse response, ModelMap model) throws Exception{
@ -70,49 +64,4 @@ public class MjonPayTypeController {
RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/let/mjo/pay/selectMjonPayTypeView.do");
return redirectUrlMaker.getRedirectUrl();
}
//결제 수단 회원 상태 조회
@RequestMapping(value={"/web/member/pay/checkPayTypeStatusAjax.do"})
public ModelAndView checkPayTypeStatusAjax(@ModelAttribute("searchVO") MjonPayTypeVO mjonPayTypeVO,
HttpServletRequest request, HttpServletResponse response, ModelMap model) throws Exception{
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
//로그인 정보 획득
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
/**
* 회원 정지된 상태이면 문자 발송이 안되도록 처리함
* 현재 로그인 세션도 만료 처리함
* */
boolean mberSttus = userManageService.selectUserStatusInfo(loginVO.getId());
if(!mberSttus) {
modelAndView.addObject("message", "현재 고객님께서는 문자온 서비스 이용이 정지된 상태로 결제 하실 수 없습니다. 이용정지 해제를 원하시면 고객센터로 연락주시기 바랍니다.");
modelAndView.addObject("result", "statusFail");
// 세션 로그아웃
request.getSession().invalidate();
} else {
//결제수단 상태 확인
String useYn = mjonPayTypeService.selectMjonPayTypeStatus(mjonPayTypeVO.getPayTypeCode());
if("N".equals(useYn)) {
modelAndView.addObject("message", "해당 결제수단이 일시적으로 이용이 불가능합니다.");
modelAndView.addObject("result", "tempNotUse");
} else {
modelAndView.addObject("result", "success");
}
}
return modelAndView;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -34,39 +34,20 @@ import itn.com.cmm.EgovMessageSource;
import itn.com.cmm.LoginVO;
import itn.com.cmm.util.RedirectUrlMaker;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.mjo.pay.service.MjonPayService;
import itn.let.mjo.pay.service.MjonPrePayService;
import itn.let.mjo.pay.service.MjonPrePayVO;
import itn.let.uss.umt.service.EgovUserManageService;
@Controller
public class MjonPrePayController {
private static final Logger LOGGER = LoggerFactory.getLogger(MjonPrePayController.class);
@Resource(name = "mjonPayService")
private MjonPayService mjonPayService;
@Resource(name = "mjonPrePayService")
private MjonPrePayService mjonPrePayService;
/** EgovMessageSource */
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
/** userManageService */
@Resource(name = "userManageService")
private EgovUserManageService userManageService;
//배열 정의{"컬럼순차번호, 컬럼이름, 컬럼내용, 컬럼이름에 붙여야할 내용(엑셀코드양식다운로드시 필요)"}
private String[][] sendPrePayExcelValue ={
{"0" ,"번호" , "1" , "" },
{"1", "아이디" , "아이디" , ""},
{"2", "전송사" , "개인전용계좌", ""},
{"3", "선결제일시" , "2021-06-08 11:05:38", ""},
{"4", "결제금액" , "1000", ""},
{"5", "등록일자" , "2021-06-08 11:05:38", ""},
} ;
/**
* 결제 리스트
@ -563,5 +544,15 @@ public class MjonPrePayController {
}
}
//배열 정의{"컬럼순차번호, 컬럼이름, 컬럼내용, 컬럼이름에 붙여야할 내용(엑셀코드양식다운로드시 필요)"}
private String[][] sendPrePayExcelValue ={
{"0" ,"번호" , "1" , "" },
{"1", "아이디" , "아이디" , ""},
{"2", "전송사" , "개인전용계좌", ""},
{"3", "선결제일시" , "2021-06-08 11:05:38", ""},
{"4", "결제금액" , "1000", ""},
{"5", "등록일자" , "2021-06-08 11:05:38", ""},
} ;
}

View File

@ -24,22 +24,12 @@ import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.EgovMessageSource;
import itn.com.cmm.LoginVO;
import itn.com.cmm.service.EgovCmmUseService;
import itn.com.cmm.service.EgovFileMngService;
import itn.com.cmm.service.EgovFileMngUtil;
import itn.com.cmm.service.FileVO;
import itn.com.cmm.util.RedirectUrlMaker;
import itn.let.cop.bbs.service.Board;
import itn.let.mjo.msg.service.MjonMsgService;
import itn.let.mjo.msgdata.service.MjonMsgDataService;
import itn.let.mjo.pay.service.MjonPayService;
import itn.let.mjo.pay.service.MjonPayVO;
import itn.let.mjo.pay.service.RefundService;
import itn.let.mjo.payva.service.VacsVactService;
import itn.let.mjo.payva.service.VacsVactVO;
import itn.let.uss.umt.service.EgovMberManageService;
import itn.let.uss.umt.service.EgovUserManageService;
import itn.let.utl.fcc.service.EgovCryptoUtil;
import itn.let.utl.user.service.CheckFileUtil;
import itn.let.utl.user.service.CheckLoginUtil;
@ -51,45 +41,13 @@ import itn.let.utl.user.service.CheckLoginUtil;
@Controller
public class MjonSBVAPayController {
@Resource(name = "mjonPayService")
private MjonPayService mjonPayService;
/** EgovMessageSource */
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
/** userManageService */
@Resource(name = "userManageService")
private EgovUserManageService userManageService;
/** refundService */
@Resource(name = "refundService")
private RefundService refundService;
@Resource(name = "mjonMsgService")
private MjonMsgService mjonMsgService;
@Resource(name = "MjonMsgDataService")
private MjonMsgDataService mjonMsgDataService;
@Resource(name = "mberManageService")
private EgovMberManageService mberManageService;
@Resource(name = "EgovCmmUseService")
private EgovCmmUseService cmmUseService;
//암호화
@Resource(name = "egovCryptoUtil")
EgovCryptoUtil egovCryptoUtil;
//로그인 처리
@Resource(name = "checkLoginUtil")
private CheckLoginUtil checkLoginUtil;
//무료 대행 관련 쿼리
//@Resource(name="addrAgencyService")
//private AddrAgencyService addrAgencyService;
//가상계좌원장
@Resource(name="vacsVactService")
@ -103,89 +61,8 @@ public class MjonSBVAPayController {
@Resource(name="EgovFileMngUtil")
private EgovFileMngUtil egovFileMngUtil;
//파일 정보 관리
@Resource(name="EgovFileMngService")
private EgovFileMngService fileMngService;
private static final Logger logger = LoggerFactory.getLogger(MjonSBVAPayController.class);
/////////////////////////////////////////////////////////////////////////////////////////
//
//
// USER
//
//
/**
* 세틀뱅크 가상계좌 결제 Action 페이지
* @param searchVO
* @param model
* @return "/web/pay/PayView.do"
* @throws Exception
*/
@RequestMapping(value= {"/web/member/payva/SBPayActionAjax.do"})
public String KGMPayActionAjax(@ModelAttribute("mjonPayVO") MjonPayVO mjonPayVO,
HttpServletRequest request,
ModelMap model) throws Exception{
/*
String pattern = (String) request.getAttribute(
HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE) ;
*/
mjonPayVO.setReturnURL(request.getRequestURL().toString().split("pay")[0] + "payva/SBPayActionAjax.do") ;
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
//테스트
mjonPayVO.setBuyerName(loginVO.getName());
mjonPayVO.setBuyerEmail(loginVO.getEmail());
mjonPayVO.setMoid(loginVO.getId());
model.addAttribute("mjonPayVO", mjonPayVO);
return "web/cop/sb/mc_web";
}
/**
* KGM mobile 결제 okurl 페이지
* @param searchVO
* @param model
* @return "/web/pay/PayView.do"
* @throws Exception
*/
@RequestMapping(value= {"/web/member/payva/OkUrl.do"})
public String OkUrl(
HttpServletRequest request
, ModelMap model
) throws Exception{
System.out.println("request.toString()");
System.out.println(request.toString());
return "web/cop/sb/okurl";
}
/**
* KGM mobile 결제 okurl 페이지
* @param searchVO
* @param model
* @return "/web/pay/PayView.do"
* @throws Exception
*/
@RequestMapping(value= {"/web/member/payva/NotiUrl.do"})
public String NotiUrl(
HttpServletRequest request
, ModelMap model
) throws Exception{
System.out.println("request.toString()");
System.out.println(request.toString());
return "web/cop/sb/notiurl";
}
/////////////////////////////////////////////////////////////////////////////////////////
//
//
@ -683,13 +560,11 @@ public class MjonSBVAPayController {
in_bool = false;
}
//atchFileId = fileMngService.insertFileInfs(result); //첨부 파일
for(int i=0;i<result.size();i++) {
FileVO vo = (FileVO) result.get(i);
atchFileId = atchFileId + "|" + vo.fileStreCours + vo.streFileNm; //첨부 파일
}
//atchFileId = atchFileId + "|" + fileMngService.insertFileInfs(result); //첨부 파일
}
if (!in_bool) atchFileId = "ERROR";
@ -697,89 +572,4 @@ public class MjonSBVAPayController {
return atchFileId;
}
//vacs_vact 가상계좌원장 내용 변경하기
/*
private ModelAndView insertAddrAgencyBoard(
ModelAndView p_modelAndView
//, Map<String, Object> p_fileResult
, String p_atchFileId
, VacsVactVO p_vacsVactVO
, String p_content
, String p_registerId
//, String p_processStatus
, MultipartHttpServletRequest p_multiRequest
) throws Exception{
//게시판 등록하기
try {
String p_processStatus = "";
//p_processStatus = p_vacsVactVO.getProcessStatus();
//if ("".equals(p_processStatus) || p_processStatus==null) p_processStatus = "B";
//p_vacsVactVO.setAtchFileId(p_atchFileId);
//p_vacsVactVO.setRequestTxt(unscript(p_content)); // XSS 방지
//p_vacsVactVO.setProcessStatus(p_processStatus); //처리상태 B/I/E
//p_vacsVactVO.setRegisterId(p_registerId);
//String userIp = EgovClntInfo.getClntIP(p_multiRequest);
//p_vacsVactVO.setNtcrIp(userIp);
vacsVactService.insert(p_vacsVactVO);
p_modelAndView.addObject("message", egovMessageSource.getMessage("success.common.insert"));
p_modelAndView.addObject("result", "success");
}catch(Exception ex){
ex.printStackTrace();
p_modelAndView.addObject("message", egovMessageSource.getMessage("fail.common.insert"));
p_modelAndView.addObject("result", "fail");
}
return p_modelAndView;
}
*/
/**
* XSS 방지 처리.
*
* @param data
* @return
*/
protected String unscript(String data) {
if (data == null || data.trim().equals("")) {
return "";
}
String ret = data;
ret = ret.replaceAll("<(S|s)(C|c)(R|r)(I|i)(P|p)(T|t)", "&lt;script");
ret = ret.replaceAll("</(S|s)(C|c)(R|r)(I|i)(P|p)(T|t)", "&lt;/script");
ret = ret.replaceAll("<(O|o)(B|b)(J|j)(E|e)(C|c)(T|t)", "&lt;object");
ret = ret.replaceAll("</(O|o)(B|b)(J|j)(E|e)(C|c)(T|t)", "&lt;/object");
ret = ret.replaceAll("<(A|a)(P|p)(P|p)(L|l)(E|e)(T|t)", "&lt;applet");
ret = ret.replaceAll("</(A|a)(P|p)(P|p)(L|l)(E|e)(T|t)", "&lt;/applet");
ret = ret.replaceAll("<(E|e)(M|m)(B|b)(E|e)(D|d)", "&lt;embed");
ret = ret.replaceAll("</(E|e)(M|m)(B|b)(E|e)(D|d)", "&lt;embed");
ret = ret.replaceAll("<(F|f)(O|o)(R|r)(M|m)", "&lt;form");
ret = ret.replaceAll("</(F|f)(O|o)(R|r)(M|m)", "&lt;form");
//ret = ret.replaceAll("<", "&lt;");
ret = ret.replaceAll("alert", "");
//ret = ret.replaceAll("iframe", "");
return ret;
}
}

View File

@ -41,7 +41,6 @@ import itn.let.mjo.event.service.MjonEventCheckVO;
import itn.let.mjo.event.service.MjonEventService;
import itn.let.mjo.event.service.MjonEventVO;
import itn.let.mjo.mjocommon.MjonCommon;
import itn.let.mjo.msgdata.service.MjonMsgDataService;
import itn.let.mjo.pay.service.MjonPayService;
import itn.let.mjo.pay.service.MjonPayVO;
import itn.let.mjo.pay.service.RefundService;
@ -50,8 +49,6 @@ import itn.let.mjo.tax.service.TaxService;
import itn.let.mjo.tax.service.TaxVO;
import itn.let.sym.site.service.EgovSiteManagerService;
import itn.let.sym.site.service.JoinSettingVO;
import itn.let.uat.uia.service.EgovLoginService;
import itn.let.uss.umt.service.EgovMberManageService;
import itn.let.uss.umt.service.MberManageVO;
import itn.let.utl.user.service.MjonNoticeSendUtil;
@ -70,13 +67,6 @@ public class RefundController {
@Resource(name="EgovFileMngService")
private EgovFileMngService fileMngService;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileService;
/** EgovLoginService */
@Resource(name = "loginService")
private EgovLoginService loginService;
@Resource(name = "EgovCmmUseService")
private EgovCmmUseService cmmUseService;
@ -86,10 +76,6 @@ public class RefundController {
@Resource(name="taxService")
private TaxService taxService;
/* MjonMsgDataService */
@Resource(name = "MjonMsgDataService")
private MjonMsgDataService mjonMsgDataService;
/** 알림전송 Util */
@Resource(name = "mjonNoticeSendUtil")
private MjonNoticeSendUtil mjonNoticeSendUtil;
@ -97,17 +83,12 @@ public class RefundController {
@Resource(name="MjonCommon")
private MjonCommon mjonCommon;
@Resource(name = "mberManageService")
private EgovMberManageService mberManageService;
/** 사이트 설정 */
@Resource(name = "egovSiteManagerService")
EgovSiteManagerService egovSiteManagerService;
@Resource(name = "MjonEventService")
private MjonEventService mjonEventService;
/**
@ -144,8 +125,6 @@ public class RefundController {
refundVO.setSearchSortOrd("desc");
}
ComDefaultCodeVO comDefaultCodeVO = new ComDefaultCodeVO();
List<RefundVO> refundList = refundService.selectRefundList(refundVO);
int totCnt = 0;
@ -200,7 +179,7 @@ public class RefundController {
if(refundVO.getBankAtchFileId() !=null) {
FileVO fileVO = new FileVO();
fileVO.setAtchFileId(refundVO.getBankAtchFileId());
List<FileVO> fileList = fileService.selectFileInfs(fileVO);
List<FileVO> fileList = fileMngService.selectFileInfs(fileVO);
model.addAttribute("bankfileList", fileList);
}
@ -208,7 +187,7 @@ public class RefundController {
if(refundVO.getDocuAtchFileId() !=null) {
FileVO fileVO = new FileVO();
fileVO.setAtchFileId(refundVO.getDocuAtchFileId());
List<FileVO> fileList = fileService.selectFileInfs(fileVO);
List<FileVO> fileList = fileMngService.selectFileInfs(fileVO);
model.addAttribute("docufileList", fileList);
}
@ -216,7 +195,7 @@ public class RefundController {
if(refundVO.getAdmAtchFileId() !=null) {
FileVO fileVO = new FileVO();
fileVO.setAtchFileId(refundVO.getAdmAtchFileId());
List<FileVO> fileList = fileService.selectFileInfs(fileVO);
List<FileVO> fileList = fileMngService.selectFileInfs(fileVO);
model.addAttribute("resultFileList", fileList);
}
@ -298,7 +277,7 @@ public class RefundController {
* @return modelAndView
* @throws Exception
*/
@RequestMapping(value = {"/uss/ion/pay/insertRefundAjax.do","/web/member/pay/insertRefundAjax.do"})
@RequestMapping(value = {"/uss/ion/pay/insertRefundAjax.do"})
public ModelAndView insertRefundAjax(final MultipartHttpServletRequest multiRequest
, RefundVO refundVO , HttpServletRequest request) throws Exception {
@ -318,13 +297,6 @@ public class RefundController {
return modelAndView;
}
/*if(true) {
modelAndView.addObject("msg", "디버그존~");
modelAndView.addObject("status", "fail");
return modelAndView;
}*/
//230802 이지우 취약점 조치 - 보유금액을 변조하여 환불 신청 경우 방지
//회원 정보 조회
RefundVO mberInfoVO = refundService.selectRefundMberInfo(refundVO);
@ -406,47 +378,6 @@ public class RefundController {
return modelAndView;
}
/**
* 환불신청금액(환불요청 상태) Ajax
* @param RefundVO
* @param model
* @return modelAndView
* @throws Exception
*/
@RequestMapping(value = {"/web/member/pay/refMonSumAjax.do"})
public ModelAndView RefundMoneySumAjax(RefundVO refundVO, HttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
boolean isSuccess = true;
String msg = "";
int refundMoneySum = 0;
int userMoney = 0;
try {
refundVO.setMberId(loginVO.getId());
refundVO = refundService.selectRefundMberInfo(refundVO);
userMoney = (int)Double.parseDouble(refundVO.getMberMoney()); // 보유Cash
refundMoneySum = refundService.selectRefundMoneySum(refundVO); // 환불신청금액(환불요청 상태)
} catch (Exception e) {
isSuccess = false;
msg = e.getMessage();
}
modelAndView.addObject("isSuccess", isSuccess);
modelAndView.addObject("msg", msg);
modelAndView.addObject("userMoney", userMoney);
modelAndView.addObject("refundMoneySum", refundMoneySum);
return modelAndView;
}
/**
* 환불요청 상태 업데이트 Ajax
* @param RefundVO

Some files were not shown because too many files have changed in this diff Show More