first commit

This commit is contained in:
revlis44
2025-12-03 10:41:27 +09:00
commit a6b37aa445
2430 changed files with 175919 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.auth.dao.HmsAuthGroupDAO
* egovframework.cms.auth.vo.HmsAuthGroupDefaultVO
* egovframework.cms.auth.vo.HmsAuthGroupVO
* egovframework.com.cmm.service.impl.EgovComAbstractDAO
* org.springframework.stereotype.Repository
*/
package egovframework.cms.auth.dao;
import egovframework.cms.auth.vo.HmsAuthGroupDefaultVO;
import egovframework.cms.auth.vo.HmsAuthGroupVO;
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
@Repository(value="hmsAuthGroupDAO")
public class HmsAuthGroupDAO
extends EgovComAbstractDAO {
public String insertHmsAuthGroup(HmsAuthGroupVO vo) throws Exception {
return (String)this.insert("hmsAuthGroupDAO.insertHmsAuthGroup_S", (Object)vo);
}
public void updateHmsAuthGroup(HmsAuthGroupVO vo) throws Exception {
this.update("hmsAuthGroupDAO.updateHmsAuthGroup_S", (Object)vo);
}
public void deleteHmsAuthGroup(HmsAuthGroupVO vo) throws Exception {
this.delete("hmsAuthGroupDAO.deleteHmsAuthGroup_S", (Object)vo);
}
public HmsAuthGroupVO selectHmsAuthGroup(HmsAuthGroupVO vo) throws Exception {
return (HmsAuthGroupVO)this.selectByPk("hmsAuthGroupDAO.selectHmsAuthGroup_S", (Object)vo);
}
public List selectHmsAuthGroupList(HmsAuthGroupDefaultVO searchVO) throws Exception {
return this.list("hmsAuthGroupDAO.selectHmsAuthGroupList_D", (Object)searchVO);
}
public int selectHmsAuthGroupListTotCnt(HmsAuthGroupDefaultVO searchVO) {
return (Integer)this.select("hmsAuthGroupDAO.selectHmsAuthGroupListTotCnt_S", (Object)searchVO);
}
public List selectHmsAuthList() throws Exception {
return this.list("hmsAuthGroupDAO.selectHmsAuthList", null);
}
public void insertHmsAuthGroupAuth(Map<String, Object> param) throws Exception {
this.insert("hmsAuthGroupDAO.insertHmsAuthGroupAuth", param);
}
public List selectHmsAuthGroupRelAuth(String authGroupSeq) throws Exception {
return this.list("hmsAuthGroupDAO.selectHmsAuthGroupRelAuth", (Object)authGroupSeq);
}
public void deleteHmsAuthGroupRelAuth(String authGroupSeq) throws Exception {
this.delete("hmsAuthGroupDAO.deleteHmsAuthGroupRelAuth", (Object)authGroupSeq);
}
public List selectHmsAuthGroupRelUser(String authGroupSeq) throws Exception {
return this.list("hmsAuthGroupDAO.selectHmsAuthGroupRelUser", (Object)authGroupSeq);
}
public List selectHmsAuthGroupRelUserByMember(String authGroupSeq) throws Exception {
return this.list("hmsAuthGroupDAO.selectHmsAuthGroupRelUserByMember", (Object)authGroupSeq);
}
public List selectHmsAuthGroupRelDept(String authGroupSeq) throws Exception {
return this.list("hmsAuthGroupDAO.selectHmsAuthGroupRelDept", (Object)authGroupSeq);
}
public void deleteHmsAuthGroupRelUser(Map<String, Object> param) throws Exception {
this.delete("hmsAuthGroupDAO.deleteHmsAuthGroupRelUser", param);
}
public void insertHmsAuthGroupUser(Map<String, Object> param) throws Exception {
this.insert("hmsAuthGroupDAO.insertHmsAuthGroupUser", param);
}
}

View File

@@ -0,0 +1,51 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.auth.service.HmsAuthGroupService
* egovframework.cms.auth.vo.HmsAuthGroupDefaultVO
* egovframework.cms.auth.vo.HmsAuthGroupVO
* javax.servlet.http.HttpServletRequest
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.auth.service;
import egovframework.cms.auth.vo.HmsAuthGroupDefaultVO;
import egovframework.cms.auth.vo.HmsAuthGroupVO;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.multipart.MultipartHttpServletRequest;
public interface HmsAuthGroupService {
public String insertHmsAuthGroup(HmsAuthGroupVO var1, MultipartHttpServletRequest var2) throws Exception;
public void updateHmsAuthGroup(HmsAuthGroupVO var1, MultipartHttpServletRequest var2) throws Exception;
public void deleteHmsAuthGroup(HmsAuthGroupVO var1, HttpServletRequest var2) throws Exception;
public HmsAuthGroupVO selectHmsAuthGroup(HmsAuthGroupVO var1) throws Exception;
public List selectHmsAuthGroupList(HmsAuthGroupDefaultVO var1) throws Exception;
public int selectHmsAuthGroupListTotCnt(HmsAuthGroupDefaultVO var1);
public List selectHmsAuthList() throws Exception;
public void insertHmsAuthGroupAuth(Map<String, Object> var1) throws Exception;
public List selectHmsAuthGroupRelAuth(String var1) throws Exception;
public void deleteHmsAuthGroupRelAuth(String var1) throws Exception;
public List selectHmsAuthGroupRelUser(String var1) throws Exception;
public List selectHmsAuthGroupRelUserByMember(String var1) throws Exception;
public List selectHmsAuthGroupRelDept(String var1) throws Exception;
public void deleteHmsAuthGroupRelUser(Map<String, Object> var1) throws Exception;
public void insertHmsAuthGroupUser(Map<String, Object> var1) throws Exception;
}

View File

@@ -0,0 +1,149 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.auth.dao.HmsAuthGroupDAO
* egovframework.cms.auth.service.HmsAuthGroupService
* egovframework.cms.auth.service.impl.HmsAuthGroupServiceImpl
* egovframework.cms.auth.vo.HmsAuthGroupDefaultVO
* egovframework.cms.auth.vo.HmsAuthGroupVO
* egovframework.cms.log.service.HmsLogService
* egovframework.cms.log.vo.HmsLogVO
* egovframework.com.cmm.LoginVO
* egovframework.com.cmm.service.EgovFileMngService
* egovframework.com.cmm.service.EgovFileMngUtil
* egovframework.rte.fdl.idgnr.EgovIdGnrService
* egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper
* javax.annotation.Resource
* javax.servlet.http.HttpServletRequest
* org.springframework.stereotype.Service
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.auth.service.impl;
import egovframework.cms.auth.dao.HmsAuthGroupDAO;
import egovframework.cms.auth.service.HmsAuthGroupService;
import egovframework.cms.auth.vo.HmsAuthGroupDefaultVO;
import egovframework.cms.auth.vo.HmsAuthGroupVO;
import egovframework.cms.log.service.HmsLogService;
import egovframework.cms.log.vo.HmsLogVO;
import egovframework.com.cmm.LoginVO;
import egovframework.com.cmm.service.EgovFileMngService;
import egovframework.com.cmm.service.EgovFileMngUtil;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Service(value="hmsAuthGroupService")
public class HmsAuthGroupServiceImpl
implements HmsAuthGroupService {
@Resource(name="hmsAuthGroupDAO")
private HmsAuthGroupDAO hmsAuthGroupDAO;
@Resource(name="EgovFileMngService")
private EgovFileMngService fileMngService;
@Resource(name="EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name="commonIdGnrService")
private EgovIdGnrService egovIdGnrService;
@Resource(name="hmsLogService")
private HmsLogService hmsLogService;
public String insertHmsAuthGroup(HmsAuthGroupVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
vo.setAuthGroupSeq(this.egovIdGnrService.getNextStringId());
this.hmsAuthGroupDAO.insertHmsAuthGroup(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_INSERT);
logVO.setLogObject(HmsLogVO.OBJ_HMS_AUTH_GROUP);
logVO.setLogMessage("");
logVO.setSeq(vo.getAuthGroupSeq());
this.hmsLogService.insertHmsLog(logVO, null);
return null;
}
public void updateHmsAuthGroup(HmsAuthGroupVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
this.hmsAuthGroupDAO.updateHmsAuthGroup(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_UPDATE);
logVO.setLogObject("");
logVO.setLogMessage("");
logVO.setSeq("");
this.hmsLogService.insertHmsLog(logVO, null);
}
public void deleteHmsAuthGroup(HmsAuthGroupVO vo, HttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
this.hmsAuthGroupDAO.deleteHmsAuthGroup(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_DELETE);
logVO.setLogObject("");
logVO.setLogMessage("");
logVO.setSeq("");
this.hmsLogService.insertHmsLog(logVO, null);
}
public HmsAuthGroupVO selectHmsAuthGroup(HmsAuthGroupVO vo) throws Exception {
HmsAuthGroupVO resultVO = this.hmsAuthGroupDAO.selectHmsAuthGroup(vo);
return resultVO;
}
public List selectHmsAuthGroupList(HmsAuthGroupDefaultVO searchVO) throws Exception {
return this.hmsAuthGroupDAO.selectHmsAuthGroupList(searchVO);
}
public int selectHmsAuthGroupListTotCnt(HmsAuthGroupDefaultVO searchVO) {
return this.hmsAuthGroupDAO.selectHmsAuthGroupListTotCnt(searchVO);
}
public List selectHmsAuthList() throws Exception {
return this.hmsAuthGroupDAO.selectHmsAuthList();
}
public void insertHmsAuthGroupAuth(Map<String, Object> param) throws Exception {
this.hmsAuthGroupDAO.insertHmsAuthGroupAuth(param);
}
public List selectHmsAuthGroupRelAuth(String authGroupSeq) throws Exception {
return this.hmsAuthGroupDAO.selectHmsAuthGroupRelAuth(authGroupSeq);
}
public void deleteHmsAuthGroupRelAuth(String authGroupSeq) throws Exception {
this.hmsAuthGroupDAO.deleteHmsAuthGroupRelAuth(authGroupSeq);
}
public List selectHmsAuthGroupRelUser(String authGroupSeq) throws Exception {
return this.hmsAuthGroupDAO.selectHmsAuthGroupRelUser(authGroupSeq);
}
public List selectHmsAuthGroupRelUserByMember(String authGroupSeq) throws Exception {
return this.hmsAuthGroupDAO.selectHmsAuthGroupRelUserByMember(authGroupSeq);
}
public List selectHmsAuthGroupRelDept(String authGroupSeq) throws Exception {
return this.hmsAuthGroupDAO.selectHmsAuthGroupRelDept(authGroupSeq);
}
public void deleteHmsAuthGroupRelUser(Map<String, Object> param) throws Exception {
this.hmsAuthGroupDAO.deleteHmsAuthGroupRelUser(param);
}
public void insertHmsAuthGroupUser(Map<String, Object> param) throws Exception {
this.hmsAuthGroupDAO.insertHmsAuthGroupUser(param);
}
}

View File

@@ -0,0 +1,209 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.auth.vo.HmsAuthGroupDefaultVO
*/
package egovframework.cms.auth.vo;
import java.io.Serializable;
public class HmsAuthGroupDefaultVO
implements Serializable {
private String searchCondition;
private String searchKeyword;
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 String bmode;
private String parentUrl;
private String pageUseYn = "Y";
private String orderby;
private String authGroupSeq;
private String searchAuthGroupDetail;
private String searchNotAuthGroupDetail;
private String[] searchAuthGroupDetailArray;
private String searchAuthGroupDetailCode;
public void setSearchCondition(String searchCondition) {
this.searchCondition = searchCondition;
}
public String getSearchCondition() {
return this.searchCondition;
}
public void setSearchKeyword(String searchKeyword) {
this.searchKeyword = searchKeyword;
}
public String getSearchKeyword() {
return this.searchKeyword;
}
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
public String getSearchUseYn() {
return this.searchUseYn;
}
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
public int getPageIndex() {
return this.pageIndex;
}
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
public int getPageUnit() {
return this.pageUnit;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getPageSize() {
return this.pageSize;
}
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
public int getFirstIndex() {
return this.firstIndex;
}
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
public int getLastIndex() {
return this.lastIndex;
}
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
public int getRecordCountPerPage() {
return this.recordCountPerPage;
}
public void setBmode(String bmode) {
this.bmode = bmode;
}
public String getBmode() {
return this.bmode;
}
public void setParentUrl(String parentUrl) {
this.parentUrl = parentUrl;
}
public String getParentUrl() {
return this.parentUrl;
}
public void setPageUseYn(String pageUseYn) {
this.pageUseYn = pageUseYn;
}
public String getPageUseYn() {
return this.pageUseYn;
}
public void setOrderby(String orderby) {
this.orderby = orderby;
}
public String getOrderby() {
return this.orderby;
}
public void setAuthGroupSeq(String authGroupSeq) {
this.authGroupSeq = authGroupSeq;
}
public String getAuthGroupSeq() {
return this.authGroupSeq;
}
public String toParam() {
StringBuilder sb = new StringBuilder();
sb.append("?pageIndex=" + this.pageIndex);
if (!this.bmode.equals("")) {
sb.append("&bmode=" + this.bmode);
}
if (!this.searchCondition.equals("")) {
sb.append("&searchCondition=" + this.searchCondition);
}
if (!this.searchKeyword.equals("")) {
sb.append("&searchKeyword=" + this.searchKeyword);
}
return sb.toString();
}
public String getSearchAuthGroupDetail() {
return this.searchAuthGroupDetail;
}
public void setSearchAuthGroupDetail(String searchAuthGroupDetail) {
this.searchAuthGroupDetail = searchAuthGroupDetail;
}
public String getSearchNotAuthGroupDetail() {
return this.searchNotAuthGroupDetail;
}
public void setSearchNotAuthGroupDetail(String searchNotAuthGroupDetail) {
this.searchNotAuthGroupDetail = searchNotAuthGroupDetail;
}
public String[] getSearchAuthGroupDetailArray() {
if (this.searchAuthGroupDetailArray == null) {
return null;
}
String[] tmp = new String[this.searchAuthGroupDetailArray.length];
int i = 0;
while (i < this.searchAuthGroupDetailArray.length) {
tmp[i] = this.searchAuthGroupDetailArray[i];
++i;
}
return tmp;
}
public void setSearchAuthGroupDetailArray(String[] searchAuthGroupDetailArray) {
if (searchAuthGroupDetailArray == null) {
return;
}
String[] tmp = new String[searchAuthGroupDetailArray.length];
int i = 0;
while (i < searchAuthGroupDetailArray.length) {
tmp[i] = searchAuthGroupDetailArray[i];
++i;
}
this.searchAuthGroupDetailArray = tmp;
}
public String getSearchAuthGroupDetailCode() {
return this.searchAuthGroupDetailCode;
}
public void setSearchAuthGroupDetailCode(String searchAuthGroupDetailCode) {
this.searchAuthGroupDetailCode = searchAuthGroupDetailCode;
}
}

View File

@@ -0,0 +1,80 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.auth.vo.HmsAuthGroupDefaultVO
* egovframework.cms.auth.vo.HmsAuthGroupVO
*/
package egovframework.cms.auth.vo;
import egovframework.cms.auth.vo.HmsAuthGroupDefaultVO;
public class HmsAuthGroupVO
extends HmsAuthGroupDefaultVO {
private String authGroupSeq;
private String authGroupNm;
private String authGroupDetail;
private String authGroupDetailCode;
private String[] authList;
public static final String GUBUN_USER = "user";
public static final String GUBUN_DEPT = "dept";
public void setAuthGroupSeq(String authGroupSeq) {
this.authGroupSeq = authGroupSeq;
}
public String getAuthGroupSeq() {
return this.authGroupSeq;
}
public void setAuthGroupNm(String authGroupNm) {
this.authGroupNm = authGroupNm;
}
public String getAuthGroupNm() {
return this.authGroupNm;
}
public void setAuthGroupDetail(String authGroupDetail) {
this.authGroupDetail = authGroupDetail;
}
public String getAuthGroupDetail() {
return this.authGroupDetail;
}
public String[] getAuthList() {
if (this.authList != null) {
String[] tmp = new String[this.authList.length];
int i = 0;
while (i < this.authList.length) {
tmp[i] = this.authList[i];
++i;
}
return tmp;
}
return this.authList;
}
public void setAuthList(String[] authList) {
if (authList != null) {
String[] tmp = new String[authList.length];
int i = 0;
while (i < authList.length) {
tmp[i] = authList[i];
++i;
}
this.authList = tmp;
}
this.authList = authList;
}
public String getAuthGroupDetailCode() {
return this.authGroupDetailCode;
}
public void setAuthGroupDetailCode(String authGroupDetailCode) {
this.authGroupDetailCode = authGroupDetailCode;
}
}

View File

@@ -0,0 +1,301 @@
package egovframework.cms.auth.web;
import egovframework.cms.auth.service.HmsAuthGroupService;
import egovframework.cms.auth.vo.HmsAuthGroupDefaultVO;
import egovframework.cms.auth.vo.HmsAuthGroupVO;
import egovframework.com.cmm.LoginVO;
import egovframework.common.dwr.DwrCommonService;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.edosi.filter.XssFilter;
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 java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Controller
@SessionAttributes(types = {HmsAuthGroupVO.class})
public class HmsAuthGroupController {
@Resource(name = "hmsAuthGroupService")
private HmsAuthGroupService hmsAuthGroupService;
@Resource(name = "propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name = "codeResource")
private CodeResource codeResource;
@Resource(name = "dwrCommonService")
private DwrCommonService dwrCommonService;
@RequestMapping({"/hms/hmsAuthGroup/hmsAuthGroupIndex.do"})
public String hmsAuthGroupIndex(HttpServletRequest request, HttpServletResponse response, @ModelAttribute("searchVO") HmsAuthGroupDefaultVO searchVO, ModelMap modelMap, Model model) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue())
return "cmm/sessionError";
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = selectHmsAuthGroupList(request, response, searchVO, model);
} else if (bmode.equals("detail")) {
viewName = selectHmsAuthGroup(request, response, searchVO, model);
} else if (bmode.equals("add")) {
viewName = addHmsAuthGroupView(request, response, searchVO, model);
} else if (bmode.equals("modify")) {
viewName = updateHmsAuthGroup(request, response, searchVO, model);
}
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
model.addAttribute("bmode", bmode);
model.addAttribute("loginVO", loginVO);
model.addAttribute("ROLE_AUTH", UserDetailsHelper.isRole("ROLE_AUTH"));
initModelData(model, bmode);
return viewName;
}
@RequestMapping({"/hms/hmsAuthGroup/hmsAuthGroupIndexB.do"})
public String hmsAuthGroupIndexB(HttpServletRequest request, HttpServletResponse response, @ModelAttribute("searchVO") HmsAuthGroupDefaultVO searchVO, ModelMap modelMap, Model model) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue())
return "cmm/sessionError";
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = selectHmsAuthGroupListB(request, response, searchVO, model);
} else if (!bmode.equals("detail")) {
if (!bmode.equals("add"))
bmode.equals("modify");
}
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
model.addAttribute("bmode", bmode);
model.addAttribute("loginVO", loginVO);
initModelData(model, bmode);
return viewName;
}
private void initModelData(Model model, String bmode) throws Exception {
Map<String, String> param = new HashMap<>();
initModelData(param, model, bmode);
}
private void initModelData(Map param, Model model, String bmode) throws Exception {
Iterator<String> it = param.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
String value = (String)param.get(key);
model.addAttribute(key, this.codeResource.getCodeList(value));
if (bmode != null && (bmode.equals("add") || bmode.equals("modify")))
model.addAttribute(key, this.codeResource.removeCodeResourceForNotUse(value));
}
}
private String selectHmsAuthGroupList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute("searchVO") HmsAuthGroupDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
searchVO.setPageUnit(this.propertiesService.getInt("pageUnit"));
searchVO.setPageSize(this.propertiesService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
int totCnt = this.hmsAuthGroupService.selectHmsAuthGroupListTotCnt(searchVO);
paginationInfo.setTotalRecordCount(totCnt);
if (totCnt > 0) {
List<EgovMap> hmsAuthGroupList = this.hmsAuthGroupService.selectHmsAuthGroupList(searchVO);
model.addAttribute("resultList", hmsAuthGroupList);
model.addAttribute("paginationInfo", paginationInfo);
}
return "/cms/hmsAuthGroup/HmsAuthGroupList";
}
private String selectHmsAuthGroupListB(HttpServletRequest request, HttpServletResponse response, @ModelAttribute("searchVO") HmsAuthGroupDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
searchVO.setPageUseYn("N");
List<EgovMap> hmsAuthGroupList = this.hmsAuthGroupService.selectHmsAuthGroupList(searchVO);
List<EgovMap> newGroupList = new ArrayList<>();
for (int i = hmsAuthGroupList.size() - 1; i >= 0; i--) {
EgovMap m = hmsAuthGroupList.get(i);
newGroupList.add(m);
}
model.addAttribute("resultList", newGroupList);
return "/cms/hmsAuthGroup/HmsAuthGroupListB";
}
private String addHmsAuthGroupView(HttpServletRequest request, HttpServletResponse response, @ModelAttribute("searchVO") HmsAuthGroupDefaultVO searchVO, Model model) throws Exception {
HmsAuthGroupVO hmsAuthGroupVO = new HmsAuthGroupVO();
model.addAttribute("hmsAuthGroupVO", hmsAuthGroupVO);
model.addAttribute("authList", this.hmsAuthGroupService.selectHmsAuthList());
return "/cms/hmsAuthGroup/HmsAuthGroupRegister";
}
@RequestMapping({"/hms/hmsAuthGroup/addHmsAuthGroup.do"})
public String addHmsAuthGroup(MultipartHttpServletRequest request, HttpServletResponse response, HmsAuthGroupVO hmsAuthGroupVO, @ModelAttribute("searchVO") HmsAuthGroupDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue())
return "cmm/sessionError";
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
this.hmsAuthGroupService.insertHmsAuthGroup(hmsAuthGroupVO, request);
if (hmsAuthGroupVO.getAuthList() != null) {
Map<String, Object> param = new HashMap<>();
param.put("authGroupSeq", hmsAuthGroupVO.getAuthGroupSeq());
for (int i = 0; i < (hmsAuthGroupVO.getAuthList()).length; i++) {
param.put("authorCode", hmsAuthGroupVO.getAuthList()[i]);
this.hmsAuthGroupService.insertHmsAuthGroupAuth(param);
}
}
status.setComplete();
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), (HttpServletRequest)request);
}
private String updateHmsAuthGroup(HttpServletRequest request, HttpServletResponse response, @ModelAttribute("searchVO") HmsAuthGroupDefaultVO searchVO, Model model) throws Exception {
HmsAuthGroupVO hmsAuthGroupVO = new HmsAuthGroupVO();
hmsAuthGroupVO.setAuthGroupSeq(searchVO.getAuthGroupSeq());
hmsAuthGroupVO = this.hmsAuthGroupService.selectHmsAuthGroup(hmsAuthGroupVO);
if (!checkWriteAuth(hmsAuthGroupVO))
return "cmm/sessionError";
List<EgovMap> authList = this.hmsAuthGroupService.selectHmsAuthGroupRelAuth(hmsAuthGroupVO.getAuthGroupSeq());
if (authList.size() > 0) {
String[] tmp = new String[authList.size()];
for (int i = 0; i < tmp.length; i++)
tmp[i] = (String)((EgovMap)authList.get(i)).get("authorCode");
hmsAuthGroupVO.setAuthList(tmp);
}
model.addAttribute("hmsAuthGroupVO", hmsAuthGroupVO);
model.addAttribute("authList", this.hmsAuthGroupService.selectHmsAuthList());
return "/cms/hmsAuthGroup/HmsAuthGroupRegister";
}
@RequestMapping({"/hms/hmsAuthGroup/updateHmsAuthGroup.do"})
public String updateHmsAuthGroup(MultipartHttpServletRequest request, HttpServletResponse response, HmsAuthGroupVO hmsAuthGroupVO, @ModelAttribute("searchVO") HmsAuthGroupDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue())
return "cmm/sessionError";
if (!checkWriteAuth(hmsAuthGroupVO))
return "cmm/privilegeError";
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
this.hmsAuthGroupService.updateHmsAuthGroup(hmsAuthGroupVO, request);
this.hmsAuthGroupService.deleteHmsAuthGroupRelAuth(hmsAuthGroupVO.getAuthGroupSeq());
if (hmsAuthGroupVO.getAuthList() != null) {
Map<String, Object> param = new HashMap<>();
param.put("authGroupSeq", hmsAuthGroupVO.getAuthGroupSeq());
for (int i = 0; i < (hmsAuthGroupVO.getAuthList()).length; i++) {
param.put("authorCode", hmsAuthGroupVO.getAuthList()[i]);
this.hmsAuthGroupService.insertHmsAuthGroupAuth(param);
}
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals(""))
request.getSession().setAttribute("SEARCH_KEYWORD", searchVO.getSearchKeyword());
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), (HttpServletRequest)request) + searchVO.toParam() + "&authGroupSeq=" + hmsAuthGroupVO.getAuthGroupSeq();
}
private String selectHmsAuthGroup(HttpServletRequest request, HttpServletResponse response, @ModelAttribute("searchVO") HmsAuthGroupDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
HmsAuthGroupVO hmsAuthGroupVO = new HmsAuthGroupVO();
hmsAuthGroupVO.setAuthGroupSeq(searchVO.getAuthGroupSeq());
hmsAuthGroupVO = this.hmsAuthGroupService.selectHmsAuthGroup(hmsAuthGroupVO);
List<EgovMap> authList = this.hmsAuthGroupService.selectHmsAuthGroupRelAuth(hmsAuthGroupVO.getAuthGroupSeq());
if (authList.size() > 0) {
String[] tmp = new String[authList.size()];
for (int i = 0; i < tmp.length; i++)
tmp[i] = (String)((EgovMap)authList.get(i)).get("authorCode");
hmsAuthGroupVO.setAuthList(tmp);
}
model.addAttribute("hmsAuthGroupVO", hmsAuthGroupVO);
model.addAttribute("checkWriteAuth", Boolean.valueOf(checkWriteAuth(hmsAuthGroupVO)));
model.addAttribute("authList", this.hmsAuthGroupService.selectHmsAuthList());
return "/cms/hmsAuthGroup/HmsAuthGroupDetail";
}
@RequestMapping({"/hms/hmsAuthGroup/deleteHmsAuthGroup.do"})
public String deleteHmsAuthGroup(HttpServletRequest request, HmsAuthGroupVO hmsAuthGroupVO, @ModelAttribute("searchVO") HmsAuthGroupDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue())
return "cmm/sessionError";
if (!checkWriteAuth(hmsAuthGroupVO))
return "cmm/privilegeError";
this.hmsAuthGroupService.deleteHmsAuthGroup(hmsAuthGroupVO, request);
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals(""))
request.getSession().setAttribute("SEARCH_KEYWORD", searchVO.getSearchKeyword());
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), request) + searchVO.toParam();
}
@RequestMapping({"/hms/hmsAuthGroup/applyHmsAuthGroupUser.do"})
public String applyHmsAuthGroupUser(HttpServletRequest request, HttpServletResponse response, @ModelAttribute("searchVO") HmsAuthGroupDefaultVO searchVO) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue())
return "cmm/sessionError";
if (!checkWriteAuth(null))
return "cmm/privilegeError";
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
String authGroupSeq = request.getParameter("authGroupSeq");
try {
Map<String, Object> deleteParam = new HashMap<>();
deleteParam.put("authGroupSeq", authGroupSeq);
this.hmsAuthGroupService.deleteHmsAuthGroupRelUser(deleteParam);
String[] authUser = request.getParameterValues("authUser");
if (authUser != null) {
HashMap<String, Object> param = new HashMap<>();
param.put("authGroupSeq", authGroupSeq);
for (int i = 0; i < authUser.length; i++) {
String[] gubun = authUser[i].split(":");
if (gubun[1].equals("user")) {
param.put("gubun", "user");
} else {
param.put("gubun", "dept");
}
param.put("userId", gubun[0]);
this.hmsAuthGroupService.insertHmsAuthGroupUser(param);
}
}
} catch (Exception e) {
e.printStackTrace();
}
String parentUrl = request.getParameter("parentUrl");
return "redirect:" + this.dwrCommonService.removeContextPath(parentUrl, request) + "?authGroupSeq=" + authGroupSeq;
}
private boolean checkWriteAuth(HmsAuthGroupVO hmsAuthGroupVO) {
if (UserDetailsHelper.isRole("ROLE_AUTH").booleanValue())
return true;
if (UserDetailsHelper.isRole("USER_ADMIN").booleanValue())
return true;
return false;
}
}

View File

@@ -0,0 +1,46 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.dao.HmsBrdCateDAO
* egovframework.cms.board.vo.HmsBrdCateDefaultVO
* egovframework.cms.board.vo.HmsBrdCateVO
* egovframework.com.cmm.service.impl.EgovComAbstractDAO
* org.springframework.stereotype.Repository
*/
package egovframework.cms.board.dao;
import egovframework.cms.board.vo.HmsBrdCateDefaultVO;
import egovframework.cms.board.vo.HmsBrdCateVO;
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
import java.util.List;
import org.springframework.stereotype.Repository;
@Repository(value="hmsBrdCateDAO")
public class HmsBrdCateDAO
extends EgovComAbstractDAO {
public String insertHmsBrdCate(HmsBrdCateVO vo) throws Exception {
return (String)this.insert("hmsBrdCateDAO.insertHmsBrdCate_S", (Object)vo);
}
public void updateHmsBrdCate(HmsBrdCateVO vo) throws Exception {
this.update("hmsBrdCateDAO.updateHmsBrdCate_S", (Object)vo);
}
public void deleteHmsBrdCate(HmsBrdCateVO vo) throws Exception {
this.delete("hmsBrdCateDAO.deleteHmsBrdCate_S", (Object)vo);
}
public HmsBrdCateVO selectHmsBrdCate(HmsBrdCateVO vo) throws Exception {
return (HmsBrdCateVO)this.selectByPk("hmsBrdCateDAO.selectHmsBrdCate_S", (Object)vo);
}
public List selectHmsBrdCateList(HmsBrdCateDefaultVO searchVO) throws Exception {
return this.list("hmsBrdCateDAO.selectHmsBrdCateList_D", (Object)searchVO);
}
public int selectHmsBrdCateListTotCnt(HmsBrdCateDefaultVO searchVO) {
return (Integer)this.getSqlMapClientTemplate().queryForObject("hmsBrdCateDAO.selectHmsBrdCateListTotCnt_S", (Object)searchVO);
}
}

View File

@@ -0,0 +1,46 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.dao.HmsBrdCateMastDAO
* egovframework.cms.board.vo.HmsBrdCateMastDefaultVO
* egovframework.cms.board.vo.HmsBrdCateMastVO
* egovframework.com.cmm.service.impl.EgovComAbstractDAO
* org.springframework.stereotype.Repository
*/
package egovframework.cms.board.dao;
import egovframework.cms.board.vo.HmsBrdCateMastDefaultVO;
import egovframework.cms.board.vo.HmsBrdCateMastVO;
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
import java.util.List;
import org.springframework.stereotype.Repository;
@Repository(value="hmsBrdCateMastDAO")
public class HmsBrdCateMastDAO
extends EgovComAbstractDAO {
public String insertHmsBrdCateMast(HmsBrdCateMastVO vo) throws Exception {
return (String)this.insert("hmsBrdCateMastDAO.insertHmsBrdCateMast_S", (Object)vo);
}
public void updateHmsBrdCateMast(HmsBrdCateMastVO vo) throws Exception {
this.update("hmsBrdCateMastDAO.updateHmsBrdCateMast_S", (Object)vo);
}
public void deleteHmsBrdCateMast(HmsBrdCateMastVO vo) throws Exception {
this.delete("hmsBrdCateMastDAO.deleteHmsBrdCateMast_S", (Object)vo);
}
public HmsBrdCateMastVO selectHmsBrdCateMast(HmsBrdCateMastVO vo) throws Exception {
return (HmsBrdCateMastVO)this.selectByPk("hmsBrdCateMastDAO.selectHmsBrdCateMast_S", (Object)vo);
}
public List selectHmsBrdCateMastList(HmsBrdCateMastDefaultVO searchVO) throws Exception {
return this.list("hmsBrdCateMastDAO.selectHmsBrdCateMastList_D", (Object)searchVO);
}
public int selectHmsBrdCateMastListTotCnt(HmsBrdCateMastDefaultVO searchVO) {
return (Integer)this.getSqlMapClientTemplate().queryForObject("hmsBrdCateMastDAO.selectHmsBrdCateMastListTotCnt_S", (Object)searchVO);
}
}

View File

@@ -0,0 +1,46 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.dao.HmsBrdCommentDAO
* egovframework.cms.board.vo.HmsBrdCommentDefaultVO
* egovframework.cms.board.vo.HmsBrdCommentVO
* egovframework.com.cmm.service.impl.EgovComAbstractDAO
* org.springframework.stereotype.Repository
*/
package egovframework.cms.board.dao;
import egovframework.cms.board.vo.HmsBrdCommentDefaultVO;
import egovframework.cms.board.vo.HmsBrdCommentVO;
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
import java.util.List;
import org.springframework.stereotype.Repository;
@Repository(value="hmsBrdCommentDAO")
public class HmsBrdCommentDAO
extends EgovComAbstractDAO {
public String insertHmsBrdComment(HmsBrdCommentVO vo) throws Exception {
return (String)this.insert("hmsBrdCommentDAO.insertHmsBrdComment_S", (Object)vo);
}
public void updateHmsBrdComment(HmsBrdCommentVO vo) throws Exception {
this.update("hmsBrdCommentDAO.updateHmsBrdComment_S", (Object)vo);
}
public void deleteHmsBrdComment(HmsBrdCommentVO vo) throws Exception {
this.delete("hmsBrdCommentDAO.deleteHmsBrdComment_S", (Object)vo);
}
public HmsBrdCommentVO selectHmsBrdComment(HmsBrdCommentVO vo) throws Exception {
return (HmsBrdCommentVO)this.selectByPk("hmsBrdCommentDAO.selectHmsBrdComment_S", (Object)vo);
}
public List selectHmsBrdCommentList(HmsBrdCommentDefaultVO searchVO) throws Exception {
return this.list("hmsBrdCommentDAO.selectHmsBrdCommentList_D", (Object)searchVO);
}
public int selectHmsBrdCommentListTotCnt(HmsBrdCommentDefaultVO searchVO) {
return (Integer)this.getSqlMapClientTemplate().queryForObject("hmsBrdCommentDAO.selectHmsBrdPostCommentTotCnt_S", (Object)searchVO);
}
}

View File

@@ -0,0 +1,46 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.dao.HmsBrdMngDAO
* egovframework.cms.board.vo.HmsBrdMngDefaultVO
* egovframework.cms.board.vo.HmsBrdMngVO
* egovframework.com.cmm.service.impl.EgovComAbstractDAO
* org.springframework.stereotype.Repository
*/
package egovframework.cms.board.dao;
import egovframework.cms.board.vo.HmsBrdMngDefaultVO;
import egovframework.cms.board.vo.HmsBrdMngVO;
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
import java.util.List;
import org.springframework.stereotype.Repository;
@Repository(value="hmsBrdMngDAO")
public class HmsBrdMngDAO
extends EgovComAbstractDAO {
public String insertHmsBrdMng(HmsBrdMngVO vo) throws Exception {
return (String)this.insert("hmsBrdMngDAO.insertHmsBrdMng_S", (Object)vo);
}
public void updateHmsBrdMng(HmsBrdMngVO vo) throws Exception {
this.update("hmsBrdMngDAO.updateHmsBrdMng_S", (Object)vo);
}
public void deleteHmsBrdMng(HmsBrdMngVO vo) throws Exception {
this.delete("hmsBrdMngDAO.deleteHmsBrdMng_S", (Object)vo);
}
public HmsBrdMngVO selectHmsBrdMng(HmsBrdMngVO vo) throws Exception {
return (HmsBrdMngVO)this.selectByPk("hmsBrdMngDAO.selectHmsBrdMng_S", (Object)vo);
}
public List selectHmsBrdMngList(HmsBrdMngDefaultVO searchVO) throws Exception {
return this.list("hmsBrdMngDAO.selectHmsBrdMngList_D", (Object)searchVO);
}
public int selectHmsBrdMngListTotCnt(HmsBrdMngDefaultVO searchVO) {
return (Integer)this.getSqlMapClientTemplate().queryForObject("hmsBrdMngDAO.selectHmsBrdMngListTotCnt_S", (Object)searchVO);
}
}

View File

@@ -0,0 +1,66 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.dao.HmsBrdPostDAO
* egovframework.cms.board.vo.HmsBrdPostDefaultVO
* egovframework.cms.board.vo.HmsBrdPostVO
* egovframework.com.cmm.service.impl.EgovComAbstractDAO
* org.springframework.stereotype.Repository
*/
package egovframework.cms.board.dao;
import egovframework.cms.board.vo.HmsBrdPostDefaultVO;
import egovframework.cms.board.vo.HmsBrdPostVO;
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
import java.util.List;
import org.springframework.stereotype.Repository;
@Repository(value="hmsBrdPostDAO")
public class HmsBrdPostDAO
extends EgovComAbstractDAO {
public String insertHmsBrdPost(HmsBrdPostVO vo) throws Exception {
return (String)this.insert("hmsBrdPostDAO.insertHmsBrdPost_S", (Object)vo);
}
public void updateHmsBrdPost(HmsBrdPostVO vo) throws Exception {
this.update("hmsBrdPostDAO.updateHmsBrdPost_S", (Object)vo);
}
public void updateIncrementHit(HmsBrdPostVO vo) throws Exception {
this.update("hmsBrdPostDAO.updateIncrementHit_S", (Object)vo);
}
public void deleteHmsBrdPost(HmsBrdPostVO vo) throws Exception {
this.delete("hmsBrdPostDAO.deleteHmsBrdPost_S", (Object)vo);
}
public HmsBrdPostVO selectHmsBrdPost(HmsBrdPostVO vo) throws Exception {
return (HmsBrdPostVO)this.selectByPk("hmsBrdPostDAO.selectHmsBrdPost_S", (Object)vo);
}
public List selectHmsBrdPostList(HmsBrdPostDefaultVO searchVO) throws Exception {
return this.list("hmsBrdPostDAO.selectHmsBrdPostList_D", (Object)searchVO);
}
public int selectHmsBrdPostListTotCnt(HmsBrdPostDefaultVO searchVO) {
return (Integer)this.getSqlMapClientTemplate().queryForObject("hmsBrdPostDAO.selectHmsBrdPostListTotCnt_S", (Object)searchVO);
}
public void updateBrdPostReply(HmsBrdPostVO vo) throws Exception {
this.update("hmsBrdPostDAO.updateBrdPostReply", (Object)vo);
}
public HmsBrdPostVO selectBrdLastPostByPostSort(HmsBrdPostVO vo) throws Exception {
return (HmsBrdPostVO)this.selectByPk("hmsBrdPostDAO.selectBrdLastPostByPostSort", (Object)vo);
}
public List selectHmsBrdNewPostList(HmsBrdPostDefaultVO searchVO) throws Exception {
return this.list("hmsBrdPostDAO.selectHmsBrdNewPostList", (Object)searchVO);
}
public int selectHmsBrdNewPostListTotCnt(HmsBrdPostDefaultVO searchVO) {
return (Integer)this.getSqlMapClientTemplate().queryForObject("hmsBrdPostDAO.selectHmsBrdNewPostListTotCnt", (Object)searchVO);
}
}

View File

@@ -0,0 +1,32 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.service.HmsBrdCateMastService
* egovframework.cms.board.vo.HmsBrdCateMastDefaultVO
* egovframework.cms.board.vo.HmsBrdCateMastVO
* javax.servlet.http.HttpServletRequest
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.board.service;
import egovframework.cms.board.vo.HmsBrdCateMastDefaultVO;
import egovframework.cms.board.vo.HmsBrdCateMastVO;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.multipart.MultipartHttpServletRequest;
public interface HmsBrdCateMastService {
public String insertHmsBrdCateMast(HmsBrdCateMastVO var1, MultipartHttpServletRequest var2) throws Exception;
public void updateHmsBrdCateMast(HmsBrdCateMastVO var1, MultipartHttpServletRequest var2) throws Exception;
public void deleteHmsBrdCateMast(HmsBrdCateMastVO var1, HttpServletRequest var2) throws Exception;
public HmsBrdCateMastVO selectHmsBrdCateMast(HmsBrdCateMastVO var1) throws Exception;
public List selectHmsBrdCateMastList(HmsBrdCateMastDefaultVO var1) throws Exception;
public int selectHmsBrdCateMastListTotCnt(HmsBrdCateMastDefaultVO var1);
}

View File

@@ -0,0 +1,32 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.service.HmsBrdCateService
* egovframework.cms.board.vo.HmsBrdCateDefaultVO
* egovframework.cms.board.vo.HmsBrdCateVO
* javax.servlet.http.HttpServletRequest
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.board.service;
import egovframework.cms.board.vo.HmsBrdCateDefaultVO;
import egovframework.cms.board.vo.HmsBrdCateVO;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.multipart.MultipartHttpServletRequest;
public interface HmsBrdCateService {
public String insertHmsBrdCate(HmsBrdCateVO var1, MultipartHttpServletRequest var2) throws Exception;
public void updateHmsBrdCate(HmsBrdCateVO var1, MultipartHttpServletRequest var2) throws Exception;
public void deleteHmsBrdCate(HmsBrdCateVO var1, HttpServletRequest var2) throws Exception;
public HmsBrdCateVO selectHmsBrdCate(HmsBrdCateVO var1) throws Exception;
public List selectHmsBrdCateList(HmsBrdCateDefaultVO var1) throws Exception;
public int selectHmsBrdCateListTotCnt(HmsBrdCateDefaultVO var1);
}

View File

@@ -0,0 +1,30 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.service.HmsBrdCommentService
* egovframework.cms.board.vo.HmsBrdCommentDefaultVO
* egovframework.cms.board.vo.HmsBrdCommentVO
* javax.servlet.http.HttpServletRequest
*/
package egovframework.cms.board.service;
import egovframework.cms.board.vo.HmsBrdCommentDefaultVO;
import egovframework.cms.board.vo.HmsBrdCommentVO;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
public interface HmsBrdCommentService {
public String insertHmsBrdComment(HmsBrdCommentVO var1, HttpServletRequest var2) throws Exception;
public void updateHmsBrdComment(HmsBrdCommentVO var1) throws Exception;
public void deleteHmsBrdComment(HmsBrdCommentVO var1, HttpServletRequest var2) throws Exception;
public HmsBrdCommentVO selectHmsBrdComment(HmsBrdCommentVO var1) throws Exception;
public List selectHmsBrdCommentList(HmsBrdCommentDefaultVO var1) throws Exception;
public int selectHmsBrdCommentListTotCnt(HmsBrdCommentDefaultVO var1);
}

View File

@@ -0,0 +1,30 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.service.HmsBrdMngService
* egovframework.cms.board.vo.HmsBrdMngDefaultVO
* egovframework.cms.board.vo.HmsBrdMngVO
* javax.servlet.http.HttpServletRequest
*/
package egovframework.cms.board.service;
import egovframework.cms.board.vo.HmsBrdMngDefaultVO;
import egovframework.cms.board.vo.HmsBrdMngVO;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
public interface HmsBrdMngService {
public String insertHmsBrdMng(HmsBrdMngVO var1, HttpServletRequest var2) throws Exception;
public void updateHmsBrdMng(HmsBrdMngVO var1, HttpServletRequest var2) throws Exception;
public void deleteHmsBrdMng(HmsBrdMngVO var1, HttpServletRequest var2) throws Exception;
public HmsBrdMngVO selectHmsBrdMng(HmsBrdMngVO var1) throws Exception;
public List selectHmsBrdMngList(HmsBrdMngDefaultVO var1) throws Exception;
public int selectHmsBrdMngListTotCnt(HmsBrdMngDefaultVO var1);
}

View File

@@ -0,0 +1,44 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.service.HmsBrdPostService
* egovframework.cms.board.vo.HmsBrdPostDefaultVO
* egovframework.cms.board.vo.HmsBrdPostVO
* javax.servlet.http.HttpServletRequest
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.board.service;
import egovframework.cms.board.vo.HmsBrdPostDefaultVO;
import egovframework.cms.board.vo.HmsBrdPostVO;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.multipart.MultipartHttpServletRequest;
public interface HmsBrdPostService {
public String insertHmsBrdPost(HmsBrdPostVO var1, MultipartHttpServletRequest var2) throws Exception;
public void updateHmsBrdPost(HmsBrdPostVO var1, MultipartHttpServletRequest var2) throws Exception;
public void updateIncrementHit(HmsBrdPostVO var1) throws Exception;
public void deleteHmsBrdPost(HmsBrdPostVO var1, HttpServletRequest var2) throws Exception;
public HmsBrdPostVO selectHmsBrdPost(HmsBrdPostVO var1) throws Exception;
public List selectHmsBrdPostList(HmsBrdPostDefaultVO var1) throws Exception;
public int selectHmsBrdPostListTotCnt(HmsBrdPostDefaultVO var1);
public void updateBrdPostReply(HmsBrdPostVO var1) throws Exception;
public String insertHmsBrdPostReply(HmsBrdPostVO var1, MultipartHttpServletRequest var2) throws Exception;
public List selectHmsBrdNewPostList(HmsBrdPostDefaultVO var1) throws Exception;
public int selectHmsBrdNewPostListTotCnt(HmsBrdPostDefaultVO var1);
public String checkFileWhiteList(MultipartHttpServletRequest var1, String var2, String var3) throws Exception;
}

View File

@@ -0,0 +1,181 @@
package egovframework.cms.board.service.impl;
import egovframework.cms.board.dao.HmsBrdCateMastDAO;
import egovframework.cms.board.service.HmsBrdCateMastService;
import egovframework.cms.board.vo.HmsBrdCateMastDefaultVO;
import egovframework.cms.board.vo.HmsBrdCateMastVO;
import egovframework.cms.log.service.HmsLogService;
import egovframework.cms.log.vo.HmsLogVO;
import egovframework.com.cmm.LoginVO;
import egovframework.com.cmm.service.EgovFileMngService;
import egovframework.com.cmm.service.EgovFileMngUtil;
import egovframework.com.cmm.service.FileVO;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.rte.fdl.cmmn.AbstractServiceImpl;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Service("hmsBrdCateMastService")
public class HmsBrdCateMastServiceImpl extends AbstractServiceImpl implements HmsBrdCateMastService {
@Resource(name = "hmsBrdCateMastDAO")
private HmsBrdCateMastDAO hmsBrdCateMastDAO;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileMngService;
@Resource(name = "EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name = "commonIdGnrService")
private EgovIdGnrService egovIdGnrService;
@Resource(name = "hmsLogService")
private HmsLogService hmsLogService;
public String insertHmsBrdCateMast(HmsBrdCateMastVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
vo.setCateMastSeq(this.egovIdGnrService.getNextStringId());
this.hmsBrdCateMastDAO.insertHmsBrdCateMast(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_INSERT);
logVO.setLogObject(HmsLogVO.OBJ_HMS_BRD_CATE_MAST);
logVO.setLogMessage("");
logVO.setSeq(vo.getCateMastSeq());
this.hmsLogService.insertHmsLog(logVO, null);
return null;
}
public void updateHmsBrdCateMast(HmsBrdCateMastVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
this.hmsBrdCateMastDAO.updateHmsBrdCateMast(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_UPDATE);
logVO.setLogObject(HmsLogVO.OBJ_HMS_BRD_CATE_MAST);
logVO.setLogMessage("");
logVO.setSeq(vo.getCateMastSeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public void deleteHmsBrdCateMast(HmsBrdCateMastVO vo, HttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
this.hmsBrdCateMastDAO.deleteHmsBrdCateMast(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_DELETE);
logVO.setLogObject(HmsLogVO.OBJ_HMS_BRD_CATE_MAST);
logVO.setLogMessage("");
logVO.setSeq(vo.getCateMastSeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public HmsBrdCateMastVO selectHmsBrdCateMast(HmsBrdCateMastVO vo) throws Exception {
HmsBrdCateMastVO resultVO = this.hmsBrdCateMastDAO.selectHmsBrdCateMast(vo);
return resultVO;
}
public List selectHmsBrdCateMastList(HmsBrdCateMastDefaultVO searchVO) throws Exception {
return this.hmsBrdCateMastDAO.selectHmsBrdCateMastList(searchVO);
}
public int selectHmsBrdCateMastListTotCnt(HmsBrdCateMastDefaultVO searchVO) {
return this.hmsBrdCateMastDAO.selectHmsBrdCateMastListTotCnt(searchVO);
}
public String addMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
String fileId = "";
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
if (!fn.endsWith(".exe") && !fn.endsWith(".php") && !fn.endsWith(".jsp") && !fn.endsWith(".bat") && !fn.endsWith(".sh") && !fn.endsWith(".asp") &&
!fn.equals(""))
file.put(key, mf);
}
}
String _atchFileId = "";
if (!file.isEmpty()) {
List<FileVO> _result = null;
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
_atchFileId = this.fileMngService.insertFileInfs(_result);
}
fileId = _atchFileId;
}
return fileId;
}
public String updateMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm, String fileId, boolean multiple) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
if (!fn.endsWith(".exe") && !fn.endsWith(".php") && !fn.endsWith(".jsp") && !fn.endsWith(".bat") && !fn.endsWith(".sh") && !fn.endsWith(".asp") &&
!fn.equals(""))
file.put(key, mf);
}
}
String[] delcheck = multiRequest.getParameterValues("delcheck");
if (delcheck != null) {
FileVO fileVO = null;
for (int i = 0; i < delcheck.length; i++) {
String[] fileInf = delcheck[i].split("\\|");
fileVO = new FileVO();
fileVO.setAtchFileId(fileInf[0]);
fileVO.setFileSn(fileInf[1]);
this.fileMngService.deleteFileInf(fileVO);
}
}
if (!file.isEmpty()) {
List<FileVO> _result = null;
if (multiple) {
if (fileId == null || fileId.equals("")) {
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
} else {
FileVO fvo = new FileVO();
fvo.setAtchFileId(fileId);
int cnt = this.fileMngService.getMaxFileSN(fvo);
_result = this.fileUtil.parseFileInf(file, "FILE_", cnt, fileId, "");
this.fileMngService.updateFileInfs(_result);
}
} else {
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
}
}
if (fileId != null && !fileId.equals("")) {
FileVO fileVO = new FileVO();
fileVO.setAtchFileId(fileId);
List<FileVO> result = this.fileMngService.selectFileInfs(fileVO);
if (result.size() == 0)
fileId = "";
}
}
return fileId;
}
}

View File

@@ -0,0 +1,201 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.dao.HmsBrdCateDAO
* egovframework.cms.board.service.HmsBrdCateService
* egovframework.cms.board.service.impl.HmsBrdCateServiceImpl
* egovframework.cms.board.vo.HmsBrdCateDefaultVO
* egovframework.cms.board.vo.HmsBrdCateVO
* egovframework.cms.log.service.HmsLogService
* egovframework.cms.log.vo.HmsLogVO
* egovframework.com.cmm.LoginVO
* egovframework.com.cmm.service.EgovFileMngService
* egovframework.com.cmm.service.EgovFileMngUtil
* egovframework.com.cmm.service.FileVO
* egovframework.edosi.egov.helper.UserDetailsHelper
* egovframework.rte.fdl.idgnr.EgovIdGnrService
* javax.annotation.Resource
* javax.servlet.http.HttpServletRequest
* org.springframework.stereotype.Service
* org.springframework.web.multipart.MultipartFile
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.board.service.impl;
import egovframework.cms.board.dao.HmsBrdCateDAO;
import egovframework.cms.board.service.HmsBrdCateService;
import egovframework.cms.board.vo.HmsBrdCateDefaultVO;
import egovframework.cms.board.vo.HmsBrdCateVO;
import egovframework.cms.log.service.HmsLogService;
import egovframework.cms.log.vo.HmsLogVO;
import egovframework.com.cmm.LoginVO;
import egovframework.com.cmm.service.EgovFileMngService;
import egovframework.com.cmm.service.EgovFileMngUtil;
import egovframework.com.cmm.service.FileVO;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Service(value="hmsBrdCateService")
public class HmsBrdCateServiceImpl
implements HmsBrdCateService {
@Resource(name="hmsBrdCateDAO")
private HmsBrdCateDAO hmsBrdCateDAO;
@Resource(name="EgovFileMngService")
private EgovFileMngService fileMngService;
@Resource(name="EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name="commonIdGnrService")
private EgovIdGnrService egovIdGnrService;
@Resource(name="hmsLogService")
private HmsLogService hmsLogService;
public String insertHmsBrdCate(HmsBrdCateVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
vo.setCateSeq(this.egovIdGnrService.getNextStringId());
this.hmsBrdCateDAO.insertHmsBrdCate(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_INSERT);
logVO.setLogObject(HmsLogVO.OBJ_HMS_BRD_CATE);
logVO.setLogMessage("");
logVO.setSeq(vo.getCateSeq());
this.hmsLogService.insertHmsLog(logVO, null);
return null;
}
public void updateHmsBrdCate(HmsBrdCateVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
this.hmsBrdCateDAO.updateHmsBrdCate(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_UPDATE);
logVO.setLogObject(HmsLogVO.OBJ_HMS_BRD_CATE);
logVO.setLogMessage("");
logVO.setSeq(vo.getCateSeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public void deleteHmsBrdCate(HmsBrdCateVO vo, HttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
this.hmsBrdCateDAO.deleteHmsBrdCate(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_DELETE);
logVO.setLogObject(HmsLogVO.OBJ_HMS_BRD_CATE);
logVO.setLogMessage("");
logVO.setSeq(vo.getCateSeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public HmsBrdCateVO selectHmsBrdCate(HmsBrdCateVO vo) throws Exception {
HmsBrdCateVO resultVO = this.hmsBrdCateDAO.selectHmsBrdCate(vo);
return resultVO;
}
public List selectHmsBrdCateList(HmsBrdCateDefaultVO searchVO) throws Exception {
return this.hmsBrdCateDAO.selectHmsBrdCateList(searchVO);
}
public int selectHmsBrdCateListTotCnt(HmsBrdCateDefaultVO searchVO) {
return this.hmsBrdCateDAO.selectHmsBrdCateListTotCnt(searchVO);
}
public String addMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
String fileId = "";
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
if (!fn.endsWith(".exe") && !fn.endsWith(".php") && !fn.endsWith(".jsp") && !fn.endsWith(".bat") && !fn.endsWith(".sh") && !fn.endsWith(".asp") &&
!fn.equals(""))
file.put(key, mf);
}
}
String _atchFileId = "";
if (!file.isEmpty()) {
List<FileVO> _result = null;
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
_atchFileId = this.fileMngService.insertFileInfs(_result);
}
fileId = _atchFileId;
}
return fileId;
}
public String updateMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm, String fileId, boolean multiple) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
if (!fn.endsWith(".exe") && !fn.endsWith(".php") && !fn.endsWith(".jsp") && !fn.endsWith(".bat") && !fn.endsWith(".sh") && !fn.endsWith(".asp") &&
!fn.equals(""))
file.put(key, mf);
}
}
String[] delcheck = multiRequest.getParameterValues("delcheck");
if (delcheck != null) {
FileVO fileVO = null;
for (int i = 0; i < delcheck.length; i++) {
String[] fileInf = delcheck[i].split("\\|");
fileVO = new FileVO();
fileVO.setAtchFileId(fileInf[0]);
fileVO.setFileSn(fileInf[1]);
this.fileMngService.deleteFileInf(fileVO);
}
}
if (!file.isEmpty()) {
List<FileVO> _result = null;
if (multiple) {
if (fileId == null || fileId.equals("")) {
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
} else {
FileVO fvo = new FileVO();
fvo.setAtchFileId(fileId);
int cnt = this.fileMngService.getMaxFileSN(fvo);
_result = this.fileUtil.parseFileInf(file, "FILE_", cnt, fileId, "");
this.fileMngService.updateFileInfs(_result);
}
} else {
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
}
}
if (fileId != null && !fileId.equals("")) {
FileVO fileVO = new FileVO();
fileVO.setAtchFileId(fileId);
List<FileVO> result = this.fileMngService.selectFileInfs(fileVO);
if (result.size() == 0)
fileId = "";
}
}
return fileId;
}
}

View File

@@ -0,0 +1,100 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.dao.HmsBrdCommentDAO
* egovframework.cms.board.service.HmsBrdCommentService
* egovframework.cms.board.service.impl.HmsBrdCommentServiceImpl
* egovframework.cms.board.vo.HmsBrdCommentDefaultVO
* egovframework.cms.board.vo.HmsBrdCommentVO
* egovframework.cms.board.vo.HmsBrdPostVO
* egovframework.cms.log.service.HmsLogService
* egovframework.cms.log.vo.HmsLogVO
* egovframework.com.cmm.LoginVO
* egovframework.edosi.egov.helper.UserDetailsHelper
* egovframework.rte.fdl.idgnr.EgovIdGnrService
* javax.annotation.Resource
* javax.servlet.http.HttpServletRequest
* org.springframework.stereotype.Service
*/
package egovframework.cms.board.service.impl;
import egovframework.cms.board.dao.HmsBrdCommentDAO;
import egovframework.cms.board.service.HmsBrdCommentService;
import egovframework.cms.board.vo.HmsBrdCommentDefaultVO;
import egovframework.cms.board.vo.HmsBrdCommentVO;
import egovframework.cms.board.vo.HmsBrdPostVO;
import egovframework.cms.log.service.HmsLogService;
import egovframework.cms.log.vo.HmsLogVO;
import egovframework.com.cmm.LoginVO;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;
@Service(value="hmsBrdCommentService")
public class HmsBrdCommentServiceImpl
implements HmsBrdCommentService {
@Resource(name="hmsBrdCommentDAO")
private HmsBrdCommentDAO hmsBrdCommentDAO;
@Resource(name="brdIdGnrService")
private EgovIdGnrService egovIdGnrService;
@Resource(name="hmsLogService")
private HmsLogService hmsLogService;
public String insertHmsBrdComment(HmsBrdCommentVO vo, HttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
String userId = loginVO.getId();
String userNm = loginVO.getName();
vo.setUserId(userId);
vo.setUserNm(userNm);
HmsBrdPostVO hmsBrdPostVO = new HmsBrdPostVO();
vo.setBrdReplySeq(this.egovIdGnrService.getNextStringId());
this.hmsBrdCommentDAO.insertHmsBrdComment(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_INSERT);
logVO.setLogObject(HmsLogVO.OBJ_BRD_COMMENT);
logVO.setLogMessage("");
logVO.setSeq(vo.getBrdReplySeq());
this.hmsLogService.insertHmsLog(logVO, null);
return null;
}
public void updateHmsBrdComment(HmsBrdCommentVO vo) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
this.hmsBrdCommentDAO.updateHmsBrdComment(vo);
}
public void deleteHmsBrdComment(HmsBrdCommentVO vo, HttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
this.hmsBrdCommentDAO.deleteHmsBrdComment(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_DELETE);
logVO.setLogObject(HmsLogVO.OBJ_BRD_COMMENT);
logVO.setLogMessage("");
logVO.setSeq(vo.getBrdReplySeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public HmsBrdCommentVO selectHmsBrdComment(HmsBrdCommentVO vo) throws Exception {
HmsBrdCommentVO resultVO = this.hmsBrdCommentDAO.selectHmsBrdComment(vo);
return resultVO;
}
public List selectHmsBrdCommentList(HmsBrdCommentDefaultVO searchVO) throws Exception {
return this.hmsBrdCommentDAO.selectHmsBrdCommentList(searchVO);
}
public int selectHmsBrdCommentListTotCnt(HmsBrdCommentDefaultVO searchVO) {
return this.hmsBrdCommentDAO.selectHmsBrdCommentListTotCnt(searchVO);
}
}

View File

@@ -0,0 +1,106 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.dao.HmsBrdMngDAO
* egovframework.cms.board.service.HmsBrdMngService
* egovframework.cms.board.service.impl.HmsBrdMngServiceImpl
* egovframework.cms.board.vo.HmsBrdMngDefaultVO
* egovframework.cms.board.vo.HmsBrdMngVO
* egovframework.cms.log.service.HmsLogService
* egovframework.cms.log.vo.HmsLogVO
* egovframework.com.cmm.LoginVO
* egovframework.edosi.egov.helper.UserDetailsHelper
* egovframework.rte.fdl.idgnr.EgovIdGnrService
* javax.annotation.Resource
* javax.servlet.http.HttpServletRequest
* org.springframework.stereotype.Service
*/
package egovframework.cms.board.service.impl;
import egovframework.cms.board.dao.HmsBrdMngDAO;
import egovframework.cms.board.service.HmsBrdMngService;
import egovframework.cms.board.vo.HmsBrdMngDefaultVO;
import egovframework.cms.board.vo.HmsBrdMngVO;
import egovframework.cms.log.service.HmsLogService;
import egovframework.cms.log.vo.HmsLogVO;
import egovframework.com.cmm.LoginVO;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;
@Service(value="hmsBrdMngService")
public class HmsBrdMngServiceImpl
implements HmsBrdMngService {
@Resource(name="hmsBrdMngDAO")
private HmsBrdMngDAO hmsBrdMngDAO;
@Resource(name="brdIdGnrService")
private EgovIdGnrService egovIdGnrService;
@Resource(name="hmsLogService")
private HmsLogService hmsLogService;
public String insertHmsBrdMng(HmsBrdMngVO vo, HttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
String userId = loginVO.getId();
String userNm = loginVO.getName();
vo.setWriterId(userId);
vo.setWriterNm(userNm);
vo.setBrdMngSeq(this.egovIdGnrService.getNextStringId());
this.hmsBrdMngDAO.insertHmsBrdMng(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_INSERT);
logVO.setLogObject(HmsLogVO.OBJ_BRD_MNG);
logVO.setLogMessage("");
logVO.setSeq(vo.getBrdMngSeq());
this.hmsLogService.insertHmsLog(logVO, null);
return null;
}
public void updateHmsBrdMng(HmsBrdMngVO vo, HttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
this.hmsBrdMngDAO.updateHmsBrdMng(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_UPDATE);
logVO.setLogObject(HmsLogVO.OBJ_BRD_MNG);
logVO.setLogMessage("");
logVO.setSeq(vo.getBrdMngSeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public void deleteHmsBrdMng(HmsBrdMngVO vo, HttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
this.hmsBrdMngDAO.deleteHmsBrdMng(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_DELETE);
logVO.setLogObject(HmsLogVO.OBJ_BRD_MNG);
logVO.setLogMessage("");
logVO.setSeq(vo.getBrdMngSeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public HmsBrdMngVO selectHmsBrdMng(HmsBrdMngVO vo) throws Exception {
HmsBrdMngVO resultVO = this.hmsBrdMngDAO.selectHmsBrdMng(vo);
return resultVO;
}
public List selectHmsBrdMngList(HmsBrdMngDefaultVO searchVO) throws Exception {
return this.hmsBrdMngDAO.selectHmsBrdMngList(searchVO);
}
public int selectHmsBrdMngListTotCnt(HmsBrdMngDefaultVO searchVO) {
return this.hmsBrdMngDAO.selectHmsBrdMngListTotCnt(searchVO);
}
}

View File

@@ -0,0 +1,271 @@
package egovframework.cms.board.service.impl;
import egovframework.cms.board.dao.HmsBrdPostDAO;
import egovframework.cms.board.service.HmsBrdMngService;
import egovframework.cms.board.service.HmsBrdPostService;
import egovframework.cms.board.vo.HmsBrdMngVO;
import egovframework.cms.board.vo.HmsBrdPostDefaultVO;
import egovframework.cms.board.vo.HmsBrdPostVO;
import egovframework.cms.log.service.HmsLogService;
import egovframework.cms.log.vo.HmsLogVO;
import egovframework.com.cmm.LoginVO;
import egovframework.com.cmm.service.EgovFileMngService;
import egovframework.com.cmm.service.EgovFileMngUtil;
import egovframework.com.cmm.service.FileVO;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Service("hmsBrdPostService")
public class HmsBrdPostServiceImpl implements HmsBrdPostService {
@Resource(name = "hmsBrdPostDAO")
private HmsBrdPostDAO hmsBrdPostDAO;
@Resource(name = "brdIdGnrService")
private EgovIdGnrService egovIdGnrService;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileMngService;
@Resource(name = "EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name = "hmsLogService")
private HmsLogService hmsLogService;
@Resource(name = "hmsBrdMngService")
private HmsBrdMngService hmsBrdMngService;
public String insertHmsBrdPost(HmsBrdPostVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = null;
String userId = null;
String userNm = null;
try {
loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
userId = loginVO.getId();
userNm = loginVO.getName();
} catch (Exception e) {
e.printStackTrace();
}
HmsBrdMngVO hmsBrdMngVO = new HmsBrdMngVO();
hmsBrdMngVO.setBrdMngSeq(vo.getBrdMngSeq());
hmsBrdMngVO = this.hmsBrdMngService.selectHmsBrdMng(hmsBrdMngVO);
userNm = !vo.getUserNm().equals("") ? vo.getUserNm() : userNm;
vo.setUserId(userId);
vo.setUserNm(userNm);
String atchSeq = addMultiFiles(request, "file_");
vo.setAtchSeq(atchSeq);
vo.setIp(request.getRemoteHost());
vo.setBrdPostSeq(this.egovIdGnrService.getNextStringId());
HmsBrdPostVO lastVO = this.hmsBrdPostDAO.selectBrdLastPostByPostSort(vo);
int postSort = (lastVO == null) ? 100 : (lastVO.getBrdSort() + 100);
int postGroup = postSort / 100;
vo.setBrdSort(postSort);
vo.setBrdGroup(postGroup);
this.hmsBrdPostDAO.insertHmsBrdPost(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_INSERT);
logVO.setLogObject(HmsLogVO.OBJ_BRD_POST);
logVO.setLogMessage("");
logVO.setSeq(vo.getBrdPostSeq());
this.hmsLogService.insertHmsLog(logVO, null);
return null;
}
public String insertHmsBrdPostReply(HmsBrdPostVO vo, MultipartHttpServletRequest request) throws Exception {
this.hmsBrdPostDAO.updateBrdPostReply(vo);
LoginVO loginVO = null;
String userId = null;
String userNm = null;
try {
loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
userId = loginVO.getId();
userNm = loginVO.getName();
} catch (Exception e) {
e.printStackTrace();
}
HmsBrdMngVO hmsBrdMngVO = new HmsBrdMngVO();
hmsBrdMngVO.setBrdMngSeq(vo.getBrdMngSeq());
hmsBrdMngVO = this.hmsBrdMngService.selectHmsBrdMng(hmsBrdMngVO);
vo.setUserId(userId);
vo.setUserNm(userNm);
String atchSeq = addMultiFiles(request, "file_");
vo.setAtchSeq(atchSeq);
vo.setIp(request.getRemoteHost());
vo.setBrdPostSeq(this.egovIdGnrService.getNextStringId());
vo.setBrdSort(vo.getBrdSort() - 1);
vo.setBrdDepth(vo.getBrdDepth() + 1);
this.hmsBrdPostDAO.insertHmsBrdPost(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_INSERT);
logVO.setLogObject(HmsLogVO.OBJ_BRD_POST);
logVO.setLogMessage("");
logVO.setSeq(vo.getBrdPostSeq());
this.hmsLogService.insertHmsLog(logVO, null);
return null;
}
public void updateHmsBrdPost(HmsBrdPostVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
HmsBrdMngVO hmsBrdMngVO = new HmsBrdMngVO();
hmsBrdMngVO.setBrdMngSeq(vo.getBrdMngSeq());
hmsBrdMngVO = this.hmsBrdMngService.selectHmsBrdMng(hmsBrdMngVO);
String atchSeq = updateMultiFiles(request, "file_", vo.getAtchSeq(), true);
vo.setAtchSeq(atchSeq);
this.hmsBrdPostDAO.updateHmsBrdPost(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_UPDATE);
logVO.setLogObject(HmsLogVO.OBJ_BRD_POST);
logVO.setLogMessage("");
logVO.setSeq(vo.getBrdPostSeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public void updateIncrementHit(HmsBrdPostVO vo) throws Exception {
this.hmsBrdPostDAO.updateIncrementHit(vo);
}
public void deleteHmsBrdPost(HmsBrdPostVO vo, HttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
this.hmsBrdPostDAO.deleteHmsBrdPost(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_INSERT);
logVO.setLogObject(HmsLogVO.OBJ_BRD_POST);
logVO.setLogMessage("");
logVO.setSeq(vo.getBrdPostSeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public HmsBrdPostVO selectHmsBrdPost(HmsBrdPostVO vo) throws Exception {
HmsBrdPostVO resultVO = this.hmsBrdPostDAO.selectHmsBrdPost(vo);
return resultVO;
}
public List selectHmsBrdPostList(HmsBrdPostDefaultVO searchVO) throws Exception {
return this.hmsBrdPostDAO.selectHmsBrdPostList(searchVO);
}
public int selectHmsBrdPostListTotCnt(HmsBrdPostDefaultVO searchVO) {
return this.hmsBrdPostDAO.selectHmsBrdPostListTotCnt(searchVO);
}
public void updateBrdPostReply(HmsBrdPostVO vo) throws Exception {
this.hmsBrdPostDAO.updateBrdPostReply(vo);
}
public List selectHmsBrdNewPostList(HmsBrdPostDefaultVO searchVO) throws Exception {
return this.hmsBrdPostDAO.selectHmsBrdNewPostList(searchVO);
}
public int selectHmsBrdNewPostListTotCnt(HmsBrdPostDefaultVO searchVO) {
return this.hmsBrdPostDAO.selectHmsBrdNewPostListTotCnt(searchVO);
}
public String addMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm) throws Exception {
multiRequest.setCharacterEncoding("utf-8");
Map<String, MultipartFile> files = multiRequest.getFileMap();
String fileId = "";
if (!files.isEmpty()) {
String _atchFileId = "";
List<FileVO> _result = null;
_result = this.fileUtil.parseFileInf(files, "FILE_", 0, "", "");
_atchFileId = this.fileMngService.insertFileInfs(_result);
fileId = _atchFileId;
}
return fileId;
}
public String updateMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm, String fileId, boolean multiple) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
String[] delcheck = multiRequest.getParameterValues("delcheck");
if (delcheck != null) {
FileVO fileVO = null;
for (int i = 0; i < delcheck.length; i++) {
String[] fileInf = delcheck[i].split("\\|");
fileVO = new FileVO();
fileVO.setAtchFileId(fileInf[0]);
fileVO.setFileSn(fileInf[1]);
this.fileMngService.deleteFileInf(fileVO);
}
}
if (!files.isEmpty()) {
List<FileVO> _result = null;
if (multiple) {
if (fileId == null || fileId.equals("")) {
_result = this.fileUtil.parseFileInf(files, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
} else {
FileVO fvo = new FileVO();
fvo.setAtchFileId(fileId);
int cnt = this.fileMngService.getMaxFileSN(fvo);
_result = this.fileUtil.parseFileInf(files, "FILE_", cnt, fileId, "");
this.fileMngService.updateFileInfs(_result);
}
} else {
_result = this.fileUtil.parseFileInf(files, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
}
}
if (fileId != null && !fileId.equals("")) {
FileVO fileVO = new FileVO();
fileVO.setAtchFileId(fileId);
List<FileVO> result = this.fileMngService.selectFileInfs(fileVO);
if (result.size() == 0)
fileId = "";
}
return fileId;
}
public String checkFileWhiteList(MultipartHttpServletRequest multiRequest, String targetNm, String whitelist) throws Exception {
if (whitelist == null || whitelist.equals(""))
return null;
String[] ext = whitelist.split(",");
if (ext == null || ext.length == 0 || ext[0] == null || ext[0].isEmpty())
return null;
Map<String, MultipartFile> files = multiRequest.getFileMap();
if (files.isEmpty())
return null;
MultipartFile file = null;
String key = null;
Iterator<Map.Entry<String, MultipartFile>> itr = files.entrySet().iterator();
while (itr.hasNext()) {
Map.Entry<String, MultipartFile> entry = itr.next();
file = entry.getValue();
key = file.getName();
if (key.indexOf(targetNm) < 0)
continue;
String fn = file.getOriginalFilename();
if (fn.equals(""))
continue;
boolean check = false;
for (int i = 0; i < ext.length; i++) {
if (fn.toLowerCase().endsWith(ext[i].toLowerCase())) {
check = true;
break;
}
}
if (!check)
return fn;
}
return null;
}
}

View File

@@ -0,0 +1,164 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.vo.HmsBrdCateDefaultVO
*/
package egovframework.cms.board.vo;
import java.io.Serializable;
public class HmsBrdCateDefaultVO
implements Serializable {
private String searchCondition;
private String searchKeyword;
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 String bmode;
private String parentUrl;
private String pageUseYn = "Y";
private String orderby;
private String cateSeq;
private String searchCateMastSeq;
public void setSearchCondition(String searchCondition) {
this.searchCondition = searchCondition;
}
public String getSearchCondition() {
return this.searchCondition;
}
public void setSearchKeyword(String searchKeyword) {
this.searchKeyword = searchKeyword;
}
public String getSearchKeyword() {
return this.searchKeyword;
}
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
public String getSearchUseYn() {
return this.searchUseYn;
}
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
public int getPageIndex() {
return this.pageIndex;
}
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
public int getPageUnit() {
return this.pageUnit;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getPageSize() {
return this.pageSize;
}
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
public int getFirstIndex() {
return this.firstIndex;
}
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
public int getLastIndex() {
return this.lastIndex;
}
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
public int getRecordCountPerPage() {
return this.recordCountPerPage;
}
public void setBmode(String bmode) {
this.bmode = bmode;
}
public String getBmode() {
return this.bmode;
}
public void setParentUrl(String parentUrl) {
this.parentUrl = parentUrl;
}
public String getParentUrl() {
return this.parentUrl;
}
public void setPageUseYn(String pageUseYn) {
this.pageUseYn = pageUseYn;
}
public String getPageUseYn() {
return this.pageUseYn;
}
public void setOrderby(String orderby) {
this.orderby = orderby;
}
public String getOrderby() {
return this.orderby;
}
public void setCateSeq(String cateSeq) {
this.cateSeq = cateSeq;
}
public String getCateSeq() {
return this.cateSeq;
}
public String toParam() {
StringBuilder sb = new StringBuilder();
sb.append("?pageIndex=" + this.pageIndex);
if (!this.bmode.equals("")) {
sb.append("&bmode=" + this.bmode);
}
if (this.searchCondition != null && !this.searchCondition.equals("")) {
sb.append("&searchCondition=" + this.searchCondition);
}
if (this.searchKeyword != null && !this.searchKeyword.equals("")) {
sb.append("&searchKeyword=" + this.searchKeyword);
}
return sb.toString();
}
public String getSearchCateMastSeq() {
return this.searchCateMastSeq;
}
public void setSearchCateMastSeq(String searchCateMastSeq) {
this.searchCateMastSeq = searchCateMastSeq;
}
}

View File

@@ -0,0 +1,155 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.vo.HmsBrdCateMastDefaultVO
*/
package egovframework.cms.board.vo;
import java.io.Serializable;
public class HmsBrdCateMastDefaultVO
implements Serializable {
private String searchCondition;
private String searchKeyword;
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 String bmode;
private String parentUrl;
private String pageUseYn = "Y";
private String orderby;
private String cateMastSeq;
public void setSearchCondition(String searchCondition) {
this.searchCondition = searchCondition;
}
public String getSearchCondition() {
return this.searchCondition;
}
public void setSearchKeyword(String searchKeyword) {
this.searchKeyword = searchKeyword;
}
public String getSearchKeyword() {
return this.searchKeyword;
}
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
public String getSearchUseYn() {
return this.searchUseYn;
}
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
public int getPageIndex() {
return this.pageIndex;
}
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
public int getPageUnit() {
return this.pageUnit;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getPageSize() {
return this.pageSize;
}
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
public int getFirstIndex() {
return this.firstIndex;
}
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
public int getLastIndex() {
return this.lastIndex;
}
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
public int getRecordCountPerPage() {
return this.recordCountPerPage;
}
public void setBmode(String bmode) {
this.bmode = bmode;
}
public String getBmode() {
return this.bmode;
}
public void setParentUrl(String parentUrl) {
this.parentUrl = parentUrl;
}
public String getParentUrl() {
return this.parentUrl;
}
public void setPageUseYn(String pageUseYn) {
this.pageUseYn = pageUseYn;
}
public String getPageUseYn() {
return this.pageUseYn;
}
public void setOrderby(String orderby) {
this.orderby = orderby;
}
public String getOrderby() {
return this.orderby;
}
public void setCateMastSeq(String cateMastSeq) {
this.cateMastSeq = cateMastSeq;
}
public String getCateMastSeq() {
return this.cateMastSeq;
}
public String toParam() {
StringBuilder sb = new StringBuilder();
sb.append("?pageIndex=" + this.pageIndex);
if (!this.bmode.equals("")) {
sb.append("&bmode=" + this.bmode);
}
if (this.searchCondition != null && !this.searchCondition.equals("")) {
sb.append("&searchCondition=" + this.searchCondition);
}
if (this.searchKeyword != null && !this.searchKeyword.equals("")) {
sb.append("&searchKeyword=" + this.searchKeyword);
}
return sb.toString();
}
}

View File

@@ -0,0 +1,42 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.vo.HmsBrdCateMastDefaultVO
* egovframework.cms.board.vo.HmsBrdCateMastVO
*/
package egovframework.cms.board.vo;
import egovframework.cms.board.vo.HmsBrdCateMastDefaultVO;
public class HmsBrdCateMastVO
extends HmsBrdCateMastDefaultVO {
private String cateMastSeq;
private String cateMastNm;
private String recSts;
public void setCateMastSeq(String cateMastSeq) {
this.cateMastSeq = cateMastSeq;
}
public String getCateMastSeq() {
return this.cateMastSeq;
}
public void setCateMastNm(String cateMastNm) {
this.cateMastNm = cateMastNm;
}
public String getCateMastNm() {
return this.cateMastNm;
}
public void setRecSts(String recSts) {
this.recSts = recSts;
}
public String getRecSts() {
return this.recSts;
}
}

View File

@@ -0,0 +1,60 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.vo.HmsBrdCateDefaultVO
* egovframework.cms.board.vo.HmsBrdCateVO
*/
package egovframework.cms.board.vo;
import egovframework.cms.board.vo.HmsBrdCateDefaultVO;
public class HmsBrdCateVO
extends HmsBrdCateDefaultVO {
private String cateSeq;
private String cateMastSeq;
private String cateNm;
private String cateSort;
private String recSts;
public void setCateSeq(String cateSeq) {
this.cateSeq = cateSeq;
}
public String getCateSeq() {
return this.cateSeq;
}
public void setCateMastSeq(String cateMastSeq) {
this.cateMastSeq = cateMastSeq;
}
public String getCateMastSeq() {
return this.cateMastSeq;
}
public void setCateNm(String cateNm) {
this.cateNm = cateNm;
}
public String getCateNm() {
return this.cateNm;
}
public void setCateSort(String cateSort) {
this.cateSort = cateSort;
}
public String getCateSort() {
return this.cateSort;
}
public void setRecSts(String recSts) {
this.recSts = recSts;
}
public String getRecSts() {
return this.recSts;
}
}

View File

@@ -0,0 +1,206 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.vo.HmsBrdCommentDefaultVO
* org.apache.commons.lang.builder.ToStringBuilder
*/
package egovframework.cms.board.vo;
import java.io.Serializable;
import org.apache.commons.lang.builder.ToStringBuilder;
public class HmsBrdCommentDefaultVO
implements Serializable {
private String searchCondition = "";
private String searchKeyword = "";
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 String bmode;
private String parentUrl;
private String pageUseYn = "Y";
private String orderby;
private String brdReplySeq;
private String brdPostSeq;
private String brdMngSeq;
private String userNm;
private String userId;
private String contents;
public String getBrdMngSeq() {
return this.brdMngSeq;
}
public void setBrdMngSeq(String brdMngSeq) {
this.brdMngSeq = brdMngSeq;
}
public String getContents() {
return this.contents;
}
public void setContents(String contents) {
this.contents = contents;
}
public String getUserNm() {
return this.userNm;
}
public void setUserNm(String userNm) {
this.userNm = userNm;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getBrdPostSeq() {
return this.brdPostSeq;
}
public void setBrdPostSeq(String brdPostSeq) {
this.brdPostSeq = brdPostSeq;
}
public void setBrdReplySeq(String brdReplySeq) {
this.brdReplySeq = brdReplySeq;
}
public String getBrdReplySeq() {
return this.brdReplySeq;
}
public void setOrderby(String orderby) {
this.orderby = orderby;
}
public String getOrderby() {
return this.orderby;
}
public void setBmode(String bmode) {
this.bmode = bmode;
}
public String getBmode() {
return this.bmode;
}
public void setParentUrl(String parentUrl) {
this.parentUrl = parentUrl;
}
public String getParentUrl() {
return this.parentUrl;
}
public void setPageUseYn(String pageUseYn) {
this.pageUseYn = pageUseYn;
}
public String getPageUseYn() {
return this.pageUseYn;
}
public String toParam() {
StringBuilder sb = new StringBuilder();
sb.append("?pageIndex=" + this.pageIndex);
if (!this.bmode.equals("")) {
sb.append("&bmode=" + this.bmode);
}
if (!this.searchCondition.equals("")) {
sb.append("&searchCondition=" + this.searchCondition);
}
if (!this.searchKeyword.equals("")) {
sb.append("&searchKeyword=" + this.searchKeyword);
}
return sb.toString();
}
public int getFirstIndex() {
return this.firstIndex;
}
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
public int getLastIndex() {
return this.lastIndex;
}
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
public int getRecordCountPerPage() {
return this.recordCountPerPage;
}
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
public String getSearchCondition() {
return this.searchCondition;
}
public void setSearchCondition(String searchCondition) {
this.searchCondition = searchCondition;
}
public String getSearchKeyword() {
return this.searchKeyword;
}
public void setSearchKeyword(String searchKeyword) {
this.searchKeyword = searchKeyword;
}
public String getSearchUseYn() {
return this.searchUseYn;
}
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
public int getPageIndex() {
return this.pageIndex;
}
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
public int getPageUnit() {
return this.pageUnit;
}
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
public int getPageSize() {
return this.pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public String toString() {
return ToStringBuilder.reflectionToString((Object)this);
}
}

View File

@@ -0,0 +1,111 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.vo.HmsBrdCommentDefaultVO
* egovframework.cms.board.vo.HmsBrdCommentVO
*/
package egovframework.cms.board.vo;
import egovframework.cms.board.vo.HmsBrdCommentDefaultVO;
import java.sql.Date;
public class HmsBrdCommentVO
extends HmsBrdCommentDefaultVO {
private static final long serialVersionUID = 1L;
private String brdReplySeq;
private String userId;
private String userNm;
private String passwd;
private String contents;
private Date createDate;
private String recSts;
private String ip;
private String brdPostSeq;
private String brdMngSeq;
public String getBrdMngSeq() {
return this.brdMngSeq;
}
public void setBrdMngSeq(String brdMngSeq) {
this.brdMngSeq = brdMngSeq;
}
public static long getSerialversionuid() {
return 1L;
}
public String getBrdReplySeq() {
return this.brdReplySeq;
}
public void setBrdReplySeq(String brdReplySeq) {
this.brdReplySeq = brdReplySeq;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserNm() {
return this.userNm;
}
public void setUserNm(String userNm) {
this.userNm = userNm;
}
public String getPasswd() {
return this.passwd;
}
public void setPasswd(String passwd) {
this.passwd = passwd;
}
public String getContents() {
return this.contents;
}
public void setContents(String contents) {
this.contents = contents;
}
public Date getCreateDate() {
return this.createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public String getRecSts() {
return this.recSts;
}
public void setRecSts(String recSts) {
this.recSts = recSts;
}
public String getIp() {
return this.ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getBrdPostSeq() {
return this.brdPostSeq;
}
public void setBrdPostSeq(String brdPostSeq) {
this.brdPostSeq = brdPostSeq;
}
}

View File

@@ -0,0 +1,179 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.vo.HmsBrdMngDefaultVO
* org.apache.commons.lang.builder.ToStringBuilder
*/
package egovframework.cms.board.vo;
import java.io.Serializable;
import org.apache.commons.lang.builder.ToStringBuilder;
public class HmsBrdMngDefaultVO
implements Serializable {
private String searchCondition = "";
private String searchKeyword = "";
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 String bmode;
private String parentUrl;
private String pageUseYn = "Y";
private String orderby;
private String brdMngSeq;
private String writerNm;
private String writerId;
public String getWriterNm() {
return this.writerNm;
}
public void setWriterNm(String writerNm) {
this.writerNm = writerNm;
}
public String getWriterId() {
return this.writerId;
}
public void setWriterId(String writerId) {
this.writerId = writerId;
}
public void setBrdMngSeq(String brdMngSeq) {
this.brdMngSeq = brdMngSeq;
}
public String getBrdMngSeq() {
return this.brdMngSeq;
}
public void setOrderby(String orderby) {
this.orderby = orderby;
}
public String getOrderby() {
return this.orderby;
}
public void setBmode(String bmode) {
this.bmode = bmode;
}
public String getBmode() {
return this.bmode;
}
public void setParentUrl(String parentUrl) {
this.parentUrl = parentUrl;
}
public String getParentUrl() {
return this.parentUrl;
}
public void setPageUseYn(String pageUseYn) {
this.pageUseYn = pageUseYn;
}
public String getPageUseYn() {
return this.pageUseYn;
}
public String toParam() {
StringBuilder sb = new StringBuilder();
sb.append("?pageIndex=" + this.pageIndex);
if (!this.bmode.equals("")) {
sb.append("&bmode=" + this.bmode);
}
if (!this.searchCondition.equals("")) {
sb.append("&searchCondition=" + this.searchCondition);
}
if (!this.searchKeyword.equals("")) {
sb.append("&searchKeyword=" + this.searchKeyword);
}
return sb.toString();
}
public int getFirstIndex() {
return this.firstIndex;
}
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
public int getLastIndex() {
return this.lastIndex;
}
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
public int getRecordCountPerPage() {
return this.recordCountPerPage;
}
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
public String getSearchCondition() {
return this.searchCondition;
}
public void setSearchCondition(String searchCondition) {
this.searchCondition = searchCondition;
}
public String getSearchKeyword() {
return this.searchKeyword;
}
public void setSearchKeyword(String searchKeyword) {
this.searchKeyword = searchKeyword;
}
public String getSearchUseYn() {
return this.searchUseYn;
}
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
public int getPageIndex() {
return this.pageIndex;
}
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
public int getPageUnit() {
return this.pageUnit;
}
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
public int getPageSize() {
return this.pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public String toString() {
return ToStringBuilder.reflectionToString((Object)this);
}
}

View File

@@ -0,0 +1,197 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.vo.HmsBrdMngDefaultVO
* egovframework.cms.board.vo.HmsBrdMngVO
*/
package egovframework.cms.board.vo;
import egovframework.cms.board.vo.HmsBrdMngDefaultVO;
import java.sql.Date;
public class HmsBrdMngVO
extends HmsBrdMngDefaultVO {
private static final long serialVersionUID = 1L;
private String brdMngSeq;
private String brdNm;
private String recSts;
private Date createDate;
private String writerId;
private String writerNm;
private String noticeIschk;
private String openIschk;
private String replyIschk;
private String brdType;
private String brdSkin;
private String editorFlag = "N";
private String showNewPost;
private String addNewPost;
private String showWriteTime;
private String manager;
private int titleLength;
private String cateMastSeq;
private String atchWhite;
private String atchCnt;
public String getBrdMngSeq() {
return this.brdMngSeq;
}
public void setBrdMngSeq(String brdMngSeq) {
this.brdMngSeq = brdMngSeq;
}
public String getBrdNm() {
return this.brdNm;
}
public void setBrdNm(String brdNm) {
this.brdNm = brdNm;
}
public String getRecSts() {
return this.recSts;
}
public void setRecSts(String recSts) {
this.recSts = recSts;
}
public Date getCreateDate() {
return this.createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public String getWriterId() {
return this.writerId;
}
public void setWriterId(String writerId) {
this.writerId = writerId;
}
public String getWriterNm() {
return this.writerNm;
}
public void setWriterNm(String writerNm) {
this.writerNm = writerNm;
}
public String getNoticeIschk() {
return this.noticeIschk;
}
public void setNoticeIschk(String noticeIschk) {
this.noticeIschk = noticeIschk;
}
public String getOpenIschk() {
return this.openIschk;
}
public void setOpenIschk(String openIschk) {
this.openIschk = openIschk;
}
public String getReplyIschk() {
return this.replyIschk;
}
public void setReplyIschk(String replyIschk) {
this.replyIschk = replyIschk;
}
public String getBrdType() {
return this.brdType;
}
public void setBrdType(String brdType) {
this.brdType = brdType;
}
public String getBrdSkin() {
return this.brdSkin;
}
public void setBrdSkin(String brdSkin) {
this.brdSkin = brdSkin;
}
public String getEditorFlag() {
return this.editorFlag;
}
public void setEditorFlag(String editorFlag) {
this.editorFlag = editorFlag;
}
public String getShowNewPost() {
return this.showNewPost;
}
public void setShowNewPost(String showNewPost) {
this.showNewPost = showNewPost;
}
public String getAddNewPost() {
return this.addNewPost;
}
public void setAddNewPost(String addNewPost) {
this.addNewPost = addNewPost;
}
public String getShowWriteTime() {
return this.showWriteTime;
}
public void setShowWriteTime(String showWriteTime) {
this.showWriteTime = showWriteTime;
}
public String getManager() {
return this.manager;
}
public void setManager(String manager) {
this.manager = manager;
}
public int getTitleLength() {
return this.titleLength;
}
public void setTitleLength(int titleLength) {
this.titleLength = titleLength;
}
public String getCateMastSeq() {
return this.cateMastSeq;
}
public void setCateMastSeq(String cateMastSeq) {
this.cateMastSeq = cateMastSeq;
}
public String getAtchWhite() {
return this.atchWhite;
}
public void setAtchWhite(String atchWhite) {
this.atchWhite = atchWhite;
}
public String getAtchCnt() {
return this.atchCnt;
}
public void setAtchCnt(String atchCnt) {
this.atchCnt = atchCnt;
}
}

View File

@@ -0,0 +1,266 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.vo.HmsBrdPostDefaultVO
* org.apache.commons.lang.builder.ToStringBuilder
*/
package egovframework.cms.board.vo;
import java.io.Serializable;
import org.apache.commons.lang.builder.ToStringBuilder;
public class HmsBrdPostDefaultVO
implements Serializable {
private String searchCondition = "";
private String searchKeyword = "";
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 String bmode;
private String parentUrl;
private String pageUseYn = "Y";
private String orderby;
private String brdPostSeq;
private String brdMngSeq;
private String userId;
private String userNm;
private String atchSeq;
private String searchBrdDepth;
private String searchBrdGroup;
private String searchCateSeq = "";
private String searchCreateDate;
private String searchUserId;
private String searchStartDate;
private String searchEndDate;
public String getAtchSeq() {
return this.atchSeq;
}
public void setAtchSeq(String atchSeq) {
this.atchSeq = atchSeq;
}
public String getBrdMngSeq() {
return this.brdMngSeq;
}
public void setBrdMngSeq(String brdMngSeq) {
this.brdMngSeq = brdMngSeq;
}
public String getUserNm() {
return this.userNm;
}
public void setUserNm(String userNm) {
this.userNm = userNm;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public void setBrdPostSeq(String brdPostSeq) {
this.brdPostSeq = brdPostSeq;
}
public String getBrdPostSeq() {
return this.brdPostSeq;
}
public void setOrderby(String orderby) {
this.orderby = orderby;
}
public String getOrderby() {
return this.orderby;
}
public void setBmode(String bmode) {
this.bmode = bmode;
}
public String getBmode() {
return this.bmode;
}
public void setParentUrl(String parentUrl) {
this.parentUrl = parentUrl;
}
public String getParentUrl() {
return this.parentUrl;
}
public void setPageUseYn(String pageUseYn) {
this.pageUseYn = pageUseYn;
}
public String getPageUseYn() {
return this.pageUseYn;
}
public String toParam() {
StringBuilder sb = new StringBuilder();
sb.append("?pageIndex=" + this.pageIndex);
if (this.bmode != null && !this.bmode.equals("")) {
sb.append("&bmode=" + this.bmode);
}
if (this.searchCondition != null && !this.searchCondition.equals("")) {
sb.append("&searchCondition=" + this.searchCondition);
}
if (this.searchKeyword != null && !this.searchKeyword.equals("")) {
sb.append("&searchKeyword=" + this.searchKeyword);
}
if (this.searchCateSeq != null && !this.searchCateSeq.equals("")) {
sb.append("&searchCateSeq=" + this.searchCateSeq);
}
if (this.pageUnit != 0) {
sb.append("&pageUnit=" + this.pageUnit);
}
return sb.toString();
}
public int getFirstIndex() {
return this.firstIndex;
}
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
public int getLastIndex() {
return this.lastIndex;
}
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
public int getRecordCountPerPage() {
return this.recordCountPerPage;
}
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
public String getSearchCondition() {
return this.searchCondition;
}
public void setSearchCondition(String searchCondition) {
this.searchCondition = searchCondition;
}
public String getSearchKeyword() {
return this.searchKeyword;
}
public void setSearchKeyword(String searchKeyword) {
this.searchKeyword = searchKeyword;
}
public String getSearchUseYn() {
return this.searchUseYn;
}
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
public int getPageIndex() {
return this.pageIndex;
}
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
public int getPageUnit() {
return this.pageUnit;
}
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
public int getPageSize() {
return this.pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public String toString() {
return ToStringBuilder.reflectionToString((Object)this);
}
public String getSearchBrdDepth() {
return this.searchBrdDepth;
}
public void setSearchBrdDepth(String searchBrdDepth) {
this.searchBrdDepth = searchBrdDepth;
}
public String getSearchBrdGroup() {
return this.searchBrdGroup;
}
public void setSearchBrdGroup(String searchBrdGroup) {
this.searchBrdGroup = searchBrdGroup;
}
public String getSearchCateSeq() {
return this.searchCateSeq;
}
public void setSearchCateSeq(String searchCateSeq) {
this.searchCateSeq = searchCateSeq;
}
public String getSearchCreateDate() {
return this.searchCreateDate;
}
public void setSearchCreateDate(String searchCreateDate) {
this.searchCreateDate = searchCreateDate;
}
public String getSearchUserId() {
return this.searchUserId;
}
public void setSearchUserId(String searchUserId) {
this.searchUserId = searchUserId;
}
public String getSearchStartDate() {
return this.searchStartDate;
}
public void setSearchStartDate(String searchStartDate) {
this.searchStartDate = searchStartDate;
}
public String getSearchEndDate() {
return this.searchEndDate;
}
public void setSearchEndDate(String searchEndDate) {
this.searchEndDate = searchEndDate;
}
}

View File

@@ -0,0 +1,318 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.vo.HmsBrdPostDefaultVO
* egovframework.cms.board.vo.HmsBrdPostVO
*/
package egovframework.cms.board.vo;
import egovframework.cms.board.vo.HmsBrdPostDefaultVO;
import java.sql.Date;
public class HmsBrdPostVO
extends HmsBrdPostDefaultVO {
private static final long serialVersionUID = 1L;
private String brdPostSeq;
private String userId;
private String userNm = "";
private String atchSeq;
private String recSts;
private String title;
private String passwd;
private int viewCnt;
private String openIschk = "Y";
private String noticeIschk = "N";
private Date createDate;
private String contents;
private String ip;
private int brdGroup;
private int brdDepth;
private int brdSort;
private String brdMngSeq;
private String editorFlag;
private String deptNm;
private String officeNm;
private String extField01;
private String extField02;
private String extField03;
private String extField04;
private String extField05;
private String extTitle01;
private String extTitle02;
private String extTitle03;
private String extTitle04;
private String extTitle05;
private String createTime;
private String cateSeq;
private String extContents01;
public String getBrdMngSeq() {
return this.brdMngSeq;
}
public void setBrdMngSeq(String brdMngSeq) {
this.brdMngSeq = brdMngSeq;
}
public static long getSerialversionuid() {
return 1L;
}
public String getBrdPostSeq() {
return this.brdPostSeq;
}
public void setBrdPostSeq(String brdPostSeq) {
this.brdPostSeq = brdPostSeq;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserNm() {
return this.userNm;
}
public void setUserNm(String userNm) {
this.userNm = userNm;
}
public String getAtchSeq() {
return this.atchSeq;
}
public void setAtchSeq(String atchSeq) {
this.atchSeq = atchSeq;
}
public String getRecSts() {
return this.recSts;
}
public void setRecSts(String recSts) {
this.recSts = recSts;
}
public String getTitle() {
return this.title;
}
public void setTitle(String title) {
this.title = title;
}
public String getPasswd() {
return this.passwd;
}
public void setPasswd(String passwd) {
this.passwd = passwd;
}
public int getViewCnt() {
return this.viewCnt;
}
public void setViewCnt(int viewCnt) {
this.viewCnt = viewCnt;
}
public String getOpenIschk() {
return this.openIschk;
}
public void setOpenIschk(String openIschk) {
this.openIschk = openIschk;
}
public String getNoticeIschk() {
return this.noticeIschk;
}
public void setNoticeIschk(String noticeIschk) {
this.noticeIschk = noticeIschk;
}
public Date getCreateDate() {
return this.createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public String getContents() {
return this.contents;
}
public void setContents(String contents) {
this.contents = contents;
}
public String getIp() {
return this.ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public int getBrdGroup() {
return this.brdGroup;
}
public void setBrdGroup(int brdGroup) {
this.brdGroup = brdGroup;
}
public int getBrdDepth() {
return this.brdDepth;
}
public void setBrdDepth(int brdDepth) {
this.brdDepth = brdDepth;
}
public int getBrdSort() {
return this.brdSort;
}
public void setBrdSort(int brdSort) {
this.brdSort = brdSort;
}
public String getEditorFlag() {
return this.editorFlag;
}
public void setEditorFlag(String editorFlag) {
this.editorFlag = editorFlag;
}
public String getDeptNm() {
return this.deptNm;
}
public void setDeptNm(String deptNm) {
this.deptNm = deptNm;
}
public String getOfficeNm() {
return this.officeNm;
}
public void setOfficeNm(String officeNm) {
this.officeNm = officeNm;
}
public String getExtField01() {
return this.extField01;
}
public void setExtField01(String extField01) {
this.extField01 = extField01;
}
public String getExtField02() {
return this.extField02;
}
public void setExtField02(String extField02) {
this.extField02 = extField02;
}
public String getExtField03() {
return this.extField03;
}
public void setExtField03(String extField03) {
this.extField03 = extField03;
}
public String getExtField04() {
return this.extField04;
}
public void setExtField04(String extField04) {
this.extField04 = extField04;
}
public String getExtField05() {
return this.extField05;
}
public void setExtField05(String extField05) {
this.extField05 = extField05;
}
public String getExtTitle01() {
return this.extTitle01;
}
public void setExtTitle01(String extTitle01) {
this.extTitle01 = extTitle01;
}
public String getExtTitle02() {
return this.extTitle02;
}
public void setExtTitle02(String extTitle02) {
this.extTitle02 = extTitle02;
}
public String getExtTitle03() {
return this.extTitle03;
}
public void setExtTitle03(String extTitle03) {
this.extTitle03 = extTitle03;
}
public String getExtTitle04() {
return this.extTitle04;
}
public void setExtTitle04(String extTitle04) {
this.extTitle04 = extTitle04;
}
public String getExtTitle05() {
return this.extTitle05;
}
public void setExtTitle05(String extTitle05) {
this.extTitle05 = extTitle05;
}
public String getCreateTime() {
return this.createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getCateSeq() {
return this.cateSeq;
}
public void setCateSeq(String cateSeq) {
this.cateSeq = cateSeq;
}
public String getExtContents01() {
return this.extContents01;
}
public void setExtContents01(String extContents01) {
this.extContents01 = extContents01;
}
}

View File

@@ -0,0 +1,242 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.service.HmsBrdCateMastService
* egovframework.cms.board.service.HmsBrdCateService
* egovframework.cms.board.vo.HmsBrdCateDefaultVO
* egovframework.cms.board.vo.HmsBrdCateMastVO
* egovframework.cms.board.vo.HmsBrdCateVO
* egovframework.cms.board.web.HmsBrdCateController
* egovframework.com.cmm.LoginVO
* egovframework.edosi.common.code.CodeResource
* egovframework.edosi.egov.helper.UserDetailsHelper
* egovframework.edosi.filter.XssFilter
* egovframework.rte.fdl.property.EgovPropertyService
* egovframework.rte.psl.dataaccess.util.EgovMap
* javax.annotation.Resource
* javax.servlet.RequestDispatcher
* javax.servlet.ServletRequest
* javax.servlet.ServletResponse
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.ModelAttribute
* org.springframework.web.bind.annotation.RequestMapping
* org.springframework.web.bind.annotation.SessionAttributes
* org.springframework.web.bind.support.SessionStatus
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.board.web;
import egovframework.cms.board.service.HmsBrdCateMastService;
import egovframework.cms.board.service.HmsBrdCateService;
import egovframework.cms.board.vo.HmsBrdCateDefaultVO;
import egovframework.cms.board.vo.HmsBrdCateMastVO;
import egovframework.cms.board.vo.HmsBrdCateVO;
import egovframework.com.cmm.LoginVO;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.edosi.filter.XssFilter;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Controller
@SessionAttributes(types={HmsBrdCateVO.class})
public class HmsBrdCateController {
@Resource(name="hmsBrdCateService")
private HmsBrdCateService hmsBrdCateService;
@Resource(name="propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="codeResource")
private CodeResource codeResource;
@Resource(name="hmsBrdCateMastService")
private HmsBrdCateMastService hmsBrdCateMastService;
@RequestMapping(value={"/hms/hmsBrdCate/hmsBrdCateIndex.do"})
public String hmsBrdCateIndex(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdCateDefaultVO searchVO, ModelMap modelMap, Model model) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = this.selectHmsBrdCateList(request, response, searchVO, model);
} else if (bmode.equals("detail")) {
viewName = this.selectHmsBrdCate(request, response, searchVO, model);
} else if (bmode.equals("add")) {
viewName = this.addHmsBrdCateView(request, response, searchVO, model);
} else if (bmode.equals("modify")) {
viewName = this.updateHmsBrdCate(request, response, searchVO, model);
}
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
model.addAttribute("bmode", (Object)bmode);
model.addAttribute("loginVO", (Object)loginVO);
model.addAttribute("ROLE_BOARD", (Object)UserDetailsHelper.isRole((String)"ROLE_BOARD"));
this.initModelData(model, bmode);
return viewName;
}
private void initModelData(Model model, String bmode) throws Exception {
HashMap param = new HashMap();
this.initModelData(param, model, bmode);
}
private void initModelData(Map param, Model model, String bmode) throws Exception {
Iterator<String> it = param.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
String value = (String)param.get(key);
model.addAttribute(key, (Object)this.codeResource.getCodeList(value));
if (bmode == null || !bmode.equals("add") && !bmode.equals("modify")) continue;
model.addAttribute(key, (Object)this.codeResource.removeCodeResourceForNotUse(value));
}
}
private String selectHmsBrdCateList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdCateDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
searchVO.setPageUseYn("N");
int totCnt = this.hmsBrdCateService.selectHmsBrdCateListTotCnt(searchVO);
int nextSortNum = 10;
if (totCnt > 0) {
List hmsBrdCateList = this.hmsBrdCateService.selectHmsBrdCateList(searchVO);
try {
nextSortNum = Integer.parseInt((String)((EgovMap)hmsBrdCateList.get(hmsBrdCateList.size() - 1)).get((Object)"cateSort")) + 10;
}
catch (Exception e) {
e.printStackTrace();
nextSortNum = 10;
}
model.addAttribute("resultList", (Object)hmsBrdCateList);
}
model.addAttribute("nextSortNum", (Object)nextSortNum);
return "/cms/hmsBrdCate/HmsBrdCateList";
}
private String addHmsBrdCateView(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdCateDefaultVO searchVO, Model model) throws Exception {
HmsBrdCateMastVO hmsBrdCateMastVO = new HmsBrdCateMastVO();
hmsBrdCateMastVO.setCateMastSeq(searchVO.getSearchCateMastSeq());
hmsBrdCateMastVO = this.hmsBrdCateMastService.selectHmsBrdCateMast(hmsBrdCateMastVO);
HmsBrdCateVO hmsBrdCateVO = new HmsBrdCateVO();
hmsBrdCateVO.setCateSort(request.getParameter("nextSortNum"));
model.addAttribute("hmsBrdCateVO", (Object)hmsBrdCateVO);
model.addAttribute("hmsBrdCateMastVO", (Object)hmsBrdCateMastVO);
return "/cms/hmsBrdCate/HmsBrdCateRegister";
}
@RequestMapping(value={"/hms/hmsBrdCate/addHmsBrdCate.do"})
public String addHmsBrdCate(MultipartHttpServletRequest request, HttpServletResponse response, HmsBrdCateVO hmsBrdCateVO, @ModelAttribute(value="searchVO") HmsBrdCateDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
this.hmsBrdCateService.insertHmsBrdCate(hmsBrdCateVO, request);
status.setComplete();
return "redirect:" + searchVO.getParentUrl() + "?searchCateMastSeq=" + hmsBrdCateVO.getCateMastSeq();
}
private String updateHmsBrdCate(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdCateDefaultVO searchVO, Model model) throws Exception {
HmsBrdCateVO hmsBrdCateVO = new HmsBrdCateVO();
hmsBrdCateVO.setCateSeq(searchVO.getCateSeq());
hmsBrdCateVO = this.hmsBrdCateService.selectHmsBrdCate(hmsBrdCateVO);
if (!this.checkWriteAuth(hmsBrdCateVO)) {
return "cmm/privilegeError";
}
HmsBrdCateMastVO hmsBrdCateMastVO = new HmsBrdCateMastVO();
hmsBrdCateMastVO.setCateMastSeq(searchVO.getSearchCateMastSeq());
hmsBrdCateMastVO = this.hmsBrdCateMastService.selectHmsBrdCateMast(hmsBrdCateMastVO);
model.addAttribute("hmsBrdCateVO", (Object)hmsBrdCateVO);
model.addAttribute("hmsBrdCateMastVO", (Object)hmsBrdCateMastVO);
return "/cms/hmsBrdCate/HmsBrdCateRegister";
}
@RequestMapping(value={"/hms/hmsBrdCate/updateHmsBrdCate.do"})
public String updateHmsBrdCate(MultipartHttpServletRequest request, HttpServletResponse response, HmsBrdCateVO hmsBrdCateVO, @ModelAttribute(value="searchVO") HmsBrdCateDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsBrdCateVO)) {
return "cmm/privilegeError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
this.hmsBrdCateService.updateHmsBrdCate(hmsBrdCateVO, request);
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + searchVO.getParentUrl() + searchVO.toParam() + "&cateSeq=" + hmsBrdCateVO.getCateSeq() + "&searchCateMastSeq=" + hmsBrdCateVO.getCateMastSeq();
}
private String selectHmsBrdCate(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdCateDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
HmsBrdCateVO hmsBrdCateVO = new HmsBrdCateVO();
hmsBrdCateVO.setCateSeq(searchVO.getCateSeq());
hmsBrdCateVO = this.hmsBrdCateService.selectHmsBrdCate(hmsBrdCateVO);
HmsBrdCateMastVO hmsBrdCateMastVO = new HmsBrdCateMastVO();
hmsBrdCateMastVO.setCateMastSeq(hmsBrdCateVO.getCateMastSeq());
hmsBrdCateMastVO = this.hmsBrdCateMastService.selectHmsBrdCateMast(hmsBrdCateMastVO);
model.addAttribute("hmsBrdCateVO", (Object)hmsBrdCateVO);
model.addAttribute("hmsBrdCateMastVO", (Object)hmsBrdCateMastVO);
model.addAttribute("checkWriteAuth", (Object)this.checkWriteAuth(hmsBrdCateVO));
return "/cms/hmsBrdCate/HmsBrdCateDetail";
}
@RequestMapping(value={"/hms/hmsBrdCate/deleteHmsBrdCate.do"})
public String deleteHmsBrdCate(HttpServletRequest request, HmsBrdCateVO hmsBrdCateVO, @ModelAttribute(value="searchVO") HmsBrdCateDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsBrdCateVO)) {
return "cmm/privilegeError";
}
this.hmsBrdCateService.deleteHmsBrdCate(hmsBrdCateVO, request);
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + searchVO.getParentUrl() + searchVO.toParam() + "&searchCateMastSeq=" + hmsBrdCateVO.getCateMastSeq();
}
private boolean checkWriteAuth(HmsBrdCateVO hmsBrdCateVO) {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
if (UserDetailsHelper.isRole((String)"ROLE_BOARD").booleanValue()) {
return true;
}
return UserDetailsHelper.isRole((String)"ROLE_ADMIN") != false;
}
}

View File

@@ -0,0 +1,224 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.service.HmsBrdCateMastService
* egovframework.cms.board.vo.HmsBrdCateMastDefaultVO
* egovframework.cms.board.vo.HmsBrdCateMastVO
* egovframework.cms.board.web.HmsBrdCateMastController
* egovframework.com.cmm.LoginVO
* egovframework.edosi.common.code.CodeResource
* egovframework.edosi.egov.helper.UserDetailsHelper
* egovframework.edosi.filter.XssFilter
* egovframework.rte.fdl.property.EgovPropertyService
* egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo
* javax.annotation.Resource
* javax.servlet.RequestDispatcher
* javax.servlet.ServletRequest
* javax.servlet.ServletResponse
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.ModelAttribute
* org.springframework.web.bind.annotation.RequestMapping
* org.springframework.web.bind.annotation.SessionAttributes
* org.springframework.web.bind.support.SessionStatus
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.board.web;
import egovframework.cms.board.service.HmsBrdCateMastService;
import egovframework.cms.board.vo.HmsBrdCateMastDefaultVO;
import egovframework.cms.board.vo.HmsBrdCateMastVO;
import egovframework.com.cmm.LoginVO;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.edosi.filter.XssFilter;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Controller
@SessionAttributes(types={HmsBrdCateMastVO.class})
public class HmsBrdCateMastController {
@Resource(name="hmsBrdCateMastService")
private HmsBrdCateMastService hmsBrdCateMastService;
@Resource(name="propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="codeResource")
private CodeResource codeResource;
@RequestMapping(value={"/hms/hmsBrdCateMast/hmsBrdCateMastIndex.do"})
public String hmsBrdCateMastIndex(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdCateMastDefaultVO searchVO, ModelMap modelMap, Model model) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = this.selectHmsBrdCateMastList(request, response, searchVO, model);
} else if (bmode.equals("detail")) {
viewName = this.selectHmsBrdCateMast(request, response, searchVO, model);
} else if (bmode.equals("add")) {
viewName = this.addHmsBrdCateMastView(request, response, searchVO, model);
} else if (bmode.equals("modify")) {
viewName = this.updateHmsBrdCateMast(request, response, searchVO, model);
}
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
model.addAttribute("bmode", (Object)bmode);
model.addAttribute("loginVO", (Object)loginVO);
model.addAttribute("ROLE_BOARD", (Object)UserDetailsHelper.isRole((String)"ROLE_BOARD"));
this.initModelData(model, bmode);
return viewName;
}
private void initModelData(Model model, String bmode) throws Exception {
HashMap param = new HashMap();
this.initModelData(param, model, bmode);
}
private void initModelData(Map param, Model model, String bmode) throws Exception {
Iterator<String> it = param.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
String value = (String)param.get(key);
model.addAttribute(key, (Object)this.codeResource.getCodeList(value));
if (bmode == null || !bmode.equals("add") && !bmode.equals("modify")) continue;
model.addAttribute(key, (Object)this.codeResource.removeCodeResourceForNotUse(value));
}
}
private String selectHmsBrdCateMastList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdCateMastDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
searchVO.setPageUnit(this.propertiesService.getInt("pageUnit"));
searchVO.setPageSize(this.propertiesService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
int totCnt = this.hmsBrdCateMastService.selectHmsBrdCateMastListTotCnt(searchVO);
if (totCnt > 0) {
List hmsBrdCateMastList = this.hmsBrdCateMastService.selectHmsBrdCateMastList(searchVO);
model.addAttribute("resultList", (Object)hmsBrdCateMastList);
}
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", (Object)paginationInfo);
return "/cms/hmsBrdCateMast/HmsBrdCateMastList";
}
private String addHmsBrdCateMastView(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdCateMastDefaultVO searchVO, Model model) throws Exception {
HmsBrdCateMastVO hmsBrdCateMastVO = new HmsBrdCateMastVO();
model.addAttribute("hmsBrdCateMastVO", (Object)hmsBrdCateMastVO);
return "/cms/hmsBrdCateMast/HmsBrdCateMastRegister";
}
@RequestMapping(value={"/hms/hmsBrdCateMast/addHmsBrdCateMast.do"})
public String addHmsBrdCateMast(MultipartHttpServletRequest request, HttpServletResponse response, HmsBrdCateMastVO hmsBrdCateMastVO, @ModelAttribute(value="searchVO") HmsBrdCateMastDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
this.hmsBrdCateMastService.insertHmsBrdCateMast(hmsBrdCateMastVO, request);
status.setComplete();
return "redirect:" + searchVO.getParentUrl();
}
private String updateHmsBrdCateMast(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdCateMastDefaultVO searchVO, Model model) throws Exception {
HmsBrdCateMastVO hmsBrdCateMastVO = new HmsBrdCateMastVO();
hmsBrdCateMastVO.setCateMastSeq(searchVO.getCateMastSeq());
hmsBrdCateMastVO = this.hmsBrdCateMastService.selectHmsBrdCateMast(hmsBrdCateMastVO);
if (!this.checkWriteAuth(hmsBrdCateMastVO)) {
return "cmm/privilegeError";
}
model.addAttribute("hmsBrdCateMastVO", (Object)hmsBrdCateMastVO);
return "/cms/hmsBrdCateMast/HmsBrdCateMastRegister";
}
@RequestMapping(value={"/hms/hmsBrdCateMast/updateHmsBrdCateMast.do"})
public String updateHmsBrdCateMast(MultipartHttpServletRequest request, HttpServletResponse response, HmsBrdCateMastVO hmsBrdCateMastVO, @ModelAttribute(value="searchVO") HmsBrdCateMastDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsBrdCateMastVO)) {
return "cmm/privilegeError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
this.hmsBrdCateMastService.updateHmsBrdCateMast(hmsBrdCateMastVO, request);
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + searchVO.getParentUrl() + searchVO.toParam() + "&cateMastSeq=" + hmsBrdCateMastVO.getCateMastSeq();
}
private String selectHmsBrdCateMast(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdCateMastDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
HmsBrdCateMastVO hmsBrdCateMastVO = new HmsBrdCateMastVO();
hmsBrdCateMastVO.setCateMastSeq(searchVO.getCateMastSeq());
hmsBrdCateMastVO = this.hmsBrdCateMastService.selectHmsBrdCateMast(hmsBrdCateMastVO);
model.addAttribute("hmsBrdCateMastVO", (Object)hmsBrdCateMastVO);
model.addAttribute("checkWriteAuth", (Object)this.checkWriteAuth(hmsBrdCateMastVO));
return "/cms/hmsBrdCateMast/HmsBrdCateMastDetail";
}
@RequestMapping(value={"/hms/hmsBrdCateMast/deleteHmsBrdCateMast.do"})
public String deleteHmsBrdCateMast(HttpServletRequest request, HmsBrdCateMastVO hmsBrdCateMastVO, @ModelAttribute(value="searchVO") HmsBrdCateMastDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsBrdCateMastVO)) {
return "cmm/privilegeError";
}
this.hmsBrdCateMastService.deleteHmsBrdCateMast(hmsBrdCateMastVO, request);
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + searchVO.getParentUrl() + searchVO.toParam();
}
private boolean checkWriteAuth(HmsBrdCateMastVO hmsBrdCateMastVO) {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
if (UserDetailsHelper.isRole((String)"ROLE_BOARD").booleanValue()) {
return true;
}
return UserDetailsHelper.isRole((String)"ROLE_ADMIN") != false;
}
}

View File

@@ -0,0 +1,266 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.board.service.HmsBrdCateMastService
* egovframework.cms.board.service.HmsBrdMngService
* egovframework.cms.board.vo.HmsBrdCateMastDefaultVO
* egovframework.cms.board.vo.HmsBrdCateMastVO
* egovframework.cms.board.vo.HmsBrdCommentDefaultVO
* egovframework.cms.board.vo.HmsBrdMngDefaultVO
* egovframework.cms.board.vo.HmsBrdMngVO
* egovframework.cms.board.web.HmsBrdMngController
* egovframework.com.cmm.LoginVO
* egovframework.edosi.common.code.CodeResource
* egovframework.edosi.egov.helper.UserDetailsHelper
* egovframework.edosi.resource.EdosiResource
* egovframework.rte.fdl.property.EgovPropertyService
* egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo
* javax.annotation.Resource
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.ModelAttribute
* org.springframework.web.bind.annotation.RequestMapping
* org.springframework.web.bind.annotation.SessionAttributes
* org.springframework.web.bind.support.SessionStatus
*/
package egovframework.cms.board.web;
import egovframework.cms.board.service.HmsBrdCateMastService;
import egovframework.cms.board.service.HmsBrdMngService;
import egovframework.cms.board.vo.HmsBrdCateMastDefaultVO;
import egovframework.cms.board.vo.HmsBrdCateMastVO;
import egovframework.cms.board.vo.HmsBrdCommentDefaultVO;
import egovframework.cms.board.vo.HmsBrdMngDefaultVO;
import egovframework.cms.board.vo.HmsBrdMngVO;
import egovframework.com.cmm.LoginVO;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.edosi.resource.EdosiResource;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import java.util.HashMap;
import java.util.Iterator;
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.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.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
@Controller
@SessionAttributes(types={HmsBrdMngVO.class})
public class HmsBrdMngController {
@Resource(name="hmsBrdMngService")
private HmsBrdMngService hmsBrdMngService;
@Resource(name="propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="codeResource")
private CodeResource codeResource;
@Resource(name="hmsBrdCateMastService")
private HmsBrdCateMastService hmsBrdCateMastService;
@RequestMapping(value={"/hms/hmsBrdMng/hmsBrdMngIndex.do"})
public String hmsBrdMngIndex(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdMngDefaultVO searchVO, @ModelAttribute(value="commentVO") HmsBrdCommentDefaultVO commentVO, SessionStatus status, ModelMap modelMap, Model model) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/privilegeError";
}
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = this.selectHmsBrdMngList(request, response, searchVO, model);
} else if (bmode.equals("detail")) {
viewName = this.selectHmsBrdMng(request, response, searchVO, model, status);
} else if (bmode.equals("add")) {
viewName = this.addHmsBrdMngView(request, response, searchVO, model);
} else if (bmode.equals("modify")) {
viewName = this.updateHmsBrdMng(request, response, searchVO, model);
}
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
model.addAttribute("bmode", (Object)bmode);
model.addAttribute("loginVO", (Object)loginVO);
model.addAttribute("ROLE_BOARD", (Object)UserDetailsHelper.isRole((String)"ROLE_BOARD"));
this.initModelData(model, bmode);
return viewName;
}
private void initModelData(Model model, String bmode) throws Exception {
HashMap param = new HashMap();
this.initModelData(param, model, bmode);
}
private void initModelData(Map param, Model model, String bmode) throws Exception {
Iterator<String> it = param.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
String value = (String)param.get(key);
model.addAttribute(key, (Object)this.codeResource.getCodeList(value));
if (bmode == null || !bmode.equals("add") && !bmode.equals("modify")) continue;
model.addAttribute(key, (Object)this.codeResource.removeCodeResourceForNotUse(value));
}
}
private String selectHmsBrdMngList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdMngDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
searchVO.setPageUnit(this.propertiesService.getInt("pageUnit"));
searchVO.setPageSize(this.propertiesService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
try {
List hmsBrdMngList = this.hmsBrdMngService.selectHmsBrdMngList(searchVO);
model.addAttribute("resultList", (Object)hmsBrdMngList);
int totCnt = this.hmsBrdMngService.selectHmsBrdMngListTotCnt(searchVO);
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", (Object)paginationInfo);
}
catch (Exception e) {
e.printStackTrace();
}
return "/cms/hmsBrdMng/HmsBrdMngList";
}
private String addHmsBrdMngView(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdMngDefaultVO searchVO, Model model) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
String whitelist = EdosiResource.getInstance().getValue("attach.whitelist").toLowerCase();
HmsBrdMngVO hmsBrdMngVO = new HmsBrdMngVO();
hmsBrdMngVO.setWriterId(loginVO.getId());
hmsBrdMngVO.setWriterNm(loginVO.getName());
hmsBrdMngVO.setShowNewPost("2");
hmsBrdMngVO.setAddNewPost("on");
hmsBrdMngVO.setShowWriteTime("on");
hmsBrdMngVO.setBrdSkin("default");
hmsBrdMngVO.setTitleLength(0);
hmsBrdMngVO.setAtchCnt("5");
hmsBrdMngVO.setAtchWhite(whitelist);
HmsBrdCateMastDefaultVO hmsBrdCateMastDefaultVO = new HmsBrdCateMastDefaultVO();
hmsBrdCateMastDefaultVO.setPageUseYn("N");
hmsBrdCateMastDefaultVO.setOrderby("name");
List hmsBrdCateMastList = this.hmsBrdCateMastService.selectHmsBrdCateMastList(hmsBrdCateMastDefaultVO);
model.addAttribute("hmsBrdMngVO", (Object)hmsBrdMngVO);
model.addAttribute("hmsBrdCateMastList", (Object)hmsBrdCateMastList);
return "/cms/hmsBrdMng/HmsBrdMngRegister";
}
@RequestMapping(value={"/hms/hmsBrdMng/addHmsBrdMng.do"})
public String addHmsBrdMng(HttpServletRequest request, HmsBrdMngVO hmsBrdMngVO, @ModelAttribute(value="searchVO") HmsBrdMngDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/privilegeError";
}
try {
Integer.parseInt(hmsBrdMngVO.getAtchCnt());
}
catch (Exception e) {
e.printStackTrace();
hmsBrdMngVO.setAtchCnt("0");
}
this.hmsBrdMngService.insertHmsBrdMng(hmsBrdMngVO, request);
status.setComplete();
return "redirect:" + searchVO.getParentUrl() + "?brdMngSeq=" + searchVO.getBrdMngSeq();
}
private String updateHmsBrdMng(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdMngDefaultVO searchVO, Model model) throws Exception {
HmsBrdMngVO hmsBrdMngVO = new HmsBrdMngVO();
hmsBrdMngVO.setBrdMngSeq(searchVO.getBrdMngSeq());
hmsBrdMngVO = this.hmsBrdMngService.selectHmsBrdMng(hmsBrdMngVO);
if (!this.checkWriteAuth(hmsBrdMngVO)) {
return "cmm/privilegeError";
}
HmsBrdCateMastDefaultVO hmsBrdCateMastDefaultVO = new HmsBrdCateMastDefaultVO();
hmsBrdCateMastDefaultVO.setPageUseYn("N");
hmsBrdCateMastDefaultVO.setOrderby("name");
List hmsBrdCateMastList = this.hmsBrdCateMastService.selectHmsBrdCateMastList(hmsBrdCateMastDefaultVO);
model.addAttribute("hmsBrdMngVO", (Object)hmsBrdMngVO);
model.addAttribute("hmsBrdCateMastList", (Object)hmsBrdCateMastList);
return "/cms/hmsBrdMng/HmsBrdMngRegister";
}
@RequestMapping(value={"/hms/hmsBrdMng/updateHmsBrdMng.do"})
public String updateHmsBrdMng(HttpServletRequest request, HmsBrdMngVO hmsBrdMngVO, @ModelAttribute(value="searchVO") HmsBrdMngDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsBrdMngVO)) {
return "cmm/privilegeError";
}
try {
Integer.parseInt(hmsBrdMngVO.getAtchCnt());
}
catch (Exception e) {
e.printStackTrace();
hmsBrdMngVO.setAtchCnt("0");
}
this.hmsBrdMngService.updateHmsBrdMng(hmsBrdMngVO, request);
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + searchVO.getParentUrl() + searchVO.toParam() + "&brdMngSeq=" + hmsBrdMngVO.getBrdMngSeq();
}
private String selectHmsBrdMng(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdMngDefaultVO searchVO, Model model, SessionStatus status) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
String brdMngSeq = request.getParameter("brdMngSeq");
try {
HmsBrdMngVO hmsBrdMngVO = new HmsBrdMngVO();
hmsBrdMngVO.setBrdMngSeq(brdMngSeq);
hmsBrdMngVO = this.hmsBrdMngService.selectHmsBrdMng(hmsBrdMngVO);
if (hmsBrdMngVO.getCateMastSeq() != null && !hmsBrdMngVO.getCateMastSeq().equals("")) {
HmsBrdCateMastVO hmsBrdCateMastVO = new HmsBrdCateMastVO();
hmsBrdCateMastVO.setCateMastSeq(hmsBrdMngVO.getCateMastSeq());
hmsBrdCateMastVO = this.hmsBrdCateMastService.selectHmsBrdCateMast(hmsBrdCateMastVO);
model.addAttribute("hmsBrdCateMastVO", (Object)hmsBrdCateMastVO);
}
model.addAttribute("hmsBrdMngVO", (Object)hmsBrdMngVO);
model.addAttribute("checkWriteAuth", (Object)this.checkWriteAuth(hmsBrdMngVO));
}
catch (Exception e) {
e.printStackTrace();
}
return "/cms/hmsBrdMng/HmsBrdMngDetail";
}
@RequestMapping(value={"/hms/hmsBrdMng/deleteHmsBrdMng.do"})
public String deleteHmsBrdMng(HttpServletRequest request, HmsBrdMngVO hmsBrdMngVO, @ModelAttribute(value="searchVO") HmsBrdMngDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsBrdMngVO)) {
return "cmm/privilegeError";
}
this.hmsBrdMngService.deleteHmsBrdMng(hmsBrdMngVO, request);
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + searchVO.getParentUrl() + searchVO.toParam();
}
private boolean checkWriteAuth(HmsBrdMngVO hmsBrdMngVO) {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
if (UserDetailsHelper.isRole((String)"ROLE_BOARD").booleanValue()) {
return true;
}
return UserDetailsHelper.isRole((String)"ROLE_ADMIN") != false;
}
}

View File

@@ -0,0 +1,623 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.ibm.icu.util.Calendar
* egovframework.cms.board.service.HmsBrdCateMastService
* egovframework.cms.board.service.HmsBrdCateService
* egovframework.cms.board.service.HmsBrdCommentService
* egovframework.cms.board.service.HmsBrdMngService
* egovframework.cms.board.service.HmsBrdPostService
* egovframework.cms.board.vo.HmsBrdCateDefaultVO
* egovframework.cms.board.vo.HmsBrdCateVO
* egovframework.cms.board.vo.HmsBrdCommentDefaultVO
* egovframework.cms.board.vo.HmsBrdCommentVO
* egovframework.cms.board.vo.HmsBrdMngVO
* egovframework.cms.board.vo.HmsBrdPostDefaultVO
* egovframework.cms.board.vo.HmsBrdPostVO
* egovframework.cms.board.web.HmsBrdPostController
* egovframework.com.cmm.LoginVO
* egovframework.common.dwr.DwrCommonService
* egovframework.edosi.common.code.CodeResource
* egovframework.edosi.common.util.EdosiDateUtil
* egovframework.edosi.egov.helper.UserDetailsHelper
* egovframework.edosi.filter.XssFilter
* egovframework.rte.fdl.property.EgovPropertyService
* egovframework.rte.psl.dataaccess.util.EgovMap
* egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo
* javax.annotation.Resource
* javax.servlet.RequestDispatcher
* javax.servlet.ServletRequest
* javax.servlet.ServletResponse
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.ModelAttribute
* org.springframework.web.bind.annotation.RequestMapping
* org.springframework.web.bind.annotation.SessionAttributes
* org.springframework.web.bind.support.SessionStatus
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.board.web;
import com.ibm.icu.util.Calendar;
import egovframework.cms.board.service.HmsBrdCateMastService;
import egovframework.cms.board.service.HmsBrdCateService;
import egovframework.cms.board.service.HmsBrdCommentService;
import egovframework.cms.board.service.HmsBrdMngService;
import egovframework.cms.board.service.HmsBrdPostService;
import egovframework.cms.board.vo.HmsBrdCateDefaultVO;
import egovframework.cms.board.vo.HmsBrdCateVO;
import egovframework.cms.board.vo.HmsBrdCommentDefaultVO;
import egovframework.cms.board.vo.HmsBrdCommentVO;
import egovframework.cms.board.vo.HmsBrdMngVO;
import egovframework.cms.board.vo.HmsBrdPostDefaultVO;
import egovframework.cms.board.vo.HmsBrdPostVO;
import egovframework.com.cmm.LoginVO;
import egovframework.common.dwr.DwrCommonService;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.common.util.EdosiDateUtil;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.edosi.filter.XssFilter;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Controller
@SessionAttributes(types={HmsBrdPostVO.class})
public class HmsBrdPostController {
@Resource(name="hmsBrdPostService")
private HmsBrdPostService hmsBrdPostService;
@Resource(name="propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="hmsBrdCommentService")
private HmsBrdCommentService hmsBrdCommentService;
@Resource(name="hmsBrdMngService")
private HmsBrdMngService hmsBrdMngService;
@Resource(name="codeResource")
private CodeResource codeResource;
private final String COMMON_BOARD = "cboard";
@Resource(name="hmsBrdCateService")
private HmsBrdCateService hmsBrdCateService;
@Resource(name="hmsBrdCateMastService")
private HmsBrdCateMastService hmsBrdCateMastService;
@Resource(name="dwrCommonService")
private DwrCommonService dwrCommonService;
@RequestMapping(value={"/hms/hmsBrdPost/hmsBrdPostIndex.do"})
public String hmsBrdPostIndex(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdPostDefaultVO searchVO, @ModelAttribute(value="commentVO") HmsBrdCommentDefaultVO commentVO, SessionStatus status, ModelMap modelMap, Model model) throws Exception {
UserDetailsHelper.isAuthenticated().booleanValue();
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = this.selectHmsBrdPostList(request, response, searchVO, model);
} else if (bmode.equals("detail")) {
viewName = this.selectHmsBrdPost(request, response, searchVO, model, status);
} else if (bmode.equals("add")) {
viewName = this.addHmsBrdPostView(request, response, searchVO, model);
} else if (bmode.equals("modify")) {
viewName = this.updateHmsBrdPost(request, response, searchVO, model);
} else if (bmode.equals("reply")) {
viewName = this.addHmsBrdReplyView(request, response, searchVO, model);
}
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
model.addAttribute("bmode", (Object)bmode);
model.addAttribute("loginVO", (Object)loginVO);
this.initModelData(model, bmode);
return viewName;
}
private void initModelData(Model model, String bmode) throws Exception {
HashMap param = new HashMap();
this.initModelData(param, model, bmode);
}
private void initModelData(Map param, Model model, String bmode) throws Exception {
Iterator<String> it = param.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
String value = (String)param.get(key);
model.addAttribute(key, (Object)this.codeResource.getCodeList(value));
if (bmode == null || !bmode.equals("add") && !bmode.equals("modify")) continue;
model.addAttribute(key, (Object)this.codeResource.removeCodeResourceForNotUse(value));
}
}
private String selectHmsBrdPostList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdPostDefaultVO searchVO, Model model) throws Exception {
if (searchVO.getBrdMngSeq() != null && searchVO.getBrdMngSeq().equals("cboard")) {
return this.selectHmsBrdNewPostList(request, response, searchVO, model);
}
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
searchVO.setPageSize(this.propertiesService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
HmsBrdMngVO hmsBrdMngVO = new HmsBrdMngVO();
hmsBrdMngVO.setBrdMngSeq(searchVO.getBrdMngSeq());
try {
hmsBrdMngVO = this.hmsBrdMngService.selectHmsBrdMng(hmsBrdMngVO);
model.addAttribute("hmsBrdMngVO", (Object)hmsBrdMngVO);
}
catch (Exception e) {
throw new Exception();
}
if (hmsBrdMngVO.getCateMastSeq() != null && !hmsBrdMngVO.getCateMastSeq().equals("")) {
HmsBrdCateDefaultVO hmsBrdCateDefaultVO = new HmsBrdCateDefaultVO();
hmsBrdCateDefaultVO.setPageUseYn("N");
hmsBrdCateDefaultVO.setSearchCateMastSeq(hmsBrdMngVO.getCateMastSeq());
List cateList = this.hmsBrdCateService.selectHmsBrdCateList(hmsBrdCateDefaultVO);
model.addAttribute("cateList", (Object)cateList);
}
HashMap result = new HashMap();
this.cookBoardList(result, hmsBrdMngVO, searchVO);
paginationInfo.setTotalRecordCount(((Integer)result.get("totCnt")).intValue());
model.addAttribute("resultList", result.get("hmsBrdPostList"));
model.addAttribute("paginationInfo", (Object)paginationInfo);
return "/cms/hmsBrdPost/" + hmsBrdMngVO.getBrdSkin() + "/HmsBrdPostList";
}
private void cookBoardList(Map<String, Object> map, HmsBrdMngVO hmsBrdMngVO, HmsBrdPostDefaultVO searchVO) throws Exception {
if (hmsBrdMngVO.getBrdType().equals("notice") || hmsBrdMngVO.getBrdType().equals("qna")) {
searchVO.setSearchBrdDepth("0");
}
int totCnt = this.hmsBrdPostService.selectHmsBrdPostListTotCnt(searchVO);
List hmsBrdPostList = null;
if (totCnt == 0) {
map.put("totCnt", totCnt);
map.put("hmsBrdPostList", hmsBrdPostList);
return;
}
if (hmsBrdMngVO.getBrdType().equals("guest")) {
hmsBrdPostList = this.hmsBrdPostService.selectHmsBrdPostList(searchVO);
int day = Integer.parseInt(hmsBrdMngVO.getShowNewPost());
String today = EdosiDateUtil.getToDayString((String)"-", (int)(-day));
int i = 0;
while (i < hmsBrdPostList.size()) {
EgovMap m = (EgovMap)hmsBrdPostList.get(i);
if (("" + m.get((Object)"createDate")).compareTo(today) > 0) {
m.put((Object)"newPost", (Object)"new");
}
if (hmsBrdMngVO.getShowWriteTime() != null && ("" + m.get((Object)"createDate")).compareTo(EdosiDateUtil.getToDayString((String)"-", (int)0)) == 0) {
try {
m.put((Object)"createDate", m.get((Object)"createTime"));
}
catch (Exception e) {
e.printStackTrace();
}
}
++i;
}
} else {
hmsBrdPostList = this.hmsBrdPostService.selectHmsBrdPostList(searchVO);
int day = Integer.parseInt(hmsBrdMngVO.getShowNewPost());
String today = EdosiDateUtil.getToDayString((String)"-", (int)(-day));
int titleLength = hmsBrdMngVO.getTitleLength();
int i = 0;
while (i < hmsBrdPostList.size()) {
EgovMap m = (EgovMap)hmsBrdPostList.get(i);
if (("" + m.get((Object)"createDate")).compareTo(today) > 0) {
m.put((Object)"newPost", (Object)"new");
}
String titleAlt = (String)m.get((Object)"title");
if (titleLength > 0) {
String title = "";
title = titleAlt.length() > titleLength ? String.valueOf(titleAlt.substring(0, titleLength)) + "..." : titleAlt;
m.put((Object)"title", (Object)title);
}
m.put((Object)"titleAlt", (Object)titleAlt);
if (hmsBrdMngVO.getShowWriteTime() != null && ("" + m.get((Object)"createDate")).compareTo(EdosiDateUtil.getToDayString((String)"-", (int)0)) == 0) {
try {
m.put((Object)"createDate", m.get((Object)"createTime"));
}
catch (Exception e) {
e.printStackTrace();
}
}
++i;
}
}
map.put("totCnt", totCnt);
map.put("hmsBrdPostList", hmsBrdPostList);
}
private String selectHmsBrdNewPostList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdPostDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
searchVO.setPageUnit(this.propertiesService.getInt("pageUnit"));
searchVO.setPageSize(this.propertiesService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
searchVO.setSearchBrdDepth("0");
List hmsBrdPostList = null;
int totCnt = this.hmsBrdPostService.selectHmsBrdNewPostListTotCnt(searchVO);
if (totCnt != 0) {
hmsBrdPostList = this.hmsBrdPostService.selectHmsBrdNewPostList(searchVO);
int day = 3;
String today = EdosiDateUtil.getToDayString((String)"-", (int)(-day));
Calendar cal = Calendar.getInstance();
int i = 0;
while (i < hmsBrdPostList.size()) {
EgovMap m = (EgovMap)hmsBrdPostList.get(i);
if (("" + m.get((Object)"createDate")).compareTo(today) > 0) {
m.put((Object)"newPost", (Object)"new");
}
String titleAlt = (String)m.get((Object)"title");
m.put((Object)"titleAlt", (Object)titleAlt);
if (("" + m.get((Object)"createDate")).compareTo(EdosiDateUtil.getToDayString((String)"-", (int)0)) == 0) {
try {
m.put((Object)"createDate", m.get((Object)"createTime"));
}
catch (Exception e) {
e.printStackTrace();
}
}
++i;
}
}
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("resultList", (Object)hmsBrdPostList);
model.addAttribute("paginationInfo", (Object)paginationInfo);
return "/cms/hmsBrdPost/HmsBrdNewPostList";
}
private String addHmsBrdPostView(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdPostDefaultVO searchVO, Model model) throws Exception {
HmsBrdMngVO hmsBrdMngVO = new HmsBrdMngVO();
hmsBrdMngVO.setBrdMngSeq(searchVO.getBrdMngSeq());
hmsBrdMngVO = this.hmsBrdMngService.selectHmsBrdMng(hmsBrdMngVO);
HmsBrdPostVO hmsBrdPostVO = new HmsBrdPostVO();
if (hmsBrdMngVO.getCateMastSeq() != null && !hmsBrdMngVO.getCateMastSeq().equals("")) {
HmsBrdCateDefaultVO hmsBrdCateDefaultVO = new HmsBrdCateDefaultVO();
hmsBrdCateDefaultVO.setPageUseYn("N");
hmsBrdCateDefaultVO.setSearchCateMastSeq(hmsBrdMngVO.getCateMastSeq());
List cateList = this.hmsBrdCateService.selectHmsBrdCateList(hmsBrdCateDefaultVO);
model.addAttribute("cateList", (Object)cateList);
}
model.addAttribute("hmsBrdPostVO", (Object)hmsBrdPostVO);
model.addAttribute("hmsBrdMngVO", (Object)hmsBrdMngVO);
return "/cms/hmsBrdPost/" + hmsBrdMngVO.getBrdSkin() + "/HmsBrdPostRegister";
}
private String addHmsBrdReplyView(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdPostDefaultVO searchVO, Model model) throws Exception {
HmsBrdPostVO hmsBrdPostVO2 = new HmsBrdPostVO();
hmsBrdPostVO2.setBrdPostSeq(searchVO.getBrdPostSeq());
hmsBrdPostVO2.setBrdMngSeq(searchVO.getBrdMngSeq());
hmsBrdPostVO2 = this.hmsBrdPostService.selectHmsBrdPost(hmsBrdPostVO2);
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
HmsBrdPostVO hmsBrdPostVO = new HmsBrdPostVO();
hmsBrdPostVO.setUserId(loginVO.getId());
hmsBrdPostVO.setUserNm(loginVO.getName());
hmsBrdPostVO.setTitle(hmsBrdPostVO2.getTitle());
hmsBrdPostVO.setContents("\n\n\n\n\n====================원본 메세지==================\n" + hmsBrdPostVO2.getContents());
hmsBrdPostVO.setBrdSort(hmsBrdPostVO2.getBrdSort());
hmsBrdPostVO.setBrdGroup(hmsBrdPostVO2.getBrdGroup());
hmsBrdPostVO.setBrdDepth(hmsBrdPostVO2.getBrdDepth());
HmsBrdMngVO hmsBrdMngVO = new HmsBrdMngVO();
hmsBrdMngVO.setBrdMngSeq(searchVO.getBrdMngSeq());
hmsBrdMngVO = this.hmsBrdMngService.selectHmsBrdMng(hmsBrdMngVO);
model.addAttribute("hmsBrdMngVO", (Object)hmsBrdMngVO);
model.addAttribute("hmsBrdPostVO", (Object)hmsBrdPostVO);
model.addAttribute("hmsBrdPostVO2", (Object)hmsBrdPostVO2);
return "/cms/hmsBrdPost/" + hmsBrdMngVO.getBrdSkin() + "/HmsBrdPostRegister";
}
@RequestMapping(value={"/hms/hmsBrdPost/addHmsBrdPost.do"})
public String addHmsBrdPost(MultipartHttpServletRequest request, HttpServletResponse response, HmsBrdPostVO hmsBrdPostVO, @ModelAttribute(value="searchVO") HmsBrdPostDefaultVO searchVO, SessionStatus status) throws Exception {
block5: {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
HmsBrdMngVO hmsBrdMngVO = new HmsBrdMngVO();
hmsBrdMngVO.setBrdMngSeq(searchVO.getBrdMngSeq());
hmsBrdMngVO = this.hmsBrdMngService.selectHmsBrdMng(hmsBrdMngVO);
String white = this.hmsBrdPostService.checkFileWhiteList(request, "file_", hmsBrdMngVO.getAtchWhite());
if (white == null) break block5;
DwrCommonService.alertAndBack((HttpServletResponse)response, (String)("유효하지 않은 첨부파일(" + white + ")이 있습니다. 다시 확인해주세요."));
return null;
}
try {
this.hmsBrdPostService.insertHmsBrdPost(hmsBrdPostVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
return "redirect:" + searchVO.getParentUrl();
}
@RequestMapping(value={"/hms/hmsBrdPost/addHmsBrdReply.do"})
public String addHmsBrdReply(MultipartHttpServletRequest request, HttpServletResponse response, HmsBrdPostVO hmsBrdPostVO, @ModelAttribute(value="searchVO") HmsBrdPostDefaultVO searchVO, SessionStatus status) throws Exception {
block5: {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
HmsBrdMngVO hmsBrdMngVO = new HmsBrdMngVO();
hmsBrdMngVO.setBrdMngSeq(searchVO.getBrdMngSeq());
hmsBrdMngVO = this.hmsBrdMngService.selectHmsBrdMng(hmsBrdMngVO);
String white = this.hmsBrdPostService.checkFileWhiteList(request, "file_", hmsBrdMngVO.getAtchWhite());
if (white == null) break block5;
DwrCommonService.alertAndBack((HttpServletResponse)response, (String)("유효하지 않은 첨부파일(" + white + ")이 있습니다. 다시 확인해주세요."));
return null;
}
try {
this.hmsBrdPostService.insertHmsBrdPostReply(hmsBrdPostVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
return "redirect:" + searchVO.getParentUrl();
}
@RequestMapping(value={"/hms/hmsBrdPost/addHmsBrdComment.do"})
public String addHmsBrdComment(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="commentVO") HmsBrdCommentDefaultVO commentVO, SessionStatus status) throws Exception {
HmsBrdCommentVO hmsBrdCommentVO = new HmsBrdCommentVO();
hmsBrdCommentVO.setBrdPostSeq(commentVO.getBrdPostSeq());
hmsBrdCommentVO.setContents(commentVO.getContents());
hmsBrdCommentVO.setUserId(commentVO.getUserId());
hmsBrdCommentVO.setUserNm(commentVO.getUserNm());
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
this.hmsBrdCommentService.insertHmsBrdComment(hmsBrdCommentVO, request);
status.setComplete();
return "redirect:" + commentVO.getParentUrl() + commentVO.toParam() + "&brdPostSeq=" + commentVO.getBrdPostSeq();
}
@RequestMapping(value={"/hms/hmsBrdPost/deleteHmsBrdComment.do"})
public String deleteHmsBrdComment(HttpServletRequest request, HttpServletResponse response, HmsBrdCommentVO hmsBrdCommentVO, @ModelAttribute(value="commentVO") HmsBrdCommentDefaultVO commentVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
this.hmsBrdCommentService.deleteHmsBrdComment(hmsBrdCommentVO, request);
status.setComplete();
if (commentVO.getSearchKeyword() != null && !commentVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)commentVO.getSearchKeyword());
}
return "redirect:" + commentVO.getParentUrl() + commentVO.toParam();
}
private String updateHmsBrdPost(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdPostDefaultVO searchVO, Model model) throws Exception {
HmsBrdPostVO hmsBrdPostVO = new HmsBrdPostVO();
hmsBrdPostVO.setBrdPostSeq(searchVO.getBrdPostSeq());
hmsBrdPostVO.setBrdMngSeq(searchVO.getBrdMngSeq());
hmsBrdPostVO = this.hmsBrdPostService.selectHmsBrdPost(hmsBrdPostVO);
HmsBrdMngVO hmsBrdMngVO = new HmsBrdMngVO();
hmsBrdMngVO.setBrdMngSeq(searchVO.getBrdMngSeq());
hmsBrdMngVO = this.hmsBrdMngService.selectHmsBrdMng(hmsBrdMngVO);
if (!this.checkWriteAuth(hmsBrdPostVO)) {
return "cmm/privilegeError";
}
if (hmsBrdMngVO.getCateMastSeq() != null && !hmsBrdMngVO.getCateMastSeq().equals("")) {
HmsBrdCateDefaultVO hmsBrdCateDefaultVO = new HmsBrdCateDefaultVO();
hmsBrdCateDefaultVO.setPageUseYn("N");
hmsBrdCateDefaultVO.setSearchCateMastSeq(hmsBrdMngVO.getCateMastSeq());
List cateList = this.hmsBrdCateService.selectHmsBrdCateList(hmsBrdCateDefaultVO);
model.addAttribute("cateList", (Object)cateList);
}
model.addAttribute("hmsBrdMngVO", (Object)hmsBrdMngVO);
model.addAttribute("hmsBrdPostVO", (Object)hmsBrdPostVO);
return "/cms/hmsBrdPost/" + hmsBrdMngVO.getBrdSkin() + "/HmsBrdPostRegister";
}
@RequestMapping(value={"/hms/hmsBrdPost/updateHmsBrdPost.do"})
public String updateHmsBrdPost(MultipartHttpServletRequest request, HttpServletResponse response, HmsBrdPostVO hmsBrdPostVO, @ModelAttribute(value="searchVO") HmsBrdPostDefaultVO searchVO, SessionStatus status) throws Exception {
block7: {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
if (!this.checkWriteAuth(hmsBrdPostVO)) {
return "cmm/privilegeError";
}
HmsBrdMngVO hmsBrdMngVO = new HmsBrdMngVO();
hmsBrdMngVO.setBrdMngSeq(searchVO.getBrdMngSeq());
hmsBrdMngVO = this.hmsBrdMngService.selectHmsBrdMng(hmsBrdMngVO);
String white = this.hmsBrdPostService.checkFileWhiteList(request, "file_", hmsBrdMngVO.getAtchWhite());
if (white == null) break block7;
DwrCommonService.alertAndBack((HttpServletResponse)response, (String)("유효하지 않은 첨부파일(" + white + ")이 있습니다. 다시 확인해주세요."));
return null;
}
try {
this.hmsBrdPostService.updateHmsBrdPost(hmsBrdPostVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + searchVO.getParentUrl() + searchVO.toParam() + "&brdPostSeq=" + hmsBrdPostVO.getBrdPostSeq();
}
private String selectHmsBrdPost(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsBrdPostDefaultVO searchVO, Model model, SessionStatus status) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
HmsBrdMngVO hmsBrdMngVO = new HmsBrdMngVO();
hmsBrdMngVO.setBrdMngSeq(searchVO.getBrdMngSeq());
hmsBrdMngVO = this.hmsBrdMngService.selectHmsBrdMng(hmsBrdMngVO);
model.addAttribute("hmsBrdMngVO", (Object)hmsBrdMngVO);
try {
HmsBrdPostVO hmsBrdPostVO = new HmsBrdPostVO();
hmsBrdPostVO.setBrdPostSeq(searchVO.getBrdPostSeq());
hmsBrdPostVO.setBrdMngSeq(searchVO.getBrdMngSeq());
this.hmsBrdPostService.updateIncrementHit(hmsBrdPostVO);
hmsBrdPostVO = this.hmsBrdPostService.selectHmsBrdPost(hmsBrdPostVO);
if (hmsBrdMngVO.getShowWriteTime() != null && ("" + hmsBrdPostVO.getCreateDate()).compareTo(EdosiDateUtil.getToDayString((String)"-", (int)0)) == 0) {
String createTime = hmsBrdPostVO.getCreateTime();
model.addAttribute("createDate", (Object)createTime);
} else {
model.addAttribute("createDate", (Object)hmsBrdPostVO.getCreateDate());
}
model.addAttribute("hmsBrdPostVO", (Object)hmsBrdPostVO);
HmsBrdCommentVO hmsBrdCommentVO = new HmsBrdCommentVO();
hmsBrdCommentVO.setBrdPostSeq(searchVO.getBrdPostSeq());
hmsBrdCommentVO.setBrdMngSeq(searchVO.getBrdMngSeq());
model.addAttribute("hmsBrdCommentVO", (Object)hmsBrdCommentVO);
HmsBrdCommentDefaultVO hmsBrdCommentDefaultVO = new HmsBrdCommentDefaultVO();
hmsBrdCommentDefaultVO.setBrdPostSeq(searchVO.getBrdPostSeq());
List commentList = this.hmsBrdCommentService.selectHmsBrdCommentList(hmsBrdCommentDefaultVO);
String cate = hmsBrdPostVO.getCateSeq();
if (cate != null && !cate.equals("")) {
HmsBrdCateVO hmsBrdCateVO = new HmsBrdCateVO();
hmsBrdCateVO.setCateSeq(cate);
try {
hmsBrdCateVO = this.hmsBrdCateService.selectHmsBrdCate(hmsBrdCateVO);
model.addAttribute("hmsBrdCateVO", (Object)hmsBrdCateVO);
}
catch (Exception e) {
System.out.println("Category is not exists");
}
}
model.addAttribute("hmsBrdCommentDefaultVO", (Object)hmsBrdCommentDefaultVO);
model.addAttribute("commentList", (Object)commentList);
model.addAttribute("checkWriteAuth", (Object)this.checkWriteAuth(hmsBrdPostVO));
}
catch (Exception e) {
e.printStackTrace();
}
return "/cms/hmsBrdPost/" + hmsBrdMngVO.getBrdSkin() + "/HmsBrdPostDetail";
}
@RequestMapping(value={"/hms/hmsBrdPost/deleteHmsBrdPost.do"})
public String deleteHmsBrdPost(HttpServletRequest request, HttpServletResponse response, HmsBrdPostVO hmsBrdPostVO, @ModelAttribute(value="searchVO") HmsBrdPostDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
if (!this.checkWriteAuth(hmsBrdPostVO)) {
return "cmm/privilegeError";
}
try {
this.hmsBrdPostService.deleteHmsBrdPost(hmsBrdPostVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + searchVO.getParentUrl() + searchVO.toParam();
}
@RequestMapping(value={"/hms/hmsBrdPost/deleteHmsBrdPostDirect.do"})
public String deleteHmsBrdPostDirect(HttpServletRequest request, HttpServletResponse response) throws Exception {
HmsBrdPostDefaultVO searchVO = new HmsBrdPostDefaultVO();
searchVO.setParentUrl(request.getParameter("parentUrl"));
searchVO.setBrdMngSeq(request.getParameter("brdMngSeq"));
HmsBrdPostVO hmsBrdPostVO = new HmsBrdPostVO();
hmsBrdPostVO.setBrdMngSeq(request.getParameter("brdMngSeq"));
hmsBrdPostVO.setBrdPostSeq(request.getParameter("brdPostSeq"));
hmsBrdPostVO = this.hmsBrdPostService.selectHmsBrdPost(hmsBrdPostVO);
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
if (!this.checkWriteAuth(hmsBrdPostVO)) {
return "cmm/privilegeError";
}
try {
this.hmsBrdPostService.deleteHmsBrdPost(hmsBrdPostVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + searchVO.getParentUrl() + searchVO.toParam() + "&brdMngSeq=" + searchVO.getBrdMngSeq();
}
private boolean checkWriteAuth(HmsBrdPostVO hmsBrdPostVO) {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
if (UserDetailsHelper.isRole((String)"ROLE_BOARD").booleanValue()) {
return true;
}
if (UserDetailsHelper.isRole((String)"ROLE_ADMIN").booleanValue()) {
return true;
}
if (hmsBrdPostVO != null && loginVO != null && loginVO.getId().equals(hmsBrdPostVO.getUserId())) {
return true;
}
HmsBrdMngVO hmsBrdMngVO = new HmsBrdMngVO();
hmsBrdMngVO.setBrdMngSeq(hmsBrdPostVO.getBrdMngSeq());
try {
hmsBrdMngVO = this.hmsBrdMngService.selectHmsBrdMng(hmsBrdMngVO);
return hmsBrdMngVO.getManager() != null && (hmsBrdMngVO.getManager().indexOf(loginVO.getId()) > -1 || hmsBrdMngVO.getManager().equals("ALL"));
}
catch (Exception e) {
e.printStackTrace();
return false;
}
}
}

View File

@@ -0,0 +1,54 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.code.dao.ComtccmmndetailcodeDAO
* egovframework.cms.code.vo.ComtccmmndetailcodeDefaultVO
* egovframework.cms.code.vo.ComtccmmndetailcodeVO
* egovframework.com.cmm.service.impl.EgovComAbstractDAO
* org.springframework.stereotype.Repository
*/
package egovframework.cms.code.dao;
import egovframework.cms.code.vo.ComtccmmndetailcodeDefaultVO;
import egovframework.cms.code.vo.ComtccmmndetailcodeVO;
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
import java.util.List;
import org.springframework.stereotype.Repository;
@Repository(value="comtccmmndetailcodeDAO")
public class ComtccmmndetailcodeDAO
extends EgovComAbstractDAO {
public String insertComtccmmndetailcode(ComtccmmndetailcodeVO vo) throws Exception {
return (String)this.insert("comtccmmndetailcodeDAO.insertComtccmmndetailcode_S", (Object)vo);
}
public void updateComtccmmndetailcode(ComtccmmndetailcodeVO vo) throws Exception {
this.update("comtccmmndetailcodeDAO.updateComtccmmndetailcode_S", (Object)vo);
}
public void deleteComtccmmndetailcode(ComtccmmndetailcodeVO vo) throws Exception {
this.delete("comtccmmndetailcodeDAO.deleteComtccmmndetailcode_S", (Object)vo);
}
public ComtccmmndetailcodeVO selectComtccmmndetailcode(ComtccmmndetailcodeVO vo) throws Exception {
return (ComtccmmndetailcodeVO)this.selectByPk("comtccmmndetailcodeDAO.selectComtccmmndetailcode_S", (Object)vo);
}
public List selectComtccmmndetailcodeList(ComtccmmndetailcodeDefaultVO searchVO) throws Exception {
return this.list("comtccmmndetailcodeDAO.selectComtccmmndetailcodeList_D", (Object)searchVO);
}
public int selectComtccmmndetailcodeListTotCnt(ComtccmmndetailcodeDefaultVO searchVO) {
return (Integer)this.getSqlMapClientTemplate().queryForObject("comtccmmndetailcodeDAO.selectComtccmmndetailcodeListTotCnt_S", (Object)searchVO);
}
public List selectComtccmmncodeList(ComtccmmndetailcodeVO vo) throws Exception {
return this.list("comtccmmndetailcodeDAO.selectComtccmmncodeList", (Object)vo);
}
public int selectComtccmmncodeMax(ComtccmmndetailcodeVO vo) throws Exception {
return (Integer)this.getSqlMapClientTemplate().queryForObject("comtccmmndetailcodeDAO.selectComtccmmncodeMax", (Object)vo);
}
}

View File

@@ -0,0 +1,32 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.code.service.ComtccmmndetailcodeService
* egovframework.cms.code.vo.ComtccmmndetailcodeDefaultVO
* egovframework.cms.code.vo.ComtccmmndetailcodeVO
* egovframework.rte.psl.dataaccess.util.EgovMap
*/
package egovframework.cms.code.service;
import egovframework.cms.code.vo.ComtccmmndetailcodeDefaultVO;
import egovframework.cms.code.vo.ComtccmmndetailcodeVO;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import java.util.List;
public interface ComtccmmndetailcodeService {
public String insertComtccmmndetailcode(ComtccmmndetailcodeVO var1) throws Exception;
public void updateComtccmmndetailcode(ComtccmmndetailcodeVO var1) throws Exception;
public void deleteComtccmmndetailcode(ComtccmmndetailcodeVO var1) throws Exception;
public ComtccmmndetailcodeVO selectComtccmmndetailcode(ComtccmmndetailcodeVO var1) throws Exception;
public List selectComtccmmndetailcodeList(ComtccmmndetailcodeDefaultVO var1) throws Exception;
public int selectComtccmmndetailcodeListTotCnt(ComtccmmndetailcodeDefaultVO var1);
public List<EgovMap> selectComtccmmncodeList(ComtccmmndetailcodeVO var1) throws Exception;
}

View File

@@ -0,0 +1,64 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.code.dao.ComtccmmndetailcodeDAO
* egovframework.cms.code.service.ComtccmmndetailcodeService
* egovframework.cms.code.service.impl.ComtccmmndetailcodeServiceImpl
* egovframework.cms.code.vo.ComtccmmndetailcodeDefaultVO
* egovframework.cms.code.vo.ComtccmmndetailcodeVO
* egovframework.rte.psl.dataaccess.util.EgovMap
* javax.annotation.Resource
* org.springframework.stereotype.Service
*/
package egovframework.cms.code.service.impl;
import egovframework.cms.code.dao.ComtccmmndetailcodeDAO;
import egovframework.cms.code.service.ComtccmmndetailcodeService;
import egovframework.cms.code.vo.ComtccmmndetailcodeDefaultVO;
import egovframework.cms.code.vo.ComtccmmndetailcodeVO;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
@Service(value="comtccmmndetailcodeService")
public class ComtccmmndetailcodeServiceImpl
implements ComtccmmndetailcodeService {
@Resource(name="comtccmmndetailcodeDAO")
private ComtccmmndetailcodeDAO comtccmmndetailcodeDAO;
public String insertComtccmmndetailcode(ComtccmmndetailcodeVO vo) throws Exception {
int max = this.comtccmmndetailcodeDAO.selectComtccmmncodeMax(vo);
String maxStr = String.format("%03d", max);
vo.setCode(String.valueOf(vo.getCodeId()) + maxStr);
this.comtccmmndetailcodeDAO.insertComtccmmndetailcode(vo);
return null;
}
public void updateComtccmmndetailcode(ComtccmmndetailcodeVO vo) throws Exception {
this.comtccmmndetailcodeDAO.updateComtccmmndetailcode(vo);
}
public void deleteComtccmmndetailcode(ComtccmmndetailcodeVO vo) throws Exception {
this.comtccmmndetailcodeDAO.deleteComtccmmndetailcode(vo);
}
public ComtccmmndetailcodeVO selectComtccmmndetailcode(ComtccmmndetailcodeVO vo) throws Exception {
ComtccmmndetailcodeVO resultVO = this.comtccmmndetailcodeDAO.selectComtccmmndetailcode(vo);
return resultVO;
}
public List selectComtccmmndetailcodeList(ComtccmmndetailcodeDefaultVO searchVO) throws Exception {
return this.comtccmmndetailcodeDAO.selectComtccmmndetailcodeList(searchVO);
}
public int selectComtccmmndetailcodeListTotCnt(ComtccmmndetailcodeDefaultVO searchVO) {
return this.comtccmmndetailcodeDAO.selectComtccmmndetailcodeListTotCnt(searchVO);
}
public List<EgovMap> selectComtccmmncodeList(ComtccmmndetailcodeVO vo) throws Exception {
return this.comtccmmndetailcodeDAO.selectComtccmmncodeList(vo);
}
}

View File

@@ -0,0 +1,170 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.code.vo.ComtccmmndetailcodeDefaultVO
* org.apache.commons.lang.builder.ToStringBuilder
*/
package egovframework.cms.code.vo;
import java.io.Serializable;
import org.apache.commons.lang.builder.ToStringBuilder;
public class ComtccmmndetailcodeDefaultVO
implements Serializable {
private String searchCondition = "";
private String searchKeyword = "";
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 String bmode;
private String parentUrl;
private String pageUseYn = "Y";
private String orderby;
private String code;
private String codeId;
public void setOrderby(String orderby) {
this.orderby = orderby;
}
public String getOrderby() {
return this.orderby;
}
public void setBmode(String bmode) {
this.bmode = bmode;
}
public String getBmode() {
return this.bmode;
}
public void setParentUrl(String parentUrl) {
this.parentUrl = parentUrl;
}
public String getParentUrl() {
return this.parentUrl;
}
public void setPageUseYn(String pageUseYn) {
this.pageUseYn = pageUseYn;
}
public String getPageUseYn() {
return this.pageUseYn;
}
public String toParam() {
StringBuilder sb = new StringBuilder();
sb.append("?pageIndex=" + this.pageIndex);
if (!this.bmode.equals("")) {
sb.append("&bmode=" + this.bmode);
}
if (!this.searchCondition.equals("")) {
sb.append("&searchCondition=" + this.searchCondition);
}
if (!this.searchKeyword.equals("")) {
sb.append("&searchKeyword=" + this.searchKeyword);
}
return sb.toString();
}
public int getFirstIndex() {
return this.firstIndex;
}
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
public int getLastIndex() {
return this.lastIndex;
}
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
public int getRecordCountPerPage() {
return this.recordCountPerPage;
}
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
public String getSearchCondition() {
return this.searchCondition;
}
public void setSearchCondition(String searchCondition) {
this.searchCondition = searchCondition;
}
public String getSearchKeyword() {
return this.searchKeyword;
}
public void setSearchKeyword(String searchKeyword) {
this.searchKeyword = searchKeyword;
}
public String getSearchUseYn() {
return this.searchUseYn;
}
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
public int getPageIndex() {
return this.pageIndex;
}
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
public int getPageUnit() {
return this.pageUnit;
}
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
public int getPageSize() {
return this.pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public String toString() {
return ToStringBuilder.reflectionToString((Object)this);
}
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public void setCodeId(String codeId) {
this.codeId = codeId;
}
public String getCodeId() {
return this.codeId;
}
}

View File

@@ -0,0 +1,107 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.code.vo.ComtccmmndetailcodeDefaultVO
* egovframework.cms.code.vo.ComtccmmndetailcodeVO
*/
package egovframework.cms.code.vo;
import egovframework.cms.code.vo.ComtccmmndetailcodeDefaultVO;
import java.util.Date;
public class ComtccmmndetailcodeVO
extends ComtccmmndetailcodeDefaultVO {
private static final long serialVersionUID = 1L;
private String codeId;
private String code;
private String codeNm;
private String codeDc;
private String useAt;
private Date frstRegistPnttm;
private String frstRegisterId;
private Date lastUpdtPnttm;
private String lastUpdusrId;
private String sort;
public String getCodeId() {
return this.codeId;
}
public void setCodeId(String codeId) {
this.codeId = codeId;
}
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public String getCodeNm() {
return this.codeNm;
}
public void setCodeNm(String codeNm) {
this.codeNm = codeNm;
}
public String getCodeDc() {
return this.codeDc;
}
public void setCodeDc(String codeDc) {
this.codeDc = codeDc;
}
public String getUseAt() {
return this.useAt;
}
public void setUseAt(String useAt) {
this.useAt = useAt;
}
public Date getFrstRegistPnttm() {
return this.frstRegistPnttm;
}
public void setFrstRegistPnttm(Date frstRegistPnttm) {
this.frstRegistPnttm = frstRegistPnttm;
}
public String getFrstRegisterId() {
return this.frstRegisterId;
}
public void setFrstRegisterId(String frstRegisterId) {
this.frstRegisterId = frstRegisterId;
}
public Date getLastUpdtPnttm() {
return this.lastUpdtPnttm;
}
public void setLastUpdtPnttm(Date lastUpdtPnttm) {
this.lastUpdtPnttm = lastUpdtPnttm;
}
public String getLastUpdusrId() {
return this.lastUpdusrId;
}
public void setLastUpdusrId(String lastUpdusrId) {
this.lastUpdusrId = lastUpdusrId;
}
public void setSort(String sort) {
this.sort = sort;
}
public String getSort() {
return this.sort;
}
}

View File

@@ -0,0 +1,234 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.code.service.ComtccmmndetailcodeService
* egovframework.cms.code.vo.ComtccmmndetailcodeDefaultVO
* egovframework.cms.code.vo.ComtccmmndetailcodeVO
* egovframework.cms.code.web.ComtccmmndetailcodeController
* egovframework.com.cmm.LoginVO
* egovframework.common.dwr.DwrCommonService
* egovframework.edosi.common.code.CodeResource
* egovframework.edosi.egov.helper.UserDetailsHelper
* egovframework.rte.fdl.property.EgovPropertyService
* egovframework.rte.psl.dataaccess.util.EgovMap
* egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo
* javax.annotation.Resource
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.ModelAttribute
* org.springframework.web.bind.annotation.RequestMapping
* org.springframework.web.bind.annotation.SessionAttributes
* org.springframework.web.bind.support.SessionStatus
*/
package egovframework.cms.code.web;
import egovframework.cms.code.service.ComtccmmndetailcodeService;
import egovframework.cms.code.vo.ComtccmmndetailcodeDefaultVO;
import egovframework.cms.code.vo.ComtccmmndetailcodeVO;
import egovframework.com.cmm.LoginVO;
import egovframework.common.dwr.DwrCommonService;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigDecimal;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
@Controller
@SessionAttributes(types={ComtccmmndetailcodeVO.class})
public class ComtccmmndetailcodeController {
@Resource(name="comtccmmndetailcodeService")
private ComtccmmndetailcodeService comtccmmndetailcodeService;
@Resource(name="propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="codeResource")
private CodeResource codeResource;
@Resource(name="dwrCommonService")
private DwrCommonService dwrCommonService;
@RequestMapping(value={"/hms/comtccmmndetailcode/comtccmmndetailcodeIndex.do"})
public String comtccmmndetailcodeIndex(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") ComtccmmndetailcodeDefaultVO searchVO, ModelMap modelMap, Model model) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/privilegeError";
}
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = this.selectComtccmmndetailcodeList(request, response, searchVO, model);
} else if (bmode.equals("detail")) {
viewName = this.selectComtccmmndetailcode(request, response, searchVO, model);
} else if (bmode.equals("add")) {
viewName = this.addComtccmmndetailcodeView(request, response, searchVO, model);
} else if (bmode.equals("modify")) {
viewName = this.updateComtccmmndetailcode(request, response, searchVO, model);
}
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
model.addAttribute("bmode", (Object)bmode);
model.addAttribute("loginVO", (Object)loginVO);
model.addAttribute("ROLE_ADMIN", (Object)UserDetailsHelper.isRole((String)"ROLE_ADMIN"));
return viewName;
}
private String selectComtccmmndetailcodeList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") ComtccmmndetailcodeDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
searchVO.setPageUnit(this.propertiesService.getInt("pageUnit"));
searchVO.setPageSize(this.propertiesService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
List comtccmmndetailcodeList = this.comtccmmndetailcodeService.selectComtccmmndetailcodeList(searchVO);
model.addAttribute("resultList", (Object)comtccmmndetailcodeList);
int totCnt = this.comtccmmndetailcodeService.selectComtccmmndetailcodeListTotCnt(searchVO);
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", (Object)paginationInfo);
return "/cms/comtccmmndetailcode/ComtccmmndetailcodeList";
}
private String addComtccmmndetailcodeView(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") ComtccmmndetailcodeDefaultVO searchVO, Model model) throws Exception {
try {
List comtccmmncodeList = this.comtccmmndetailcodeService.selectComtccmmncodeList(null);
ComtccmmndetailcodeVO comtccmmndetailcodeVO = new ComtccmmndetailcodeVO();
comtccmmndetailcodeVO.setUseAt("Y");
if (comtccmmncodeList.size() > 0) {
String codeId = (String)((EgovMap)comtccmmncodeList.get(0)).get((Object)"codeId");
ComtccmmndetailcodeDefaultVO comtccmmndetailcodeDefaultVO = new ComtccmmndetailcodeDefaultVO();
comtccmmndetailcodeDefaultVO.setPageUseYn("N");
comtccmmndetailcodeDefaultVO.setSearchCondition("3");
comtccmmndetailcodeDefaultVO.setSearchKeyword(codeId);
List sortList = this.comtccmmndetailcodeService.selectComtccmmndetailcodeList(comtccmmndetailcodeDefaultVO);
if (((EgovMap)sortList.get(sortList.size() - 1)).get((Object)"sort") != null) {
System.out.println(((EgovMap)sortList.get(sortList.size() - 1)).get((Object)"sort") + " " + ((EgovMap)sortList.get(sortList.size() - 1)).get((Object)"sort").getClass());
comtccmmndetailcodeVO.setSort(String.valueOf(Integer.parseInt((String)((EgovMap)sortList.get(sortList.size() - 1)).get((Object)"sort")) + 10));
}
}
model.addAttribute("comtccmmndetailcodeVO", (Object)comtccmmndetailcodeVO);
model.addAttribute("comtccmmncode", (Object)comtccmmncodeList);
}
catch (Exception e) {
e.printStackTrace();
}
return "/cms/comtccmmndetailcode/ComtccmmndetailcodeRegister";
}
@RequestMapping(value={"/hms/comtccmmndetailcode/addComtccmmndetailcode.do"})
public String addComtccmmndetailcode(HttpServletRequest request, ComtccmmndetailcodeVO comtccmmndetailcodeVO, @ModelAttribute(value="searchVO") ComtccmmndetailcodeDefaultVO searchVO, SessionStatus status) throws Exception {
UserDetailsHelper.isAuthenticated().booleanValue();
this.comtccmmndetailcodeService.insertComtccmmndetailcode(comtccmmndetailcodeVO);
status.setComplete();
this.codeResource.setCodeList(comtccmmndetailcodeVO.getCodeId());
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), request);
}
private String updateComtccmmndetailcode(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") ComtccmmndetailcodeDefaultVO searchVO, Model model) throws Exception {
ComtccmmndetailcodeVO comtccmmndetailcodeVO = new ComtccmmndetailcodeVO();
comtccmmndetailcodeVO.setCode(searchVO.getCode());
comtccmmndetailcodeVO.setCodeId(searchVO.getCodeId());
comtccmmndetailcodeVO = this.comtccmmndetailcodeService.selectComtccmmndetailcode(comtccmmndetailcodeVO);
if (!this.checkWriteAuth(comtccmmndetailcodeVO)) {
return "cmm/privilegeError";
}
List comtccmmncodeList = this.comtccmmndetailcodeService.selectComtccmmncodeList(comtccmmndetailcodeVO);
model.addAttribute("comtccmmndetailcodeVO", (Object)comtccmmndetailcodeVO);
model.addAttribute("comtccmmncode", comtccmmncodeList.get(0));
return "/cms/comtccmmndetailcode/ComtccmmndetailcodeRegister";
}
@RequestMapping(value={"/hms/comtccmmndetailcode/updateComtccmmndetailcode.do"})
public String updateComtccmmndetailcode(HttpServletRequest request, ComtccmmndetailcodeVO comtccmmndetailcodeVO, @ModelAttribute(value="searchVO") ComtccmmndetailcodeDefaultVO searchVO, SessionStatus status) throws Exception {
UserDetailsHelper.isAuthenticated().booleanValue();
if (!this.checkWriteAuth(comtccmmndetailcodeVO)) {
return "cmm/privilegeError";
}
this.comtccmmndetailcodeService.updateComtccmmndetailcode(comtccmmndetailcodeVO);
status.setComplete();
this.codeResource.setCodeList(comtccmmndetailcodeVO.getCodeId());
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), request) + searchVO.toParam() + "&code=" + comtccmmndetailcodeVO.getCode() + "&codeId=" + comtccmmndetailcodeVO.getCodeId();
}
private String selectComtccmmndetailcode(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") ComtccmmndetailcodeDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
ComtccmmndetailcodeVO comtccmmndetailcodeVO = new ComtccmmndetailcodeVO();
comtccmmndetailcodeVO.setCode(searchVO.getCode());
comtccmmndetailcodeVO.setCodeId(searchVO.getCodeId());
comtccmmndetailcodeVO = this.comtccmmndetailcodeService.selectComtccmmndetailcode(comtccmmndetailcodeVO);
List comtccmmncodeList = this.comtccmmndetailcodeService.selectComtccmmncodeList(comtccmmndetailcodeVO);
model.addAttribute("comtccmmncode", comtccmmncodeList.get(0));
model.addAttribute("comtccmmndetailcodeVO", (Object)comtccmmndetailcodeVO);
model.addAttribute("checkWriteAuth", (Object)this.checkWriteAuth(comtccmmndetailcodeVO));
return "/cms/comtccmmndetailcode/ComtccmmndetailcodeDetail";
}
@RequestMapping(value={"/hms/comtccmmndetailcode/deleteComtccmmndetailcode.do"})
public String deleteComtccmmndetailcode(HttpServletRequest request, ComtccmmndetailcodeVO comtccmmndetailcodeVO, @ModelAttribute(value="searchVO") ComtccmmndetailcodeDefaultVO searchVO, SessionStatus status) throws Exception {
UserDetailsHelper.isAuthenticated().booleanValue();
if (!this.checkWriteAuth(comtccmmndetailcodeVO)) {
return "cmm/privilegeError";
}
this.comtccmmndetailcodeService.deleteComtccmmndetailcode(comtccmmndetailcodeVO);
status.setComplete();
this.codeResource.setCodeList(comtccmmndetailcodeVO.getCodeId());
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), request) + searchVO.toParam();
}
@RequestMapping(value={"/hms/comtccmmndetailcode/getSortByCodeId.do"})
private String getSortByCodeId(HttpServletRequest request, HttpServletResponse response) throws Exception {
try {
String codeId = request.getParameter("codeId");
ComtccmmndetailcodeDefaultVO comtccmmndetailcodeDefaultVO = new ComtccmmndetailcodeDefaultVO();
comtccmmndetailcodeDefaultVO.setPageUseYn("N");
comtccmmndetailcodeDefaultVO.setSearchCondition("3");
comtccmmndetailcodeDefaultVO.setSearchKeyword(codeId);
List sortList = this.comtccmmndetailcodeService.selectComtccmmndetailcodeList(comtccmmndetailcodeDefaultVO);
String sort = "";
sort = ((EgovMap)sortList.get(sortList.size() - 1)).get((Object)"sort") != null ? String.valueOf(((BigDecimal)((EgovMap)sortList.get(sortList.size() - 1)).get((Object)"sort")).intValue() + 10) : "10";
response.setContentType("text/html; charset=utf-8");
PrintWriter w = response.getWriter();
((Writer)w).write(sort);
((Writer)w).flush();
((Writer)w).close();
}
catch (Exception e) {
e.printStackTrace();
}
return null;
}
private boolean checkWriteAuth(ComtccmmndetailcodeVO comtccmmndetailcodeVO) {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
return UserDetailsHelper.isRole((String)"ROLE_ADMIN") != false;
}
}

View File

@@ -0,0 +1,50 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.content.dao.HmsContentDAO
* egovframework.cms.content.vo.HmsContentDefaultVO
* egovframework.cms.content.vo.HmsContentVO
* egovframework.com.cmm.service.impl.EgovComAbstractDAO
* org.springframework.stereotype.Repository
*/
package egovframework.cms.content.dao;
import egovframework.cms.content.vo.HmsContentDefaultVO;
import egovframework.cms.content.vo.HmsContentVO;
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
import java.util.List;
import org.springframework.stereotype.Repository;
@Repository(value="hmsContentDAO")
public class HmsContentDAO
extends EgovComAbstractDAO {
public String insertHmsContent(HmsContentVO vo) throws Exception {
return (String)this.insert("hmsContentDAO.insertHmsContent_S", (Object)vo);
}
public void updateHmsContent(HmsContentVO vo) throws Exception {
this.update("hmsContentDAO.updateHmsContent_S", (Object)vo);
}
public void deleteHmsContent(HmsContentVO vo) throws Exception {
this.delete("hmsContentDAO.deleteHmsContent_S", (Object)vo);
}
public HmsContentVO selectHmsContent(HmsContentVO vo) throws Exception {
return (HmsContentVO)this.selectByPk("hmsContentDAO.selectHmsContent_S", (Object)vo);
}
public List selectHmsContentList(HmsContentDefaultVO searchVO) throws Exception {
return this.list("hmsContentDAO.selectHmsContentList_D", (Object)searchVO);
}
public int selectHmsContentListTotCnt(HmsContentDefaultVO searchVO) {
return (Integer)this.getSqlMapClientTemplate().queryForObject("hmsContentDAO.selectHmsContentListTotCnt_S", (Object)searchVO);
}
public void updateHmsContentViewCnt(String seq) throws Exception {
this.update("hmsContentDAO.updateHmsContentViewCnt", (Object)seq);
}
}

View File

@@ -0,0 +1,34 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.content.service.HmsContentService
* egovframework.cms.content.vo.HmsContentDefaultVO
* egovframework.cms.content.vo.HmsContentVO
* javax.servlet.http.HttpServletRequest
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.content.service;
import egovframework.cms.content.vo.HmsContentDefaultVO;
import egovframework.cms.content.vo.HmsContentVO;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.multipart.MultipartHttpServletRequest;
public interface HmsContentService {
public String insertHmsContent(HmsContentVO var1, MultipartHttpServletRequest var2) throws Exception;
public void updateHmsContent(HmsContentVO var1, MultipartHttpServletRequest var2) throws Exception;
public void deleteHmsContent(HmsContentVO var1, HttpServletRequest var2) throws Exception;
public HmsContentVO selectHmsContent(HmsContentVO var1) throws Exception;
public List selectHmsContentList(HmsContentDefaultVO var1) throws Exception;
public int selectHmsContentListTotCnt(HmsContentDefaultVO var1);
public void updateHmsContentViewCnt(String var1) throws Exception;
}

View File

@@ -0,0 +1,243 @@
package egovframework.cms.content.service.impl;
import egovframework.cms.content.dao.HmsContentDAO;
import egovframework.cms.content.service.HmsContentService;
import egovframework.cms.content.vo.HmsContentDefaultVO;
import egovframework.cms.content.vo.HmsContentVO;
import egovframework.cms.log.service.HmsLogService;
import egovframework.cms.log.vo.HmsLogVO;
import egovframework.com.cmm.LoginVO;
import egovframework.com.cmm.service.EgovFileMngService;
import egovframework.com.cmm.service.EgovFileMngUtil;
import egovframework.com.cmm.service.FileVO;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.edosi.resource.EdosiResource;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import java.io.File;
import java.io.FileOutputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Service("hmsContentService")
public class HmsContentServiceImpl implements HmsContentService {
@Resource(name = "hmsContentDAO")
private HmsContentDAO hmsContentDAO;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileMngService;
@Resource(name = "EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name = "commonIdGnrService")
private EgovIdGnrService egovIdGnrService;
@Resource(name = "hmsLogService")
private HmsLogService hmsLogService;
private final String OBJ_CMS_CONTENT = "CMS_CONTENT";
public String insertHmsContent(HmsContentVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
vo.setContentSeq(this.egovIdGnrService.getNextStringId());
vo.setUserId(loginVO.getId());
vo.setUserNm(loginVO.getName());
String contentUrl = EdosiResource.getInstance().getValue("contents.url");
vo.setUrl("/" + vo.getTemplate() + contentUrl + vo.getContentSeq() + ".motion");
this.hmsContentDAO.insertHmsContent(vo);
makeFile(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getUniqId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_INSERT);
logVO.setLogObject("CMS_CONTENT");
logVO.setLogMessage("");
logVO.setSeq(vo.getContentSeq());
this.hmsLogService.insertHmsLog(logVO, null);
return null;
}
public void updateHmsContent(HmsContentVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
String contentUrl = EdosiResource.getInstance().getValue("contents.url");
vo.setUrl("/" + vo.getTemplate() + contentUrl + vo.getContentSeq() + ".motion");
this.hmsContentDAO.updateHmsContent(vo);
if (vo.getShow().equals("MNG001001")) {
makeFile(vo);
} else {
deleteFile(vo.getContentSeq());
}
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getUniqId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_UPDATE);
logVO.setLogObject("CMS_CONTENT");
logVO.setLogMessage("");
logVO.setSeq(vo.getContentSeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public void deleteHmsContent(HmsContentVO vo, HttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
this.hmsContentDAO.deleteHmsContent(vo);
deleteFile(vo.getContentSeq());
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getUniqId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_DELETE);
logVO.setLogObject("CMS_CONTENT");
logVO.setLogMessage("");
logVO.setSeq(vo.getContentSeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public HmsContentVO selectHmsContent(HmsContentVO vo) throws Exception {
HmsContentVO resultVO = this.hmsContentDAO.selectHmsContent(vo);
return resultVO;
}
public List selectHmsContentList(HmsContentDefaultVO searchVO) throws Exception {
return this.hmsContentDAO.selectHmsContentList(searchVO);
}
public int selectHmsContentListTotCnt(HmsContentDefaultVO searchVO) {
return this.hmsContentDAO.selectHmsContentListTotCnt(searchVO);
}
public void deleteFile(String seq) throws Exception {
String contentsDoc = EdosiResource.getInstance().getValue("contents.doc");
String contentsUrl = EdosiResource.getInstance().getValue("contents.url");
File f = new File(String.valueOf(contentsDoc) + contentsUrl + seq + ".jsp");
if (f.exists())
f.delete();
}
public void makeFile(HmsContentVO vo) throws Exception {
String contentsDoc = EdosiResource.getInstance().getValue("contents.doc");
String contentsUrl = EdosiResource.getInstance().getValue("contents.url");
String seq = vo.getContentSeq();
deleteFile(seq);
StringBuilder sb = new StringBuilder();
sb.append(makeContentHeader());
sb.append(vo.getContents());
sb.append(makeViewCountScript(seq));
String data = sb.toString();
File f = new File(String.valueOf(contentsDoc) + contentsUrl + seq + ".jsp");
FileOutputStream fos = new FileOutputStream(f);
fos.write(data.getBytes("utf8"));
fos.flush();
fos.close();
}
private String makeContentHeader() {
StringBuilder sb = new StringBuilder();
sb.append("<%@ page contentType=\"text/html; charset=utf-8\" pageEncoding=\"utf-8\"\n");
sb.append("%><%@ taglib prefix=\"c\" uri=\"http://java.sun.com/jsp/jstl/core\"\n");
sb.append("%>");
return sb.toString();
}
private String makeViewCountScript(String seq) {
StringBuilder sb = new StringBuilder();
sb.append("\n<script>\n");
sb.append("\t$.post('/hms/hmsContent/updateHmsContentViewCnt.do', {'content_seq':'" + seq + "'}, function(result) {});\n");
sb.append("</script>\n");
return sb.toString();
}
public String addMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
String fileId = "";
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
if (!fn.endsWith(".exe") && !fn.endsWith(".php") && !fn.endsWith(".jsp") && !fn.endsWith(".bat") && !fn.endsWith(".sh") && !fn.endsWith(".asp") &&
!fn.equals(""))
file.put(key, mf);
}
}
String _atchFileId = "";
if (!file.isEmpty()) {
List<FileVO> _result = null;
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
_atchFileId = this.fileMngService.insertFileInfs(_result);
}
fileId = _atchFileId;
}
return fileId;
}
public String updateMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm, String fileId, boolean multiple) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
if (!fn.endsWith(".exe") && !fn.endsWith(".php") && !fn.endsWith(".jsp") && !fn.endsWith(".bat") && !fn.endsWith(".sh") && !fn.endsWith(".asp") &&
!fn.equals(""))
file.put(key, mf);
}
}
String[] delcheck = multiRequest.getParameterValues("delcheck");
if (delcheck != null) {
FileVO fileVO = null;
for (int i = 0; i < delcheck.length; i++) {
String[] fileInf = delcheck[i].split("\\|");
fileVO = new FileVO();
fileVO.setAtchFileId(fileInf[0]);
fileVO.setFileSn(fileInf[1]);
this.fileMngService.deleteFileInf(fileVO);
}
}
if (!file.isEmpty()) {
List<FileVO> _result = null;
if (multiple) {
if (fileId == null || fileId.equals("")) {
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
} else {
FileVO fvo = new FileVO();
fvo.setAtchFileId(fileId);
int cnt = this.fileMngService.getMaxFileSN(fvo);
_result = this.fileUtil.parseFileInf(file, "FILE_", cnt, fileId, "");
this.fileMngService.updateFileInfs(_result);
}
} else {
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
}
}
if (fileId != null && !fileId.equals("")) {
FileVO fileVO = new FileVO();
fileVO.setAtchFileId(fileId);
List<FileVO> result = this.fileMngService.selectFileInfs(fileVO);
if (result.size() == 0)
fileId = "";
}
}
return fileId;
}
public void updateHmsContentViewCnt(String seq) throws Exception {
this.hmsContentDAO.updateHmsContentViewCnt(seq);
}
}

View File

@@ -0,0 +1,155 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.content.vo.HmsContentDefaultVO
*/
package egovframework.cms.content.vo;
import java.io.Serializable;
public class HmsContentDefaultVO
implements Serializable {
private String searchCondition;
private String searchKeyword;
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 String bmode;
private String parentUrl;
private String pageUseYn = "Y";
private String orderby;
private String contentSeq;
public void setSearchCondition(String searchCondition) {
this.searchCondition = searchCondition;
}
public String getSearchCondition() {
return this.searchCondition;
}
public void setSearchKeyword(String searchKeyword) {
this.searchKeyword = searchKeyword;
}
public String getSearchKeyword() {
return this.searchKeyword;
}
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
public String getSearchUseYn() {
return this.searchUseYn;
}
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
public int getPageIndex() {
return this.pageIndex;
}
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
public int getPageUnit() {
return this.pageUnit;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getPageSize() {
return this.pageSize;
}
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
public int getFirstIndex() {
return this.firstIndex;
}
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
public int getLastIndex() {
return this.lastIndex;
}
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
public int getRecordCountPerPage() {
return this.recordCountPerPage;
}
public void setBmode(String bmode) {
this.bmode = bmode;
}
public String getBmode() {
return this.bmode;
}
public void setParentUrl(String parentUrl) {
this.parentUrl = parentUrl;
}
public String getParentUrl() {
return this.parentUrl;
}
public void setPageUseYn(String pageUseYn) {
this.pageUseYn = pageUseYn;
}
public String getPageUseYn() {
return this.pageUseYn;
}
public void setOrderby(String orderby) {
this.orderby = orderby;
}
public String getOrderby() {
return this.orderby;
}
public void setContentSeq(String contentSeq) {
this.contentSeq = contentSeq;
}
public String getContentSeq() {
return this.contentSeq;
}
public String toParam() {
StringBuilder sb = new StringBuilder();
sb.append("?pageIndex=" + this.pageIndex);
if (!this.bmode.equals("")) {
sb.append("&bmode=" + this.bmode);
}
if (this.searchCondition != null && !this.searchCondition.equals("")) {
sb.append("&searchCondition=" + this.searchCondition);
}
if (this.searchKeyword != null && !this.searchKeyword.equals("")) {
sb.append("&searchKeyword=" + this.searchKeyword);
}
return sb.toString();
}
}

View File

@@ -0,0 +1,142 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.content.vo.HmsContentDefaultVO
* egovframework.cms.content.vo.HmsContentVO
*/
package egovframework.cms.content.vo;
import egovframework.cms.content.vo.HmsContentDefaultVO;
import java.sql.Date;
public class HmsContentVO
extends HmsContentDefaultVO {
private String contentSeq;
private String title;
private String contents;
private String recSts;
private String userId;
private String userNm;
private String managerId;
private String url;
private String show;
private Date createDate;
private Date updateDate;
private int viewCnt;
private String managerNm;
private String template;
public void setContentSeq(String contentSeq) {
this.contentSeq = contentSeq;
}
public String getContentSeq() {
return this.contentSeq;
}
public void setTitle(String title) {
this.title = title;
}
public String getTitle() {
return this.title;
}
public void setContents(String contents) {
this.contents = contents;
}
public String getContents() {
return this.contents;
}
public void setRecSts(String recSts) {
this.recSts = recSts;
}
public String getRecSts() {
return this.recSts;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserId() {
return this.userId;
}
public void setUserNm(String userNm) {
this.userNm = userNm;
}
public String getUserNm() {
return this.userNm;
}
public void setManagerId(String managerId) {
this.managerId = managerId;
}
public String getManagerId() {
return this.managerId;
}
public void setUrl(String url) {
this.url = url;
}
public String getUrl() {
return this.url;
}
public void setShow(String show) {
this.show = show;
}
public String getShow() {
return this.show;
}
public Date getCreateDate() {
return this.createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Date getUpdateDate() {
return this.updateDate;
}
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
public int getViewCnt() {
return this.viewCnt;
}
public void setViewCnt(int viewCnt) {
this.viewCnt = viewCnt;
}
public String getManagerNm() {
return this.managerNm;
}
public void setManagerNm(String managerNm) {
this.managerNm = managerNm;
}
public String getTemplate() {
return this.template;
}
public void setTemplate(String template) {
this.template = template;
}
}

View File

@@ -0,0 +1,263 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.content.service.HmsContentService
* egovframework.cms.content.vo.HmsContentDefaultVO
* egovframework.cms.content.vo.HmsContentVO
* egovframework.cms.content.web.HmsContentController
* egovframework.com.cmm.LoginVO
* egovframework.edosi.common.code.CodeResource
* egovframework.edosi.egov.helper.UserDetailsHelper
* egovframework.edosi.filter.XssFilter
* egovframework.edosi.resource.EdosiResource
* egovframework.rte.fdl.property.EgovPropertyService
* egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo
* javax.annotation.Resource
* javax.servlet.RequestDispatcher
* javax.servlet.ServletRequest
* javax.servlet.ServletResponse
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.ModelAttribute
* org.springframework.web.bind.annotation.RequestMapping
* org.springframework.web.bind.annotation.SessionAttributes
* org.springframework.web.bind.support.SessionStatus
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.content.web;
import egovframework.cms.content.service.HmsContentService;
import egovframework.cms.content.vo.HmsContentDefaultVO;
import egovframework.cms.content.vo.HmsContentVO;
import egovframework.com.cmm.LoginVO;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.edosi.filter.XssFilter;
import egovframework.edosi.resource.EdosiResource;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Controller
@SessionAttributes(types={HmsContentVO.class})
public class HmsContentController {
@Resource(name="hmsContentService")
private HmsContentService hmsContentService;
@Resource(name="propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="codeResource")
private CodeResource codeResource;
@RequestMapping(value={"/hms/hmsContent/hmsContentIndex.do"})
public String hmsContentIndex(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsContentDefaultVO searchVO, ModelMap modelMap, Model model) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = this.selectHmsContentList(request, response, searchVO, model);
} else if (bmode.equals("detail")) {
viewName = this.selectHmsContent(request, response, searchVO, model);
} else if (bmode.equals("add")) {
viewName = this.addHmsContentView(request, response, searchVO, model);
} else if (bmode.equals("modify")) {
viewName = this.updateHmsContent(request, response, searchVO, model);
}
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
model.addAttribute("bmode", (Object)bmode);
model.addAttribute("loginVO", (Object)loginVO);
this.initModelData(model, bmode);
return viewName;
}
private void initModelData(Model model, String bmode) throws Exception {
HashMap<String, String> param = new HashMap<String, String>();
param.put("show", "MNG001");
this.initModelData(param, model, bmode);
}
private void initModelData(Map param, Model model, String bmode) throws Exception {
Iterator<String> it = param.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
String value = (String)param.get(key);
model.addAttribute(key, (Object)this.codeResource.getCodeList(value));
if (bmode == null || !bmode.equals("add") && !bmode.equals("modify")) continue;
model.addAttribute(key, (Object)this.codeResource.removeCodeResourceForNotUse(value));
}
}
private String selectHmsContentList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsContentDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
searchVO.setPageUnit(this.propertiesService.getInt("pageUnit"));
searchVO.setPageSize(this.propertiesService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
int totCnt = this.hmsContentService.selectHmsContentListTotCnt(searchVO);
if (totCnt > 0) {
List hmsContentList = this.hmsContentService.selectHmsContentList(searchVO);
model.addAttribute("resultList", (Object)hmsContentList);
}
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", (Object)paginationInfo);
return "/cms/hmsContent/HmsContentList";
}
private String addHmsContentView(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsContentDefaultVO searchVO, Model model) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
HmsContentVO hmsContentVO = new HmsContentVO();
hmsContentVO.setShow("MNG001001");
hmsContentVO.setManagerId(loginVO.getId());
hmsContentVO.setManagerNm(loginVO.getName());
ArrayList<String> templateList = new ArrayList<String>();
String contentDoc = EdosiResource.getInstance().getValue("contents.doc");
File file = new File(String.valueOf(contentDoc) + "/WEB-INF/templates");
File[] f = file.listFiles();
if (f != null) {
int i = 0;
while (i < f.length) {
if (!f[i].isFile() && f[i].getName().charAt(0) != '.') {
templateList.add(f[i].getName());
}
++i;
}
model.addAttribute("templateList", templateList);
}
model.addAttribute("hmsContentVO", (Object)hmsContentVO);
return "/cms/hmsContent/HmsContentRegister";
}
@RequestMapping(value={"/hms/hmsContent/addHmsContent.do"})
public String addHmsContent(MultipartHttpServletRequest request, HttpServletResponse response, HmsContentVO hmsContentVO, @ModelAttribute(value="searchVO") HmsContentDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
this.hmsContentService.insertHmsContent(hmsContentVO, request);
status.setComplete();
return "redirect:" + searchVO.getParentUrl();
}
private String updateHmsContent(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsContentDefaultVO searchVO, Model model) throws Exception {
HmsContentVO hmsContentVO = new HmsContentVO();
hmsContentVO.setContentSeq(searchVO.getContentSeq());
hmsContentVO = this.hmsContentService.selectHmsContent(hmsContentVO);
if (!this.checkWriteAuth(hmsContentVO)) {
return "cmm/sessionError";
}
ArrayList<String> templateList = new ArrayList<String>();
String contentDoc = EdosiResource.getInstance().getValue("contents.doc");
File file = new File(String.valueOf(contentDoc) + "/WEB-INF/templates");
File[] f = file.listFiles();
if (f != null) {
int i = 0;
while (i < f.length) {
if (!f[i].isFile() && f[i].getName().charAt(0) != '.') {
templateList.add(f[i].getName());
}
++i;
}
model.addAttribute("templateList", templateList);
}
model.addAttribute("hmsContentVO", (Object)hmsContentVO);
return "/cms/hmsContent/HmsContentRegister";
}
@RequestMapping(value={"/hms/hmsContent/updateHmsContent.do"})
public String updateHmsContent(MultipartHttpServletRequest request, HttpServletResponse response, HmsContentVO hmsContentVO, @ModelAttribute(value="searchVO") HmsContentDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsContentVO)) {
return "cmm/privilegeError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
this.hmsContentService.updateHmsContent(hmsContentVO, request);
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + searchVO.getParentUrl() + searchVO.toParam() + "&contentSeq=" + hmsContentVO.getContentSeq();
}
private String selectHmsContent(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsContentDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
HmsContentVO hmsContentVO = new HmsContentVO();
hmsContentVO.setContentSeq(searchVO.getContentSeq());
hmsContentVO = this.hmsContentService.selectHmsContent(hmsContentVO);
model.addAttribute("hmsContentVO", (Object)hmsContentVO);
model.addAttribute("checkWriteAuth", (Object)this.checkWriteAuth(hmsContentVO));
return "/cms/hmsContent/HmsContentDetail";
}
@RequestMapping(value={"/hms/hmsContent/deleteHmsContent.do"})
public String deleteHmsContent(HttpServletRequest request, HmsContentVO hmsContentVO, @ModelAttribute(value="searchVO") HmsContentDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsContentVO)) {
return "cmm/privilegeError";
}
this.hmsContentService.deleteHmsContent(hmsContentVO, request);
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + searchVO.getParentUrl() + searchVO.toParam();
}
@RequestMapping(value={"/hms/hmsContent/updateHmsContentViewCnt.do"})
public String updateHmsContentViewCnt(HttpServletRequest request) throws Exception {
this.hmsContentService.updateHmsContentViewCnt(request.getParameter("content_seq"));
return null;
}
private boolean checkWriteAuth(HmsContentVO hmsContentVO) {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
return loginVO.getId().equals(hmsContentVO.getManagerId());
}
}

View File

@@ -0,0 +1,54 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.dept.dao.HmsDeptDAO
* egovframework.cms.dept.vo.HmsDeptDefaultVO
* egovframework.cms.dept.vo.HmsDeptVO
* egovframework.com.cmm.service.impl.EgovComAbstractDAO
* org.springframework.stereotype.Repository
*/
package egovframework.cms.dept.dao;
import egovframework.cms.dept.vo.HmsDeptDefaultVO;
import egovframework.cms.dept.vo.HmsDeptVO;
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
import java.util.List;
import org.springframework.stereotype.Repository;
@Repository(value="hmsDeptDAO")
public class HmsDeptDAO
extends EgovComAbstractDAO {
public String insertHmsDept(HmsDeptVO vo) throws Exception {
return (String)this.insert("hmsDeptDAO.insertHmsDept_S", (Object)vo);
}
public void updateHmsDept(HmsDeptVO vo) throws Exception {
this.update("hmsDeptDAO.updateHmsDept_S", (Object)vo);
}
public void deleteHmsDept(HmsDeptVO vo) throws Exception {
this.delete("hmsDeptDAO.deleteHmsDept_S", (Object)vo);
}
public HmsDeptVO selectHmsDept(HmsDeptVO vo) throws Exception {
return (HmsDeptVO)this.select("hmsDeptDAO.selectHmsDept_S", (Object)vo);
}
public List selectHmsDeptList(HmsDeptDefaultVO searchVO) throws Exception {
return this.list("hmsDeptDAO.selectHmsDeptList_D", (Object)searchVO);
}
public int selectHmsDeptListTotCnt(HmsDeptDefaultVO searchVO) {
return (Integer)this.select("hmsDeptDAO.selectHmsDeptListTotCnt_S", (Object)searchVO);
}
public List selectHmsDeptOrgList(HmsDeptDefaultVO searchVO) throws Exception {
return this.list("hmsDeptDAO.selectHmsDeptOrgList", (Object)searchVO);
}
public List selectHmsUserList(HmsDeptDefaultVO searchVO) throws Exception {
return this.list("hmsDeptDAO.selectHmsUserList", (Object)searchVO);
}
}

View File

@@ -0,0 +1,36 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.dept.service.HmsDeptService
* egovframework.cms.dept.vo.HmsDeptDefaultVO
* egovframework.cms.dept.vo.HmsDeptVO
* javax.servlet.http.HttpServletRequest
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.dept.service;
import egovframework.cms.dept.vo.HmsDeptDefaultVO;
import egovframework.cms.dept.vo.HmsDeptVO;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.multipart.MultipartHttpServletRequest;
public interface HmsDeptService {
public String insertHmsDept(HmsDeptVO var1, MultipartHttpServletRequest var2) throws Exception;
public void updateHmsDept(HmsDeptVO var1, MultipartHttpServletRequest var2) throws Exception;
public void deleteHmsDept(HmsDeptVO var1, HttpServletRequest var2) throws Exception;
public HmsDeptVO selectHmsDept(HmsDeptVO var1) throws Exception;
public List selectHmsDeptList(HmsDeptDefaultVO var1) throws Exception;
public int selectHmsDeptListTotCnt(HmsDeptDefaultVO var1);
public List selectHmsDeptOrgList(HmsDeptDefaultVO var1) throws Exception;
public List selectHmsUserList(HmsDeptDefaultVO var1) throws Exception;
}

View File

@@ -0,0 +1,228 @@
package egovframework.cms.dept.service.impl;
import egovframework.cms.dept.dao.HmsDeptDAO;
import egovframework.cms.dept.service.HmsDeptService;
import egovframework.cms.dept.vo.HmsDeptDefaultVO;
import egovframework.cms.dept.vo.HmsDeptVO;
import egovframework.cms.log.service.HmsLogService;
import egovframework.cms.log.vo.HmsLogVO;
import egovframework.com.cmm.LoginVO;
import egovframework.com.cmm.service.EgovFileMngService;
import egovframework.com.cmm.service.EgovFileMngUtil;
import egovframework.com.cmm.service.FileVO;
import egovframework.edosi.resource.EdosiResource;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Service("hmsDeptService")
public class HmsDeptServiceImpl implements HmsDeptService {
@Resource(name = "hmsDeptDAO")
private HmsDeptDAO hmsDeptDAO;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileMngService;
@Resource(name = "EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name = "commonIdGnrService")
private EgovIdGnrService egovIdGnrService;
@Resource(name = "hmsLogService")
private HmsLogService hmsLogService;
private final String OBJ_HMS_DEPT = "HMS_DEPT";
public String insertHmsDept(HmsDeptVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
String id = this.egovIdGnrService.getNextStringId();
vo.setDeptSeq(id);
vo.setDeptNm(request.getParameter("newDeptNm"));
vo.setParentDeptCd(request.getParameter("deptSeq"));
vo.setDeptCd(id);
vo.setDeptDepth(String.valueOf(Integer.parseInt(request.getParameter("deptDepth")) + 1));
vo.setDeptRank("10");
this.hmsDeptDAO.insertHmsDept(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_INSERT);
logVO.setLogObject("HMS_DEPT");
logVO.setLogMessage("");
logVO.setSeq(vo.getDeptSeq());
this.hmsLogService.insertHmsLog(logVO, null);
return null;
}
public void updateHmsDept(HmsDeptVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
vo.setDeptNm(request.getParameter("deptNm"));
vo.setParentDeptCd(request.getParameter("parentDeptCd"));
vo.setDeptCd(request.getParameter("deptCd"));
this.hmsDeptDAO.updateHmsDept(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_UPDATE);
logVO.setLogObject("HMS_DEPT");
logVO.setLogMessage("");
logVO.setSeq(vo.getDeptSeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public void deleteHmsDept(HmsDeptVO vo, HttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
this.hmsDeptDAO.deleteHmsDept(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_DELETE);
logVO.setLogObject("HMS_DEPT");
logVO.setLogMessage("");
logVO.setSeq(vo.getDeptSeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public HmsDeptVO selectHmsDept(HmsDeptVO vo) throws Exception {
HmsDeptVO resultVO = this.hmsDeptDAO.selectHmsDept(vo);
return resultVO;
}
public List selectHmsDeptList(HmsDeptDefaultVO searchVO) throws Exception {
return this.hmsDeptDAO.selectHmsDeptList(searchVO);
}
public int selectHmsDeptListTotCnt(HmsDeptDefaultVO searchVO) {
return this.hmsDeptDAO.selectHmsDeptListTotCnt(searchVO);
}
public String addMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
String fileId = "";
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
String whitelist = EdosiResource.getInstance().getValue("attach.whitelist");
if (whitelist == null || whitelist.equals("")) {
file.put(key, mf);
continue;
}
String[] ext = whitelist.split(",");
if (ext != null && ext.length > 0) {
boolean check = false;
for (int i = 0; i < ext.length; i++) {
if (fn.endsWith(ext[i])) {
check = true;
break;
}
}
if (check)
file.put(key, mf);
}
}
}
String _atchFileId = "";
if (!file.isEmpty()) {
List<FileVO> _result = null;
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
_atchFileId = this.fileMngService.insertFileInfs(_result);
}
fileId = _atchFileId;
}
return fileId;
}
public String updateMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm, String fileId, boolean multiple) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
String whitelist = EdosiResource.getInstance().getValue("attach.whitelist");
if (whitelist == null || whitelist.equals("")) {
file.put(key, mf);
continue;
}
String[] ext = whitelist.split(",");
if (ext != null && ext.length > 0) {
boolean check = false;
for (int i = 0; i < ext.length; i++) {
if (fn.endsWith(ext[i])) {
check = true;
break;
}
}
if (check)
file.put(key, mf);
}
}
}
String[] delcheck = multiRequest.getParameterValues("delcheck");
if (delcheck != null) {
FileVO fileVO = null;
for (int i = 0; i < delcheck.length; i++) {
String[] fileInf = delcheck[i].split("\\|");
fileVO = new FileVO();
fileVO.setAtchFileId(fileInf[0]);
fileVO.setFileSn(fileInf[1]);
this.fileMngService.deleteFileInf(fileVO);
}
}
if (!file.isEmpty()) {
List<FileVO> _result = null;
if (multiple) {
if (fileId == null || fileId.equals("")) {
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
} else {
FileVO fvo = new FileVO();
fvo.setAtchFileId(fileId);
int cnt = this.fileMngService.getMaxFileSN(fvo);
_result = this.fileUtil.parseFileInf(file, "FILE_", cnt, fileId, "");
this.fileMngService.updateFileInfs(_result);
}
} else {
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
}
}
if (fileId != null && !fileId.equals("")) {
FileVO fileVO = new FileVO();
fileVO.setAtchFileId(fileId);
List<FileVO> result = this.fileMngService.selectFileInfs(fileVO);
if (result.size() == 0)
fileId = "";
}
}
return fileId;
}
public List selectHmsDeptOrgList(HmsDeptDefaultVO searchVO) throws Exception {
return this.hmsDeptDAO.selectHmsDeptOrgList(searchVO);
}
public List selectHmsUserList(HmsDeptDefaultVO searchVO) throws Exception {
return this.hmsDeptDAO.selectHmsUserList(searchVO);
}
}

View File

@@ -0,0 +1,191 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.dept.vo.HmsDeptDefaultVO
*/
package egovframework.cms.dept.vo;
import java.io.Serializable;
public class HmsDeptDefaultVO
implements Serializable {
private String searchCondition;
private String searchKeyword;
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 String bmode;
private String parentUrl;
private String pageUseYn = "Y";
private String orderby;
private String deptSeq;
private String searchDeptDepth;
private String searchParentDeptCd;
private String searchDeptCd;
private String searchDeptSeq;
public void setSearchCondition(String searchCondition) {
this.searchCondition = searchCondition;
}
public String getSearchCondition() {
return this.searchCondition;
}
public void setSearchKeyword(String searchKeyword) {
this.searchKeyword = searchKeyword;
}
public String getSearchKeyword() {
return this.searchKeyword;
}
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
public String getSearchUseYn() {
return this.searchUseYn;
}
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
public int getPageIndex() {
return this.pageIndex;
}
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
public int getPageUnit() {
return this.pageUnit;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getPageSize() {
return this.pageSize;
}
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
public int getFirstIndex() {
return this.firstIndex;
}
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
public int getLastIndex() {
return this.lastIndex;
}
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
public int getRecordCountPerPage() {
return this.recordCountPerPage;
}
public void setBmode(String bmode) {
this.bmode = bmode;
}
public String getBmode() {
return this.bmode;
}
public void setParentUrl(String parentUrl) {
this.parentUrl = parentUrl;
}
public String getParentUrl() {
return this.parentUrl;
}
public void setPageUseYn(String pageUseYn) {
this.pageUseYn = pageUseYn;
}
public String getPageUseYn() {
return this.pageUseYn;
}
public void setOrderby(String orderby) {
this.orderby = orderby;
}
public String getOrderby() {
return this.orderby;
}
public void setDeptSeq(String deptSeq) {
this.deptSeq = deptSeq;
}
public String getDeptSeq() {
return this.deptSeq;
}
public String toParam() {
StringBuilder sb = new StringBuilder();
sb.append("?pageIndex=" + this.pageIndex);
if (this.bmode != null && !this.bmode.equals("")) {
sb.append("&bmode=" + this.bmode);
}
if (this.searchCondition != null && !this.searchCondition.equals("")) {
sb.append("&searchCondition=" + this.searchCondition);
}
if (this.searchKeyword != null && !this.searchKeyword.equals("")) {
sb.append("&searchKeyword=" + this.searchKeyword);
}
return sb.toString();
}
public String getSearchDeptDepth() {
return this.searchDeptDepth;
}
public void setSearchDeptDepth(String searchDeptDepth) {
this.searchDeptDepth = searchDeptDepth;
}
public String getSearchParentDeptCd() {
return this.searchParentDeptCd;
}
public void setSearchParentDeptCd(String searchParentDeptCd) {
this.searchParentDeptCd = searchParentDeptCd;
}
public String getSearchDeptCd() {
return this.searchDeptCd;
}
public void setSearchDeptCd(String searchDeptCd) {
this.searchDeptCd = searchDeptCd;
}
public String getSearchDeptSeq() {
return this.searchDeptSeq;
}
public void setSearchDeptSeq(String searchDeptSeq) {
this.searchDeptSeq = searchDeptSeq;
}
}

View File

@@ -0,0 +1,114 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.dept.vo.HmsDeptDefaultVO
* egovframework.cms.dept.vo.HmsDeptVO
*/
package egovframework.cms.dept.vo;
import egovframework.cms.dept.vo.HmsDeptDefaultVO;
public class HmsDeptVO
extends HmsDeptDefaultVO {
private String deptSeq;
private String parentDeptCd;
private String deptNm;
private String deptCd;
private String deptRank;
private String deptDepth;
private String deptFullNm;
private String extField01;
private String extField02;
private String extField03;
private String recSts;
public void setDeptSeq(String deptSeq) {
this.deptSeq = deptSeq;
}
public String getDeptSeq() {
return this.deptSeq;
}
public void setParentDeptCd(String parentDeptCd) {
this.parentDeptCd = parentDeptCd;
}
public String getParentDeptCd() {
return this.parentDeptCd;
}
public void setDeptNm(String deptNm) {
this.deptNm = deptNm;
}
public String getDeptNm() {
return this.deptNm;
}
public void setDeptCd(String deptCd) {
this.deptCd = deptCd;
}
public String getDeptCd() {
return this.deptCd;
}
public void setDeptRank(String deptRank) {
this.deptRank = deptRank;
}
public String getDeptRank() {
return this.deptRank;
}
public void setDeptDepth(String deptDepth) {
this.deptDepth = deptDepth;
}
public String getDeptDepth() {
return this.deptDepth;
}
public void setDeptFullNm(String deptFullNm) {
this.deptFullNm = deptFullNm;
}
public String getDeptFullNm() {
return this.deptFullNm;
}
public void setExtField01(String extField01) {
this.extField01 = extField01;
}
public String getExtField01() {
return this.extField01;
}
public void setExtField02(String extField02) {
this.extField02 = extField02;
}
public String getExtField02() {
return this.extField02;
}
public void setExtField03(String extField03) {
this.extField03 = extField03;
}
public String getExtField03() {
return this.extField03;
}
public void setRecSts(String recSts) {
this.recSts = recSts;
}
public String getRecSts() {
return this.recSts;
}
}

View File

@@ -0,0 +1,285 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.dept.service.HmsDeptService
* egovframework.cms.dept.vo.HmsDeptDefaultVO
* egovframework.cms.dept.vo.HmsDeptVO
* egovframework.cms.dept.web.HmsDeptAdminController
* egovframework.cms.user.service.HmsUserService
* egovframework.cms.user.vo.HmsUserDefaultVO
* egovframework.com.cmm.LoginVO
* egovframework.common.dwr.DwrCommonService
* egovframework.common.service.CommonService
* egovframework.edosi.common.code.CodeResource
* egovframework.edosi.egov.helper.UserDetailsHelper
* egovframework.edosi.filter.XssFilter
* egovframework.main.MainGlobals
* egovframework.rte.fdl.property.EgovPropertyService
* egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper
* egovframework.rte.psl.dataaccess.util.EgovMap
* javax.annotation.Resource
* javax.servlet.RequestDispatcher
* javax.servlet.ServletRequest
* javax.servlet.ServletResponse
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* net.sf.json.JSONArray
* net.sf.json.JSONObject
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.ModelAttribute
* org.springframework.web.bind.annotation.RequestMapping
* org.springframework.web.bind.annotation.SessionAttributes
* org.springframework.web.bind.support.SessionStatus
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.dept.web;
import egovframework.cms.dept.service.HmsDeptService;
import egovframework.cms.dept.vo.HmsDeptDefaultVO;
import egovframework.cms.dept.vo.HmsDeptVO;
import egovframework.cms.user.service.HmsUserService;
import egovframework.cms.user.vo.HmsUserDefaultVO;
import egovframework.com.cmm.LoginVO;
import egovframework.common.dwr.DwrCommonService;
import egovframework.common.service.CommonService;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.edosi.filter.XssFilter;
import egovframework.main.MainGlobals;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
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.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Controller
@SessionAttributes(types={HmsDeptVO.class})
public class HmsDeptAdminController {
@Resource(name="hmsDeptService")
private HmsDeptService hmsDeptService;
@Resource(name="propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="codeResource")
private CodeResource codeResource;
@Resource(name="commonService")
private CommonService commonService;
@Resource(name="hmsUserService")
private HmsUserService hmsUserService;
@Resource(name="dwrCommonService")
private DwrCommonService dwrCommonService;
@RequestMapping(value={"/admin/hmsDept/hmsDeptAdminIndex.do"})
public String hmsDeptIndex(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, ModelMap modelMap, Model model) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = this.selectHmsDeptAdminList(request, response, searchVO, model);
} else if (bmode.equals("detail")) {
viewName = this.selectHmsDeptAdmin(request, response, searchVO, model);
} else if (bmode.equals("add")) {
viewName = this.addHmsDeptAdminView(request, response, searchVO, model);
} else if (bmode.equals("modify")) {
viewName = this.updateHmsDeptAdmin(request, response, searchVO, model);
}
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
model.addAttribute("bmode", (Object)bmode);
model.addAttribute("loginVO", (Object)loginVO);
this.initModelData(model, bmode);
return viewName;
}
private void initModelData(Model model, String bmode) throws Exception {
HashMap param = new HashMap();
this.initModelData(param, model, bmode);
}
private void initModelData(Map param, Model model, String bmode) throws Exception {
Iterator<String> it = param.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
String value = (String)param.get(key);
model.addAttribute(key, (Object)this.codeResource.getCodeList(value));
if (bmode == null || !bmode.equals("add") && !bmode.equals("modify")) continue;
model.addAttribute(key, (Object)this.codeResource.removeCodeResourceForNotUse(value));
}
}
private String selectHmsDeptAdminList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
try {
searchVO.setPageUseYn("N");
searchVO.setSearchDeptSeq(MainGlobals.ORG_CODE);
List hmsDeptList = this.hmsDeptService.selectHmsDeptOrgList(searchVO);
model.addAttribute("resultList", (Object)hmsDeptList);
JSONArray array = new JSONArray();
int i = 0;
while (i < hmsDeptList.size()) {
EgovMap m = (EgovMap)hmsDeptList.get(i);
JSONObject tmp = new JSONObject();
tmp.put((Object)"id", m.get((Object)"deptSeq"));
tmp.put((Object)"parent", m.get((Object)"parentDeptCd"));
tmp.put((Object)"text", m.get((Object)"deptNm"));
array.add((Object)tmp);
++i;
}
model.addAttribute("orgJSON", (Object)array.toString());
}
catch (Exception e) {
e.printStackTrace();
}
return "cms/hmsDept/HmsDeptAdminList";
}
private String addHmsDeptAdminView(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, Model model) throws Exception {
HmsDeptVO hmsDeptVO = new HmsDeptVO();
model.addAttribute("hmsDeptVO", (Object)hmsDeptVO);
return "cms/hmsDept/HmsDeptAdminRegister";
}
@RequestMapping(value={"/admin/hmsDept/addHmsDeptAdmin.do"})
public String addHmsDeptAdmin(MultipartHttpServletRequest request, HttpServletResponse response, HmsDeptVO hmsDeptVO, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
try {
this.hmsDeptService.insertHmsDept(hmsDeptVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), (HttpServletRequest)request);
}
private String updateHmsDeptAdmin(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, Model model) throws Exception {
HmsDeptVO hmsDeptVO = new HmsDeptVO();
hmsDeptVO.setDeptSeq(searchVO.getDeptSeq());
hmsDeptVO = this.hmsDeptService.selectHmsDept(hmsDeptVO);
if (!this.checkWriteAuth(hmsDeptVO)) {
return "cmm/sessionError";
}
model.addAttribute("hmsDeptVO", (Object)hmsDeptVO);
return "cms/hmsDept/HmsDeptAdminRegister";
}
@RequestMapping(value={"/admin/hmsDept/updateHmsDeptAdmin.do"})
public String updateHmsDeptAdmin(MultipartHttpServletRequest request, HttpServletResponse response, HmsDeptVO hmsDeptVO, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsDeptVO)) {
return "cmm/privilegeError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
try {
this.hmsDeptService.updateHmsDept(hmsDeptVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), (HttpServletRequest)request);
}
private String selectHmsDeptAdmin(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
HmsDeptVO hmsDeptVO = new HmsDeptVO();
hmsDeptVO.setDeptCd(searchVO.getSearchDeptCd());
try {
hmsDeptVO = this.hmsDeptService.selectHmsDept(hmsDeptVO);
HmsUserDefaultVO hmsUserDefaultVO = new HmsUserDefaultVO();
hmsUserDefaultVO.setPageUseYn("N");
hmsUserDefaultVO.setSearchDeptCd(searchVO.getSearchDeptCd());
List hmsUserList = this.hmsUserService.selectHmsUserList(hmsUserDefaultVO);
int i = 0;
while (i < hmsUserList.size()) {
EgovMap m = (EgovMap)hmsUserList.get(i);
if (m.get((Object)"jobTitle") != null) {
String jobTitle = ((String)m.get((Object)"jobTitle")).replaceAll("-", "\r\n");
m.put((Object)"jobTitle", (Object)jobTitle);
}
++i;
}
model.addAttribute("hmsDeptVO", (Object)hmsDeptVO);
model.addAttribute("resultList", (Object)hmsUserList);
}
catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("hmsDeptVO", (Object)hmsDeptVO);
model.addAttribute("checkWriteAuth", (Object)this.checkWriteAuth(hmsDeptVO));
return "cms/hmsDept/HmsDeptAdminDetail";
}
@RequestMapping(value={"/admin/hmsDept/deleteHmsDeptAdmin.do"})
public String deleteHmsDeptAdmin(HttpServletRequest request, HmsDeptVO hmsDeptVO, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsDeptVO)) {
return "cmm/privilegeError";
}
try {
this.hmsDeptService.deleteHmsDept(hmsDeptVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
searchVO.setBmode(null);
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), request) + searchVO.toParam();
}
private boolean checkWriteAuth(HmsDeptVO hmsDeptVO) {
if (UserDetailsHelper.isRole((String)"ROLE_USER").booleanValue()) {
return true;
}
return UserDetailsHelper.isRole((String)"ROLE_ADMIN") != false;
}
}

View File

@@ -0,0 +1,297 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.dept.service.HmsDeptService
* egovframework.cms.dept.vo.HmsDeptDefaultVO
* egovframework.cms.dept.vo.HmsDeptVO
* egovframework.cms.dept.web.HmsDeptController
* egovframework.cms.user.service.HmsUserService
* egovframework.cms.user.vo.HmsUserDefaultVO
* egovframework.com.cmm.LoginVO
* egovframework.com.cmm.service.EgovProperties
* egovframework.common.dwr.DwrCommonService
* egovframework.common.service.CommonService
* egovframework.edosi.common.code.CodeResource
* egovframework.edosi.egov.helper.UserDetailsHelper
* egovframework.edosi.filter.XssFilter
* egovframework.rte.fdl.property.EgovPropertyService
* egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper
* egovframework.rte.psl.dataaccess.util.EgovMap
* egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo
* javax.annotation.Resource
* javax.servlet.RequestDispatcher
* javax.servlet.ServletRequest
* javax.servlet.ServletResponse
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* net.sf.json.JSONArray
* net.sf.json.JSONObject
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.ModelAttribute
* org.springframework.web.bind.annotation.RequestMapping
* org.springframework.web.bind.annotation.SessionAttributes
* org.springframework.web.bind.support.SessionStatus
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.dept.web;
import egovframework.cms.dept.service.HmsDeptService;
import egovframework.cms.dept.vo.HmsDeptDefaultVO;
import egovframework.cms.dept.vo.HmsDeptVO;
import egovframework.cms.user.service.HmsUserService;
import egovframework.cms.user.vo.HmsUserDefaultVO;
import egovframework.com.cmm.LoginVO;
import egovframework.com.cmm.service.EgovProperties;
import egovframework.common.dwr.DwrCommonService;
import egovframework.common.service.CommonService;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.edosi.filter.XssFilter;
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 java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
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.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Controller
@SessionAttributes(types={HmsDeptVO.class})
public class HmsDeptController {
@Resource(name="hmsDeptService")
private HmsDeptService hmsDeptService;
@Resource(name="propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="codeResource")
private CodeResource codeResource;
@Resource(name="commonService")
private CommonService commonService;
@Resource(name="hmsUserService")
private HmsUserService hmsUserService;
@Resource(name="dwrCommonService")
private DwrCommonService dwrCommonService;
@RequestMapping(value={"/dms/hmsDept/hmsDeptIndex.do"})
public String hmsDeptIndex(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, ModelMap modelMap, Model model) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = this.selectHmsDeptList(request, response, searchVO, model);
} else if (bmode.equals("detail")) {
viewName = this.selectHmsDept(request, response, searchVO, model);
} else if (bmode.equals("add")) {
viewName = this.addHmsDeptView(request, response, searchVO, model);
} else if (bmode.equals("modify")) {
viewName = this.updateHmsDept(request, response, searchVO, model);
}
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
model.addAttribute("bmode", (Object)bmode);
model.addAttribute("loginVO", (Object)loginVO);
this.initModelData(model, bmode);
return viewName;
}
private void initModelData(Model model, String bmode) throws Exception {
HashMap param = new HashMap();
this.initModelData(param, model, bmode);
}
private void initModelData(Map param, Model model, String bmode) throws Exception {
Iterator<String> it = param.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
String value = (String)param.get(key);
model.addAttribute(key, (Object)this.codeResource.getCodeList(value));
if (bmode == null || !bmode.equals("add") && !bmode.equals("modify")) continue;
model.addAttribute(key, (Object)this.codeResource.removeCodeResourceForNotUse(value));
}
}
private String selectHmsDeptList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
searchVO.setPageUnit(this.propertiesService.getInt("pageUnit"));
searchVO.setPageSize(this.propertiesService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
try {
String orgCode = EgovProperties.getProperty((String)"Globals.OrgCode");
searchVO.setSearchDeptCd(orgCode);
List hmsDeptList = this.hmsDeptService.selectHmsDeptOrgList(searchVO);
model.addAttribute("resultList", (Object)hmsDeptList);
JSONArray array = new JSONArray();
int i = 0;
while (i < hmsDeptList.size()) {
EgovMap m = (EgovMap)hmsDeptList.get(i);
JSONObject tmp = new JSONObject();
tmp.put((Object)"id", m.get((Object)"deptCd"));
tmp.put((Object)"parent", m.get((Object)"parentDeptCd"));
tmp.put((Object)"text", m.get((Object)"deptNm"));
array.add((Object)tmp);
++i;
}
model.addAttribute("orgJSON", (Object)array.toString());
}
catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("paginationInfo", (Object)paginationInfo);
return "dms/hmsDept/HmsDeptList";
}
private String addHmsDeptView(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, Model model) throws Exception {
HmsDeptVO hmsDeptVO = new HmsDeptVO();
model.addAttribute("hmsDeptVO", (Object)hmsDeptVO);
return "dms/hmsDept/HmsDeptRegister";
}
@RequestMapping(value={"/dms/hmsDept/addHmsDept.do"})
public String addHmsDept(MultipartHttpServletRequest request, HttpServletResponse response, HmsDeptVO hmsDeptVO, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
try {
this.hmsDeptService.insertHmsDept(hmsDeptVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), (HttpServletRequest)request);
}
private String updateHmsDept(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, Model model) throws Exception {
HmsDeptVO hmsDeptVO = new HmsDeptVO();
hmsDeptVO.setDeptSeq(searchVO.getDeptSeq());
hmsDeptVO = this.hmsDeptService.selectHmsDept(hmsDeptVO);
if (!this.checkWriteAuth(hmsDeptVO)) {
return "cmm/sessionError";
}
model.addAttribute("hmsDeptVO", (Object)hmsDeptVO);
return "dms/hmsDept/HmsDeptRegister";
}
@RequestMapping(value={"/dms/hmsDept/updateHmsDept.do"})
public String updateHmsDept(MultipartHttpServletRequest request, HttpServletResponse response, HmsDeptVO hmsDeptVO, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsDeptVO)) {
return "cmm/privilegeError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
try {
this.hmsDeptService.updateHmsDept(hmsDeptVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), (HttpServletRequest)request) + searchVO.toParam() + "&deptSeq=" + hmsDeptVO.getDeptSeq();
}
private String selectHmsDept(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
HmsDeptVO hmsDeptVO = new HmsDeptVO();
hmsDeptVO.setDeptCd(searchVO.getSearchDeptCd());
try {
hmsDeptVO = this.hmsDeptService.selectHmsDept(hmsDeptVO);
HmsUserDefaultVO hmsUserDefaultVO = new HmsUserDefaultVO();
hmsUserDefaultVO.setPageUseYn("N");
hmsUserDefaultVO.setSearchDeptCd(searchVO.getSearchDeptCd());
List hmsUserList = this.hmsUserService.selectHmsUserList(hmsUserDefaultVO);
int i = 0;
while (i < hmsUserList.size()) {
EgovMap m = (EgovMap)hmsUserList.get(i);
if (m.get((Object)"jobTitle") != null) {
String jobTitle = ((String)m.get((Object)"jobTitle")).replaceAll("-", "\r\n");
m.put((Object)"jobTitle", (Object)jobTitle);
}
++i;
}
model.addAttribute("hmsDeptVO", (Object)hmsDeptVO);
model.addAttribute("resultList", (Object)hmsUserList);
}
catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("hmsDeptVO", (Object)hmsDeptVO);
model.addAttribute("checkWriteAuth", (Object)this.checkWriteAuth(hmsDeptVO));
return "dms/hmsDept/HmsDeptDetail";
}
@RequestMapping(value={"/dms/hmsDept/deleteHmsDept.do"})
public String deleteHmsDept(HttpServletRequest request, HmsDeptVO hmsDeptVO, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsDeptVO)) {
return "cmm/privilegeError";
}
try {
this.hmsDeptService.deleteHmsDept(hmsDeptVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
searchVO.setBmode(null);
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), request) + searchVO.toParam();
}
private boolean checkWriteAuth(HmsDeptVO hmsDeptVO) {
if (UserDetailsHelper.isRole((String)"ROLE_USER").booleanValue()) {
return true;
}
return UserDetailsHelper.isRole((String)"ROLE_ADMIN") != false;
}
}

View File

@@ -0,0 +1,222 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.dept.service.HmsDeptService
* egovframework.cms.dept.vo.HmsDeptDefaultVO
* egovframework.cms.dept.vo.HmsDeptVO
* egovframework.cms.dept.web.HmsDeptFindController
* egovframework.com.cmm.LoginVO
* egovframework.com.cmm.service.EgovProperties
* egovframework.common.service.CommonService
* egovframework.edosi.common.code.CodeResource
* egovframework.edosi.egov.helper.UserDetailsHelper
* egovframework.rte.fdl.property.EgovPropertyService
* egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper
* egovframework.rte.psl.dataaccess.util.EgovMap
* javax.annotation.Resource
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* net.sf.json.JSONArray
* net.sf.json.JSONObject
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.RequestMapping
* org.springframework.web.bind.annotation.SessionAttributes
*/
package egovframework.cms.dept.web;
import egovframework.cms.dept.service.HmsDeptService;
import egovframework.cms.dept.vo.HmsDeptDefaultVO;
import egovframework.cms.dept.vo.HmsDeptVO;
import egovframework.com.cmm.LoginVO;
import egovframework.com.cmm.service.EgovProperties;
import egovframework.common.service.CommonService;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import java.io.PrintWriter;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.SessionAttributes;
@Controller
@SessionAttributes(types={HmsDeptVO.class})
public class HmsDeptFindController {
@Resource(name="hmsDeptService")
private HmsDeptService hmsDeptService;
@Resource(name="propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="codeResource")
private CodeResource codeResource;
@Resource(name="commonService")
private CommonService commonService;
@RequestMapping(value={"/popup/hmsDept/hmsUserFindIndexajax.do"})
public String hmsUserFindIndexajax(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap, Model model) throws Exception {
response.setContentType("text/plain; charset=utf-8");
PrintWriter out = response.getWriter();
HmsDeptDefaultVO searchVO = new HmsDeptDefaultVO();
JSONArray jsonResultList = new JSONArray();
JSONArray jsonList = new JSONArray();
try {
searchVO.setDeptSeq(request.getParameter("deptSeq"));
searchVO.setSearchKeyword(request.getParameter("name"));
List hmsUsertList = this.hmsDeptService.selectHmsUserList(searchVO);
if (hmsUsertList.size() > 0) {
int i = 0;
while (i < hmsUsertList.size()) {
JSONObject json = new JSONObject();
json.put((Object)"managerId", ((EgovMap)hmsUsertList.get(i)).get((Object)"userId"));
json.put((Object)"managerNm", ((EgovMap)hmsUsertList.get(i)).get((Object)"userNm"));
json.put((Object)"managerDeptCd", ((EgovMap)hmsUsertList.get(i)).get((Object)"deptCd"));
json.put((Object)"managerDeptNm", ((EgovMap)hmsUsertList.get(i)).get((Object)"deptNm"));
json.put((Object)"managerTel", ((EgovMap)hmsUsertList.get(i)).get((Object)"tel"));
jsonList.add((Object)json);
++i;
}
}
response.setContentType("text/xml;charset=utf-8");
PrintWriter printWriter = response.getWriter();
printWriter.print(jsonList);
printWriter.flush();
printWriter.close();
}
catch (Exception ex) {
JSONObject jsonObject = new JSONObject();
jsonObject.put((Object)"flag", (Object)"fail");
jsonObject.put((Object)"message", (Object)"정보 조회 중 오류가 발생하였습니다.");
out.println(jsonObject.toString());
}
return null;
}
@RequestMapping(value={"/popup/hmsDept/hmsUserFindIndex.do"})
public String hmsUserIndex(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap, Model model) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
HmsDeptDefaultVO searchVO = new HmsDeptDefaultVO();
try {
String orgCode = EgovProperties.getProperty((String)"Globals.OrgCode");
searchVO.setSearchDeptCd(orgCode);
List hmsDeptList = this.hmsDeptService.selectHmsDeptOrgList(searchVO);
model.addAttribute("resultList", (Object)hmsDeptList);
JSONArray array = new JSONArray();
int i = 0;
while (i < hmsDeptList.size()) {
EgovMap m = (EgovMap)hmsDeptList.get(i);
String deptCd = (String)m.get((Object)"deptCd");
String deptNm = (String)m.get((Object)"deptNm");
String parentDeptCd = (String)m.get((Object)"parentDeptCd");
JSONObject org = new JSONObject();
org.put((Object)"parent", (Object)parentDeptCd);
org.put((Object)"id", (Object)deptCd);
org.put((Object)"text", (Object)deptNm);
org.put((Object)"a_attr", (Object)("{'name':'" + deptNm + "','model':'" + deptNm + "'}"));
if (i == 0) {
org.put((Object)"parent", (Object)"#");
}
array.add((Object)org);
++i;
}
model.addAttribute("orgData", (Object)array.toString());
}
catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("loginVO", (Object)loginVO);
return "/common/HmsDeptUserFindPopup";
}
@RequestMapping(value={"/popup/hmsDept/hmsDeptFindIndex.do"})
public String hmsDeptIndex(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap, Model model) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
HmsDeptDefaultVO searchVO = new HmsDeptDefaultVO();
try {
String orgCode = EgovProperties.getProperty((String)"Globals.OrgCode");
searchVO.setSearchDeptCd(orgCode);
List hmsDeptList = this.hmsDeptService.selectHmsDeptOrgList(searchVO);
model.addAttribute("resultList", (Object)hmsDeptList);
JSONArray array = new JSONArray();
int i = 0;
while (i < hmsDeptList.size()) {
EgovMap m = (EgovMap)hmsDeptList.get(i);
String deptCd = (String)m.get((Object)"deptCd");
String deptNm = (String)m.get((Object)"deptNm");
String parentDeptCd = (String)m.get((Object)"parentDeptCd");
JSONObject org = new JSONObject();
org.put((Object)"parent", (Object)parentDeptCd);
org.put((Object)"id", (Object)deptCd);
org.put((Object)"text", (Object)deptNm);
org.put((Object)"a_attr", (Object)("{'name':'" + deptNm + "','model':'" + deptNm + "'}"));
if (i == 0) {
org.put((Object)"parent", (Object)"#");
}
array.add((Object)org);
++i;
}
model.addAttribute("orgData", (Object)array.toString());
}
catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("loginVO", (Object)loginVO);
return "/common/HmsDeptFindPopup";
}
@RequestMapping(value={"/popup/hmsDept/hmsDeptAndUserFindIndex.do"})
public String hmsDeptAndUserFindIndex(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap, Model model) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
HmsDeptDefaultVO searchVO = new HmsDeptDefaultVO();
try {
String orgCode = EgovProperties.getProperty((String)"Globals.OrgCode");
searchVO.setSearchDeptCd(orgCode);
List hmsDeptList = this.hmsDeptService.selectHmsDeptOrgList(searchVO);
model.addAttribute("resultList", (Object)hmsDeptList);
JSONArray array = new JSONArray();
int i = 0;
while (i < hmsDeptList.size()) {
EgovMap m = (EgovMap)hmsDeptList.get(i);
String deptCd = (String)m.get((Object)"deptCd");
String deptNm = (String)m.get((Object)"deptNm");
String parentDeptCd = (String)m.get((Object)"parentDeptCd");
JSONObject org = new JSONObject();
org.put((Object)"parent", (Object)parentDeptCd);
org.put((Object)"id", (Object)deptCd);
org.put((Object)"text", (Object)deptNm);
org.put((Object)"a_attr", (Object)("{'name':'" + deptNm + "','model':'" + deptNm + "'}"));
if (i == 0) {
org.put((Object)"parent", (Object)"#");
}
array.add((Object)org);
++i;
}
model.addAttribute("orgData", (Object)array.toString());
}
catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("loginVO", (Object)loginVO);
return "/common/HmsDeptAndUserFindPopup";
}
}

View File

@@ -0,0 +1,254 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.dept.service.HmsDeptService
* egovframework.cms.dept.vo.HmsDeptDefaultVO
* egovframework.cms.dept.vo.HmsDeptVO
* egovframework.cms.dept.web.HmsDeptMobileController
* egovframework.com.cmm.LoginVO
* egovframework.common.dwr.DwrCommonService
* egovframework.common.service.CommonService
* egovframework.edosi.common.code.CodeResource
* egovframework.edosi.filter.XssFilter
* egovframework.rte.fdl.property.EgovPropertyService
* egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper
* egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo
* javax.annotation.Resource
* javax.servlet.RequestDispatcher
* javax.servlet.ServletRequest
* javax.servlet.ServletResponse
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.ModelAttribute
* org.springframework.web.bind.annotation.RequestMapping
* org.springframework.web.bind.annotation.SessionAttributes
* org.springframework.web.bind.support.SessionStatus
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.dept.web;
import egovframework.cms.dept.service.HmsDeptService;
import egovframework.cms.dept.vo.HmsDeptDefaultVO;
import egovframework.cms.dept.vo.HmsDeptVO;
import egovframework.com.cmm.LoginVO;
import egovframework.common.dwr.DwrCommonService;
import egovframework.common.service.CommonService;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.filter.XssFilter;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Controller
@SessionAttributes(types={HmsDeptVO.class})
public class HmsDeptMobileController {
@Resource(name="hmsDeptService")
private HmsDeptService hmsDeptService;
@Resource(name="propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="codeResource")
private CodeResource codeResource;
@Resource(name="commonService")
private CommonService commonService;
@Resource(name="dwrCommonService")
private DwrCommonService dwrCommonService;
@RequestMapping(value={"/mobile/hmsDept/hmsDeptMobileIndex.do"})
public String hmsDeptIndex(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, ModelMap modelMap, Model model) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = this.selectHmsDeptMobileList(request, response, searchVO, model);
} else if (bmode.equals("detail")) {
viewName = this.selectHmsDeptMobile(request, response, searchVO, model);
} else if (bmode.equals("add")) {
viewName = this.addHmsDeptMobileView(request, response, searchVO, model);
} else if (bmode.equals("modify")) {
viewName = this.updateHmsDeptMobile(request, response, searchVO, model);
}
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
model.addAttribute("bmode", (Object)bmode);
model.addAttribute("loginVO", (Object)loginVO);
this.initModelData(model, bmode);
return viewName;
}
private void initModelData(Model model, String bmode) throws Exception {
HashMap param = new HashMap();
this.initModelData(param, model, bmode);
}
private void initModelData(Map param, Model model, String bmode) throws Exception {
Iterator<String> it = param.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
String value = (String)param.get(key);
model.addAttribute(key, (Object)this.codeResource.getCodeList(value));
if (bmode == null || !bmode.equals("add") && !bmode.equals("modify")) continue;
model.addAttribute(key, (Object)this.codeResource.removeCodeResourceForNotUse(value));
}
}
private String selectHmsDeptMobileList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
searchVO.setPageUnit(this.propertiesService.getInt("pageUnit"));
searchVO.setPageSize(this.propertiesService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
int totCnt = 0;
try {
totCnt = this.hmsDeptService.selectHmsDeptListTotCnt(searchVO);
if (totCnt > 0) {
List hmsDeptList = this.hmsDeptService.selectHmsDeptList(searchVO);
model.addAttribute("resultList", (Object)hmsDeptList);
}
}
catch (Exception e) {
e.printStackTrace();
}
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", (Object)paginationInfo);
return "mobile/hmsDept/HmsDeptMobileList";
}
private String addHmsDeptMobileView(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, Model model) throws Exception {
HmsDeptVO hmsDeptVO = new HmsDeptVO();
model.addAttribute("hmsDeptVO", (Object)hmsDeptVO);
return "mobile/hmsDept/HmsDeptMobileRegister";
}
@RequestMapping(value={"/mobile/hmsDept/addHmsDeptMobile.do"})
public String addHmsDeptMobile(MultipartHttpServletRequest request, HttpServletResponse response, HmsDeptVO hmsDeptVO, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
try {
this.hmsDeptService.insertHmsDept(hmsDeptVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), (HttpServletRequest)request);
}
private String updateHmsDeptMobile(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, Model model) throws Exception {
HmsDeptVO hmsDeptVO = new HmsDeptVO();
hmsDeptVO.setDeptSeq(searchVO.getDeptSeq());
hmsDeptVO = this.hmsDeptService.selectHmsDept(hmsDeptVO);
if (!this.checkWriteAuth(hmsDeptVO)) {
return "cmm/sessionError";
}
model.addAttribute("hmsDeptVO", (Object)hmsDeptVO);
return "mobile/hmsDept/HmsDeptMobileRegister";
}
@RequestMapping(value={"/mobile/hmsDept/updateHmsDeptMobile.do"})
public String updateHmsDeptMobile(MultipartHttpServletRequest request, HttpServletResponse response, HmsDeptVO hmsDeptVO, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsDeptVO)) {
return "cmm/privilegeError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
try {
this.hmsDeptService.updateHmsDept(hmsDeptVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), (HttpServletRequest)request) + searchVO.toParam() + "&deptSeq=" + hmsDeptVO.getDeptSeq();
}
private String selectHmsDeptMobile(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
HmsDeptVO hmsDeptVO = new HmsDeptVO();
hmsDeptVO.setDeptSeq(searchVO.getDeptSeq());
try {
hmsDeptVO = this.hmsDeptService.selectHmsDept(hmsDeptVO);
}
catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("hmsDeptVO", (Object)hmsDeptVO);
model.addAttribute("checkWriteAuth", (Object)this.checkWriteAuth(hmsDeptVO));
return "mobile/hmsDept/HmsDeptMobileDetail";
}
@RequestMapping(value={"/mobile/hmsDept/deleteHmsDeptMobile.do"})
public String deleteHmsDeptMobile(HttpServletRequest request, HmsDeptVO hmsDeptVO, @ModelAttribute(value="searchVO") HmsDeptDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsDeptVO)) {
return "cmm/privilegeError";
}
try {
this.hmsDeptService.deleteHmsDept(hmsDeptVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
searchVO.setBmode(null);
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), request) + searchVO.toParam();
}
private boolean checkWriteAuth(HmsDeptVO hmsDeptVO) {
return true;
}
}

View File

@@ -0,0 +1,46 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.duty.dao.HmsDutyDAO
* egovframework.cms.duty.vo.HmsDutyDefaultVO
* egovframework.cms.duty.vo.HmsDutyVO
* egovframework.com.cmm.service.impl.EgovComAbstractDAO
* org.springframework.stereotype.Repository
*/
package egovframework.cms.duty.dao;
import egovframework.cms.duty.vo.HmsDutyDefaultVO;
import egovframework.cms.duty.vo.HmsDutyVO;
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
import java.util.List;
import org.springframework.stereotype.Repository;
@Repository(value="hmsDutyDAO")
public class HmsDutyDAO
extends EgovComAbstractDAO {
public String insertHmsDuty(HmsDutyVO vo) throws Exception {
return (String)this.insert("hmsDutyDAO.insertHmsDuty_S", (Object)vo);
}
public void updateHmsDuty(HmsDutyVO vo) throws Exception {
this.update("hmsDutyDAO.updateHmsDuty_S", (Object)vo);
}
public void deleteHmsDuty(HmsDutyVO vo) throws Exception {
this.delete("hmsDutyDAO.deleteHmsDuty_S", (Object)vo);
}
public HmsDutyVO selectHmsDuty(HmsDutyVO vo) throws Exception {
return (HmsDutyVO)this.selectByPk("hmsDutyDAO.selectHmsDuty_S", (Object)vo);
}
public List selectHmsDutyList(HmsDutyDefaultVO searchVO) throws Exception {
return this.list("hmsDutyDAO.selectHmsDutyList_D", (Object)searchVO);
}
public int selectHmsDutyListTotCnt(HmsDutyDefaultVO searchVO) {
return (Integer)this.getSqlMapClientTemplate().queryForObject("hmsDutyDAO.selectHmsDutyListTotCnt_S", (Object)searchVO);
}
}

View File

@@ -0,0 +1,32 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.duty.service.HmsDutyService
* egovframework.cms.duty.vo.HmsDutyDefaultVO
* egovframework.cms.duty.vo.HmsDutyVO
* javax.servlet.http.HttpServletRequest
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.duty.service;
import egovframework.cms.duty.vo.HmsDutyDefaultVO;
import egovframework.cms.duty.vo.HmsDutyVO;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.multipart.MultipartHttpServletRequest;
public interface HmsDutyService {
public String insertHmsDuty(HmsDutyVO var1, MultipartHttpServletRequest var2) throws Exception;
public void updateHmsDuty(HmsDutyVO var1, MultipartHttpServletRequest var2) throws Exception;
public void deleteHmsDuty(HmsDutyVO var1, HttpServletRequest var2) throws Exception;
public HmsDutyVO selectHmsDuty(HmsDutyVO var1) throws Exception;
public List selectHmsDutyList(HmsDutyDefaultVO var1) throws Exception;
public int selectHmsDutyListTotCnt(HmsDutyDefaultVO var1);
}

View File

@@ -0,0 +1,202 @@
package egovframework.cms.duty.service.impl;
import egovframework.cms.duty.dao.HmsDutyDAO;
import egovframework.cms.duty.service.HmsDutyService;
import egovframework.cms.duty.vo.HmsDutyDefaultVO;
import egovframework.cms.duty.vo.HmsDutyVO;
import egovframework.cms.log.service.HmsLogService;
import egovframework.cms.log.vo.HmsLogVO;
import egovframework.com.cmm.LoginVO;
import egovframework.com.cmm.service.EgovFileMngService;
import egovframework.com.cmm.service.EgovFileMngUtil;
import egovframework.com.cmm.service.FileVO;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.edosi.resource.EdosiResource;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Service("hmsDutyService")
public class HmsDutyServiceImpl implements HmsDutyService {
@Resource(name = "hmsDutyDAO")
private HmsDutyDAO hmsDutyDAO;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileMngService;
@Resource(name = "EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name = "commonIdGnrService")
private EgovIdGnrService egovIdGnrService;
@Resource(name = "hmsLogService")
private HmsLogService hmsLogService;
public String insertHmsDuty(HmsDutyVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
vo.setDutySeq(this.egovIdGnrService.getNextStringId());
vo.setDutyCd(vo.getDutySeq());
this.hmsDutyDAO.insertHmsDuty(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_INSERT);
logVO.setLogObject(HmsLogVO.OBJ_HMS_DUTY);
logVO.setLogMessage("");
logVO.setSeq(vo.getDutySeq());
this.hmsLogService.insertHmsLog(logVO, null);
return null;
}
public void updateHmsDuty(HmsDutyVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
this.hmsDutyDAO.updateHmsDuty(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_UPDATE);
logVO.setLogObject(HmsLogVO.OBJ_HMS_DUTY);
logVO.setLogMessage("");
logVO.setSeq(vo.getDutySeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public void deleteHmsDuty(HmsDutyVO vo, HttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
this.hmsDutyDAO.deleteHmsDuty(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_DELETE);
logVO.setLogObject(HmsLogVO.OBJ_HMS_DUTY);
logVO.setLogMessage("");
logVO.setSeq(vo.getDutySeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public HmsDutyVO selectHmsDuty(HmsDutyVO vo) throws Exception {
HmsDutyVO resultVO = this.hmsDutyDAO.selectHmsDuty(vo);
return resultVO;
}
public List selectHmsDutyList(HmsDutyDefaultVO searchVO) throws Exception {
return this.hmsDutyDAO.selectHmsDutyList(searchVO);
}
public int selectHmsDutyListTotCnt(HmsDutyDefaultVO searchVO) {
return this.hmsDutyDAO.selectHmsDutyListTotCnt(searchVO);
}
public String addMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
String fileId = "";
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
String whitelist = EdosiResource.getInstance().getValue("attach.whitelist");
String[] ext = whitelist.split(",");
if (ext != null && ext.length > 0) {
boolean check = false;
for (int i = 0; i < ext.length; i++) {
if (fn.endsWith(ext[i])) {
check = true;
break;
}
}
if (check)
file.put(key, mf);
}
}
}
String _atchFileId = "";
if (!file.isEmpty()) {
List<FileVO> _result = null;
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
_atchFileId = this.fileMngService.insertFileInfs(_result);
}
fileId = _atchFileId;
}
return fileId;
}
public String updateMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm, String fileId, boolean multiple) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
String whitelist = EdosiResource.getInstance().getValue("attach.whitelist");
String[] ext = whitelist.split(",");
if (ext != null && ext.length > 0) {
boolean check = false;
for (int i = 0; i < ext.length; i++) {
if (fn.endsWith(ext[i])) {
check = true;
break;
}
}
if (check)
file.put(key, mf);
}
}
}
String[] delcheck = multiRequest.getParameterValues("delcheck");
if (delcheck != null) {
FileVO fileVO = null;
for (int i = 0; i < delcheck.length; i++) {
String[] fileInf = delcheck[i].split("\\|");
fileVO = new FileVO();
fileVO.setAtchFileId(fileInf[0]);
fileVO.setFileSn(fileInf[1]);
this.fileMngService.deleteFileInf(fileVO);
}
}
if (!file.isEmpty()) {
List<FileVO> _result = null;
if (multiple) {
if (fileId == null || fileId.equals("")) {
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
} else {
FileVO fvo = new FileVO();
fvo.setAtchFileId(fileId);
int cnt = this.fileMngService.getMaxFileSN(fvo);
_result = this.fileUtil.parseFileInf(file, "FILE_", cnt, fileId, "");
this.fileMngService.updateFileInfs(_result);
}
} else {
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
}
}
if (fileId != null && !fileId.equals("")) {
FileVO fileVO = new FileVO();
fileVO.setAtchFileId(fileId);
List<FileVO> result = this.fileMngService.selectFileInfs(fileVO);
if (result.size() == 0)
fileId = "";
}
}
return fileId;
}
}

View File

@@ -0,0 +1,155 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.duty.vo.HmsDutyDefaultVO
*/
package egovframework.cms.duty.vo;
import java.io.Serializable;
public class HmsDutyDefaultVO
implements Serializable {
private String searchCondition;
private String searchKeyword;
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 String bmode;
private String parentUrl;
private String pageUseYn = "Y";
private String orderby;
private String dutySeq;
public void setSearchCondition(String searchCondition) {
this.searchCondition = searchCondition;
}
public String getSearchCondition() {
return this.searchCondition;
}
public void setSearchKeyword(String searchKeyword) {
this.searchKeyword = searchKeyword;
}
public String getSearchKeyword() {
return this.searchKeyword;
}
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
public String getSearchUseYn() {
return this.searchUseYn;
}
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
public int getPageIndex() {
return this.pageIndex;
}
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
public int getPageUnit() {
return this.pageUnit;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getPageSize() {
return this.pageSize;
}
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
public int getFirstIndex() {
return this.firstIndex;
}
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
public int getLastIndex() {
return this.lastIndex;
}
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
public int getRecordCountPerPage() {
return this.recordCountPerPage;
}
public void setBmode(String bmode) {
this.bmode = bmode;
}
public String getBmode() {
return this.bmode;
}
public void setParentUrl(String parentUrl) {
this.parentUrl = parentUrl;
}
public String getParentUrl() {
return this.parentUrl;
}
public void setPageUseYn(String pageUseYn) {
this.pageUseYn = pageUseYn;
}
public String getPageUseYn() {
return this.pageUseYn;
}
public void setOrderby(String orderby) {
this.orderby = orderby;
}
public String getOrderby() {
return this.orderby;
}
public void setDutySeq(String dutySeq) {
this.dutySeq = dutySeq;
}
public String getDutySeq() {
return this.dutySeq;
}
public String toParam() {
StringBuilder sb = new StringBuilder();
sb.append("?pageIndex=" + this.pageIndex);
if (this.bmode != null && !this.bmode.equals("")) {
sb.append("&bmode=" + this.bmode);
}
if (this.searchCondition != null && !this.searchCondition.equals("")) {
sb.append("&searchCondition=" + this.searchCondition);
}
if (this.searchKeyword != null && !this.searchKeyword.equals("")) {
sb.append("&searchKeyword=" + this.searchKeyword);
}
return sb.toString();
}
}

View File

@@ -0,0 +1,61 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.duty.vo.HmsDutyDefaultVO
* egovframework.cms.duty.vo.HmsDutyVO
*/
package egovframework.cms.duty.vo;
import egovframework.cms.duty.vo.HmsDutyDefaultVO;
import java.sql.Date;
public class HmsDutyVO
extends HmsDutyDefaultVO {
private String dutySeq;
private String dutyCd;
private String dutyNm;
private String recSts;
private Date createDate;
public void setDutySeq(String dutySeq) {
this.dutySeq = dutySeq;
}
public String getDutySeq() {
return this.dutySeq;
}
public void setDutyCd(String dutyCd) {
this.dutyCd = dutyCd;
}
public String getDutyCd() {
return this.dutyCd;
}
public void setDutyNm(String dutyNm) {
this.dutyNm = dutyNm;
}
public String getDutyNm() {
return this.dutyNm;
}
public void setRecSts(String recSts) {
this.recSts = recSts;
}
public String getRecSts() {
return this.recSts;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Date getCreateDate() {
return this.createDate;
}
}

View File

@@ -0,0 +1,250 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.duty.service.HmsDutyService
* egovframework.cms.duty.vo.HmsDutyDefaultVO
* egovframework.cms.duty.vo.HmsDutyVO
* egovframework.cms.duty.web.HmsDutyController
* egovframework.com.cmm.LoginVO
* egovframework.edosi.common.code.CodeResource
* egovframework.edosi.egov.helper.UserDetailsHelper
* egovframework.edosi.filter.XssFilter
* egovframework.rte.fdl.property.EgovPropertyService
* egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo
* javax.annotation.Resource
* javax.servlet.RequestDispatcher
* javax.servlet.ServletRequest
* javax.servlet.ServletResponse
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.ModelAttribute
* org.springframework.web.bind.annotation.RequestMapping
* org.springframework.web.bind.annotation.SessionAttributes
* org.springframework.web.bind.support.SessionStatus
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.duty.web;
import egovframework.cms.duty.service.HmsDutyService;
import egovframework.cms.duty.vo.HmsDutyDefaultVO;
import egovframework.cms.duty.vo.HmsDutyVO;
import egovframework.com.cmm.LoginVO;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.edosi.filter.XssFilter;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Controller
@SessionAttributes(types={HmsDutyVO.class})
public class HmsDutyController {
@Resource(name="hmsDutyService")
private HmsDutyService hmsDutyService;
@Resource(name="propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="codeResource")
private CodeResource codeResource;
@RequestMapping(value={"/hms/hmsDuty/hmsDutyIndex.do"})
public String hmsDutyIndex(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDutyDefaultVO searchVO, ModelMap modelMap, Model model) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = this.selectHmsDutyList(request, response, searchVO, model);
} else if (bmode.equals("detail")) {
viewName = this.selectHmsDuty(request, response, searchVO, model);
} else if (bmode.equals("add")) {
viewName = this.addHmsDutyView(request, response, searchVO, model);
} else if (bmode.equals("modify")) {
viewName = this.updateHmsDuty(request, response, searchVO, model);
}
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
model.addAttribute("bmode", (Object)bmode);
model.addAttribute("loginVO", (Object)loginVO);
model.addAttribute("ROLE_USER", (Object)UserDetailsHelper.isRole((String)"ROLE_USER"));
this.initModelData(model, bmode);
return viewName;
}
private void initModelData(Model model, String bmode) throws Exception {
HashMap param = new HashMap();
this.initModelData(param, model, bmode);
}
private void initModelData(Map param, Model model, String bmode) throws Exception {
Iterator<String> it = param.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
String value = (String)param.get(key);
model.addAttribute(key, (Object)this.codeResource.getCodeList(value));
if (bmode == null || !bmode.equals("add") && !bmode.equals("modify")) continue;
model.addAttribute(key, (Object)this.codeResource.removeCodeResourceForNotUse(value));
}
}
private String selectHmsDutyList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDutyDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
searchVO.setPageUnit(this.propertiesService.getInt("pageUnit"));
searchVO.setPageSize(this.propertiesService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
int totCnt = 0;
try {
totCnt = this.hmsDutyService.selectHmsDutyListTotCnt(searchVO);
if (totCnt > 0) {
List hmsDutyList = this.hmsDutyService.selectHmsDutyList(searchVO);
model.addAttribute("resultList", (Object)hmsDutyList);
}
}
catch (Exception e) {
e.printStackTrace();
}
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", (Object)paginationInfo);
return "/cms/hmsDuty/HmsDutyList";
}
private String addHmsDutyView(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDutyDefaultVO searchVO, Model model) throws Exception {
HmsDutyVO hmsDutyVO = new HmsDutyVO();
model.addAttribute("hmsDutyVO", (Object)hmsDutyVO);
return "/cms/hmsDuty/HmsDutyRegister";
}
@RequestMapping(value={"/hms/hmsDuty/addHmsDuty.do"})
public String addHmsDuty(MultipartHttpServletRequest request, HttpServletResponse response, HmsDutyVO hmsDutyVO, @ModelAttribute(value="searchVO") HmsDutyDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
try {
this.hmsDutyService.insertHmsDuty(hmsDutyVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
return "redirect:" + searchVO.getParentUrl();
}
private String updateHmsDuty(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDutyDefaultVO searchVO, Model model) throws Exception {
HmsDutyVO hmsDutyVO = new HmsDutyVO();
hmsDutyVO.setDutySeq(searchVO.getDutySeq());
hmsDutyVO = this.hmsDutyService.selectHmsDuty(hmsDutyVO);
if (!this.checkWriteAuth(hmsDutyVO)) {
return "cmm/sessionError";
}
model.addAttribute("hmsDutyVO", (Object)hmsDutyVO);
return "/cms/hmsDuty/HmsDutyRegister";
}
@RequestMapping(value={"/hms/hmsDuty/updateHmsDuty.do"})
public String updateHmsDuty(MultipartHttpServletRequest request, HttpServletResponse response, HmsDutyVO hmsDutyVO, @ModelAttribute(value="searchVO") HmsDutyDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsDutyVO)) {
return "cmm/privilegeError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
try {
this.hmsDutyService.updateHmsDuty(hmsDutyVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + searchVO.getParentUrl() + searchVO.toParam() + "&dutySeq=" + hmsDutyVO.getDutySeq();
}
private String selectHmsDuty(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsDutyDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
HmsDutyVO hmsDutyVO = new HmsDutyVO();
hmsDutyVO.setDutySeq(searchVO.getDutySeq());
try {
hmsDutyVO = this.hmsDutyService.selectHmsDuty(hmsDutyVO);
}
catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("hmsDutyVO", (Object)hmsDutyVO);
model.addAttribute("checkWriteAuth", (Object)this.checkWriteAuth(hmsDutyVO));
return "/cms/hmsDuty/HmsDutyDetail";
}
@RequestMapping(value={"/hms/hmsDuty/deleteHmsDuty.do"})
public String deleteHmsDuty(HttpServletRequest request, HmsDutyVO hmsDutyVO, @ModelAttribute(value="searchVO") HmsDutyDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsDutyVO)) {
return "cmm/privilegeError";
}
try {
this.hmsDutyService.deleteHmsDuty(hmsDutyVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
searchVO.setBmode(null);
return "redirect:" + searchVO.getParentUrl() + searchVO.toParam();
}
private boolean checkWriteAuth(HmsDutyVO hmsDutyVO) {
if (UserDetailsHelper.isRole((String)"ROLE_USER").booleanValue()) {
return true;
}
return UserDetailsHelper.isRole((String)"ROLE_ADMIN") != false;
}
}

View File

@@ -0,0 +1,46 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.env.dao.HmsEnvDAO
* egovframework.cms.env.vo.HmsEnvDefaultVO
* egovframework.cms.env.vo.HmsEnvVO
* egovframework.com.cmm.service.impl.EgovComAbstractDAO
* org.springframework.stereotype.Repository
*/
package egovframework.cms.env.dao;
import egovframework.cms.env.vo.HmsEnvDefaultVO;
import egovframework.cms.env.vo.HmsEnvVO;
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
import java.util.List;
import org.springframework.stereotype.Repository;
@Repository(value="hmsEnvDAO")
public class HmsEnvDAO
extends EgovComAbstractDAO {
public String insertHmsEnv(HmsEnvVO vo) throws Exception {
return (String)this.insert("hmsEnvDAO.insertHmsEnv_S", (Object)vo);
}
public void updateHmsEnv(HmsEnvVO vo) throws Exception {
this.update("hmsEnvDAO.updateHmsEnv_S", (Object)vo);
}
public void deleteHmsEnv(HmsEnvVO vo) throws Exception {
this.delete("hmsEnvDAO.deleteHmsEnv_S", (Object)vo);
}
public HmsEnvVO selectHmsEnv(HmsEnvVO vo) throws Exception {
return (HmsEnvVO)this.select("hmsEnvDAO.selectHmsEnv_S", (Object)vo);
}
public List selectHmsEnvList(HmsEnvDefaultVO searchVO) throws Exception {
return this.list("hmsEnvDAO.selectHmsEnvList_D", (Object)searchVO);
}
public int selectHmsEnvListTotCnt(HmsEnvDefaultVO searchVO) {
return (Integer)this.select("hmsEnvDAO.selectHmsEnvListTotCnt_S", (Object)searchVO);
}
}

View File

@@ -0,0 +1,32 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.env.service.HmsEnvService
* egovframework.cms.env.vo.HmsEnvDefaultVO
* egovframework.cms.env.vo.HmsEnvVO
* javax.servlet.http.HttpServletRequest
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.env.service;
import egovframework.cms.env.vo.HmsEnvDefaultVO;
import egovframework.cms.env.vo.HmsEnvVO;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.multipart.MultipartHttpServletRequest;
public interface HmsEnvService {
public String insertHmsEnv(HmsEnvVO var1, MultipartHttpServletRequest var2) throws Exception;
public void updateHmsEnv(HmsEnvVO var1, MultipartHttpServletRequest var2) throws Exception;
public void deleteHmsEnv(HmsEnvVO var1, HttpServletRequest var2) throws Exception;
public HmsEnvVO selectHmsEnv(HmsEnvVO var1) throws Exception;
public List selectHmsEnvList(HmsEnvDefaultVO var1) throws Exception;
public int selectHmsEnvListTotCnt(HmsEnvDefaultVO var1);
}

View File

@@ -0,0 +1,232 @@
package egovframework.cms.env.service.impl;
import egovframework.cms.code.service.ComtccmmndetailcodeService;
import egovframework.cms.code.vo.ComtccmmndetailcodeVO;
import egovframework.cms.env.dao.HmsEnvDAO;
import egovframework.cms.env.service.HmsEnvService;
import egovframework.cms.env.vo.HmsEnvDefaultVO;
import egovframework.cms.env.vo.HmsEnvVO;
import egovframework.cms.log.service.HmsLogService;
import egovframework.cms.log.vo.HmsLogVO;
import egovframework.com.cmm.LoginVO;
import egovframework.com.cmm.service.CmmnDetailCode;
import egovframework.com.cmm.service.EgovFileMngService;
import egovframework.com.cmm.service.EgovFileMngUtil;
import egovframework.com.cmm.service.FileVO;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.edosi.resource.EdosiResource;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Service("hmsEnvService")
public class HmsEnvServiceImpl implements HmsEnvService {
@Resource(name = "hmsEnvDAO")
private HmsEnvDAO hmsEnvDAO;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileMngService;
@Resource(name = "EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name = "commonIdGnrService")
private EgovIdGnrService egovIdGnrService;
@Resource(name = "hmsLogService")
private HmsLogService hmsLogService;
@Resource(name = "comtccmmndetailcodeService")
private ComtccmmndetailcodeService comtccmmndetailcodeService;
@Resource(name = "codeResource")
private CodeResource codeResource;
public String insertHmsEnv(HmsEnvVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
vo.setLogoImage(this.egovIdGnrService.getNextStringId());
this.hmsEnvDAO.insertHmsEnv(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_INSERT);
logVO.setLogObject("HMS_ENV");
logVO.setLogMessage("");
logVO.setSeq(vo.getLogoImage());
this.hmsLogService.insertHmsLog(logVO, null);
return null;
}
public void updateHmsEnv(HmsEnvVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
List<CmmnDetailCode> list = this.codeResource.getCodeList("CUS001");
Map<String, Object> data = new HashMap<>();
for (int i = 0; i < list.size(); i++)
data.put(((CmmnDetailCode)list.get(i)).getCode(), ((CmmnDetailCode)list.get(i)).getCodeDc());
String adminLogoImage = updateMultiFiles(request, "file_1", (String)data.get("CUS001001"), false);
String userLogoImage = updateMultiFiles(request, "file_2", (String)data.get("CUS001002"), false);
ComtccmmndetailcodeVO comtccmmndetailcodeVO = new ComtccmmndetailcodeVO();
comtccmmndetailcodeVO.setCodeId("CUS001");
comtccmmndetailcodeVO.setCode("CUS001001");
comtccmmndetailcodeVO.setCodeDc(adminLogoImage);
comtccmmndetailcodeVO.setUseAt("Y");
comtccmmndetailcodeVO.setSort("10");
this.comtccmmndetailcodeService.updateComtccmmndetailcode(comtccmmndetailcodeVO);
comtccmmndetailcodeVO.setCode(null);
comtccmmndetailcodeVO.setCodeDc(null);
comtccmmndetailcodeVO.setCode("CUS001002");
comtccmmndetailcodeVO.setCodeDc(userLogoImage);
this.comtccmmndetailcodeService.updateComtccmmndetailcode(comtccmmndetailcodeVO);
comtccmmndetailcodeVO.setCode(null);
comtccmmndetailcodeVO.setCodeDc(null);
comtccmmndetailcodeVO.setCode("CUS001003");
comtccmmndetailcodeVO.setCodeDc(request.getParameter("footerText"));
this.comtccmmndetailcodeService.updateComtccmmndetailcode(comtccmmndetailcodeVO);
comtccmmndetailcodeVO.setCode(null);
comtccmmndetailcodeVO.setCodeDc(null);
comtccmmndetailcodeVO.setCode("CUS001004");
comtccmmndetailcodeVO.setCodeDc(request.getParameter("notUserIds"));
this.comtccmmndetailcodeService.updateComtccmmndetailcode(comtccmmndetailcodeVO);
comtccmmndetailcodeVO.setCode(null);
comtccmmndetailcodeVO.setCodeDc(null);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_UPDATE);
logVO.setLogObject("HMS_ENV");
logVO.setLogMessage("");
logVO.setSeq(vo.getLogoImage());
this.hmsLogService.insertHmsLog(logVO, null);
}
public void deleteHmsEnv(HmsEnvVO vo, HttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
this.hmsEnvDAO.deleteHmsEnv(vo);
}
public HmsEnvVO selectHmsEnv(HmsEnvVO vo) throws Exception {
HmsEnvVO resultVO = this.hmsEnvDAO.selectHmsEnv(vo);
return resultVO;
}
public List selectHmsEnvList(HmsEnvDefaultVO searchVO) throws Exception {
return this.hmsEnvDAO.selectHmsEnvList(searchVO);
}
public int selectHmsEnvListTotCnt(HmsEnvDefaultVO searchVO) {
return this.hmsEnvDAO.selectHmsEnvListTotCnt(searchVO);
}
public String addMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
String fileId = "";
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
String whitelist = EdosiResource.getInstance().getValue("attach.whitelist");
String[] ext = whitelist.split(",");
if (ext != null && ext.length > 0) {
boolean check = false;
for (int i = 0; i < ext.length; i++) {
if (fn.endsWith(ext[i])) {
check = true;
break;
}
}
if (check)
file.put(key, mf);
}
}
}
String _atchFileId = "";
if (!file.isEmpty()) {
List<FileVO> _result = null;
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
_atchFileId = this.fileMngService.insertFileInfs(_result);
}
fileId = _atchFileId;
}
return fileId;
}
public String updateMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm, String fileId, boolean multiple) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
String whitelist = EdosiResource.getInstance().getValue("attach.whitelist");
String[] ext = whitelist.split(",");
if (ext != null && ext.length > 0) {
boolean check = false;
for (int i = 0; i < ext.length; i++) {
if (fn.endsWith(ext[i])) {
check = true;
break;
}
}
if (check)
file.put(key, mf);
}
}
}
String[] delcheck = multiRequest.getParameterValues("delcheck");
if (delcheck != null) {
FileVO fileVO = null;
for (int i = 0; i < delcheck.length; i++) {
String[] fileInf = delcheck[i].split("\\|");
fileVO = new FileVO();
fileVO.setAtchFileId(fileInf[0]);
fileVO.setFileSn(fileInf[1]);
this.fileMngService.deleteFileInf(fileVO);
}
}
if (!file.isEmpty()) {
List<FileVO> _result = null;
if (multiple) {
if (fileId == null || fileId.equals("")) {
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
} else {
FileVO fvo = new FileVO();
fvo.setAtchFileId(fileId);
int cnt = this.fileMngService.getMaxFileSN(fvo);
_result = this.fileUtil.parseFileInf(file, "FILE_", cnt, fileId, "");
this.fileMngService.updateFileInfs(_result);
}
} else {
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
}
}
if (fileId != null && !fileId.equals("")) {
FileVO fileVO = new FileVO();
fileVO.setAtchFileId(fileId);
List<FileVO> result = this.fileMngService.selectFileInfs(fileVO);
if (result.size() == 0)
fileId = "";
}
}
return fileId;
}
}

View File

@@ -0,0 +1,155 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.env.vo.HmsEnvDefaultVO
*/
package egovframework.cms.env.vo;
import java.io.Serializable;
public class HmsEnvDefaultVO
implements Serializable {
private String searchCondition;
private String searchKeyword;
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 String bmode;
private String parentUrl;
private String pageUseYn = "Y";
private String orderby;
private String logoImage;
public void setSearchCondition(String searchCondition) {
this.searchCondition = searchCondition;
}
public String getSearchCondition() {
return this.searchCondition;
}
public void setSearchKeyword(String searchKeyword) {
this.searchKeyword = searchKeyword;
}
public String getSearchKeyword() {
return this.searchKeyword;
}
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
public String getSearchUseYn() {
return this.searchUseYn;
}
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
public int getPageIndex() {
return this.pageIndex;
}
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
public int getPageUnit() {
return this.pageUnit;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getPageSize() {
return this.pageSize;
}
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
public int getFirstIndex() {
return this.firstIndex;
}
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
public int getLastIndex() {
return this.lastIndex;
}
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
public int getRecordCountPerPage() {
return this.recordCountPerPage;
}
public void setBmode(String bmode) {
this.bmode = bmode;
}
public String getBmode() {
return this.bmode;
}
public void setParentUrl(String parentUrl) {
this.parentUrl = parentUrl;
}
public String getParentUrl() {
return this.parentUrl;
}
public void setPageUseYn(String pageUseYn) {
this.pageUseYn = pageUseYn;
}
public String getPageUseYn() {
return this.pageUseYn;
}
public void setOrderby(String orderby) {
this.orderby = orderby;
}
public String getOrderby() {
return this.orderby;
}
public void setLogoImage(String logoImage) {
this.logoImage = logoImage;
}
public String getLogoImage() {
return this.logoImage;
}
public String toParam() {
StringBuilder sb = new StringBuilder();
sb.append("?pageIndex=" + this.pageIndex);
if (this.bmode != null && !this.bmode.equals("")) {
sb.append("&bmode=" + this.bmode);
}
if (this.searchCondition != null && !this.searchCondition.equals("")) {
sb.append("&searchCondition=" + this.searchCondition);
}
if (this.searchKeyword != null && !this.searchKeyword.equals("")) {
sb.append("&searchKeyword=" + this.searchKeyword);
}
return sb.toString();
}
}

View File

@@ -0,0 +1,96 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.env.vo.HmsEnvDefaultVO
* egovframework.cms.env.vo.HmsEnvVO
*/
package egovframework.cms.env.vo;
import egovframework.cms.env.vo.HmsEnvDefaultVO;
public class HmsEnvVO
extends HmsEnvDefaultVO {
private String logoImage;
private String headerImage;
private String footerText;
private String loginFooterImage;
private String versionType;
private String introImage;
private String mobileIntroImage;
private String mobileLogoImage;
private String notUserIds;
public void setLogoImage(String logoImage) {
this.logoImage = logoImage;
}
public String getLogoImage() {
return this.logoImage;
}
public void setHeaderImage(String headerImage) {
this.headerImage = headerImage;
}
public String getHeaderImage() {
return this.headerImage;
}
public void setFooterText(String footerText) {
this.footerText = footerText;
}
public String getFooterText() {
return this.footerText;
}
public void setLoginFooterImage(String loginFooterImage) {
this.loginFooterImage = loginFooterImage;
}
public String getLoginFooterImage() {
return this.loginFooterImage;
}
public void setVersionType(String versionType) {
this.versionType = versionType;
}
public String getVersionType() {
return this.versionType;
}
public String getIntroImage() {
return this.introImage;
}
public void setIntroImage(String introImage) {
this.introImage = introImage;
}
public String getMobileIntroImage() {
return this.mobileIntroImage;
}
public void setMobileIntroImage(String mobileIntroImage) {
this.mobileIntroImage = mobileIntroImage;
}
public String getMobileLogoImage() {
return this.mobileLogoImage;
}
public void setMobileLogoImage(String mobileLogoImage) {
this.mobileLogoImage = mobileLogoImage;
}
public String getNotUserIds() {
return this.notUserIds;
}
public void setNotUserIds(String notUserIds) {
this.notUserIds = notUserIds;
}
}

View File

@@ -0,0 +1,195 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.env.service.HmsEnvService
* egovframework.cms.env.vo.HmsEnvDefaultVO
* egovframework.cms.env.vo.HmsEnvVO
* egovframework.cms.env.web.HmsEnvController
* egovframework.com.cmm.LoginVO
* egovframework.com.cmm.service.CmmnDetailCode
* egovframework.common.dwr.DwrCommonService
* egovframework.common.service.CommonService
* egovframework.edosi.common.code.CodeResource
* egovframework.edosi.egov.helper.UserDetailsHelper
* egovframework.edosi.filter.XssFilter
* egovframework.rte.fdl.property.EgovPropertyService
* javax.annotation.Resource
* javax.servlet.RequestDispatcher
* javax.servlet.ServletRequest
* javax.servlet.ServletResponse
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.ModelAttribute
* org.springframework.web.bind.annotation.RequestMapping
* org.springframework.web.bind.annotation.SessionAttributes
* org.springframework.web.bind.support.SessionStatus
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.env.web;
import egovframework.cms.env.service.HmsEnvService;
import egovframework.cms.env.vo.HmsEnvDefaultVO;
import egovframework.cms.env.vo.HmsEnvVO;
import egovframework.com.cmm.LoginVO;
import egovframework.com.cmm.service.CmmnDetailCode;
import egovframework.common.dwr.DwrCommonService;
import egovframework.common.service.CommonService;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.edosi.filter.XssFilter;
import egovframework.rte.fdl.property.EgovPropertyService;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Controller
@SessionAttributes(types={HmsEnvVO.class})
public class HmsEnvController {
@Resource(name="hmsEnvService")
private HmsEnvService hmsEnvService;
@Resource(name="propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="codeResource")
private CodeResource codeResource;
@Resource(name="commonService")
private CommonService commonService;
@Resource(name="dwrCommonService")
private DwrCommonService dwrCommonService;
@RequestMapping(value={"/hms/hmsEnv/hmsEnvIndex.do"})
public String hmsEnvIndex(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsEnvDefaultVO searchVO, ModelMap modelMap, Model model) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = this.selectHmsEnv(request, response, searchVO, model);
} else if (bmode.equals("detail")) {
viewName = this.selectHmsEnv(request, response, searchVO, model);
} else if (bmode.equals("modify")) {
viewName = this.updateHmsEnv(request, response, searchVO, model);
}
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
model.addAttribute("bmode", (Object)bmode);
model.addAttribute("loginVO", (Object)loginVO);
this.initModelData(model, bmode);
return viewName;
}
private void initModelData(Model model, String bmode) throws Exception {
HashMap param = new HashMap();
this.initModelData(param, model, bmode);
}
private void initModelData(Map param, Model model, String bmode) throws Exception {
Iterator<String> it = param.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
String value = (String)param.get(key);
model.addAttribute(key, (Object)this.codeResource.getCodeList(value));
if (bmode == null || !bmode.equals("add") && !bmode.equals("modify")) continue;
model.addAttribute(key, (Object)this.codeResource.removeCodeResourceForNotUse(value));
}
}
private String updateHmsEnv(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsEnvDefaultVO searchVO, Model model) throws Exception {
if (!this.checkWriteAuth(null)) {
return "cmm/privilegeError";
}
List list = this.codeResource.getCodeList("CUS001");
HashMap<String, String> data = new HashMap<String, String>();
int i = 0;
while (i < list.size()) {
data.put(((CmmnDetailCode)list.get(i)).getCode(), ((CmmnDetailCode)list.get(i)).getCodeDc());
++i;
}
model.addAttribute("data", data);
return "/cms/hmsEnv/HmsEnvRegister";
}
@RequestMapping(value={"/hms/hmsEnv/updateHmsEnv.do"})
public String updateHmsEnv(MultipartHttpServletRequest request, HttpServletResponse response, HmsEnvVO hmsEnvVO, @ModelAttribute(value="searchVO") HmsEnvDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsEnvVO)) {
return "cmm/privilegeError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
try {
this.hmsEnvService.updateHmsEnv(hmsEnvVO, request);
this.codeResource.setCodeList("CUS001");
List list = this.codeResource.getCodeList("CUS001");
HashMap<String, String> data = new HashMap<String, String>();
int i = 0;
while (i < list.size()) {
data.put(((CmmnDetailCode)list.get(i)).getCode(), ((CmmnDetailCode)list.get(i)).getCodeDc());
++i;
}
request.getSession().setAttribute("env", data);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), (HttpServletRequest)request) + searchVO.toParam();
}
private String selectHmsEnv(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsEnvDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
try {
List list = this.codeResource.getCodeList("CUS001");
HashMap<String, String> data = new HashMap<String, String>();
int i = 0;
while (i < list.size()) {
data.put(((CmmnDetailCode)list.get(i)).getCode(), ((CmmnDetailCode)list.get(i)).getCodeDc());
++i;
}
model.addAttribute("data", data);
model.addAttribute("checkWriteAuth", (Object)this.checkWriteAuth(null));
}
catch (Exception e) {
e.printStackTrace();
}
return "/cms/hmsEnv/HmsEnvDetail";
}
private boolean checkWriteAuth(HmsEnvVO hmsEnvVO) {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
if (UserDetailsHelper.isRole((String)"ROLE_SYSTEM").booleanValue()) {
return true;
}
return true;
}
}

View File

@@ -0,0 +1,46 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.log.dao.HmsLogDAO
* egovframework.cms.log.vo.HmsLogDefaultVO
* egovframework.cms.log.vo.HmsLogVO
* egovframework.com.cmm.service.impl.EgovComAbstractDAO
* org.springframework.stereotype.Repository
*/
package egovframework.cms.log.dao;
import egovframework.cms.log.vo.HmsLogDefaultVO;
import egovframework.cms.log.vo.HmsLogVO;
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
import java.util.List;
import org.springframework.stereotype.Repository;
@Repository(value="hmsLogDAO")
public class HmsLogDAO
extends EgovComAbstractDAO {
public String insertHmsLog(HmsLogVO vo) throws Exception {
return (String)this.insert("hmsLogDAO.insertHmsLog_S", (Object)vo);
}
public void updateHmsLog(HmsLogVO vo) throws Exception {
this.update("hmsLogDAO.updateHmsLog_S", (Object)vo);
}
public void deleteHmsLog(HmsLogVO vo) throws Exception {
this.delete("hmsLogDAO.deleteHmsLog_S", (Object)vo);
}
public HmsLogVO selectHmsLog(HmsLogVO vo) throws Exception {
return (HmsLogVO)this.selectByPk("hmsLogDAO.selectHmsLog_S", (Object)vo);
}
public List selectHmsLogList(HmsLogDefaultVO searchVO) throws Exception {
return this.list("hmsLogDAO.selectHmsLogList_D", (Object)searchVO);
}
public int selectHmsLogListTotCnt(HmsLogDefaultVO searchVO) {
return (Integer)this.select("hmsLogDAO.selectHmsLogListTotCnt_S", (Object)searchVO);
}
}

View File

@@ -0,0 +1,30 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.log.service.HmsLogService
* egovframework.cms.log.vo.HmsLogDefaultVO
* egovframework.cms.log.vo.HmsLogVO
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.log.service;
import egovframework.cms.log.vo.HmsLogDefaultVO;
import egovframework.cms.log.vo.HmsLogVO;
import java.util.List;
import org.springframework.web.multipart.MultipartHttpServletRequest;
public interface HmsLogService {
public String insertHmsLog(HmsLogVO var1, MultipartHttpServletRequest var2) throws Exception;
public void updateHmsLog(HmsLogVO var1, MultipartHttpServletRequest var2) throws Exception;
public void deleteHmsLog(HmsLogVO var1) throws Exception;
public HmsLogVO selectHmsLog(HmsLogVO var1) throws Exception;
public List selectHmsLogList(HmsLogDefaultVO var1) throws Exception;
public int selectHmsLogListTotCnt(HmsLogDefaultVO var1);
}

View File

@@ -0,0 +1,137 @@
package egovframework.cms.log.service.impl;
import egovframework.cms.log.dao.HmsLogDAO;
import egovframework.cms.log.service.HmsLogService;
import egovframework.cms.log.vo.HmsLogDefaultVO;
import egovframework.cms.log.vo.HmsLogVO;
import egovframework.com.cmm.service.EgovFileMngService;
import egovframework.com.cmm.service.EgovFileMngUtil;
import egovframework.com.cmm.service.FileVO;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Service("hmsLogService")
public class HmsLogServiceImpl implements HmsLogService {
@Resource(name = "hmsLogDAO")
private HmsLogDAO hmsLogDAO;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileMngService;
@Resource(name = "EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name = "logIdGnrService")
private EgovIdGnrService egovIdGnrService;
public String insertHmsLog(HmsLogVO vo, MultipartHttpServletRequest request) throws Exception {
vo.setLogSeq(this.egovIdGnrService.getNextStringId());
this.hmsLogDAO.insertHmsLog(vo);
return null;
}
public void updateHmsLog(HmsLogVO vo, MultipartHttpServletRequest request) throws Exception {
this.hmsLogDAO.updateHmsLog(vo);
}
public void deleteHmsLog(HmsLogVO vo) throws Exception {
this.hmsLogDAO.deleteHmsLog(vo);
}
public HmsLogVO selectHmsLog(HmsLogVO vo) throws Exception {
HmsLogVO resultVO = this.hmsLogDAO.selectHmsLog(vo);
return resultVO;
}
public List selectHmsLogList(HmsLogDefaultVO searchVO) throws Exception {
return this.hmsLogDAO.selectHmsLogList(searchVO);
}
public int selectHmsLogListTotCnt(HmsLogDefaultVO searchVO) {
return this.hmsLogDAO.selectHmsLogListTotCnt(searchVO);
}
public String addMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
String fileId = "";
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
if (!fn.endsWith(".exe") && !fn.endsWith(".php") && !fn.endsWith(".jsp") && !fn.endsWith(".bat") && !fn.endsWith(".sh") && !fn.endsWith(".asp") &&
!fn.equals(""))
file.put(key, mf);
}
}
String _atchFileId = "";
if (!file.isEmpty()) {
List<FileVO> _result = null;
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
_atchFileId = this.fileMngService.insertFileInfs(_result);
}
fileId = _atchFileId;
}
return fileId;
}
public String updateMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm, String fileId) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
if (!fn.endsWith(".exe") && !fn.endsWith(".php") && !fn.endsWith(".jsp") && !fn.endsWith(".bat") && !fn.endsWith(".sh") && !fn.endsWith(".asp") &&
!fn.equals(""))
file.put(key, mf);
}
}
String[] delcheck = multiRequest.getParameterValues("delcheck");
if (delcheck != null) {
FileVO fileVO = null;
for (int i = 0; i < delcheck.length; i++) {
String[] fileInf = delcheck[i].split("\\|");
fileVO = new FileVO();
fileVO.setAtchFileId(fileInf[0]);
fileVO.setFileSn(fileInf[1]);
this.fileMngService.deleteFileInf(fileVO);
}
}
if (!file.isEmpty()) {
List<FileVO> _result = null;
if (fileId == null || fileId.equals("")) {
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
} else {
FileVO fvo = new FileVO();
fvo.setAtchFileId(fileId);
int cnt = this.fileMngService.getMaxFileSN(fvo);
_result = this.fileUtil.parseFileInf(file, "FILE_", cnt, fileId, "");
this.fileMngService.updateFileInfs(_result);
}
}
if (fileId != null && !fileId.equals("")) {
FileVO fileVO = new FileVO();
fileVO.setAtchFileId(fileId);
List<FileVO> result = this.fileMngService.selectFileInfs(fileVO);
if (result.size() == 0)
fileId = "";
}
}
return fileId;
}
}

View File

@@ -0,0 +1,155 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.log.vo.HmsLogDefaultVO
*/
package egovframework.cms.log.vo;
import java.io.Serializable;
public class HmsLogDefaultVO
implements Serializable {
private String searchCondition;
private String searchKeyword;
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 String bmode;
private String parentUrl;
private String pageUseYn = "Y";
private String orderby;
private String logSeq;
public void setSearchCondition(String searchCondition) {
this.searchCondition = searchCondition;
}
public String getSearchCondition() {
return this.searchCondition;
}
public void setSearchKeyword(String searchKeyword) {
this.searchKeyword = searchKeyword;
}
public String getSearchKeyword() {
return this.searchKeyword;
}
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
public String getSearchUseYn() {
return this.searchUseYn;
}
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
public int getPageIndex() {
return this.pageIndex;
}
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
public int getPageUnit() {
return this.pageUnit;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getPageSize() {
return this.pageSize;
}
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
public int getFirstIndex() {
return this.firstIndex;
}
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
public int getLastIndex() {
return this.lastIndex;
}
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
public int getRecordCountPerPage() {
return this.recordCountPerPage;
}
public void setBmode(String bmode) {
this.bmode = bmode;
}
public String getBmode() {
return this.bmode;
}
public void setParentUrl(String parentUrl) {
this.parentUrl = parentUrl;
}
public String getParentUrl() {
return this.parentUrl;
}
public void setPageUseYn(String pageUseYn) {
this.pageUseYn = pageUseYn;
}
public String getPageUseYn() {
return this.pageUseYn;
}
public void setOrderby(String orderby) {
this.orderby = orderby;
}
public String getOrderby() {
return this.orderby;
}
public void setLogSeq(String logSeq) {
this.logSeq = logSeq;
}
public String getLogSeq() {
return this.logSeq;
}
public String toParam() {
StringBuilder sb = new StringBuilder();
sb.append("?pageIndex=" + this.pageIndex);
if (!this.bmode.equals("")) {
sb.append("&bmode=" + this.bmode);
}
if (!this.searchCondition.equals("")) {
sb.append("&searchCondition=" + this.searchCondition);
}
if (!this.searchKeyword.equals("")) {
sb.append("&searchKeyword=" + this.searchKeyword);
}
return sb.toString();
}
}

View File

@@ -0,0 +1,128 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.log.vo.HmsLogDefaultVO
* egovframework.cms.log.vo.HmsLogVO
*/
package egovframework.cms.log.vo;
import egovframework.cms.log.vo.HmsLogDefaultVO;
import java.sql.Date;
public class HmsLogVO
extends HmsLogDefaultVO {
private String logSeq;
private String userId;
private String userNm;
private Date createDate;
private String ip;
private String seq;
private String logObject;
private String logMessage;
private String logStatusType;
public static String TYPE_LOGIN = "LOGIN";
public static String TYPE_LOGOUT = "LOGOUT";
public static String TYPE_INSERT = "INSERT";
public static String TYPE_UPDATE = "UPDATE";
public static String TYPE_DELETE = "DELETE";
public static String TYPE_PATH = "PATH";
public static String OBJ_HMS_MEMBER = "HMS_MEMBER";
public static String OBJ_HMS_USER = "HMS_USER";
public static String OBJ_BRD_POST = "HMS_BRD_POST";
public static String OBJ_BRD_MNG = "HMS_BRD_MANAGER";
public static String OBJ_BRD_COMMENT = "HMS_BRD_COMMENT";
public static String OBJ_HMS_AUTH_GROUP = "HMS_AUTH_GROUP";
public static String OBJ_HMS_BRD_CATE = "HMS_BRD_CATE";
public static String OBJ_HMS_BRD_CATE_MAST = "HMS_BRD_CATE_MAST";
public static String OBJ_DMS_OFFICIAL_ADDR = "DMS_OFFICIAL_ADDR";
public static String OBJ_HMS_DUTY = "HMS_DUTY";
public static String OBJ_HMS_DEPT = "HMS_DEPT";
public static String OBJ_HMS_POSITION = "HMS_POSITION";
public static String OBJ_DMS_IJ_OPINION = "DMS_IJ_OPINION";
public static String OBJ_DMS_IJ_OPINION_COMMENT = "DMS_IJ_OPINION_COMMENT";
public static final String OBJ_HMS_ENV = "HMS_ENV";
public static final String TBL_DOCUMENT = "DMS_IJ_DOCUMENT";
public static final String TBL_DOCUMENT_CHK = "DMS_IJ_DOCUMENT_CHK";
public static final String TBL_ALLIM = "DMS_IJ_ALLIM";
public static final String TBL_FIELD = "DMS_IJ_FIELD";
public static final String TBL_GALLERY = "DMS_IJ_GALLERY";
public static final String TBL_MEETING = "DMS_IJ_MEETING";
public static final String TBL_MEETING_CHK = "DMS_IJ_MEETING_CHK";
public static final String TBL_PERSON = "DMS_IJ_PERSON";
public static final String TBL_OPINION = "DMS_IJ_OPINION";
public static final String TBL_OPINION_COMMENT = "DMS_IJ_OPINION_COMMENT";
public void setLogSeq(String logSeq) {
this.logSeq = logSeq;
}
public String getLogSeq() {
return this.logSeq;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserId() {
return this.userId;
}
public void setUserNm(String userNm) {
this.userNm = userNm;
}
public String getUserNm() {
return this.userNm;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Date getCreateDate() {
return this.createDate;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getIp() {
return this.ip;
}
public void setSeq(String seq) {
this.seq = seq;
}
public String getSeq() {
return this.seq;
}
public void setLogObject(String logObject) {
this.logObject = logObject;
}
public String getLogObject() {
return this.logObject;
}
public void setLogMessage(String logMessage) {
this.logMessage = logMessage;
}
public String getLogMessage() {
return this.logMessage;
}
public void setLogStatusType(String logStatusType) {
this.logStatusType = logStatusType;
}
public String getLogStatusType() {
return this.logStatusType;
}
}

View File

@@ -0,0 +1,213 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.log.service.HmsLogService
* egovframework.cms.log.vo.HmsLogDefaultVO
* egovframework.cms.log.vo.HmsLogVO
* egovframework.cms.log.web.HmsLogController
* egovframework.com.cmm.LoginVO
* egovframework.common.dwr.DwrCommonService
* egovframework.edosi.egov.helper.UserDetailsHelper
* egovframework.edosi.filter.XssFilter
* egovframework.rte.fdl.property.EgovPropertyService
* egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper
* egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo
* javax.annotation.Resource
* javax.servlet.RequestDispatcher
* javax.servlet.ServletRequest
* javax.servlet.ServletResponse
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.ModelAttribute
* org.springframework.web.bind.annotation.RequestMapping
* org.springframework.web.bind.annotation.SessionAttributes
* org.springframework.web.bind.support.SessionStatus
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.log.web;
import egovframework.cms.log.service.HmsLogService;
import egovframework.cms.log.vo.HmsLogDefaultVO;
import egovframework.cms.log.vo.HmsLogVO;
import egovframework.com.cmm.LoginVO;
import egovframework.common.dwr.DwrCommonService;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.edosi.filter.XssFilter;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Controller
@SessionAttributes(types={HmsLogVO.class})
public class HmsLogController {
@Resource(name="hmsLogService")
private HmsLogService hmsLogService;
@Resource(name="propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="dwrCommonService")
private DwrCommonService dwrCommonService;
@RequestMapping(value={"/hms/hmsLog/hmsLogIndex.do"})
public String hmsLogIndex(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsLogDefaultVO searchVO, ModelMap modelMap, Model model) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = this.selectHmsLogList(request, response, searchVO, model);
} else if (bmode.equals("detail")) {
viewName = this.selectHmsLog(request, response, searchVO, model);
} else if (bmode.equals("add")) {
viewName = this.addHmsLogView(request, response, searchVO, model);
} else if (bmode.equals("modify")) {
viewName = this.updateHmsLog(request, response, searchVO, model);
}
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
model.addAttribute("bmode", (Object)bmode);
model.addAttribute("loginVO", (Object)loginVO);
this.initModelData(model, bmode);
return viewName;
}
private void initModelData(Model model, String bmode) throws Exception {
if (bmode != null && !bmode.equals("add")) {
bmode.equals("modify");
}
}
private String selectHmsLogList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsLogDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
searchVO.setPageUnit(this.propertiesService.getInt("pageUnit"));
searchVO.setPageSize(this.propertiesService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
try {
int totCnt = this.hmsLogService.selectHmsLogListTotCnt(searchVO);
if (totCnt > 0) {
List hmsLogList = this.hmsLogService.selectHmsLogList(searchVO);
model.addAttribute("resultList", (Object)hmsLogList);
}
paginationInfo.setTotalRecordCount(totCnt);
}
catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("paginationInfo", (Object)paginationInfo);
return "/cms/hmsLog/HmsLogList";
}
private String addHmsLogView(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsLogDefaultVO searchVO, Model model) throws Exception {
HmsLogVO hmsLogVO = new HmsLogVO();
model.addAttribute("hmsLogVO", (Object)hmsLogVO);
return "/cms/hmsLog/HmsLogRegister";
}
@RequestMapping(value={"/hms/hmsLog/addHmsLog.do"})
public String addHmsLog(MultipartHttpServletRequest request, HttpServletResponse response, HmsLogVO hmsLogVO, @ModelAttribute(value="searchVO") HmsLogDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/privilegeError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
this.hmsLogService.insertHmsLog(hmsLogVO, request);
status.setComplete();
return "redirect:" + searchVO.getParentUrl();
}
private String updateHmsLog(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsLogDefaultVO searchVO, Model model) throws Exception {
HmsLogVO hmsLogVO = new HmsLogVO();
hmsLogVO.setLogSeq(searchVO.getLogSeq());
hmsLogVO = this.hmsLogService.selectHmsLog(hmsLogVO);
if (!this.checkWriteAuth(hmsLogVO)) {
return "cmm/privilegeError";
}
model.addAttribute("hmsLogVO", (Object)hmsLogVO);
return "/cms/hmsLog/HmsLogRegister";
}
@RequestMapping(value={"/hms/hmsLog/updateHmsLog.do"})
public String updateHmsLog(MultipartHttpServletRequest request, HttpServletResponse response, HmsLogVO hmsLogVO, @ModelAttribute(value="searchVO") HmsLogDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsLogVO)) {
return "cmm/privilegeError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
this.hmsLogService.updateHmsLog(hmsLogVO, request);
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + searchVO.getParentUrl() + searchVO.toParam() + "&logSeq=" + hmsLogVO.getLogSeq();
}
private String selectHmsLog(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsLogDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
HmsLogVO hmsLogVO = new HmsLogVO();
hmsLogVO.setLogSeq(searchVO.getLogSeq());
hmsLogVO = this.hmsLogService.selectHmsLog(hmsLogVO);
model.addAttribute("hmsLogVO", (Object)hmsLogVO);
model.addAttribute("checkWriteAuth", (Object)this.checkWriteAuth(hmsLogVO));
return "/cms/hmsLog/HmsLogDetail";
}
@RequestMapping(value={"/hms/hmsLog/deleteHmsLog.do"})
public String deleteHmsLog(HttpServletRequest request, HmsLogVO hmsLogVO, @ModelAttribute(value="searchVO") HmsLogDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsLogVO)) {
return "cmm/privilegeError";
}
this.hmsLogService.deleteHmsLog(hmsLogVO);
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + searchVO.getParentUrl() + searchVO.toParam();
}
private boolean checkWriteAuth(HmsLogVO hmsLogVO) {
return UserDetailsHelper.isRole((String)"ROLE_ADMIN") != false;
}
}

View File

@@ -0,0 +1,46 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.position.dao.HmsPositionDAO
* egovframework.cms.position.vo.HmsPositionDefaultVO
* egovframework.cms.position.vo.HmsPositionVO
* egovframework.com.cmm.service.impl.EgovComAbstractDAO
* org.springframework.stereotype.Repository
*/
package egovframework.cms.position.dao;
import egovframework.cms.position.vo.HmsPositionDefaultVO;
import egovframework.cms.position.vo.HmsPositionVO;
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
import java.util.List;
import org.springframework.stereotype.Repository;
@Repository(value="hmsPositionDAO")
public class HmsPositionDAO
extends EgovComAbstractDAO {
public String insertHmsPosition(HmsPositionVO vo) throws Exception {
return (String)this.insert("hmsPositionDAO.insertHmsPosition_S", (Object)vo);
}
public void updateHmsPosition(HmsPositionVO vo) throws Exception {
this.update("hmsPositionDAO.updateHmsPosition_S", (Object)vo);
}
public void deleteHmsPosition(HmsPositionVO vo) throws Exception {
this.delete("hmsPositionDAO.deleteHmsPosition_S", (Object)vo);
}
public HmsPositionVO selectHmsPosition(HmsPositionVO vo) throws Exception {
return (HmsPositionVO)this.selectByPk("hmsPositionDAO.selectHmsPosition_S", (Object)vo);
}
public List selectHmsPositionList(HmsPositionDefaultVO searchVO) throws Exception {
return this.list("hmsPositionDAO.selectHmsPositionList_D", (Object)searchVO);
}
public int selectHmsPositionListTotCnt(HmsPositionDefaultVO searchVO) {
return (Integer)this.getSqlMapClientTemplate().queryForObject("hmsPositionDAO.selectHmsPositionListTotCnt_S", (Object)searchVO);
}
}

View File

@@ -0,0 +1,32 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.position.service.HmsPositionService
* egovframework.cms.position.vo.HmsPositionDefaultVO
* egovframework.cms.position.vo.HmsPositionVO
* javax.servlet.http.HttpServletRequest
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.position.service;
import egovframework.cms.position.vo.HmsPositionDefaultVO;
import egovframework.cms.position.vo.HmsPositionVO;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.multipart.MultipartHttpServletRequest;
public interface HmsPositionService {
public String insertHmsPosition(HmsPositionVO var1, MultipartHttpServletRequest var2) throws Exception;
public void updateHmsPosition(HmsPositionVO var1, MultipartHttpServletRequest var2) throws Exception;
public void deleteHmsPosition(HmsPositionVO var1, HttpServletRequest var2) throws Exception;
public HmsPositionVO selectHmsPosition(HmsPositionVO var1) throws Exception;
public List selectHmsPositionList(HmsPositionDefaultVO var1) throws Exception;
public int selectHmsPositionListTotCnt(HmsPositionDefaultVO var1);
}

View File

@@ -0,0 +1,214 @@
package egovframework.cms.position.service.impl;
import egovframework.cms.log.service.HmsLogService;
import egovframework.cms.log.vo.HmsLogVO;
import egovframework.cms.position.dao.HmsPositionDAO;
import egovframework.cms.position.service.HmsPositionService;
import egovframework.cms.position.vo.HmsPositionDefaultVO;
import egovframework.cms.position.vo.HmsPositionVO;
import egovframework.com.cmm.LoginVO;
import egovframework.com.cmm.service.EgovFileMngService;
import egovframework.com.cmm.service.EgovFileMngUtil;
import egovframework.com.cmm.service.FileVO;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.edosi.resource.EdosiResource;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Service("hmsPositionService")
public class HmsPositionServiceImpl implements HmsPositionService {
@Resource(name = "hmsPositionDAO")
private HmsPositionDAO hmsPositionDAO;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileMngService;
@Resource(name = "EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name = "commonIdGnrService")
private EgovIdGnrService egovIdGnrService;
@Resource(name = "hmsLogService")
private HmsLogService hmsLogService;
public String insertHmsPosition(HmsPositionVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
vo.setPositionSeq(this.egovIdGnrService.getNextStringId());
vo.setPositionCd(vo.getPositionSeq());
try {
Integer.parseInt(vo.getRnk());
} catch (Exception e) {
e.printStackTrace();
vo.setRnk("010");
}
this.hmsPositionDAO.insertHmsPosition(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_INSERT);
logVO.setLogObject(HmsLogVO.OBJ_HMS_POSITION);
logVO.setLogMessage("");
logVO.setSeq(vo.getPositionSeq());
this.hmsLogService.insertHmsLog(logVO, null);
return null;
}
public void updateHmsPosition(HmsPositionVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
try {
Integer.parseInt(vo.getRnk());
} catch (Exception e) {
e.printStackTrace();
vo.setRnk("010");
}
this.hmsPositionDAO.updateHmsPosition(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_UPDATE);
logVO.setLogObject(HmsLogVO.OBJ_HMS_POSITION);
logVO.setLogMessage("");
logVO.setSeq(vo.getPositionSeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public void deleteHmsPosition(HmsPositionVO vo, HttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
this.hmsPositionDAO.deleteHmsPosition(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_DELETE);
logVO.setLogObject(HmsLogVO.OBJ_HMS_POSITION);
logVO.setLogMessage("");
logVO.setSeq(vo.getPositionSeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public HmsPositionVO selectHmsPosition(HmsPositionVO vo) throws Exception {
HmsPositionVO resultVO = this.hmsPositionDAO.selectHmsPosition(vo);
return resultVO;
}
public List selectHmsPositionList(HmsPositionDefaultVO searchVO) throws Exception {
return this.hmsPositionDAO.selectHmsPositionList(searchVO);
}
public int selectHmsPositionListTotCnt(HmsPositionDefaultVO searchVO) {
return this.hmsPositionDAO.selectHmsPositionListTotCnt(searchVO);
}
public String addMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
String fileId = "";
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
String whitelist = EdosiResource.getInstance().getValue("attach.whitelist");
String[] ext = whitelist.split(",");
if (ext != null && ext.length > 0) {
boolean check = false;
for (int i = 0; i < ext.length; i++) {
if (fn.endsWith(ext[i])) {
check = true;
break;
}
}
if (check)
file.put(key, mf);
}
}
}
String _atchFileId = "";
if (!file.isEmpty()) {
List<FileVO> _result = null;
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
_atchFileId = this.fileMngService.insertFileInfs(_result);
}
fileId = _atchFileId;
}
return fileId;
}
public String updateMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm, String fileId, boolean multiple) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
String whitelist = EdosiResource.getInstance().getValue("attach.whitelist");
String[] ext = whitelist.split(",");
if (ext != null && ext.length > 0) {
boolean check = false;
for (int i = 0; i < ext.length; i++) {
if (fn.endsWith(ext[i])) {
check = true;
break;
}
}
if (check)
file.put(key, mf);
}
}
}
String[] delcheck = multiRequest.getParameterValues("delcheck");
if (delcheck != null) {
FileVO fileVO = null;
for (int i = 0; i < delcheck.length; i++) {
String[] fileInf = delcheck[i].split("\\|");
fileVO = new FileVO();
fileVO.setAtchFileId(fileInf[0]);
fileVO.setFileSn(fileInf[1]);
this.fileMngService.deleteFileInf(fileVO);
}
}
if (!file.isEmpty()) {
List<FileVO> _result = null;
if (multiple) {
if (fileId == null || fileId.equals("")) {
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
} else {
FileVO fvo = new FileVO();
fvo.setAtchFileId(fileId);
int cnt = this.fileMngService.getMaxFileSN(fvo);
_result = this.fileUtil.parseFileInf(file, "FILE_", cnt, fileId, "");
this.fileMngService.updateFileInfs(_result);
}
} else {
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
}
}
if (fileId != null && !fileId.equals("")) {
FileVO fileVO = new FileVO();
fileVO.setAtchFileId(fileId);
List<FileVO> result = this.fileMngService.selectFileInfs(fileVO);
if (result.size() == 0)
fileId = "";
}
}
return fileId;
}
}

View File

@@ -0,0 +1,155 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.position.vo.HmsPositionDefaultVO
*/
package egovframework.cms.position.vo;
import java.io.Serializable;
public class HmsPositionDefaultVO
implements Serializable {
private String searchCondition;
private String searchKeyword;
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 String bmode;
private String parentUrl;
private String pageUseYn = "Y";
private String orderby;
private String positionSeq;
public void setSearchCondition(String searchCondition) {
this.searchCondition = searchCondition;
}
public String getSearchCondition() {
return this.searchCondition;
}
public void setSearchKeyword(String searchKeyword) {
this.searchKeyword = searchKeyword;
}
public String getSearchKeyword() {
return this.searchKeyword;
}
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
public String getSearchUseYn() {
return this.searchUseYn;
}
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
public int getPageIndex() {
return this.pageIndex;
}
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
public int getPageUnit() {
return this.pageUnit;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getPageSize() {
return this.pageSize;
}
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
public int getFirstIndex() {
return this.firstIndex;
}
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
public int getLastIndex() {
return this.lastIndex;
}
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
public int getRecordCountPerPage() {
return this.recordCountPerPage;
}
public void setBmode(String bmode) {
this.bmode = bmode;
}
public String getBmode() {
return this.bmode;
}
public void setParentUrl(String parentUrl) {
this.parentUrl = parentUrl;
}
public String getParentUrl() {
return this.parentUrl;
}
public void setPageUseYn(String pageUseYn) {
this.pageUseYn = pageUseYn;
}
public String getPageUseYn() {
return this.pageUseYn;
}
public void setOrderby(String orderby) {
this.orderby = orderby;
}
public String getOrderby() {
return this.orderby;
}
public void setPositionSeq(String positionSeq) {
this.positionSeq = positionSeq;
}
public String getPositionSeq() {
return this.positionSeq;
}
public String toParam() {
StringBuilder sb = new StringBuilder();
sb.append("?pageIndex=" + this.pageIndex);
if (this.bmode != null && !this.bmode.equals("")) {
sb.append("&bmode=" + this.bmode);
}
if (this.searchCondition != null && !this.searchCondition.equals("")) {
sb.append("&searchCondition=" + this.searchCondition);
}
if (this.searchKeyword != null && !this.searchKeyword.equals("")) {
sb.append("&searchKeyword=" + this.searchKeyword);
}
return sb.toString();
}
}

View File

@@ -0,0 +1,70 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.position.vo.HmsPositionDefaultVO
* egovframework.cms.position.vo.HmsPositionVO
*/
package egovframework.cms.position.vo;
import egovframework.cms.position.vo.HmsPositionDefaultVO;
import java.sql.Date;
public class HmsPositionVO
extends HmsPositionDefaultVO {
private String positionCd;
private String positionNm;
private String positionSeq;
private String recSts;
private Date createDate;
private String rnk;
public void setPositionCd(String positionCd) {
this.positionCd = positionCd;
}
public String getPositionCd() {
return this.positionCd;
}
public void setPositionNm(String positionNm) {
this.positionNm = positionNm;
}
public String getPositionNm() {
return this.positionNm;
}
public void setPositionSeq(String positionSeq) {
this.positionSeq = positionSeq;
}
public String getPositionSeq() {
return this.positionSeq;
}
public void setRecSts(String recSts) {
this.recSts = recSts;
}
public String getRecSts() {
return this.recSts;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Date getCreateDate() {
return this.createDate;
}
public String getRnk() {
return this.rnk;
}
public void setRnk(String rnk) {
this.rnk = rnk;
}
}

View File

@@ -0,0 +1,251 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.position.service.HmsPositionService
* egovframework.cms.position.vo.HmsPositionDefaultVO
* egovframework.cms.position.vo.HmsPositionVO
* egovframework.cms.position.web.HmsPositionController
* egovframework.com.cmm.LoginVO
* egovframework.edosi.common.code.CodeResource
* egovframework.edosi.egov.helper.UserDetailsHelper
* egovframework.edosi.filter.XssFilter
* egovframework.rte.fdl.property.EgovPropertyService
* egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo
* javax.annotation.Resource
* javax.servlet.RequestDispatcher
* javax.servlet.ServletRequest
* javax.servlet.ServletResponse
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.ModelAttribute
* org.springframework.web.bind.annotation.RequestMapping
* org.springframework.web.bind.annotation.SessionAttributes
* org.springframework.web.bind.support.SessionStatus
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.position.web;
import egovframework.cms.position.service.HmsPositionService;
import egovframework.cms.position.vo.HmsPositionDefaultVO;
import egovframework.cms.position.vo.HmsPositionVO;
import egovframework.com.cmm.LoginVO;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.edosi.filter.XssFilter;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@Controller
@SessionAttributes(types={HmsPositionVO.class})
public class HmsPositionController {
@Resource(name="hmsPositionService")
private HmsPositionService hmsPositionService;
@Resource(name="propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="codeResource")
private CodeResource codeResource;
@RequestMapping(value={"/hms/hmsPosition/hmsPositionIndex.do"})
public String hmsPositionIndex(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsPositionDefaultVO searchVO, ModelMap modelMap, Model model) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = this.selectHmsPositionList(request, response, searchVO, model);
} else if (bmode.equals("detail")) {
viewName = this.selectHmsPosition(request, response, searchVO, model);
} else if (bmode.equals("add")) {
viewName = this.addHmsPositionView(request, response, searchVO, model);
} else if (bmode.equals("modify")) {
viewName = this.updateHmsPosition(request, response, searchVO, model);
}
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
model.addAttribute("bmode", (Object)bmode);
model.addAttribute("loginVO", (Object)loginVO);
model.addAttribute("ROLE_USER", (Object)UserDetailsHelper.isRole((String)"ROLE_USER"));
this.initModelData(model, bmode);
return viewName;
}
private void initModelData(Model model, String bmode) throws Exception {
HashMap param = new HashMap();
this.initModelData(param, model, bmode);
}
private void initModelData(Map param, Model model, String bmode) throws Exception {
Iterator<String> it = param.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
String value = (String)param.get(key);
model.addAttribute(key, (Object)this.codeResource.getCodeList(value));
if (bmode == null || !bmode.equals("add") && !bmode.equals("modify")) continue;
model.addAttribute(key, (Object)this.codeResource.removeCodeResourceForNotUse(value));
}
}
private String selectHmsPositionList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsPositionDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
searchVO.setPageUnit(this.propertiesService.getInt("pageUnit"));
searchVO.setPageSize(20);
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
int totCnt = 0;
try {
totCnt = this.hmsPositionService.selectHmsPositionListTotCnt(searchVO);
if (totCnt > 0) {
List hmsPositionList = this.hmsPositionService.selectHmsPositionList(searchVO);
model.addAttribute("resultList", (Object)hmsPositionList);
}
}
catch (Exception e) {
e.printStackTrace();
}
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", (Object)paginationInfo);
return "/cms/hmsPosition/HmsPositionList";
}
private String addHmsPositionView(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsPositionDefaultVO searchVO, Model model) throws Exception {
HmsPositionVO hmsPositionVO = new HmsPositionVO();
hmsPositionVO.setRnk("010");
model.addAttribute("hmsPositionVO", (Object)hmsPositionVO);
return "/cms/hmsPosition/HmsPositionRegister";
}
@RequestMapping(value={"/hms/hmsPosition/addHmsPosition.do"})
public String addHmsPosition(MultipartHttpServletRequest request, HttpServletResponse response, HmsPositionVO hmsPositionVO, @ModelAttribute(value="searchVO") HmsPositionDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
try {
this.hmsPositionService.insertHmsPosition(hmsPositionVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
return "redirect:" + searchVO.getParentUrl();
}
private String updateHmsPosition(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsPositionDefaultVO searchVO, Model model) throws Exception {
HmsPositionVO hmsPositionVO = new HmsPositionVO();
hmsPositionVO.setPositionSeq(searchVO.getPositionSeq());
hmsPositionVO = this.hmsPositionService.selectHmsPosition(hmsPositionVO);
if (!this.checkWriteAuth(hmsPositionVO)) {
return "cmm/sessionError";
}
model.addAttribute("hmsPositionVO", (Object)hmsPositionVO);
return "/cms/hmsPosition/HmsPositionRegister";
}
@RequestMapping(value={"/hms/hmsPosition/updateHmsPosition.do"})
public String updateHmsPosition(MultipartHttpServletRequest request, HttpServletResponse response, HmsPositionVO hmsPositionVO, @ModelAttribute(value="searchVO") HmsPositionDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsPositionVO)) {
return "cmm/privilegeError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
try {
this.hmsPositionService.updateHmsPosition(hmsPositionVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + searchVO.getParentUrl() + searchVO.toParam() + "&positionSeq=" + hmsPositionVO.getPositionSeq();
}
private String selectHmsPosition(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsPositionDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
HmsPositionVO hmsPositionVO = new HmsPositionVO();
hmsPositionVO.setPositionSeq(searchVO.getPositionSeq());
try {
hmsPositionVO = this.hmsPositionService.selectHmsPosition(hmsPositionVO);
}
catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("hmsPositionVO", (Object)hmsPositionVO);
model.addAttribute("checkWriteAuth", (Object)this.checkWriteAuth(hmsPositionVO));
return "/cms/hmsPosition/HmsPositionDetail";
}
@RequestMapping(value={"/hms/hmsPosition/deleteHmsPosition.do"})
public String deleteHmsPosition(HttpServletRequest request, HmsPositionVO hmsPositionVO, @ModelAttribute(value="searchVO") HmsPositionDefaultVO searchVO, SessionStatus status) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsPositionVO)) {
return "cmm/privilegeError";
}
try {
this.hmsPositionService.deleteHmsPosition(hmsPositionVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
searchVO.setBmode(null);
return "redirect:" + searchVO.getParentUrl() + searchVO.toParam();
}
private boolean checkWriteAuth(HmsPositionVO hmsPositionVO) {
if (UserDetailsHelper.isRole((String)"ROLE_USER").booleanValue()) {
return true;
}
return UserDetailsHelper.isRole((String)"ROLE_ADMIN") != false;
}
}

View File

@@ -0,0 +1,58 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.user.dao.HmsUserDAO
* egovframework.cms.user.vo.HmsUserDefaultVO
* egovframework.cms.user.vo.HmsUserVO
* egovframework.com.cmm.service.impl.EgovComAbstractDAO
* org.springframework.stereotype.Repository
*/
package egovframework.cms.user.dao;
import egovframework.cms.user.vo.HmsUserDefaultVO;
import egovframework.cms.user.vo.HmsUserVO;
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
import java.util.List;
import org.springframework.stereotype.Repository;
@Repository(value="hmsUserDAO")
public class HmsUserDAO
extends EgovComAbstractDAO {
public String insertHmsUser(HmsUserVO vo) throws Exception {
return (String)this.insert("hmsUserDAO.insertHmsUser_S", (Object)vo);
}
public void updateHmsUser(HmsUserVO vo) throws Exception {
this.update("hmsUserDAO.updateHmsUser_S", (Object)vo);
}
public void deleteHmsUser(HmsUserVO vo) throws Exception {
this.delete("hmsUserDAO.deleteHmsUser_S", (Object)vo);
}
public HmsUserVO selectHmsUser(HmsUserVO vo) throws Exception {
return (HmsUserVO)this.select("hmsUserDAO.selectHmsUser_S", (Object)vo);
}
public List selectHmsUserList(HmsUserDefaultVO searchVO) throws Exception {
return this.list("hmsUserDAO.selectHmsUserList_D", (Object)searchVO);
}
public int selectHmsUserListTotCnt(HmsUserDefaultVO searchVO) {
return (Integer)this.select("hmsUserDAO.selectHmsUserListTotCnt_S", (Object)searchVO);
}
public void updateHmsUserPasswd(HmsUserVO vo) throws Exception {
this.update("hmsUserDAO.updateHmsUserPasswd", (Object)vo);
}
public void insertHmsUserType(HmsUserVO vo) {
this.insert("hmsUserDAO.insertHmsUserType_S", (Object)vo);
}
public void deleteHmsUserType(HmsUserVO vo) {
this.delete("hmsUserDAO.deleteHmsUserType_S", (Object)vo);
}
}

View File

@@ -0,0 +1,34 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.user.service.HmsUserService
* egovframework.cms.user.vo.HmsUserDefaultVO
* egovframework.cms.user.vo.HmsUserVO
* javax.servlet.http.HttpServletRequest
* org.springframework.web.multipart.MultipartHttpServletRequest
*/
package egovframework.cms.user.service;
import egovframework.cms.user.vo.HmsUserDefaultVO;
import egovframework.cms.user.vo.HmsUserVO;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.multipart.MultipartHttpServletRequest;
public interface HmsUserService {
public String insertHmsUser(HmsUserVO var1, MultipartHttpServletRequest var2) throws Exception;
public void updateHmsUser(HmsUserVO var1, MultipartHttpServletRequest var2) throws Exception;
public void deleteHmsUser(HmsUserVO var1, HttpServletRequest var2) throws Exception;
public HmsUserVO selectHmsUser(HmsUserVO var1) throws Exception;
public List selectHmsUserList(HmsUserDefaultVO var1) throws Exception;
public int selectHmsUserListTotCnt(HmsUserDefaultVO var1);
public void updateHmsUserPasswd(HmsUserVO var1) throws Exception;
}

View File

@@ -0,0 +1,334 @@
package egovframework.cms.user.service.impl;
import egovframework.cms.auth.dao.HmsAuthGroupDAO;
import egovframework.cms.dept.service.HmsDeptService;
import egovframework.cms.dept.vo.HmsDeptDefaultVO;
import egovframework.cms.log.service.HmsLogService;
import egovframework.cms.log.vo.HmsLogVO;
import egovframework.cms.user.dao.HmsUserDAO;
import egovframework.cms.user.service.HmsUserService;
import egovframework.cms.user.vo.HmsUserDefaultVO;
import egovframework.cms.user.vo.HmsUserVO;
import egovframework.com.cmm.LoginVO;
import egovframework.com.cmm.service.EgovFileMngService;
import egovframework.com.cmm.service.EgovFileMngUtil;
import egovframework.com.cmm.service.FileVO;
import egovframework.dms.prj.dao.DmsPrjDAO;
import egovframework.dms.prj.vo.DmsPrjAuthUserVO;
import egovframework.dms.prj.vo.DmsPrjVO;
import egovframework.edosi.resource.EdosiResource;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import sayit.crypto.EdosiCryptoUtil;
@Service("hmsUserService")
public class HmsUserServiceImpl implements HmsUserService {
@Resource(name = "hmsUserDAO")
private HmsUserDAO hmsUserDAO;
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileMngService;
@Resource(name = "EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name = "commonIdGnrService")
private EgovIdGnrService egovIdGnrService;
@Resource(name = "hmsLogService")
private HmsLogService hmsLogService;
@Resource(name = "hmsDeptService")
private HmsDeptService hmsDeptService;
@Resource(name = "dmsPrjDAO")
private DmsPrjDAO dmsPrjDAO;
@Resource(name = "hmsAuthGroupDAO")
private HmsAuthGroupDAO hmsAuthGroupDAO;
private final String OBJ_HMS_USER = "HMS_USER";
public String insertHmsUser(HmsUserVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
String auth = request.getParameter("group1");
vo.setUserSeq(vo.getUserId());
vo.setUserType(auth);
try {
EdosiCryptoUtil eu1 = EdosiCryptoUtil.getInstance();
vo.setPasswd(eu1.encrypt(vo.getPasswd()));
} catch (Exception e) {
e.printStackTrace();
}
HmsDeptDefaultVO hmsDeptDefaultVO = new HmsDeptDefaultVO();
hmsDeptDefaultVO.setPageUseYn("N");
List<EgovMap> deptAllList = this.hmsDeptService.selectHmsDeptList(hmsDeptDefaultVO);
for (int i = 0; i < deptAllList.size(); i++) {
if (((String)((EgovMap)deptAllList.get(i)).get("deptSeq")).equals(vo.getDeptCd())) {
vo.setDeptNm((String)((EgovMap)deptAllList.get(i)).get("deptNm"));
break;
}
}
this.hmsUserDAO.insertHmsUser(vo);
this.hmsUserDAO.insertHmsUserType(vo);
Map<String, Object> param = new HashMap<>();
if ("CUS".equals(auth)) {
param.put("authGroupSeq", "BOM_0000000000000003");
} else {
param.put("authGroupSeq", "BOM_0000000000000004");
}
param.put("userId", vo.getUserId());
param.put("gubun", "user");
this.hmsAuthGroupDAO.insertHmsAuthGroupUser(param);
String prjId = request.getParameter("prjChkId");
String[] prjIdArray = prjId.split(",");
if (prjIdArray != null && prjIdArray.length > 0)
for (int j = 0; j < prjIdArray.length; j++) {
DmsPrjAuthUserVO dmsPrjAuthUserVO = new DmsPrjAuthUserVO();
dmsPrjAuthUserVO.setPrjSeq(prjIdArray[j]);
dmsPrjAuthUserVO.setUserId(vo.getUserId());
dmsPrjAuthUserVO.setUserType(vo.getUserType());
this.dmsPrjDAO.insertDmsPrjAuthUser(dmsPrjAuthUserVO);
}
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_INSERT);
logVO.setLogObject("HMS_USER");
logVO.setLogMessage("");
logVO.setSeq(vo.getUserSeq());
this.hmsLogService.insertHmsLog(logVO, null);
return null;
}
public void updateHmsUser(HmsUserVO vo, MultipartHttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
if ("ADM".equals(loginVO.getUserSe())) {
try {
EdosiCryptoUtil eu1 = EdosiCryptoUtil.getInstance();
vo.setPasswd(eu1.encrypt(vo.getPasswd()));
} catch (Exception e) {
e.printStackTrace();
}
String auth = request.getParameter("group1");
vo.setUserSeq(vo.getUserId());
vo.setUserType(auth);
HmsDeptDefaultVO hmsDeptDefaultVO = new HmsDeptDefaultVO();
hmsDeptDefaultVO.setPageUseYn("N");
List<EgovMap> deptAllList = this.hmsDeptService.selectHmsDeptList(hmsDeptDefaultVO);
for (int i = 0; i < deptAllList.size(); i++) {
if (((String)((EgovMap)deptAllList.get(i)).get("deptSeq")).equals(vo.getDeptCd())) {
vo.setDeptNm((String)((EgovMap)deptAllList.get(i)).get("deptNm"));
break;
}
}
Map<String, Object> param = new HashMap<>();
param.put("userId", vo.getUserId());
this.hmsAuthGroupDAO.deleteHmsAuthGroupRelUser(param);
if ("CUS".equals(auth)) {
param.put("authGroupSeq", "BOM_0000000000000003");
} else {
param.put("authGroupSeq", "BOM_0000000000000004");
}
param.put("gubun", "user");
this.hmsAuthGroupDAO.insertHmsAuthGroupUser(param);
this.hmsUserDAO.updateHmsUser(vo);
this.hmsUserDAO.updateHmsUserPasswd(vo);
this.hmsUserDAO.deleteHmsUserType(vo);
this.hmsUserDAO.insertHmsUserType(vo);
DmsPrjVO prjVO = new DmsPrjVO();
prjVO.setUserId(vo.getUserId());
this.dmsPrjDAO.deleteDmsPrjAuthUser(prjVO);
String prjId = request.getParameter("prjChkId");
String[] prjIdArray = prjId.split(",");
if (prjIdArray != null && prjIdArray.length > 0)
for (int j = 0; j < prjIdArray.length; j++) {
DmsPrjAuthUserVO dmsPrjAuthUserVO = new DmsPrjAuthUserVO();
dmsPrjAuthUserVO.setPrjSeq(prjIdArray[j]);
dmsPrjAuthUserVO.setUserId(vo.getUserId());
dmsPrjAuthUserVO.setUserType(vo.getUserType());
this.dmsPrjDAO.insertDmsPrjAuthUser(dmsPrjAuthUserVO);
}
} else {
try {
EdosiCryptoUtil eu1 = EdosiCryptoUtil.getInstance();
vo.setPasswd(eu1.encrypt(vo.getPasswd()));
} catch (Exception e) {
e.printStackTrace();
}
vo.setUserSeq(vo.getUserId());
HmsDeptDefaultVO hmsDeptDefaultVO = new HmsDeptDefaultVO();
hmsDeptDefaultVO.setPageUseYn("N");
List<EgovMap> deptAllList = this.hmsDeptService.selectHmsDeptList(hmsDeptDefaultVO);
for (int i = 0; i < deptAllList.size(); i++) {
if (((String)((EgovMap)deptAllList.get(i)).get("deptSeq")).equals(vo.getDeptCd())) {
vo.setDeptNm((String)((EgovMap)deptAllList.get(i)).get("deptNm"));
break;
}
}
this.hmsUserDAO.updateHmsUser(vo);
this.hmsUserDAO.updateHmsUserPasswd(vo);
}
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_UPDATE);
logVO.setLogObject("HMS_USER");
logVO.setLogMessage("");
logVO.setSeq(vo.getUserSeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public void deleteHmsUser(HmsUserVO vo, HttpServletRequest request) throws Exception {
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
this.hmsUserDAO.deleteHmsUser(vo);
HmsLogVO logVO = new HmsLogVO();
logVO.setIp(request.getRemoteAddr());
logVO.setUserId(loginVO.getId());
logVO.setUserNm(loginVO.getName());
logVO.setLogStatusType(HmsLogVO.TYPE_DELETE);
logVO.setLogObject("HMS_USER");
logVO.setLogMessage("");
logVO.setSeq(vo.getUserSeq());
this.hmsLogService.insertHmsLog(logVO, null);
}
public HmsUserVO selectHmsUser(HmsUserVO vo) throws Exception {
HmsUserVO resultVO = this.hmsUserDAO.selectHmsUser(vo);
return resultVO;
}
public List selectHmsUserList(HmsUserDefaultVO searchVO) throws Exception {
return this.hmsUserDAO.selectHmsUserList(searchVO);
}
public int selectHmsUserListTotCnt(HmsUserDefaultVO searchVO) {
return this.hmsUserDAO.selectHmsUserListTotCnt(searchVO);
}
public String addMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
String fileId = "";
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
String whitelist = EdosiResource.getInstance().getValue("attach.whitelist");
if (whitelist == null || whitelist.equals("")) {
file.put(key, mf);
continue;
}
String[] ext = whitelist.split(",");
if (ext != null && ext.length > 0) {
boolean check = false;
for (int i = 0; i < ext.length; i++) {
if (fn.endsWith(ext[i])) {
check = true;
break;
}
}
if (check)
file.put(key, mf);
}
}
}
String _atchFileId = "";
if (!file.isEmpty()) {
List<FileVO> _result = null;
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
_atchFileId = this.fileMngService.insertFileInfs(_result);
}
fileId = _atchFileId;
}
return fileId;
}
public String updateMultiFiles(MultipartHttpServletRequest multiRequest, String targetNm, String fileId, boolean multiple) throws Exception {
Map<String, MultipartFile> files = multiRequest.getFileMap();
Map<String, MultipartFile> file = new HashMap<>();
if (!files.isEmpty()) {
Iterator<String> it = files.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
if (key.indexOf(targetNm) > -1) {
MultipartFile mf = files.get(key);
String fn = mf.getOriginalFilename();
String whitelist = EdosiResource.getInstance().getValue("attach.whitelist");
if (whitelist == null || whitelist.equals("")) {
file.put(key, mf);
continue;
}
String[] ext = whitelist.split(",");
if (ext != null && ext.length > 0) {
boolean check = false;
for (int i = 0; i < ext.length; i++) {
if (fn.endsWith(ext[i])) {
check = true;
break;
}
}
if (check)
file.put(key, mf);
}
}
}
String[] delcheck = multiRequest.getParameterValues("delcheck");
if (delcheck != null) {
FileVO fileVO = null;
for (int i = 0; i < delcheck.length; i++) {
String[] fileInf = delcheck[i].split("\\|");
fileVO = new FileVO();
fileVO.setAtchFileId(fileInf[0]);
fileVO.setFileSn(fileInf[1]);
this.fileMngService.deleteFileInf(fileVO);
}
}
if (!file.isEmpty()) {
List<FileVO> _result = null;
if (multiple) {
if (fileId == null || fileId.equals("")) {
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
} else {
FileVO fvo = new FileVO();
fvo.setAtchFileId(fileId);
int cnt = this.fileMngService.getMaxFileSN(fvo);
_result = this.fileUtil.parseFileInf(file, "FILE_", cnt, fileId, "");
this.fileMngService.updateFileInfs(_result);
}
} else {
_result = this.fileUtil.parseFileInf(file, "FILE_", 0, "", "");
fileId = this.fileMngService.insertFileInfs(_result);
}
}
if (fileId != null && !fileId.equals("")) {
FileVO fileVO = new FileVO();
fileVO.setAtchFileId(fileId);
List<FileVO> result = this.fileMngService.selectFileInfs(fileVO);
if (result.size() == 0)
fileId = "";
}
}
return fileId;
}
public void updateHmsUserPasswd(HmsUserVO vo) throws Exception {
this.hmsUserDAO.updateHmsUserPasswd(vo);
}
}

View File

@@ -0,0 +1,182 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.user.vo.HmsUserDefaultVO
*/
package egovframework.cms.user.vo;
import java.io.Serializable;
public class HmsUserDefaultVO
implements Serializable {
private String searchCondition;
private String searchKeyword;
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 String bmode;
private String parentUrl;
private String pageUseYn = "Y";
private String orderby;
private String userSeq;
private String searchDeptCd;
private String searchDeptSeq;
private String userType;
public void setSearchCondition(String searchCondition) {
this.searchCondition = searchCondition;
}
public String getSearchCondition() {
return this.searchCondition;
}
public void setSearchKeyword(String searchKeyword) {
this.searchKeyword = searchKeyword;
}
public String getSearchKeyword() {
return this.searchKeyword;
}
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
public String getSearchUseYn() {
return this.searchUseYn;
}
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
public int getPageIndex() {
return this.pageIndex;
}
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
public int getPageUnit() {
return this.pageUnit;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getPageSize() {
return this.pageSize;
}
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
public int getFirstIndex() {
return this.firstIndex;
}
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
public int getLastIndex() {
return this.lastIndex;
}
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
public int getRecordCountPerPage() {
return this.recordCountPerPage;
}
public void setBmode(String bmode) {
this.bmode = bmode;
}
public String getBmode() {
return this.bmode;
}
public void setParentUrl(String parentUrl) {
this.parentUrl = parentUrl;
}
public String getParentUrl() {
return this.parentUrl;
}
public void setPageUseYn(String pageUseYn) {
this.pageUseYn = pageUseYn;
}
public String getPageUseYn() {
return this.pageUseYn;
}
public void setOrderby(String orderby) {
this.orderby = orderby;
}
public String getOrderby() {
return this.orderby;
}
public void setUserSeq(String userSeq) {
this.userSeq = userSeq;
}
public String getUserSeq() {
return this.userSeq;
}
public String toParam() {
StringBuilder sb = new StringBuilder();
sb.append("?pageIndex=" + this.pageIndex);
if (this.bmode != null && !this.bmode.equals("")) {
sb.append("&bmode=" + this.bmode);
}
if (this.searchCondition != null && !this.searchCondition.equals("")) {
sb.append("&searchCondition=" + this.searchCondition);
}
if (this.searchKeyword != null && !this.searchKeyword.equals("")) {
sb.append("&searchKeyword=" + this.searchKeyword);
}
return sb.toString();
}
public String getSearchDeptCd() {
return this.searchDeptCd;
}
public void setSearchDeptCd(String searchDeptCd) {
this.searchDeptCd = searchDeptCd;
}
public String getSearchDeptSeq() {
return this.searchDeptSeq;
}
public void setSearchDeptSeq(String searchDeptSeq) {
this.searchDeptSeq = searchDeptSeq;
}
public String getUserType() {
return this.userType;
}
public void setUserType(String userType) {
this.userType = userType;
}
}

View File

@@ -0,0 +1,298 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.user.vo.HmsUserDefaultVO
* egovframework.cms.user.vo.HmsUserVO
* egovframework.rte.psl.dataaccess.util.EgovMap
*/
package egovframework.cms.user.vo;
import egovframework.cms.user.vo.HmsUserDefaultVO;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import java.sql.Date;
import java.util.List;
public class HmsUserVO
extends HmsUserDefaultVO {
private String userId;
private String userNm;
private String tel;
private String passwd;
private String email;
private String mobile;
private String recSts;
private Date createDate;
private String userSeq;
private String deptNm;
private String positionNm;
private String dutyNm;
private String userRank;
private String extField01;
private String extField02;
private String extField03;
private String extField04;
private String extField05;
private String officeNm;
private String positionCd;
private String dutyCd;
private String deptCd;
private String officeCd;
private String gender;
private String birthday;
private String birthdayType;
private String jobTitle;
private List<EgovMap> positionList;
private List<EgovMap> dutyList;
private List<EgovMap> deptAllList;
private String userType;
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserId() {
return this.userId;
}
public void setUserNm(String userNm) {
this.userNm = userNm;
}
public String getUserNm() {
return this.userNm;
}
public void setTel(String tel) {
this.tel = tel;
}
public String getTel() {
return this.tel;
}
public void setPasswd(String passwd) {
this.passwd = passwd;
}
public String getPasswd() {
return this.passwd;
}
public void setEmail(String email) {
this.email = email;
}
public String getEmail() {
return this.email;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getMobile() {
return this.mobile;
}
public void setRecSts(String recSts) {
this.recSts = recSts;
}
public String getRecSts() {
return this.recSts;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Date getCreateDate() {
return this.createDate;
}
public void setUserSeq(String userSeq) {
this.userSeq = userSeq;
}
public String getUserSeq() {
return this.userSeq;
}
public void setDeptNm(String deptNm) {
this.deptNm = deptNm;
}
public String getDeptNm() {
return this.deptNm;
}
public void setPositionNm(String positionNm) {
this.positionNm = positionNm;
}
public String getPositionNm() {
return this.positionNm;
}
public void setDutyNm(String dutyNm) {
this.dutyNm = dutyNm;
}
public String getDutyNm() {
return this.dutyNm;
}
public void setUserRank(String userRank) {
this.userRank = userRank;
}
public String getUserRank() {
return this.userRank;
}
public void setExtField01(String extField01) {
this.extField01 = extField01;
}
public String getExtField01() {
return this.extField01;
}
public void setExtField02(String extField02) {
this.extField02 = extField02;
}
public String getExtField02() {
return this.extField02;
}
public void setExtField03(String extField03) {
this.extField03 = extField03;
}
public String getExtField03() {
return this.extField03;
}
public void setExtField04(String extField04) {
this.extField04 = extField04;
}
public String getExtField04() {
return this.extField04;
}
public void setExtField05(String extField05) {
this.extField05 = extField05;
}
public String getExtField05() {
return this.extField05;
}
public void setOfficeNm(String officeNm) {
this.officeNm = officeNm;
}
public String getOfficeNm() {
return this.officeNm;
}
public void setPositionCd(String positionCd) {
this.positionCd = positionCd;
}
public String getPositionCd() {
return this.positionCd;
}
public void setDutyCd(String dutyCd) {
this.dutyCd = dutyCd;
}
public String getDutyCd() {
return this.dutyCd;
}
public void setDeptCd(String deptCd) {
this.deptCd = deptCd;
}
public String getDeptCd() {
return this.deptCd;
}
public void setOfficeCd(String officeCd) {
this.officeCd = officeCd;
}
public String getOfficeCd() {
return this.officeCd;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getGender() {
return this.gender;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
public String getBirthday() {
return this.birthday;
}
public void setBirthdayType(String birthdayType) {
this.birthdayType = birthdayType;
}
public String getBirthdayType() {
return this.birthdayType;
}
public String getJobTitle() {
return this.jobTitle;
}
public void setJobTitle(String jobTitle) {
this.jobTitle = jobTitle;
}
public List<EgovMap> getPositionList() {
return this.positionList;
}
public void setPositionList(List<EgovMap> positionList) {
this.positionList = positionList;
}
public List<EgovMap> getDutyList() {
return this.dutyList;
}
public void setDutyList(List<EgovMap> dutyList) {
this.dutyList = dutyList;
}
public List<EgovMap> getDeptAllList() {
return this.deptAllList;
}
public void setDeptAllList(List<EgovMap> deptAllList) {
this.deptAllList = deptAllList;
}
public String getUserType() {
return this.userType;
}
public void setUserType(String userType) {
this.userType = userType;
}
}

View File

@@ -0,0 +1,328 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.dept.service.HmsDeptService
* egovframework.cms.dept.vo.HmsDeptDefaultVO
* egovframework.cms.duty.service.HmsDutyService
* egovframework.cms.position.service.HmsPositionService
* egovframework.cms.user.service.HmsUserService
* egovframework.cms.user.vo.HmsUserDefaultVO
* egovframework.cms.user.vo.HmsUserVO
* egovframework.cms.user.web.HmsUserAdminController
* egovframework.com.cmm.LoginVO
* egovframework.common.dwr.DwrCommonService
* egovframework.common.service.CommonService
* egovframework.dms.prj.service.DmsPrjService
* egovframework.dms.prj.vo.DmsPrjDefaultVO
* egovframework.edosi.common.code.CodeResource
* egovframework.edosi.egov.helper.UserDetailsHelper
* egovframework.edosi.filter.XssFilter
* egovframework.rte.fdl.property.EgovPropertyService
* egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper
* egovframework.rte.psl.dataaccess.util.EgovMap
* egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo
* javax.annotation.Resource
* javax.servlet.RequestDispatcher
* javax.servlet.ServletRequest
* javax.servlet.ServletResponse
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.ModelAttribute
* org.springframework.web.bind.annotation.RequestMapping
* org.springframework.web.bind.annotation.SessionAttributes
* org.springframework.web.bind.support.SessionStatus
* org.springframework.web.multipart.MultipartHttpServletRequest
* sayit.crypto.EdosiCryptoUtil
*/
package egovframework.cms.user.web;
import egovframework.cms.dept.service.HmsDeptService;
import egovframework.cms.dept.vo.HmsDeptDefaultVO;
import egovframework.cms.duty.service.HmsDutyService;
import egovframework.cms.position.service.HmsPositionService;
import egovframework.cms.user.service.HmsUserService;
import egovframework.cms.user.vo.HmsUserDefaultVO;
import egovframework.cms.user.vo.HmsUserVO;
import egovframework.com.cmm.LoginVO;
import egovframework.common.dwr.DwrCommonService;
import egovframework.common.service.CommonService;
import egovframework.dms.prj.service.DmsPrjService;
import egovframework.dms.prj.vo.DmsPrjDefaultVO;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import egovframework.edosi.filter.XssFilter;
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 java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import sayit.crypto.EdosiCryptoUtil;
@Controller
@SessionAttributes(types={HmsUserVO.class})
public class HmsUserAdminController {
@Resource(name="hmsUserService")
private HmsUserService hmsUserService;
@Resource(name="propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="codeResource")
private CodeResource codeResource;
@Resource(name="commonService")
private CommonService commonService;
@Resource(name="dwrCommonService")
private DwrCommonService dwrCommonService;
@Resource(name="hmsPositionService")
private HmsPositionService hmsPositionService;
@Resource(name="hmsDutyService")
private HmsDutyService hmsDutyService;
@Resource(name="hmsDeptService")
private HmsDeptService hmsDeptService;
@Resource(name="dmsPrjService")
private DmsPrjService dmsPrjService;
@RequestMapping(value={"/dms/hmsUser/hmsUserAdminIndex.do"})
public String hmsUserIndex(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, ModelMap modelMap, Model model) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = this.selectHmsUserAdminList(request, response, searchVO, model);
} else if (bmode.equals("detail")) {
viewName = this.selectHmsUserAdmin(request, response, searchVO, model);
} else if (bmode.equals("add")) {
viewName = this.addHmsUserAdminView(request, response, searchVO, model);
} else if (bmode.equals("modify")) {
viewName = this.updateHmsUserAdmin(request, response, searchVO, model);
}
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
model.addAttribute("bmode", (Object)bmode);
model.addAttribute("loginVO", (Object)loginVO);
model.addAttribute("ROLE_USER", (Object)UserDetailsHelper.isRole((String)"ROLE_USER"));
this.initModelData(model, bmode);
return viewName;
}
private void initModelData(Model model, String bmode) throws Exception {
HashMap param = new HashMap();
this.initModelData(param, model, bmode);
}
private void initModelData(Map param, Model model, String bmode) throws Exception {
Iterator<String> it = param.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
String value = (String)param.get(key);
model.addAttribute(key, (Object)this.codeResource.getCodeList(value));
if (bmode == null || !bmode.equals("add") && !bmode.equals("modify")) continue;
model.addAttribute(key, (Object)this.codeResource.removeCodeResourceForNotUse(value));
}
}
private String selectHmsUserAdminList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
searchVO.setPageUnit(this.propertiesService.getInt("pageUnit"));
searchVO.setPageSize(this.propertiesService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
int totCnt = 0;
try {
totCnt = this.hmsUserService.selectHmsUserListTotCnt(searchVO);
if (totCnt > 0) {
List hmsUserList = this.hmsUserService.selectHmsUserList(searchVO);
model.addAttribute("resultList", (Object)hmsUserList);
}
}
catch (Exception e) {
e.printStackTrace();
}
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", (Object)paginationInfo);
return "cms/hmsUser/HmsUserAdminList";
}
private String addHmsUserAdminView(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, Model model) throws Exception {
HmsUserVO hmsUserVO = new HmsUserVO();
HmsDeptDefaultVO hmsDeptDefaultVO = new HmsDeptDefaultVO();
hmsDeptDefaultVO.setPageUseYn("N");
List deptAllList = this.hmsDeptService.selectHmsDeptList(hmsDeptDefaultVO);
DmsPrjDefaultVO dmsPrjDefaultVO = new DmsPrjDefaultVO();
dmsPrjDefaultVO.setPageUseYn("N");
List dmsPrjList = this.dmsPrjService.selectDmsPrjList(dmsPrjDefaultVO);
model.addAttribute("deptAllList", (Object)deptAllList);
model.addAttribute("hmsUserVO", (Object)hmsUserVO);
model.addAttribute("prjList", (Object)dmsPrjList);
return "cms/hmsUser/HmsUserAdminRegister";
}
@RequestMapping(value={"/hms/hmsUser/addHmsUserAdmin.do"})
public String addHmsUserAdmin(MultipartHttpServletRequest request, HttpServletResponse response, HmsUserVO hmsUserVO, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
try {
this.hmsUserService.insertHmsUser(hmsUserVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), (HttpServletRequest)request);
}
private String updateHmsUserAdmin(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, Model model) throws Exception {
HmsUserVO hmsUserVO;
block6: {
hmsUserVO = new HmsUserVO();
hmsUserVO.setUserSeq(searchVO.getUserSeq());
hmsUserVO = this.hmsUserService.selectHmsUser(hmsUserVO);
try {
EdosiCryptoUtil eu1 = EdosiCryptoUtil.getInstance();
hmsUserVO.setPasswd(eu1.decrypt(hmsUserVO.getPasswd()));
}
catch (Exception e) {
e.printStackTrace();
}
if (this.checkWriteAuth(hmsUserVO)) break block6;
return "cmm/sessionError";
}
try {
HmsDeptDefaultVO hmsDeptDefaultVO3 = new HmsDeptDefaultVO();
hmsDeptDefaultVO3.setPageUseYn("N");
List deptAllList = this.hmsDeptService.selectHmsDeptList(hmsDeptDefaultVO3);
DmsPrjDefaultVO dmsPrjDefaultVO = new DmsPrjDefaultVO();
dmsPrjDefaultVO.setPageUseYn("N");
List dmsPrjAllList = this.dmsPrjService.selectDmsPrjList(dmsPrjDefaultVO);
dmsPrjDefaultVO.setUserId(hmsUserVO.getUserId());
List dmsPrjList = this.dmsPrjService.selectDmsPrjAuthList(dmsPrjDefaultVO);
String prjId = "";
int i = 0;
while (i < dmsPrjList.size()) {
prjId = String.valueOf(prjId) + ((EgovMap)dmsPrjList.get(i)).get((Object)"prjSeq") + ",";
++i;
}
model.addAttribute("prjId", (Object)prjId);
model.addAttribute("prjList", (Object)dmsPrjAllList);
model.addAttribute("deptAllList", (Object)deptAllList);
model.addAttribute("hmsUserVO", (Object)hmsUserVO);
}
catch (Exception e) {
e.printStackTrace();
}
return "cms/hmsUser/HmsUserAdminRegister";
}
@RequestMapping(value={"/hms/hmsUser/updateHmsUserAdmin.do"})
public String updateHmsUserAdmin(MultipartHttpServletRequest request, HttpServletResponse response, HmsUserVO hmsUserVO, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsUserVO)) {
return "cmm/privilegeError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
try {
this.hmsUserService.updateHmsUser(hmsUserVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), (HttpServletRequest)request) + searchVO.toParam() + "&userSeq=" + hmsUserVO.getUserSeq();
}
private String selectHmsUserAdmin(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
HmsUserVO hmsUserVO = new HmsUserVO();
hmsUserVO.setUserId(searchVO.getUserSeq());
try {
hmsUserVO = this.hmsUserService.selectHmsUser(hmsUserVO);
DmsPrjDefaultVO dmsPrjDefaultVO = new DmsPrjDefaultVO();
dmsPrjDefaultVO.setPageUseYn("N");
dmsPrjDefaultVO.setUserId(hmsUserVO.getUserId());
List dmsPrjList = this.dmsPrjService.selectDmsPrjAuthList(dmsPrjDefaultVO);
model.addAttribute("prjList", (Object)dmsPrjList);
}
catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("hmsUserVO", (Object)hmsUserVO);
model.addAttribute("checkWriteAuth", (Object)this.checkWriteAuth(hmsUserVO));
return "cms/hmsUser/HmsUserAdminDetail";
}
@RequestMapping(value={"/hms/hmsUser/deleteHmsUserAdmin.do"})
public String deleteHmsUserAdmin(HttpServletRequest request, HmsUserVO hmsUserVO, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsUserVO)) {
return "cmm/privilegeError";
}
try {
this.hmsUserService.deleteHmsUser(hmsUserVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
searchVO.setBmode(null);
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), request) + searchVO.toParam();
}
private boolean checkWriteAuth(HmsUserVO hmsUserVO) {
if (UserDetailsHelper.isRole((String)"ROLE_USER").booleanValue()) {
return true;
}
return UserDetailsHelper.isRole((String)"ROLE_ADMIN") != false;
}
}

View File

@@ -0,0 +1,293 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.dept.service.HmsDeptService
* egovframework.cms.dept.vo.HmsDeptDefaultVO
* egovframework.cms.user.service.HmsUserService
* egovframework.cms.user.vo.HmsUserDefaultVO
* egovframework.cms.user.vo.HmsUserVO
* egovframework.cms.user.web.HmsUserController
* egovframework.com.cmm.LoginVO
* egovframework.common.dwr.DwrCommonService
* egovframework.common.service.CommonService
* egovframework.dms.prj.service.DmsPrjService
* egovframework.dms.prj.vo.DmsPrjDefaultVO
* egovframework.edosi.common.code.CodeResource
* egovframework.edosi.filter.XssFilter
* egovframework.rte.fdl.property.EgovPropertyService
* egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper
* egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo
* javax.annotation.Resource
* javax.servlet.RequestDispatcher
* javax.servlet.ServletRequest
* javax.servlet.ServletResponse
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.ModelAttribute
* org.springframework.web.bind.annotation.RequestMapping
* org.springframework.web.bind.annotation.SessionAttributes
* org.springframework.web.bind.support.SessionStatus
* org.springframework.web.multipart.MultipartHttpServletRequest
* sayit.crypto.EdosiCryptoUtil
*/
package egovframework.cms.user.web;
import egovframework.cms.dept.service.HmsDeptService;
import egovframework.cms.dept.vo.HmsDeptDefaultVO;
import egovframework.cms.user.service.HmsUserService;
import egovframework.cms.user.vo.HmsUserDefaultVO;
import egovframework.cms.user.vo.HmsUserVO;
import egovframework.com.cmm.LoginVO;
import egovframework.common.dwr.DwrCommonService;
import egovframework.common.service.CommonService;
import egovframework.dms.prj.service.DmsPrjService;
import egovframework.dms.prj.vo.DmsPrjDefaultVO;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.filter.XssFilter;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import sayit.crypto.EdosiCryptoUtil;
@Controller
@SessionAttributes(types={HmsUserVO.class})
public class HmsUserController {
@Resource(name="hmsUserService")
private HmsUserService hmsUserService;
@Resource(name="propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="codeResource")
private CodeResource codeResource;
@Resource(name="commonService")
private CommonService commonService;
@Resource(name="dwrCommonService")
private DwrCommonService dwrCommonService;
@Resource(name="dmsPrjService")
private DmsPrjService dmsPrjService;
@Resource(name="hmsDeptService")
private HmsDeptService hmsDeptService;
@RequestMapping(value={"/dms/hmsUser/hmsUserIndex.do"})
public String hmsUserIndex(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, ModelMap modelMap, Model model) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = this.selectHmsUserList(request, response, searchVO, model);
} else if (bmode.equals("detail")) {
viewName = this.selectHmsUser(request, response, searchVO, model);
} else if (bmode.equals("add")) {
viewName = this.addHmsUserView(request, response, searchVO, model);
} else if (bmode.equals("modify")) {
viewName = this.updateHmsUser(request, response, searchVO, model);
}
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
model.addAttribute("bmode", (Object)bmode);
model.addAttribute("loginVO", (Object)loginVO);
this.initModelData(model, bmode);
return viewName;
}
private void initModelData(Model model, String bmode) throws Exception {
HashMap param = new HashMap();
this.initModelData(param, model, bmode);
}
private void initModelData(Map param, Model model, String bmode) throws Exception {
Iterator<String> it = param.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
String value = (String)param.get(key);
model.addAttribute(key, (Object)this.codeResource.getCodeList(value));
if (bmode == null || !bmode.equals("add") && !bmode.equals("modify")) continue;
model.addAttribute(key, (Object)this.codeResource.removeCodeResourceForNotUse(value));
}
}
private String selectHmsUserList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
searchVO.setPageUnit(this.propertiesService.getInt("pageUnit"));
searchVO.setPageSize(this.propertiesService.getInt("pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
int totCnt = 0;
try {
totCnt = this.hmsUserService.selectHmsUserListTotCnt(searchVO);
if (totCnt > 0) {
List hmsUserList = this.hmsUserService.selectHmsUserList(searchVO);
model.addAttribute("resultList", (Object)hmsUserList);
}
}
catch (Exception e) {
e.printStackTrace();
}
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", (Object)paginationInfo);
return "dms/hmsUser/HmsUserList";
}
private String addHmsUserView(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, Model model) throws Exception {
HmsUserVO hmsUserVO = new HmsUserVO();
model.addAttribute("hmsUserVO", (Object)hmsUserVO);
return "dms/hmsUser/HmsUserRegister";
}
@RequestMapping(value={"/dms/hmsUser/addHmsUser.do"})
public String addHmsUser(MultipartHttpServletRequest request, HttpServletResponse response, HmsUserVO hmsUserVO, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
try {
this.hmsUserService.insertHmsUser(hmsUserVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), (HttpServletRequest)request);
}
private String updateHmsUser(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, Model model) throws Exception {
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
HmsUserVO hmsUserVO = new HmsUserVO();
hmsUserVO.setUserId(loginVO.getId());
hmsUserVO = this.hmsUserService.selectHmsUser(hmsUserVO);
try {
EdosiCryptoUtil eu1 = EdosiCryptoUtil.getInstance();
hmsUserVO.setPasswd(eu1.decrypt(hmsUserVO.getPasswd()));
}
catch (Exception e) {
e.printStackTrace();
}
if (!this.checkWriteAuth(hmsUserVO)) {
return "cmm/sessionError";
}
HmsDeptDefaultVO hmsDeptDefaultVO3 = new HmsDeptDefaultVO();
hmsDeptDefaultVO3.setPageUseYn("N");
List deptAllList = this.hmsDeptService.selectHmsDeptList(hmsDeptDefaultVO3);
DmsPrjDefaultVO dmsPrjDefaultVO = new DmsPrjDefaultVO();
dmsPrjDefaultVO.setPageUseYn("N");
List dmsPrjAllList = this.dmsPrjService.selectDmsPrjList(dmsPrjDefaultVO);
model.addAttribute("deptAllList", (Object)deptAllList);
model.addAttribute("hmsUserVO", (Object)hmsUserVO);
if (!this.checkWriteAuth(hmsUserVO)) {
return "cmm/sessionError";
}
model.addAttribute("hmsUserVO", (Object)hmsUserVO);
return "dms/hmsUser/HmsUserRegister";
}
@RequestMapping(value={"/dms/hmsUser/updateHmsUser.do"})
public String updateHmsUser(MultipartHttpServletRequest request, HttpServletResponse response, HmsUserVO hmsUserVO, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsUserVO)) {
return "cmm/privilegeError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
try {
this.hmsUserService.updateHmsUser(hmsUserVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), (HttpServletRequest)request) + searchVO.toParam() + "&userSeq=" + hmsUserVO.getUserSeq();
}
private String selectHmsUser(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
HmsUserVO hmsUserVO = new HmsUserVO();
hmsUserVO.setUserId(loginVO.getId());
try {
hmsUserVO = this.hmsUserService.selectHmsUser(hmsUserVO);
DmsPrjDefaultVO dmsPrjDefaultVO = new DmsPrjDefaultVO();
dmsPrjDefaultVO.setPageUseYn("N");
dmsPrjDefaultVO.setUserId(hmsUserVO.getUserId());
List dmsPrjList = this.dmsPrjService.selectDmsPrjAuthList(dmsPrjDefaultVO);
model.addAttribute("prjList", (Object)dmsPrjList);
}
catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("hmsUserVO", (Object)hmsUserVO);
model.addAttribute("checkWriteAuth", (Object)this.checkWriteAuth(hmsUserVO));
return "dms/hmsUser/HmsUserDetail";
}
@RequestMapping(value={"/dms/hmsUser/deleteHmsUser.do"})
public String deleteHmsUser(HttpServletRequest request, HmsUserVO hmsUserVO, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsUserVO)) {
return "cmm/privilegeError";
}
try {
this.hmsUserService.deleteHmsUser(hmsUserVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
searchVO.setBmode(null);
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), request) + searchVO.toParam();
}
private boolean checkWriteAuth(HmsUserVO hmsUserVO) {
return true;
}
}

View File

@@ -0,0 +1,86 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.dept.service.HmsDeptService
* egovframework.cms.user.service.HmsUserService
* egovframework.cms.user.vo.HmsUserDefaultVO
* egovframework.cms.user.vo.HmsUserVO
* egovframework.cms.user.web.HmsUserFindController
* egovframework.com.cmm.LoginVO
* egovframework.common.dwr.DwrCommonService
* egovframework.dms.prj.service.DmsPrjService
* egovframework.edosi.egov.helper.UserDetailsHelper
* javax.annotation.Resource
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.RequestMapping
*/
package egovframework.cms.user.web;
import egovframework.cms.dept.service.HmsDeptService;
import egovframework.cms.user.service.HmsUserService;
import egovframework.cms.user.vo.HmsUserDefaultVO;
import egovframework.cms.user.vo.HmsUserVO;
import egovframework.com.cmm.LoginVO;
import egovframework.common.dwr.DwrCommonService;
import egovframework.dms.prj.service.DmsPrjService;
import egovframework.edosi.egov.helper.UserDetailsHelper;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class HmsUserFindController {
@Resource(name="hmsDeptService")
private HmsDeptService hmsDeptService;
@Resource(name="hmsUserService")
private HmsUserService hmsUserService;
@Resource(name="dwrCommonService")
private DwrCommonService dwrCommonService;
@Resource(name="dmsPrjService")
private DmsPrjService dmsPrjService;
@RequestMapping(value={"/popup/hmsUser/hmsUserFindIndex.do"})
public String hmsUserIndex(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap, Model model) throws Exception {
if (!UserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
LoginVO loginVO = (LoginVO)UserDetailsHelper.getAuthenticatedUser();
try {
String mode = request.getParameter("searchMode");
HmsUserVO hmsUserVO = new HmsUserVO();
hmsUserVO.setPageUseYn("N");
List resultList = new ArrayList();
if ("EMP".equals(mode)) {
hmsUserVO.setUserType(mode);
int totCnt = this.hmsUserService.selectHmsUserListTotCnt((HmsUserDefaultVO)hmsUserVO);
if (totCnt > 0) {
resultList = this.hmsUserService.selectHmsUserList((HmsUserDefaultVO)hmsUserVO);
}
} else {
hmsUserVO.setUserType("CUS");
int totCnt = this.hmsUserService.selectHmsUserListTotCnt((HmsUserDefaultVO)hmsUserVO);
if (totCnt > 0) {
resultList = this.hmsUserService.selectHmsUserList((HmsUserDefaultVO)hmsUserVO);
}
}
model.addAttribute("resultList", resultList);
}
catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("loginVO", (Object)loginVO);
return "/common/HmsUserFindPopup";
}
}

View File

@@ -0,0 +1,258 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* egovframework.cms.dept.service.HmsDeptService
* egovframework.cms.user.service.HmsUserService
* egovframework.cms.user.vo.HmsUserDefaultVO
* egovframework.cms.user.vo.HmsUserVO
* egovframework.cms.user.web.HmsUserMobileController
* egovframework.com.cmm.LoginVO
* egovframework.common.dwr.DwrCommonService
* egovframework.common.service.CommonService
* egovframework.edosi.common.code.CodeResource
* egovframework.edosi.filter.XssFilter
* egovframework.rte.fdl.property.EgovPropertyService
* egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper
* javax.annotation.Resource
* javax.servlet.RequestDispatcher
* javax.servlet.ServletRequest
* javax.servlet.ServletResponse
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* org.springframework.stereotype.Controller
* org.springframework.ui.Model
* org.springframework.ui.ModelMap
* org.springframework.web.bind.annotation.ModelAttribute
* org.springframework.web.bind.annotation.RequestMapping
* org.springframework.web.bind.annotation.SessionAttributes
* org.springframework.web.bind.support.SessionStatus
* org.springframework.web.multipart.MultipartHttpServletRequest
* sayit.crypto.EdosiCryptoUtil
*/
package egovframework.cms.user.web;
import egovframework.cms.dept.service.HmsDeptService;
import egovframework.cms.user.service.HmsUserService;
import egovframework.cms.user.vo.HmsUserDefaultVO;
import egovframework.cms.user.vo.HmsUserVO;
import egovframework.com.cmm.LoginVO;
import egovframework.common.dwr.DwrCommonService;
import egovframework.common.service.CommonService;
import egovframework.edosi.common.code.CodeResource;
import egovframework.edosi.filter.XssFilter;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import sayit.crypto.EdosiCryptoUtil;
@Controller
@SessionAttributes(types={HmsUserVO.class})
public class HmsUserMobileController {
@Resource(name="hmsUserService")
private HmsUserService hmsUserService;
@Resource(name="hmsDeptService")
private HmsDeptService hmsDeptService;
@Resource(name="propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name="codeResource")
private CodeResource codeResource;
@Resource(name="commonService")
private CommonService commonService;
@Resource(name="dwrCommonService")
private DwrCommonService dwrCommonService;
@RequestMapping(value={"/dms/hmsUser/hmsUserMobileIndex.do"})
public String hmsUserIndex(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, ModelMap modelMap, Model model) throws Exception {
String viewName = "";
String bmode = searchVO.getBmode();
if (bmode == null || bmode.equals("") || bmode.equals("list")) {
viewName = this.selectHmsUserMobileList(request, response, searchVO, model);
} else if (bmode.equals("user")) {
viewName = this.selectHmsUserMobileUserList(request, response, searchVO, model);
} else if (bmode.equals("detail")) {
viewName = this.selectHmsUserMobile(request, response, searchVO, model);
} else if (bmode.equals("add")) {
viewName = this.addHmsUserMobileView(request, response, searchVO, model);
} else if (bmode.equals("modify")) {
viewName = this.updateHmsUserMobile(request, response, searchVO, model);
}
model.addAttribute("bmode", (Object)bmode);
this.initModelData(model, bmode);
return viewName;
}
private void initModelData(Model model, String bmode) throws Exception {
HashMap param = new HashMap();
this.initModelData(param, model, bmode);
}
private void initModelData(Map param, Model model, String bmode) throws Exception {
Iterator<String> it = param.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
String value = (String)param.get(key);
model.addAttribute(key, (Object)this.codeResource.getCodeList(value));
if (bmode == null || !bmode.equals("add") && !bmode.equals("modify")) continue;
model.addAttribute(key, (Object)this.codeResource.removeCodeResourceForNotUse(value));
}
}
private String selectHmsUserMobileList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
try {
HmsUserVO hmsUserVO = new HmsUserVO();
hmsUserVO.setUserId(loginVO.getId());
hmsUserVO = this.hmsUserService.selectHmsUser(hmsUserVO);
EdosiCryptoUtil eu1 = EdosiCryptoUtil.getInstance();
hmsUserVO.setPasswd(eu1.decrypt(hmsUserVO.getPasswd()));
model.addAttribute("hmsUserVO", (Object)hmsUserVO);
}
catch (Exception e) {
e.printStackTrace();
}
return "mobile/hmsUser/HmsUserMobileRegister";
}
private String addHmsUserMobileView(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, Model model) throws Exception {
HmsUserVO hmsUserVO = new HmsUserVO();
model.addAttribute("hmsUserVO", (Object)hmsUserVO);
return "mobile/hmsUser/HmsUserMobileRegister";
}
@RequestMapping(value={"/dms/hmsUser/addHmsUserMobile.do"})
public String addHmsUserMobile(MultipartHttpServletRequest request, HttpServletResponse response, HmsUserVO hmsUserVO, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
try {
this.hmsUserService.insertHmsUser(hmsUserVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), (HttpServletRequest)request);
}
private String updateHmsUserMobile(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, Model model) throws Exception {
HmsUserVO hmsUserVO = new HmsUserVO();
hmsUserVO.setUserSeq(searchVO.getUserSeq());
hmsUserVO = this.hmsUserService.selectHmsUser(hmsUserVO);
if (!this.checkWriteAuth(hmsUserVO)) {
return "cmm/sessionError";
}
model.addAttribute("hmsUserVO", (Object)hmsUserVO);
return "mobile/hmsUser/HmsUserMobileRegister";
}
@RequestMapping(value={"/dms/hmsUser/updateHmsUserMobile.do"})
public String updateHmsUserMobile(MultipartHttpServletRequest request, HttpServletResponse response, HmsUserVO hmsUserVO, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!XssFilter.getInstance().isNotFindXSS((ServletRequest)request)) {
RequestDispatcher dispatcher = request.getRequestDispatcher(XssFilter.infoUrl);
dispatcher.forward((ServletRequest)request, (ServletResponse)response);
return null;
}
try {
this.hmsUserService.updateHmsUser(hmsUserVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), (HttpServletRequest)request) + searchVO.toParam();
}
private String selectHmsUserMobileUserList(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
try {
searchVO.setPageUseYn("N");
List userList = this.hmsUserService.selectHmsUserList(searchVO);
model.addAttribute("userList", (Object)userList);
}
catch (Exception e) {
e.printStackTrace();
}
return "mobile/hmsUser/HmsUserMobileUserList";
}
private String selectHmsUserMobile(HttpServletRequest request, HttpServletResponse response, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, Model model) throws Exception {
if (request.getSession().getAttribute("SEARCH_KEYWORD") != null) {
searchVO.setSearchKeyword((String)request.getSession().getAttribute("SEARCH_KEYWORD"));
request.getSession().setAttribute("SEARCH_KEYWORD", null);
}
HmsUserVO hmsUserVO = new HmsUserVO();
hmsUserVO.setUserSeq(searchVO.getUserSeq());
try {
hmsUserVO = this.hmsUserService.selectHmsUser(hmsUserVO);
}
catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("hmsUserVO", (Object)hmsUserVO);
model.addAttribute("checkWriteAuth", (Object)this.checkWriteAuth(hmsUserVO));
return "mobile/hmsUser/HmsUserMobileDetail";
}
@RequestMapping(value={"/dms/hmsUser/deleteHmsUserMobile.do"})
public String deleteHmsUserMobile(HttpServletRequest request, HmsUserVO hmsUserVO, @ModelAttribute(value="searchVO") HmsUserDefaultVO searchVO, SessionStatus status) throws Exception {
if (!EgovUserDetailsHelper.isAuthenticated().booleanValue()) {
return "cmm/sessionError";
}
if (!this.checkWriteAuth(hmsUserVO)) {
return "cmm/privilegeError";
}
try {
this.hmsUserService.deleteHmsUser(hmsUserVO, request);
}
catch (Exception e) {
e.printStackTrace();
}
status.setComplete();
if (searchVO.getSearchKeyword() != null && !searchVO.getSearchKeyword().equals("")) {
request.getSession().setAttribute("SEARCH_KEYWORD", (Object)searchVO.getSearchKeyword());
}
searchVO.setBmode(null);
return "redirect:" + this.dwrCommonService.removeContextPath(searchVO.getParentUrl(), request) + searchVO.toParam();
}
private boolean checkWriteAuth(HmsUserVO hmsUserVO) {
return true;
}
}