시군구, 부서 관리 관련 소스 파일명 변경

main
이범준 6 months ago
parent c3eb6cfeaf
commit 3c3b5efa1a

@ -0,0 +1,58 @@
package cokr.xit.applib.ogdp;
import cokr.xit.foundation.component.QueryRequest;
public class OgdpQuery extends QueryRequest {
private static final long serialVersionUID = 1L;
private String sggCd; // 시군구 코드
private String deptCd; // 부서 코드
private String instCd; // 기관 코드
private String useYn; // 사용 여부
private String delYn; // 삭제 여부
public String getSggCd() {
return ifEmpty(sggCd, () -> null);
}
public <T extends OgdpQuery> T setSggCd(String sggCd) {
this.sggCd = sggCd;
return self();
}
public String getDeptCd() {
return ifEmpty(deptCd, () -> null);
}
public <T extends OgdpQuery> T setDeptCd(String deptCd) {
this.deptCd = deptCd;
return self();
}
public String getInstCd() {
return ifEmpty(instCd, () -> null);
}
public <T extends OgdpQuery> T setInstCd(String instCd) {
this.instCd = instCd;
return self();
}
public String getUseYn() {
return ifEmpty(useYn, () -> null);
}
public <T extends OgdpQuery> T setUseYn(String useYn) {
this.useYn = useYn;
return self();
}
public String getDelYn() {
return ifEmpty(delYn, () -> null);
}
public <T extends OgdpQuery> T setDelYn(String delYn) {
this.delYn = delYn;
return self();
}
}

@ -1,4 +1,4 @@
package cokr.xit.fims.mngt; package cokr.xit.applib.ogdp;
import cokr.xit.base.user.Sigungu; import cokr.xit.base.user.Sigungu;
import lombok.Getter; import lombok.Getter;
@ -10,7 +10,7 @@ import lombok.Setter;
*/ */
@Getter @Getter
@Setter @Setter
public class FimsSigungu extends Sigungu { public class OgdpSigungu extends Sigungu {
/** /**
* *

@ -1,28 +1,17 @@
package cokr.xit.fims.mngt.dao; package cokr.xit.applib.ogdp.dao;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.cmmn.CmmnQuery; import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.fims.mngt.FimsDepartment; import cokr.xit.applib.ogdp.OgdpSigungu;
import cokr.xit.fims.mngt.FimsSigungu;
import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
/** DAO @Mapper("cmmnOgdpMapper")
* public interface CmmnOgdpMapper extends AbstractMapper {
* <p> :
*
* <pre>
* ============ ============
* 2023-09-15 leebj
* ================================
* </pre>
*/
@Mapper("ogdpMapper")
public interface OgdpMapper extends AbstractMapper {
/** , .<br /> /** , .<br />
* @param * @param
@ -77,7 +66,7 @@ public interface OgdpMapper extends AbstractMapper {
* <li> false</li> * <li> false</li>
* </ul> * </ul>
*/ */
default boolean updateSgg(FimsSigungu sgg) { default boolean updateSgg(OgdpSigungu sgg) {
return sgg != null && updateSgg(params().set("sgg", sgg)) == 1; return sgg != null && updateSgg(params().set("sgg", sgg)) == 1;
} }
@ -85,13 +74,15 @@ public interface OgdpMapper extends AbstractMapper {
* @param req * @param req
* @return * @return
*/ */
List<DataObject> selectSggs(CmmnQuery req); List<DataObject> selectSggs(OgdpQuery req);
/** . /** .
* @param req * @param req
* @return * @return
*/ */
default DataObject selectSggInfo(CmmnQuery req) { default DataObject selectSggInfo(OgdpQuery req) {
// 사용 여부 확인 // 사용 여부 확인
if (req.getUseYn() == null) { if (req.getUseYn() == null) {
req.setUseYn("Y"); req.setUseYn("Y");
@ -106,77 +97,6 @@ public interface OgdpMapper extends AbstractMapper {
return (!sggs.isEmpty() || sggs.size() == 1) ? sggs.get(0) : null; return (!sggs.isEmpty() || sggs.size() == 1) ? sggs.get(0) : null;
} }
/** .<br />
* @param req
* @return
*/
List<DataObject> selectDeptList(CmmnQuery req);
/** .
* @param req
* @return
*/
List<DataObject> selectDepts(CmmnQuery req);
/** .
* @param req
* @return
*/
default DataObject selectDeptInfo(CmmnQuery req) {
// 기본 정렬
if (req.getOrderBy() == null) {
req.setOrderBy("D.DEPT_CD DESC");
}
List<DataObject> depts = selectDepts(req);
return !depts.isEmpty() ? depts.get(0) : null;
}
/** .
* @param params
* <ul><li>"dept" - </li>
* <li>"currentUser" - </li>
* </ul>
* @return
*/
int insertDept(Map<String, Object> params);
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
default boolean insert(FimsDepartment dept) {
return dept != null && insertDept(params().set("dept", dept)) == 1;
}
/** .
* @param params
* <ul><li>"dept" - </li>
* <li>"currentUser" - </li>
* </ul>
* @return
*/
int updateDept(Map<String, Object> params);
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
default boolean update(FimsDepartment dept) {
return dept != null && updateDept(params().set("dept", dept)) == 1;
}
/** . /** .
* @param params * @param params
* <ul><li>"deptCds" - </li> * <ul><li>"deptCds" - </li>
@ -197,5 +117,4 @@ public interface OgdpMapper extends AbstractMapper {
int effected = setStatus(params); int effected = setStatus(params);
return effected; return effected;
} }
} }

@ -0,0 +1,96 @@
package cokr.xit.applib.ogdp.dao;
import java.util.List;
import java.util.Map;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.base.user.Department;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
/** DAO
*
* <p> :
*
* <pre>
* ============ ============
* 2023-09-15 leebj
* ================================
* </pre>
*/
@Mapper("defaultOgdpMapper")
public interface DefaultOgdpMapper extends AbstractMapper {
/** .<br />
* @param req
* @return
*/
List<DataObject> selectDeptList(OgdpQuery req);
/** .
* @param req
* @return
*/
List<DataObject> selectDepts(OgdpQuery req);
/** .
* @param req
* @return
*/
default DataObject selectDeptInfo(OgdpQuery req) {
// 기본 정렬
if (req.getOrderBy() == null) {
req.setOrderBy("D.DEPT_CD DESC");
}
List<DataObject> depts = selectDepts(req);
return !depts.isEmpty() ? depts.get(0) : null;
}
/** .
* @param params
* <ul><li>"dept" - </li>
* <li>"currentUser" - </li>
* </ul>
* @return
*/
int insertDept(Map<String, Object> params);
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
default boolean insert(Department dept) {
return dept != null && insertDept(params().set("dept", dept)) == 1;
}
/** .
* @param params
* <ul><li>"dept" - </li>
* <li>"currentUser" - </li>
* </ul>
* @return
*/
int updateDept(Map<String, Object> params);
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
default boolean update(Department dept) {
return dept != null && updateDept(params().set("dept", dept)) == 1;
}
}

@ -0,0 +1,41 @@
package cokr.xit.applib.ogdp.service;
import java.util.List;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.base.user.Department;
import cokr.xit.foundation.data.DataObject;
public interface OgdpService {
/** .
* @param req
* @return
*/
List<DataObject> getDeptList(OgdpQuery req);
/** .
* @param req
* @return
*/
DataObject getDeptInfo(OgdpQuery req);
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
String create(Department dept);
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
String update(Department dept);
}

@ -0,0 +1,82 @@
package cokr.xit.applib.ogdp.service.bean;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.OgdpSigungu;
import cokr.xit.applib.ogdp.dao.CmmnOgdpMapper;
import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.component.AbstractBean;
import cokr.xit.foundation.data.DataObject;
@Component("cmmnOgdpBean")
public class CmmnOgdpBean extends AbstractBean {
@Resource(name="cmmnOgdpMapper")
private CmmnOgdpMapper cmmnOgdpMapper;
/**userInfo ,, .
* @param userInfo
* @return
*/
public void initUserInfo(UserInfo userInfo) {
DataObject ogdpInfo = cmmnOgdpMapper.selectOgdpInfoOfUser(userInfo.getId());
Map<String, Object> infoMap = userInfo.getInfo();
if(ogdpInfo == null) {
infoMap.put("sggCd", "");
infoMap.put("sggNm", "");
infoMap.put("instCd", "");
infoMap.put("instNm", "");
infoMap.put("deptCd", "");
infoMap.put("deptNm", "");
} else {
infoMap.put("sggCd", ogdpInfo.string("SGG_CD"));
infoMap.put("sggNm", ogdpInfo.string("SGG_NM"));
infoMap.put("instCd", ogdpInfo.string("INST_CD"));
infoMap.put("instNm", ogdpInfo.string("INST_NM"));
infoMap.put("deptCd", ogdpInfo.string("DEPT_CD"));
infoMap.put("deptNm", ogdpInfo.string("DEPT_NM"));
}
userInfo.setInfo(infoMap);
}
/** .
* @param sgg
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean updateSgg(OgdpSigungu sgg) {
return cmmnOgdpMapper.updateSgg(sgg);
}
/** .
* @param req
* @return
*/
public DataObject getSggInfo(OgdpQuery req) {
return cmmnOgdpMapper.selectSggInfo(req);
}
/** .
* @param deptCds
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean remove(String... deptCds) {
return cmmnOgdpMapper.setStatus("N", deptCds) > 0 ? true : false;
}
}

@ -0,0 +1,78 @@
package cokr.xit.applib.ogdp.service.bean;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.dao.CmmnOgdpMapper;
import cokr.xit.applib.ogdp.dao.DefaultOgdpMapper;
import cokr.xit.base.user.Department;
import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.foundation.component.AbstractBean;
import cokr.xit.foundation.data.DataObject;
@Component("defaultOgdpBean")
public class DefaultOgdpBean extends AbstractBean {
@Resource(name="cmmnOgdpMapper")
CmmnOgdpMapper cmmnOgdpMapper;
@Resource(name = "defaultOgdpMapper")
private DefaultOgdpMapper defaultOgdpMapper;
@Resource(name = "userMapper")
private UserMapper userMapper;
/** .
* @param req
* @return
*/
public List<DataObject> getDeptList(OgdpQuery req) {
return defaultOgdpMapper.selectDeptList(req);
}
/** .
* @param req
* @return
*/
public List<DataObject> getDepts(OgdpQuery req) {
return defaultOgdpMapper.selectDepts(req);
}
/** .
* @param req
* @return
*/
public DataObject getDeptInfo(OgdpQuery req) {
return defaultOgdpMapper.selectDeptInfo(req);
}
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean create(Department dept) {
return defaultOgdpMapper.insert(dept);
}
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean update(Department dept) {
return defaultOgdpMapper.update(dept);
}
}

@ -0,0 +1,42 @@
package cokr.xit.applib.ogdp.service.bean;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.service.OgdpService;
import cokr.xit.base.user.Department;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.foundation.data.DataObject;
@Service("defaultOgdpService")
public class DefaultOgdpServiceBean extends AbstractServiceBean implements OgdpService {
@Resource(name = "defaultOgdpBean")
private DefaultOgdpBean defaultOgdpBean;
@Override
public List<DataObject> getDeptList(OgdpQuery req) {
return defaultOgdpBean.getDeptList(req);
}
@Override
public DataObject getDeptInfo(OgdpQuery req) {
return defaultOgdpBean.getDeptInfo(req);
}
@Override
public String create(Department dept) {
return defaultOgdpBean.create(dept) ? "[S]" : "[F]";
}
@Override
public String update(Department dept) {
return defaultOgdpBean.update(dept) ? "[S]" : "[F]";
}
}

@ -10,9 +10,9 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.ogdp.dao.CmmnOgdpMapper;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.service.UserService; import cokr.xit.base.user.service.UserService;
import cokr.xit.fims.mngt.dao.OgdpMapper;
import cokr.xit.fims.task.TaskRequestMappingHandlerMapping; import cokr.xit.fims.task.TaskRequestMappingHandlerMapping;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
import cokr.xit.foundation.web.AbstractController; import cokr.xit.foundation.web.AbstractController;
@ -24,8 +24,8 @@ public class MainController extends AbstractController {
@Autowired @Autowired
private TaskRequestMappingHandlerMapping requestHandlers; private TaskRequestMappingHandlerMapping requestHandlers;
@Resource(name="ogdpMapper") @Resource(name="cmmnOgdpMapper")
OgdpMapper ogdpMapper; CmmnOgdpMapper cmmnOgdpMapper;
@Resource(name="userService") @Resource(name="userService")
private UserService userService; private UserService userService;
@ -39,12 +39,12 @@ public class MainController extends AbstractController {
public ModelAndView signupPage(String institute) { public ModelAndView signupPage(String institute) {
ModelAndView mav = new ModelAndView("fims/user/user-info"); ModelAndView mav = new ModelAndView("fims/user/user-info");
mav.addObject("allOgdpList", ogdpMapper.selectAllOgdpList()); mav.addObject("allOgdpList", cmmnOgdpMapper.selectAllOgdpList());
DataObject params = new DataObject(); DataObject params = new DataObject();
params.set("anonymous", "Y"); params.set("anonymous", "Y");
params.set("institute", institute); params.set("institute", institute);
List<DataObject> ableOgdpList = ogdpMapper.selectAbleOgdpList(params); List<DataObject> ableOgdpList = cmmnOgdpMapper.selectAbleOgdpList(params);
mav.addObject("ableOgdpList", ableOgdpList); mav.addObject("ableOgdpList", ableOgdpList);
mav.addObject("userInfo", "{}"); mav.addObject("userInfo", "{}");
@ -71,7 +71,7 @@ public class MainController extends AbstractController {
@RequestMapping(name="기관 목록", value="/instList.do") @RequestMapping(name="기관 목록", value="/instList.do")
public ModelAndView instList(String account, String institute) { public ModelAndView instList(String account, String institute) {
List<DataObject> instList = ogdpMapper.selectAllInstList(); List<DataObject> instList = cmmnOgdpMapper.selectAllInstList();
return new ModelAndView("jsonView") return new ModelAndView("jsonView")
.addObject("instList", instList); .addObject("instList", instList);
} }

@ -10,10 +10,10 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.code.service.CodeQuery; import cokr.xit.base.code.service.CodeQuery;
import cokr.xit.base.code.service.bean.CodeBean; import cokr.xit.base.code.service.bean.CodeBean;
import cokr.xit.fims.cmmn.CmmnQuery; import cokr.xit.fims.cmmn.CmmnQuery;
import cokr.xit.fims.mngt.service.bean.OgdpBean;
import cokr.xit.fims.mngt.service.bean.TaskBean; import cokr.xit.fims.mngt.service.bean.TaskBean;
import cokr.xit.foundation.UserInfo; import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
@ -26,8 +26,8 @@ public class CodeController extends cokr.xit.base.code.web.CodeController {
@Resource(name = "taskBean") @Resource(name = "taskBean")
private TaskBean taskBean; private TaskBean taskBean;
@Resource(name = "ogdpBean") @Resource(name = "cmmnOgdpBean")
private OgdpBean ogdpBean; private CmmnOgdpBean cmmnOgdpBean;
@RequestMapping(name="모든 업무구분코드 조회",value="/getAllTaskSeCd.do") @RequestMapping(name="모든 업무구분코드 조회",value="/getAllTaskSeCd.do")
public ModelAndView getAllTaskSeCd() { public ModelAndView getAllTaskSeCd() {
@ -52,7 +52,7 @@ public class CodeController extends cokr.xit.base.code.web.CodeController {
mav.addObject("sggHasTask", "Y"); mav.addObject("sggHasTask", "Y");
} else { } else {
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
String sggCd = (String)userInfo.getInfo().get("sggCd"); String sggCd = (String)userInfo.getInfo().get("sggCd");

@ -8,14 +8,14 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.ogdp.dao.CmmnOgdpMapper;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.code.service.CodeQuery; import cokr.xit.base.code.service.CodeQuery;
import cokr.xit.base.code.service.bean.CodeBean; import cokr.xit.base.code.service.bean.CodeBean;
import cokr.xit.base.security.SecuredUserInfo; import cokr.xit.base.security.SecuredUserInfo;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.service.UserService; import cokr.xit.base.user.service.UserService;
import cokr.xit.fims.cmmn.service.bean.StngBean; import cokr.xit.fims.cmmn.service.bean.StngBean;
import cokr.xit.fims.mngt.dao.OgdpMapper;
import cokr.xit.fims.mngt.service.bean.OgdpBean;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
@Controller @Controller
@ -30,11 +30,11 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
@Resource(name = "codeBean") @Resource(name = "codeBean")
private CodeBean codeBean; private CodeBean codeBean;
@Resource(name="ogdpBean") @Resource(name = "cmmnOgdpBean")
private OgdpBean ogdpBean; private CmmnOgdpBean cmmnOgdpBean;
@Resource(name="ogdpMapper") @Resource(name="cmmnOgdpMapper")
private OgdpMapper ogdpMapper; CmmnOgdpMapper cmmnOgdpMapper;
@Resource(name = "stngBean") @Resource(name = "stngBean")
private StngBean stngBean; private StngBean stngBean;
@ -49,10 +49,10 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
public ModelAndView getInfo(String userID) { public ModelAndView getInfo(String userID) {
ModelAndView mav = super.getInfo(userID); ModelAndView mav = super.getInfo(userID);
mav.addObject("allOgdpList", ogdpMapper.selectAllOgdpList()); mav.addObject("allOgdpList", cmmnOgdpMapper.selectAllOgdpList());
DataObject params = new DataObject().set("currentUser", currentUser()); DataObject params = new DataObject().set("currentUser", currentUser());
List<DataObject> ableOgdpList = ogdpMapper.selectAbleOgdpList(params); List<DataObject> ableOgdpList = cmmnOgdpMapper.selectAbleOgdpList(params);
mav.addObject("ableOgdpList", ableOgdpList); mav.addObject("ableOgdpList", ableOgdpList);
return mav; return mav;
@ -65,7 +65,7 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
SecuredUserInfo userInfo = currentUser(); SecuredUserInfo userInfo = currentUser();
//시군구,기관,부서 //시군구,기관,부서
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
//관리자여부,업무권한여부 //관리자여부,업무권한여부
boolean isAdmin = userInfo.hasAuthorities("ROLE_ADMIN"); boolean isAdmin = userInfo.hasAuthorities("ROLE_ADMIN");
@ -112,9 +112,9 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
DataObject userInfo = userService.getUserInfo(currentUser().getId()); DataObject userInfo = userService.getUserInfo(currentUser().getId());
mav.addObject("userInfo", toJson(userInfo)); mav.addObject("userInfo", toJson(userInfo));
mav.addObject("allOgdpList", ogdpMapper.selectAllOgdpList()); mav.addObject("allOgdpList", cmmnOgdpMapper.selectAllOgdpList());
DataObject params = new DataObject().set("currentUser", currentUser()); DataObject params = new DataObject().set("currentUser", currentUser());
List<DataObject> ableOgdpList = ogdpMapper.selectAbleOgdpList(params); List<DataObject> ableOgdpList = cmmnOgdpMapper.selectAbleOgdpList(params);
mav.addObject("ableOgdpList", ableOgdpList); mav.addObject("ableOgdpList", ableOgdpList);
return mav; return mav;

@ -9,6 +9,7 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.code.CommonCode; import cokr.xit.base.code.CommonCode;
import cokr.xit.base.code.service.CodeQuery; import cokr.xit.base.code.service.CodeQuery;
import cokr.xit.base.code.service.bean.CodeBean; import cokr.xit.base.code.service.bean.CodeBean;
@ -16,7 +17,6 @@ import cokr.xit.base.security.Authority;
import cokr.xit.base.security.SecuredUserInfo; import cokr.xit.base.security.SecuredUserInfo;
import cokr.xit.fims.cmmn.CmmnQuery; import cokr.xit.fims.cmmn.CmmnQuery;
import cokr.xit.fims.cmmn.dao.StngMapper; import cokr.xit.fims.cmmn.dao.StngMapper;
import cokr.xit.fims.mngt.service.bean.OgdpBean;
import cokr.xit.fims.mngt.service.bean.TaskBean; import cokr.xit.fims.mngt.service.bean.TaskBean;
import cokr.xit.foundation.UserInfo; import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.component.AbstractBean; import cokr.xit.foundation.component.AbstractBean;
@ -27,8 +27,8 @@ public class StngBean extends AbstractBean {
@Resource(name = "codeBean") @Resource(name = "codeBean")
private CodeBean codeBean; private CodeBean codeBean;
@Resource(name = "ogdpBean") @Resource(name = "cmmnOgdpBean")
private OgdpBean ogdpBean; private CmmnOgdpBean cmmnOgdpBean;
@Resource(name = "stngMapper") @Resource(name = "stngMapper")
private StngMapper stngMapper; private StngMapper stngMapper;
@ -49,14 +49,14 @@ public class StngBean extends AbstractBean {
if(userInfo.getInstitute().equals("default")) { if(userInfo.getInstitute().equals("default")) {
return new DataObject(); return new DataObject();
} }
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
return stngMapper.selectDeptStng((String)userInfo.getInfo().get("deptCd")); return stngMapper.selectDeptStng((String)userInfo.getInfo().get("deptCd"));
} else if(type.equals("sgg")){ } else if(type.equals("sgg")){
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
if(userInfo.getInstitute().equals("default")) { if(userInfo.getInstitute().equals("default")) {
return new DataObject(); return new DataObject();
} }
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
return stngMapper.selectSggStng((String)userInfo.getInfo().get("sggCd")); return stngMapper.selectSggStng((String)userInfo.getInfo().get("sggCd"));
} else { } else {
return null; return null;
@ -71,7 +71,7 @@ public class StngBean extends AbstractBean {
public boolean updateDtbnActno(String dtbnBankNm, String dtbnActno) { public boolean updateDtbnActno(String dtbnBankNm, String dtbnActno) {
Map<String, String> params = new HashMap<String, String>(); Map<String, String> params = new HashMap<String, String>();
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
params.put("mdfr", userInfo.getId()); params.put("mdfr", userInfo.getId());
params.put("deptCd", (String)userInfo.getInfo().get("deptCd")); params.put("deptCd", (String)userInfo.getInfo().get("deptCd"));
params.put("dtbnBankNm", dtbnBankNm); params.put("dtbnBankNm", dtbnBankNm);
@ -99,7 +99,7 @@ public class StngBean extends AbstractBean {
} else if(isAdmin) { //관리자 } else if(isAdmin) { //관리자
Map<String, Object> info = userInfo.getInfo(); Map<String, Object> info = userInfo.getInfo();
if(info == null || info.get("sggCd") == null || info.get("sggCd").equals("")) { if(info == null || info.get("sggCd") == null || info.get("sggCd").equals("")) {
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
} }
availableTaskList = taskBean.getTasks((new CmmnQuery()).setSggCd((String)userInfo.getInfo().get("sggCd")).setUseYn("Y")) availableTaskList = taskBean.getTasks((new CmmnQuery()).setSggCd((String)userInfo.getInfo().get("sggCd")).setUseYn("Y"))
@ -182,7 +182,7 @@ public class StngBean extends AbstractBean {
SecuredUserInfo userInfo = currentUser(); SecuredUserInfo userInfo = currentUser();
Map<String, Object> info = userInfo.getInfo(); Map<String, Object> info = userInfo.getInfo();
if(info == null || info.get("sggCd") == null || info.get("sggCd").equals("")) { if(info == null || info.get("sggCd") == null || info.get("sggCd").equals("")) {
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
} }
List<String> taskSeCdListForSgg = taskBean.getTasks((new CmmnQuery()).setSggCd((String)userInfo.getInfo().get("sggCd")).setUseYn("Y")) List<String> taskSeCdListForSgg = taskBean.getTasks((new CmmnQuery()).setSggCd((String)userInfo.getInfo().get("sggCd")).setUseYn("Y"))

@ -6,10 +6,10 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.fims.cmmn.dao.ExtrStngMapper; import cokr.xit.fims.cmmn.dao.ExtrStngMapper;
import cokr.xit.fims.cmmn.service.LinkService; import cokr.xit.fims.cmmn.service.LinkService;
import cokr.xit.fims.cmmn.service.bean.LinkBean; import cokr.xit.fims.cmmn.service.bean.LinkBean;
import cokr.xit.fims.mngt.service.bean.OgdpBean;
import cokr.xit.foundation.UserInfo; import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
import cokr.xit.foundation.web.AbstractController; import cokr.xit.foundation.web.AbstractController;
@ -24,8 +24,8 @@ public class LinkController extends AbstractController {
@Resource(name = "linkService") @Resource(name = "linkService")
private LinkService linkService; private LinkService linkService;
@Resource(name = "ogdpBean") @Resource(name = "cmmnOgdpBean")
private OgdpBean ogdpBean; private CmmnOgdpBean cmmnOgdpBean;
@Resource(name = "extrStngMapper") @Resource(name = "extrStngMapper")
private ExtrStngMapper extrStngMapper; private ExtrStngMapper extrStngMapper;
@ -36,7 +36,7 @@ public class LinkController extends AbstractController {
boolean saved = false; boolean saved = false;
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
String sggCd = (String) userInfo.getInfo().get("sggCd"); String sggCd = (String) userInfo.getInfo().get("sggCd");
System.out.println("파라미터 : "+ param); System.out.println("파라미터 : "+ param);

@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.code.CommonCode; import cokr.xit.base.code.CommonCode;
import cokr.xit.base.file.FileInfo; import cokr.xit.base.file.FileInfo;
import cokr.xit.base.file.web.FileInfoFactory; import cokr.xit.base.file.web.FileInfoFactory;
@ -42,7 +43,6 @@ import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.fims.crdn.service.CrdnStngService; import cokr.xit.fims.crdn.service.CrdnStngService;
import cokr.xit.fims.crdn.service.ImportService; import cokr.xit.fims.crdn.service.ImportService;
import cokr.xit.fims.crdn.service.bean.CrdnStngBean; import cokr.xit.fims.crdn.service.bean.CrdnStngBean;
import cokr.xit.fims.mngt.service.bean.OgdpBean;
import cokr.xit.fims.task.Task; import cokr.xit.fims.task.Task;
import cokr.xit.foundation.UserInfo; import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
@ -95,8 +95,8 @@ public class Crdn05Controller extends ApplicationController {
@Resource(name="crdnStngMapper") @Resource(name="crdnStngMapper")
private CrdnStngMapper crdnStngMapper; private CrdnStngMapper crdnStngMapper;
@Resource(name="ogdpBean") @Resource(name = "cmmnOgdpBean")
protected OgdpBean ogdpBean; private CmmnOgdpBean cmmnOgdpBean;
@Resource(name = "stngBean") @Resource(name = "stngBean")
private StngBean stngBean; private StngBean stngBean;
@ -481,7 +481,7 @@ public class Crdn05Controller extends ApplicationController {
boolean saved = false; boolean saved = false;
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
crdn.setSggCd((String)userInfo.getInfo().get("sggCd")); crdn.setSggCd((String)userInfo.getInfo().get("sggCd"));
crdn.setCrdnRegSeCd("01"); crdn.setCrdnRegSeCd("01");

@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.Print; import cokr.xit.applib.Print;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.code.CommonCode; import cokr.xit.base.code.CommonCode;
import cokr.xit.base.docs.xls.CellDef; import cokr.xit.base.docs.xls.CellDef;
import cokr.xit.base.docs.xls.Format; import cokr.xit.base.docs.xls.Format;
@ -37,7 +38,6 @@ import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.fims.cvlc.CrdnCvlcpt; import cokr.xit.fims.cvlc.CrdnCvlcpt;
import cokr.xit.fims.cvlc.service.CrdnCvlcptService; import cokr.xit.fims.cvlc.service.CrdnCvlcptService;
import cokr.xit.fims.cvlc.service.bean.CrdnCvlcptMainBean; import cokr.xit.fims.cvlc.service.bean.CrdnCvlcptMainBean;
import cokr.xit.fims.mngt.service.bean.OgdpBean;
import cokr.xit.fims.task.Task; import cokr.xit.fims.task.Task;
import cokr.xit.foundation.UserInfo; import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
@ -82,8 +82,8 @@ public class Cvlc01Controller extends ApplicationController {
@Resource(name = "fileBean") @Resource(name = "fileBean")
private FileBean fileBean; private FileBean fileBean;
@Resource(name = "ogdpBean") @Resource(name = "cmmnOgdpBean")
private OgdpBean ogdpBean; private CmmnOgdpBean cmmnOgdpBean;
@Resource(name = "crdnCvlcptMainBean") @Resource(name = "crdnCvlcptMainBean")
private CrdnCvlcptMainBean crdnCvlcptMainBean; private CrdnCvlcptMainBean crdnCvlcptMainBean;
@ -221,7 +221,7 @@ public class Cvlc01Controller extends ApplicationController {
FimsPrintOption printOption = new FimsPrintOption(); FimsPrintOption printOption = new FimsPrintOption();
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
Print print = new Print(); Print print = new Print();
print.setPrintRequestUserInfo(userInfo); print.setPrintRequestUserInfo(userInfo);

@ -10,7 +10,6 @@ import cokr.xit.base.file.FileInfo;
import cokr.xit.fims.excl.LevyExclQuery; import cokr.xit.fims.excl.LevyExclQuery;
import cokr.xit.fims.excl.OpnnSbmsn; import cokr.xit.fims.excl.OpnnSbmsn;
import cokr.xit.fims.excl.service.OpnnSbmsnService; import cokr.xit.fims.excl.service.OpnnSbmsnService;
import cokr.xit.fims.mngt.service.bean.OgdpBean;
import cokr.xit.foundation.component.AbstractServiceBean; import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
@ -31,10 +30,6 @@ public class OpnnSbmsnServiceBean extends AbstractServiceBean implements OpnnSbm
@Resource(name = "opnnSbmsnBean") @Resource(name = "opnnSbmsnBean")
protected OpnnSbmsnBean opnnSbmsnBean; protected OpnnSbmsnBean opnnSbmsnBean;
/* Bean */
@Resource(name="ogdpBean")
protected OgdpBean ogdpBean;
@Override @Override
public List<DataObject> getOpnnSbmsnList(LevyExclQuery req) { public List<DataObject> getOpnnSbmsnList(LevyExclQuery req) {
return opnnSbmsnBean.getOpnnSbmsnList(req); return opnnSbmsnBean.getOpnnSbmsnList(req);

@ -15,6 +15,7 @@ import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.Print; import cokr.xit.applib.Print;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.code.CommonCode; import cokr.xit.base.code.CommonCode;
import cokr.xit.base.docs.xls.CellDef; import cokr.xit.base.docs.xls.CellDef;
import cokr.xit.base.docs.xls.Format; import cokr.xit.base.docs.xls.Format;
@ -35,7 +36,6 @@ import cokr.xit.fims.excl.OpnnDlbrMbr;
import cokr.xit.fims.excl.OpnnSbmsn; import cokr.xit.fims.excl.OpnnSbmsn;
import cokr.xit.fims.excl.service.OpnnDlbrMbrService; import cokr.xit.fims.excl.service.OpnnDlbrMbrService;
import cokr.xit.fims.excl.service.OpnnSbmsnService; import cokr.xit.fims.excl.service.OpnnSbmsnService;
import cokr.xit.fims.mngt.service.bean.OgdpBean;
import cokr.xit.fims.task.Task; import cokr.xit.fims.task.Task;
import cokr.xit.foundation.UserInfo; import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
@ -89,8 +89,8 @@ public class Excl02Controller extends ApplicationController {
@Resource(name="stngBean") @Resource(name="stngBean")
private StngBean stngBean; private StngBean stngBean;
@Resource(name="ogdpBean") @Resource(name = "cmmnOgdpBean")
private OgdpBean ogdpBean; private CmmnOgdpBean cmmnOgdpBean;
/** (fims/excl/excl02/010-main) . /** (fims/excl/excl02/010-main) .
* *
@ -374,7 +374,7 @@ public class Excl02Controller extends ApplicationController {
@RequestMapping(name="의견제출 심의의결서 출력", value=METHOD_URL.makeDlbrDecsnFileFromHwpFormat) @RequestMapping(name="의견제출 심의의결서 출력", value=METHOD_URL.makeDlbrDecsnFileFromHwpFormat)
public ModelAndView makeDlbrDecsnFileFromHwpFormat(LevyExclQuery req) { public ModelAndView makeDlbrDecsnFileFromHwpFormat(LevyExclQuery req) {
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
Print print = new Print(); Print print = new Print();
print.setPrintRequestUserInfo(userInfo); print.setPrintRequestUserInfo(userInfo);

@ -0,0 +1,47 @@
package cokr.xit.fims.mngt.dao;
import java.util.List;
import java.util.Map;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.fims.mngt.FimsDepartment;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
@Mapper("fimsOgdpMapper")
public interface FimsOgdpMapper extends AbstractMapper {
default DataObject selectDeptInfo(OgdpQuery req) {
// 기본 정렬
if (req.getOrderBy() == null) {
req.setOrderBy("D.DEPT_CD DESC");
}
List<DataObject> depts = selectDepts(req);
return !depts.isEmpty() ? depts.get(0) : null;
};
/** .
* @param req
* @return
*/
List<DataObject> selectDepts(OgdpQuery req);
List<DataObject> selectDeptList(OgdpQuery query);
default boolean insertDept(FimsDepartment dept) {
return dept != null && insertDept(params().set("dept", dept)) == 1;
};
int insertDept(Map<String, Object> params);
default boolean updateDept(FimsDepartment dept) {
return dept != null && updateDept(params().set("dept", dept)) == 1;
}
int updateDept(Map<String, Object> params);
}

@ -1,61 +0,0 @@
package cokr.xit.fims.mngt.service;
import java.util.List;
import cokr.xit.fims.cmmn.CmmnQuery;
import cokr.xit.fims.mngt.FimsDepartment;
import cokr.xit.fims.mngt.FimsSigungu;
import cokr.xit.foundation.data.DataObject;
public interface OgdpService {
String updateSgg(FimsSigungu sgg);
DataObject getSggInfo(CmmnQuery req);
/** .
* @param req
* @return
*/
List<DataObject> getDeptList(CmmnQuery req);
/** .
* @param req
* @return
*/
List<DataObject> getDepts(CmmnQuery req);
/** .
* @param req
* @return
*/
DataObject getDeptInfo(CmmnQuery req);
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
String create(FimsDepartment dept);
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
String update(FimsDepartment dept);
/** .
* @param deptCds
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
String remove(String... deptCds);
}

@ -0,0 +1,38 @@
package cokr.xit.fims.mngt.service.bean;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.fims.mngt.FimsDepartment;
import cokr.xit.fims.mngt.dao.FimsOgdpMapper;
import cokr.xit.foundation.data.DataObject;
@Component("fimsOgdpBean")
public class FimsOgdpBean extends CmmnOgdpBean {
@Resource(name = "fimsOgdpMapper")
private FimsOgdpMapper fimsOgdpMapper;
public DataObject getDeptInfo(OgdpQuery query) {
return fimsOgdpMapper.selectDeptInfo(query);
}
public List<DataObject> getDeptList(OgdpQuery query) {
return fimsOgdpMapper.selectDeptList(query);
}
public boolean createFimsDept(FimsDepartment dept) {
return fimsOgdpMapper.insertDept(dept);
}
public boolean updateFimsDept(FimsDepartment dept) {
return fimsOgdpMapper.updateDept(dept);
}
}

@ -0,0 +1,53 @@
package cokr.xit.fims.mngt.service.bean;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.service.OgdpService;
import cokr.xit.base.user.Department;
import cokr.xit.fims.mngt.FimsDepartment;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.foundation.data.DataObject;
@Service("fimsOgdpService")
public class FimsOgdpServiceBean extends AbstractServiceBean implements OgdpService {
@Resource(name="fimsOgdpBean")
private FimsOgdpBean fimsOgdpBean;
@Override
public List<DataObject> getDeptList(OgdpQuery query) {
return fimsOgdpBean.getDeptList(query);
}
@Override
public DataObject getDeptInfo(OgdpQuery query) {
return fimsOgdpBean.getDeptInfo(query);
}
@Override
public String create(Department dept) {
if(dept instanceof FimsDepartment) {
FimsDepartment fdept = (FimsDepartment) dept;
return fimsOgdpBean.createFimsDept(fdept) ? "[S]" : "[F]";
}
return "[F]";
}
@Override
public String update(Department dept) {
if(dept instanceof FimsDepartment) {
FimsDepartment fdept = (FimsDepartment) dept;
return fimsOgdpBean.updateFimsDept(fdept) ? "[S]" : "[F]";
}
return "[F]";
}
}

@ -1,133 +0,0 @@
package cokr.xit.fims.mngt.service.bean;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.fims.cmmn.CmmnQuery;
import cokr.xit.fims.mngt.FimsDepartment;
import cokr.xit.fims.mngt.FimsSigungu;
import cokr.xit.fims.mngt.dao.OgdpMapper;
import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.component.AbstractBean;
import cokr.xit.foundation.data.DataObject;
@Component("ogdpBean")
public class OgdpBean extends AbstractBean {
@Resource(name = "ogdpMapper")
private OgdpMapper ogdpMapper;
@Resource(name = "userMapper")
private UserMapper userMapper;
/**userInfo ,, .
* @param userInfo
* @return
*/
public void initUserInfo(UserInfo userInfo) {
DataObject ogdpInfo = ogdpMapper.selectOgdpInfoOfUser(userInfo.getId());
Map<String, Object> infoMap = userInfo.getInfo();
if(ogdpInfo == null) {
infoMap.put("sggCd", "");
infoMap.put("sggNm", "");
infoMap.put("instCd", "");
infoMap.put("instNm", "");
infoMap.put("deptCd", "");
infoMap.put("deptNm", "");
} else {
infoMap.put("sggCd", ogdpInfo.string("SGG_CD"));
infoMap.put("sggNm", ogdpInfo.string("SGG_NM"));
infoMap.put("instCd", ogdpInfo.string("INST_CD"));
infoMap.put("instNm", ogdpInfo.string("INST_NM"));
infoMap.put("deptCd", ogdpInfo.string("DEPT_CD"));
infoMap.put("deptNm", ogdpInfo.string("DEPT_NM"));
}
userInfo.setInfo(infoMap);
}
/** .
* @param sgg
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean updateSgg(FimsSigungu sgg) {
return ogdpMapper.updateSgg(sgg);
}
/** .
* @param req
* @return
*/
public DataObject getSggInfo(CmmnQuery req) {
return ogdpMapper.selectSggInfo(req);
}
/** .
* @param req
* @return
*/
public List<DataObject> getDeptList(CmmnQuery req) {
return ogdpMapper.selectDeptList(req);
}
/** .
* @param req
* @return
*/
public List<DataObject> getDepts(CmmnQuery req) {
return ogdpMapper.selectDepts(req);
}
/** .
* @param req
* @return
*/
public DataObject getDeptInfo(CmmnQuery req) {
return ogdpMapper.selectDeptInfo(req);
}
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean create(FimsDepartment dept) {
return ogdpMapper.insert(dept);
}
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean update(FimsDepartment dept) {
return ogdpMapper.update(dept);
}
/** .
* @param deptCds
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean remove(String... deptCds) {
return ogdpMapper.setStatus("N", deptCds) > 0 ? true : false;
}
}

@ -1,68 +0,0 @@
package cokr.xit.fims.mngt.service.bean;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import cokr.xit.fims.cmmn.CmmnQuery;
import cokr.xit.fims.mngt.FimsDepartment;
import cokr.xit.fims.mngt.FimsSigungu;
import cokr.xit.fims.mngt.service.OgdpService;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.foundation.data.DataObject;
@Service("ogdpService")
public class OgdpServiceBean extends AbstractServiceBean implements OgdpService {
@Resource(name = "ogdpBean")
private OgdpBean ogdpBean;
@Override
public String updateSgg(FimsSigungu sgg) {
return ogdpBean.updateSgg(sgg) ? "[S]" : "[F]";
}
@Override
public DataObject getSggInfo(CmmnQuery req) {
return ogdpBean.getSggInfo(req);
}
@Override
public List<DataObject> getDeptList(CmmnQuery req) {
return ogdpBean.getDeptList(req);
}
@Override
public List<DataObject> getDepts(CmmnQuery req) {
return ogdpBean.getDepts(req);
}
@Override
public DataObject getDeptInfo(CmmnQuery req) {
return ogdpBean.getDeptInfo(req);
}
@Override
public String create(FimsDepartment dept) {
return ogdpBean.create(dept) ? "[S]" : "[F]";
}
@Override
public String update(FimsDepartment dept) {
return ogdpBean.update(dept) ? "[S]" : "[F]";
}
@Override
public String remove(String... deptCds) {
boolean result = ogdpBean.remove(deptCds);
if(result) {
return "[S]";
} else {
return "[F]";
}
}
}

@ -8,11 +8,12 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.ogdp.dao.CmmnOgdpMapper;
import cokr.xit.applib.ogdp.dao.DefaultOgdpMapper;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.mngt.Ntc; import cokr.xit.fims.mngt.Ntc;
import cokr.xit.fims.mngt.NtcQuery; import cokr.xit.fims.mngt.NtcQuery;
import cokr.xit.fims.mngt.dao.OgdpMapper;
import cokr.xit.fims.mngt.service.NtcService; import cokr.xit.fims.mngt.service.NtcService;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
@ -40,8 +41,11 @@ public class Mngt01Controller extends ApplicationController {
@Resource(name="ntcService") @Resource(name="ntcService")
private NtcService ntcService; private NtcService ntcService;
@Resource(name = "ogdpMapper") @Resource(name="cmmnOgdpMapper")
private OgdpMapper ogdpMapper; CmmnOgdpMapper cmmnOgdpMapper;
@Resource(name = "defaultOgdpMapper")
private DefaultOgdpMapper defaultOgdpMapper;
/** . /** .
* @return fims/mngt/mngt01010-main * @return fims/mngt/mngt01010-main
@ -96,7 +100,7 @@ public class Mngt01Controller extends ApplicationController {
} }
mav.addObject("ntcInfo", json ? info : toJson(info)); mav.addObject("ntcInfo", json ? info : toJson(info));
List<DataObject> allSggList = ogdpMapper.selectAllSggList(); List<DataObject> allSggList = cmmnOgdpMapper.selectAllSggList();
mav.addObject("sggList", allSggList); mav.addObject("sggList", allSggList);
return mav; return mav;

@ -13,15 +13,15 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.OgdpSigungu;
import cokr.xit.applib.ogdp.dao.CmmnOgdpMapper;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.CmmnQuery; import cokr.xit.fims.cmmn.CmmnQuery;
import cokr.xit.fims.cmmn.service.StngService; import cokr.xit.fims.cmmn.service.StngService;
import cokr.xit.fims.mngt.FimsSigungu;
import cokr.xit.fims.mngt.Task; import cokr.xit.fims.mngt.Task;
import cokr.xit.fims.mngt.VltnQuery; import cokr.xit.fims.mngt.VltnQuery;
import cokr.xit.fims.mngt.dao.OgdpMapper;
import cokr.xit.fims.mngt.service.OgdpService;
import cokr.xit.fims.mngt.service.bean.OgdpBean;
import cokr.xit.fims.mngt.service.bean.TaskBean; import cokr.xit.fims.mngt.service.bean.TaskBean;
import cokr.xit.fims.mngt.service.bean.VltnBean; import cokr.xit.fims.mngt.service.bean.VltnBean;
import cokr.xit.foundation.UserInfo; import cokr.xit.foundation.UserInfo;
@ -49,16 +49,12 @@ public class Mngt03Controller extends ApplicationController {
; ;
} }
/** 소속 정보 서비스 */
@Resource(name = "ogdpService")
private OgdpService ogdpService;
/** 소속 정보 Bean */ @Resource(name = "cmmnOgdpBean")
@Resource(name = "ogdpBean") private CmmnOgdpBean cmmnOgdpBean;
private OgdpBean ogdpBean;
@Resource(name = "ogdpMapper") @Resource(name="cmmnOgdpMapper")
private OgdpMapper ogdpMapper; CmmnOgdpMapper cmmnOgdpMapper;
/** 설정 정보 서비스 */ /** 설정 정보 서비스 */
@Resource(name = "stngService") @Resource(name = "stngService")
@ -88,7 +84,7 @@ public class Mngt03Controller extends ApplicationController {
mav.setViewName("fims/mngt/select-sgg"); mav.setViewName("fims/mngt/select-sgg");
mav.addObject("pageName", "selectSgg"); mav.addObject("pageName", "selectSgg");
List<DataObject> sggList = ogdpMapper.selectAllSggList(); List<DataObject> sggList = cmmnOgdpMapper.selectAllSggList();
mav.addObject("sggList", sggList); mav.addObject("sggList", sggList);
} else { } else {
@ -100,7 +96,7 @@ public class Mngt03Controller extends ApplicationController {
} else { } else {
mav.setViewName("fims/mngt/mngt03010-main"); mav.setViewName("fims/mngt/mngt03010-main");
mav.addObject("pageName", "mngt03010"); mav.addObject("pageName", "mngt03010");
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
mav.addObject("sggCd", userInfo.getInfo().get("sggCd")); mav.addObject("sggCd", userInfo.getInfo().get("sggCd"));
} }
@ -112,9 +108,9 @@ public class Mngt03Controller extends ApplicationController {
* @return jsonView * @return jsonView
*/ */
@RequestMapping(name="시군구 조회", value=METHOD_URL.getSggInfo) @RequestMapping(name="시군구 조회", value=METHOD_URL.getSggInfo)
public ModelAndView getSggInfo(CmmnQuery req) { public ModelAndView getSggInfo(OgdpQuery req) {
ModelAndView mav = new ModelAndView("jsonView"); ModelAndView mav = new ModelAndView("jsonView");
DataObject sggInfo = ogdpService.getSggInfo(req); DataObject sggInfo = cmmnOgdpBean.getSggInfo(req);
mav.addObject("sggInfo", sggInfo); mav.addObject("sggInfo", sggInfo);
return mav; return mav;
} }
@ -147,7 +143,7 @@ public class Mngt03Controller extends ApplicationController {
* }</code></pre> * }</code></pre>
*/ */
@RequestMapping(name="시군구 정보 수정", value=METHOD_URL.updateSgg) @RequestMapping(name="시군구 정보 수정", value=METHOD_URL.updateSgg)
public ModelAndView updateSgg(FimsSigungu sgg, MultipartFile symbol, MultipartFile logo, MultipartFile offcs) { public ModelAndView updateSgg(OgdpSigungu sgg, MultipartFile symbol, MultipartFile logo, MultipartFile offcs) {
ModelAndView mav = new ModelAndView("jsonView"); ModelAndView mav = new ModelAndView("jsonView");
String sggCd = sgg.getSggID(); String sggCd = sgg.getSggID();
@ -167,11 +163,8 @@ public class Mngt03Controller extends ApplicationController {
sgg.setOfficialSealFilepath(newOffcs.get("filePath")); sgg.setOfficialSealFilepath(newOffcs.get("filePath"));
sgg.setOfficialSealFilename(newOffcs.get("fileName")); sgg.setOfficialSealFilename(newOffcs.get("fileName"));
} }
boolean saved = false; boolean saved = cmmnOgdpBean.updateSgg(sgg);
String rtnMsg = ogdpService.updateSgg(sgg);
if(rtnMsg.contains("[S]")) {
saved = true;
}
mav.addObject("saved", saved); mav.addObject("saved", saved);
return mav; return mav;
} }

@ -8,12 +8,13 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.dao.CmmnOgdpMapper;
import cokr.xit.applib.ogdp.service.OgdpService;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.CmmnQuery; import cokr.xit.fims.cmmn.CmmnQuery;
import cokr.xit.fims.mngt.FimsDepartment; import cokr.xit.fims.mngt.FimsDepartment;
import cokr.xit.fims.mngt.dao.OgdpMapper;
import cokr.xit.fims.mngt.service.OgdpService;
import cokr.xit.fims.mngt.service.bean.OgdpBean;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
/** .<br /> /** .<br />
@ -37,16 +38,17 @@ public class Mngt04Controller extends ApplicationController {
; ;
} }
/** 소속 정보 서비스 */ /** 소속 정보 서비스 */
@Resource(name = "ogdpService") @Resource(name = "fimsOgdpService")
private OgdpService ogdpService; private OgdpService fimsOgdpService;
@Resource(name = "cmmnOgdpBean")
private CmmnOgdpBean cmmnOgdpBean;
/** 소속 정보 Bean */ @Resource(name = "cmmnOgdpMapper")
@Resource(name = "ogdpBean") private CmmnOgdpMapper cmmnOgdpMapper;
private OgdpBean ogdpBean;
@Resource(name = "ogdpMapper")
private OgdpMapper ogdpMapper;
/** . /** .
* @return fims/mngt/mngt04010-main * @return fims/mngt/mngt04010-main
@ -58,7 +60,7 @@ public class Mngt04Controller extends ApplicationController {
mav.setViewName("fims/mngt/mngt04010-main"); mav.setViewName("fims/mngt/mngt04010-main");
mav.addObject("pageName", "mngt04010"); mav.addObject("pageName", "mngt04010");
List<DataObject> allSggList = ogdpMapper.selectAllSggList(); List<DataObject> allSggList = cmmnOgdpMapper.selectAllSggList();
mav.addObject("sggList", allSggList); mav.addObject("sggList", allSggList);
@ -71,11 +73,11 @@ public class Mngt04Controller extends ApplicationController {
* @return jsonView * @return jsonView
*/ */
@RequestMapping(name="부서 목록 조회", value=METHOD_URL.getDeptList) @RequestMapping(name="부서 목록 조회", value=METHOD_URL.getDeptList)
public ModelAndView getDeptList(CmmnQuery query) { public ModelAndView getDeptList(OgdpQuery query) {
setFetchSize(query); setFetchSize(query);
return setCollectionInfo(new ModelAndView("jsonView"), ogdpService.getDeptList(query),"",""); return setCollectionInfo(new ModelAndView("jsonView"), fimsOgdpService.getDeptList(query),"","");
} }
@ -87,11 +89,11 @@ public class Mngt04Controller extends ApplicationController {
* }</pre> * }</pre>
*/ */
@RequestMapping(name="부서 상세 조회", value=METHOD_URL.getDeptInfo) @RequestMapping(name="부서 상세 조회", value=METHOD_URL.getDeptInfo)
public ModelAndView getDeptInfo(CmmnQuery query) { public ModelAndView getDeptInfo(OgdpQuery query) {
DataObject deptInfo = new DataObject(); DataObject deptInfo = new DataObject();
if(!ifEmpty(query.getDeptCd(), ()->"").equals("")) { if(!ifEmpty(query.getDeptCd(), ()->"").equals("")) {
deptInfo = ogdpService.getDeptInfo(query); deptInfo = fimsOgdpService.getDeptInfo(query);
} else { } else {
deptInfo = null; deptInfo = null;
} }
@ -114,11 +116,8 @@ public class Mngt04Controller extends ApplicationController {
@RequestMapping(name="부서 삭제", value=METHOD_URL.removeDept) @RequestMapping(name="부서 삭제", value=METHOD_URL.removeDept)
public ModelAndView removeDept(String... deptCds) { public ModelAndView removeDept(String... deptCds) {
ModelAndView mav = new ModelAndView("jsonView"); ModelAndView mav = new ModelAndView("jsonView");
boolean saved = false;
String rtnMsg = ogdpService.remove(deptCds); boolean saved = cmmnOgdpBean.remove(deptCds);
if(rtnMsg.contains("[S]")) {
saved = true;
}
mav.addObject("saved", saved); mav.addObject("saved", saved);
return mav; return mav;
@ -135,7 +134,7 @@ public class Mngt04Controller extends ApplicationController {
public ModelAndView createDept(FimsDepartment dept) { public ModelAndView createDept(FimsDepartment dept) {
ModelAndView mav = new ModelAndView("jsonView"); ModelAndView mav = new ModelAndView("jsonView");
boolean saved = false; boolean saved = false;
String rtnMsg = ogdpService.create(dept); String rtnMsg = fimsOgdpService.create(dept);
if(rtnMsg.contains("[S]")) { if(rtnMsg.contains("[S]")) {
saved = true; saved = true;
} }
@ -155,7 +154,7 @@ public class Mngt04Controller extends ApplicationController {
public ModelAndView updateDept(FimsDepartment dept) { public ModelAndView updateDept(FimsDepartment dept) {
ModelAndView mav = new ModelAndView("jsonView"); ModelAndView mav = new ModelAndView("jsonView");
boolean saved = false; boolean saved = false;
String rtnMsg = ogdpService.update(dept); String rtnMsg = fimsOgdpService.update(dept);
if(rtnMsg.contains("[S]")) { if(rtnMsg.contains("[S]")) {
saved = true; saved = true;
} }

@ -29,6 +29,7 @@ import org.springframework.stereotype.Component;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.base.code.CommonCode; import cokr.xit.base.code.CommonCode;
import cokr.xit.base.code.service.bean.CodeBean; import cokr.xit.base.code.service.bean.CodeBean;
import cokr.xit.base.file.ZIP; import cokr.xit.base.file.ZIP;
@ -42,7 +43,7 @@ import cokr.xit.fims.crdn.dao.CrdnInfoMapper;
import cokr.xit.fims.crdn.dao.CrdnStngMapper; import cokr.xit.fims.crdn.dao.CrdnStngMapper;
import cokr.xit.fims.crdn.dao.CrdnUpdtMapper; import cokr.xit.fims.crdn.dao.CrdnUpdtMapper;
import cokr.xit.fims.mngt.dao.TaskMapper; import cokr.xit.fims.mngt.dao.TaskMapper;
import cokr.xit.fims.mngt.service.bean.OgdpBean; import cokr.xit.fims.mngt.service.bean.FimsOgdpBean;
import cokr.xit.fims.nxrp.A01; import cokr.xit.fims.nxrp.A01;
import cokr.xit.fims.nxrp.A03Rqst; import cokr.xit.fims.nxrp.A03Rqst;
import cokr.xit.fims.nxrp.NisIndivQuery; import cokr.xit.fims.nxrp.NisIndivQuery;
@ -110,8 +111,8 @@ public class NisIndivBean extends AbstractBean {
protected StngBean stngBean; protected StngBean stngBean;
/** 부서 정보 DAO */ /** 부서 정보 DAO */
@Resource(name = "ogdpBean") @Resource(name = "fimsOgdpBean")
private OgdpBean ogdpBean; private FimsOgdpBean fimsOgdpBean;
/** . /** .
* @param req * @param req
@ -144,7 +145,7 @@ public class NisIndivBean extends AbstractBean {
DataObject userInfo = userBean.getUserInfo(currentUser().getId()); DataObject userInfo = userBean.getUserInfo(currentUser().getId());
// 2. 부서 정보 // 2. 부서 정보
DataObject deptInfo = ogdpBean.getDeptInfo(new CmmnQuery().setDeptCd(userInfo.string("DEPT_CD"))); DataObject deptInfo = fimsOgdpBean.getDeptInfo(new OgdpQuery().setDeptCd(userInfo.string("DEPT_CD")));
// 3. 세외수입 과태료대장에 연계할 단속 정보를 조회 // 3. 세외수입 과태료대장에 연계할 단속 정보를 조회
DataObject selectCrdnInfo = nisA01Mapper.selectCrdnInfo(req.getCrdnId()); DataObject selectCrdnInfo = nisA01Mapper.selectCrdnInfo(req.getCrdnId());
@ -346,7 +347,7 @@ public class NisIndivBean extends AbstractBean {
DataObject userInfo = userBean.getUserInfo(currentUser().getId()); DataObject userInfo = userBean.getUserInfo(currentUser().getId());
// 2. 부서 정보 // 2. 부서 정보
DataObject deptInfo = ogdpBean.getDeptInfo(new CmmnQuery().setDeptCd(userInfo.string("DEPT_CD"))); DataObject deptInfo = fimsOgdpBean.getDeptInfo(new OgdpQuery().setDeptCd(userInfo.string("DEPT_CD")));
// 3. 세외수입 과태료대장에 연계할 단속 정보를 조회 // 3. 세외수입 과태료대장에 연계할 단속 정보를 조회
DataObject selectCrdnInfo = nisA01Mapper.selectCrdnInfo(req.getCrdnId()); DataObject selectCrdnInfo = nisA01Mapper.selectCrdnInfo(req.getCrdnId());

@ -6,7 +6,6 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import cokr.xit.fims.mngt.service.bean.OgdpBean;
import cokr.xit.fims.sndb.SndbQuery; import cokr.xit.fims.sndb.SndbQuery;
import cokr.xit.fims.sndb.Svbtc; import cokr.xit.fims.sndb.Svbtc;
import cokr.xit.fims.sndb.service.SvbtcService; import cokr.xit.fims.sndb.service.SvbtcService;
@ -30,10 +29,6 @@ public class SvbtcServiceBean extends AbstractServiceBean implements SvbtcServic
@Resource(name = "svbtcBean") @Resource(name = "svbtcBean")
private SvbtcBean svbtcBean; private SvbtcBean svbtcBean;
/* Bean */
@Resource(name="ogdpBean")
protected OgdpBean ogdpBean;
@Override @Override
public List<DataObject> getSvbtcList(SndbQuery req) { public List<DataObject> getSvbtcList(SndbQuery req) {
return svbtcBean.getSvbtcList(req); return svbtcBean.getSvbtcList(req);

@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.Print; import cokr.xit.applib.Print;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.code.CommonCode; import cokr.xit.base.code.CommonCode;
import cokr.xit.base.docs.xls.CellDef; import cokr.xit.base.docs.xls.CellDef;
import cokr.xit.base.docs.xls.Format; import cokr.xit.base.docs.xls.Format;
@ -36,7 +37,6 @@ import cokr.xit.fims.cmmn.service.bean.StngBean;
import cokr.xit.fims.cmmn.xls.FormatMaker; import cokr.xit.fims.cmmn.xls.FormatMaker;
import cokr.xit.fims.cmmn.xls.StyleMaker; import cokr.xit.fims.cmmn.xls.StyleMaker;
import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.mngt.service.bean.OgdpBean;
import cokr.xit.fims.mngt.service.bean.TaskBean; import cokr.xit.fims.mngt.service.bean.TaskBean;
import cokr.xit.fims.sndb.SndbQuery; import cokr.xit.fims.sndb.SndbQuery;
import cokr.xit.fims.sndb.Sndng; import cokr.xit.fims.sndb.Sndng;
@ -153,8 +153,8 @@ public class Sndb01Controller extends ApplicationController {
@Resource(name="fileBean") @Resource(name="fileBean")
private FileBean fileBean; private FileBean fileBean;
@Resource(name="ogdpBean") @Resource(name = "cmmnOgdpBean")
private OgdpBean ogdpBean; private CmmnOgdpBean cmmnOgdpBean;
@Resource(name="svbtcBean") @Resource(name="svbtcBean")
private SvbtcBean svbtcBean; private SvbtcBean svbtcBean;
@ -1657,7 +1657,7 @@ public class Sndb01Controller extends ApplicationController {
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
Print print = new Print(); Print print = new Print();
print.setPrintRequestUserInfo(userInfo); print.setPrintRequestUserInfo(userInfo);
@ -1866,7 +1866,7 @@ public class Sndb01Controller extends ApplicationController {
Print print = new Print(); Print print = new Print();
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
print.setPrintRequestUserInfo(userInfo); print.setPrintRequestUserInfo(userInfo);
//출력물 기본 설정 //출력물 기본 설정

@ -10,7 +10,6 @@ import cokr.xit.base.file.service.bean.FileBean;
import cokr.xit.fims.cmmn.dao.OtptStngMapper; import cokr.xit.fims.cmmn.dao.OtptStngMapper;
import cokr.xit.fims.cmmn.service.bean.StngBean; import cokr.xit.fims.cmmn.service.bean.StngBean;
import cokr.xit.fims.crdn.dao.CrdnListMapper; import cokr.xit.fims.crdn.dao.CrdnListMapper;
import cokr.xit.fims.mngt.service.bean.OgdpBean;
import cokr.xit.fims.sprt.SprtQuery; import cokr.xit.fims.sprt.SprtQuery;
import cokr.xit.fims.sprt.dao.IntegrationSearchMapper; import cokr.xit.fims.sprt.dao.IntegrationSearchMapper;
import cokr.xit.fims.sprt.service.IntegrationSearchService; import cokr.xit.fims.sprt.service.IntegrationSearchService;
@ -34,9 +33,6 @@ public class IntegrationSearchServiceBean extends AbstractServiceBean implements
@Resource(name="integrationSearchBean") @Resource(name="integrationSearchBean")
protected IntegrationSearchBean integrationSearchBean; protected IntegrationSearchBean integrationSearchBean;
@Resource(name="ogdpBean")
protected OgdpBean ogdpBean;
@Resource(name="crdnListMapper") @Resource(name="crdnListMapper")
protected CrdnListMapper crdnListMapper; protected CrdnListMapper crdnListMapper;

@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.Print; import cokr.xit.applib.Print;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.code.CommonCode; import cokr.xit.base.code.CommonCode;
import cokr.xit.base.docs.xls.CellDef; import cokr.xit.base.docs.xls.CellDef;
import cokr.xit.base.docs.xls.Format; import cokr.xit.base.docs.xls.Format;
@ -48,7 +49,6 @@ import cokr.xit.fims.cmmn.xls.StyleMaker;
import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.dao.CrdnListMapper; import cokr.xit.fims.crdn.dao.CrdnListMapper;
import cokr.xit.fims.mngt.service.bean.OgdpBean;
import cokr.xit.fims.mngt.service.bean.TaskBean; import cokr.xit.fims.mngt.service.bean.TaskBean;
import cokr.xit.fims.sndb.SndbQuery; import cokr.xit.fims.sndb.SndbQuery;
import cokr.xit.fims.sndb.Sndng; import cokr.xit.fims.sndb.Sndng;
@ -127,8 +127,8 @@ public class Sprt01Controller extends ApplicationController {
@Resource(name = "taskBean") @Resource(name = "taskBean")
private TaskBean taskBean; private TaskBean taskBean;
@Resource(name = "ogdpBean") @Resource(name = "cmmnOgdpBean")
private OgdpBean ogdpBean; private CmmnOgdpBean cmmnOgdpBean;
@Resource(name = "mediaBean") @Resource(name = "mediaBean")
private MediaBean mediaBean; private MediaBean mediaBean;
@ -457,7 +457,7 @@ public class Sprt01Controller extends ApplicationController {
FimsPrintOption printOption = new FimsPrintOption(); FimsPrintOption printOption = new FimsPrintOption();
printOption.setPrivateInfoYn(privateInfoYn); printOption.setPrivateInfoYn(privateInfoYn);
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
Print print = new Print(); Print print = new Print();
print.setPrintRequestUserInfo(userInfo); print.setPrintRequestUserInfo(userInfo);
@ -483,7 +483,7 @@ public class Sprt01Controller extends ApplicationController {
FimsPrintOption printOption = new FimsPrintOption(); FimsPrintOption printOption = new FimsPrintOption();
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
Print print = new Print(); Print print = new Print();
print.setPrintRequestUserInfo(userInfo); print.setPrintRequestUserInfo(userInfo);
@ -558,7 +558,7 @@ public class Sprt01Controller extends ApplicationController {
printOption.setGlobalVariable(globalVariable); printOption.setGlobalVariable(globalVariable);
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
Print print = new Print(); Print print = new Print();
print.setPrintRequestUserInfo(userInfo); print.setPrintRequestUserInfo(userInfo);
@ -584,7 +584,7 @@ public class Sprt01Controller extends ApplicationController {
DataObject deptStngInfo = stngBean.getStng("dept"); DataObject deptStngInfo = stngBean.getStng("dept");
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
Print print = new Print(); Print print = new Print();
print.setPrintRequestUserInfo(userInfo); print.setPrintRequestUserInfo(userInfo);
@ -624,7 +624,7 @@ public class Sprt01Controller extends ApplicationController {
public ModelAndView makeRcvmtConfirmFileFromHwpFormat(String... crdnIds) { public ModelAndView makeRcvmtConfirmFileFromHwpFormat(String... crdnIds) {
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
Print print = new Print(); Print print = new Print();
print.setPrintRequestUserInfo(userInfo); print.setPrintRequestUserInfo(userInfo);
@ -662,7 +662,7 @@ public class Sprt01Controller extends ApplicationController {
@RequestMapping(name="사전통지서 pdf 파일 생성", value=METHOD_URL.makeAdvntcePdf) @RequestMapping(name="사전통지서 pdf 파일 생성", value=METHOD_URL.makeAdvntcePdf)
public ModelAndView makeAdvntcePdf(String[] crdnIds, Sndng sndng, FimsPrintOption printOption) { public ModelAndView makeAdvntcePdf(String[] crdnIds, Sndng sndng, FimsPrintOption printOption) {
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
sndng.setSggCd((String)userInfo.getInfo().get("sggCd")); sndng.setSggCd((String)userInfo.getInfo().get("sggCd"));
@ -782,7 +782,7 @@ public class Sprt01Controller extends ApplicationController {
@RequestMapping(name="사전통지서 외주 파일 생성", value=METHOD_URL.makeAdvntceOutsourcing) @RequestMapping(name="사전통지서 외주 파일 생성", value=METHOD_URL.makeAdvntceOutsourcing)
public ModelAndView makeAdvntceOutsourcing(String[] crdnIds, Sndng sndng, FimsPrintOption printOption) { public ModelAndView makeAdvntceOutsourcing(String[] crdnIds, Sndng sndng, FimsPrintOption printOption) {
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
sndng.setSggCd((String)userInfo.getInfo().get("sggCd")); sndng.setSggCd((String)userInfo.getInfo().get("sggCd"));
@ -900,7 +900,7 @@ public class Sprt01Controller extends ApplicationController {
public ModelAndView makeNhtPdf(String[] crdnIds, Sndng sndng, FimsPrintOption printOption) { public ModelAndView makeNhtPdf(String[] crdnIds, Sndng sndng, FimsPrintOption printOption) {
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
sndng.setSggCd((String)userInfo.getInfo().get("sggCd")); sndng.setSggCd((String)userInfo.getInfo().get("sggCd"));
@ -1022,7 +1022,7 @@ public class Sprt01Controller extends ApplicationController {
@RequestMapping(name="고지서 외주 파일 생성", value=METHOD_URL.makeNhtOutsourcing) @RequestMapping(name="고지서 외주 파일 생성", value=METHOD_URL.makeNhtOutsourcing)
public ModelAndView makeNhtOutsourcing(String[] crdnIds, Sndng sndng, FimsPrintOption printOption) { public ModelAndView makeNhtOutsourcing(String[] crdnIds, Sndng sndng, FimsPrintOption printOption) {
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
ogdpBean.initUserInfo(userInfo); cmmnOgdpBean.initUserInfo(userInfo);
sndng.setSggCd((String)userInfo.getInfo().get("sggCd")); sndng.setSggCd((String)userInfo.getInfo().get("sggCd"));

@ -1,202 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cokr.xit.fims.mngt.dao.OgdpMapper"> <mapper namespace="cokr.xit.fims.mngt.dao.FimsOgdpMapper">
<select id="selectAllOgdpList" resultType="dataobject">
/* 전체 기관,부서 목록 조회(ogdpMapper.selectAllOgdpList) */
SELECT CONCAT(A.INST_CD,'/',B.DEPT_CD) AS OGDP_CD
, CONCAT(A.INST_NM,' / ',B.DEPT_NM) AS OGDP_NM
, A.INST_CD
, A.INST_NM
, B.DEPT_CD
, B.DEPT_NM
, A.SGG_CD
, A.SGG_NM
FROM TB_SGG A
LEFT OUTER JOIN TB_DEPT B ON (A.INST_CD = B.INST_CD)
UNION
SELECT ('default/default') AS OGDP_CD
, CONCAT('기본 기관',' / ','기본 부서') AS OGDP_NM
, 'default' AS INST_CD
, '기본 기관' AS INST_NM
, 'default' AS DEPT_CD
, '기본 부서' AS DEPT_NM
, 'default' AS SGG_CD
, '기본 시군구' AS SGG_NM
FROM DUAL
</select>
<select id="selectAbleOgdpList" parameterType="map" resultType="dataobject">
/* 사용가능한 기관,부서 목록 조회(ogdpMapper.selectAbleOgdpList) */
SELECT CONCAT(A.INST_CD,'/',B.DEPT_CD) AS OGDP_CD
, CONCAT(A.INST_NM,' / ',B.DEPT_NM) AS OGDP_NM
, A.INST_CD
, A.INST_NM
, B.DEPT_CD
, B.DEPT_NM
, A.SGG_CD
, A.SGG_NM
FROM TB_SGG A
LEFT OUTER JOIN TB_DEPT B ON (A.INST_CD = B.INST_CD)
<choose>
<when test='anonymous == "Y" '>
WHERE A.INST_CD = #{institute}
</when>
<otherwise>
<if test="currentUser.institute != 'default'">
WHERE A.SGG_CD = #{currentUser.user.orgID}
</if>
<if test="currentUser.institute == 'default'">
UNION
SELECT 'default/default' AS OGDP_CD
, CONCAT('기본 기관',' / ','기본 부서') AS OGDP_NM
, 'default' AS INST_CD
, '기본 기관' AS INST_NM
, 'default' AS DEPT_CD
, '기본 부서' AS DEPT_NM
, 'default' AS SGG_CD
, '기본 시군구' AS SGG_NM
FROM DUAL
</if>
</otherwise>
</choose>
</select>
<select id="selectOgdpInfoOfUser" parameterType="string" resultType="dataobject">
/* 사용자의 시군구,기관,부서 조회(ogdpMapper.selectOgdpInfoOfUser) */
SELECT S.SGG_CD
, S.SGG_NM
, U.NSTT_CD AS INST_CD
, S.INST_NM
, U.DEPT_CD
, D.DEPT_NM
FROM TB_USER U
LEFT OUTER JOIN TB_SGG S ON (U.ORG_ID = S.SGG_CD)
LEFT OUTER JOIN TB_DEPT D ON (U.DEPT_CD = D.DEPT_CD)
WHERE U.USER_ID = #{userId}
</select>
<select id="selectAllSggList" parameterType="string" resultType="dataobject">
/* 모든 시군구 조회(ogdpMapper.selectAllSggList) */
SELECT SGG_CD
, SGG_NM
FROM TB_SGG
WHERE USE_YN = 'Y'
</select>
<select id="selectAllInstList" parameterType="string" resultType="dataobject">
/* 모든 기관 조회(ogdpMapper.selectAllInstList) */
SELECT INST_CD
, INST_NM
FROM TB_SGG
WHERE USE_YN = 'Y'
</select>
<sql id="selectSgg">
SELECT S.SGG_CD <!-- 시군구 코드 -->
, S.SGG_NM <!-- 시군구 명 -->
, S.INST_SE_CD <!-- 기관 구분 코드 -->
, S.INST_CD <!-- 기관 코드 -->
, S.INST_NM <!-- 기관 명 -->
, (CASE
WHEN S.INST_DADDR IS NULL OR S.INST_DADDR = ''
THEN S.INST_ADDR
ELSE CONCAT(S.INST_ADDR,' ',S.INST_DADDR)
END) AS INST_FULL_ADDR <!-- 기관 전체 주소 -->
, S.INST_ADDR <!-- 기관 기본 주소 -->
, S.INST_DADDR <!-- 기관 상세 주소 -->
, S.INST_ZIP <!-- 기관 우편번호 -->
, S.SYMBOL_FILE_PATH <!-- 상징 파일 경로 -->
, S.SYMBOL_FILE_NM <!-- 상징 파일 명 -->
, S.LOGO_FILE_PATH <!-- 로고 파일 경로 -->
, S.LOGO_FILE_NM <!-- 로고 파일 명 -->
, S.OFFCS_FILE_PATH <!-- 직인 파일 경로 -->
, S.OFFCS_FILE_NM <!-- 직인 파일 명 -->
FROM TB_SGG S
</sql>
<select id="selectSggs" parameterType="map" resultType="dataobject">
/* 시군구 객체 가져오기(ogdpMapper.selectSggs) */
<include refid="selectSgg" />
<where>
<if test="sggCd != null">
AND S.SGG_CD = #{sggCd} <!-- 시군구 코드 -->
</if>
<if test="useYn != null">
AND S.USE_YN = #{useYn} <!-- 사용 여부 -->
</if>
</where>
<include refid="utility.orderBy" />
</select>
<select id="selectSggCdByDeptCd" parameterType="string" resultType="string">
/* 부서에 따른 시군구코드 조회(ogdpMapper.selectSggCdByDeptCd) */
SELECT SGG_CD
FROM TB_DEPT
WHERE DEPT_CD = #{deptCd}
</select>
<update id="updateSgg" parameterType="map">
/* 시군구 설정정보 수정 (ogdpMapper.updateSgg) */
UPDATE TB_SGG
SET MDFCN_DT = <include refid="utility.now" />
, MDFR = #{sgg.modifiedBy}
, INST_ZIP = #{sgg.instituteZipCode} <!-- 기관 우편번호 -->
, INST_ADDR = #{sgg.instAddress} <!-- 기관 기본 주소 -->
, INST_DADDR = #{sgg.instDetailAddress} <!-- 기관 상세 주소 -->
<if test="sgg.symbolFilepath != null">
, SYMBOL_FILE_PATH = #{sgg.symbolFilepath} <!-- 상징 파일 경로 -->
, SYMBOL_FILE_NM = #{sgg.symbolFilename} <!-- 상징 파일 명 -->
</if>
<if test="sgg.logoFilepath != null">
, LOGO_FILE_PATH = #{sgg.logoFilepath} <!-- 로고 파일 경로 -->
, LOGO_FILE_NM = #{sgg.logoFilename} <!-- 로고 파일 명 -->
</if>
<if test="sgg.officialSealFilepath != null">
, OFFCS_FILE_PATH = #{sgg.officialSealFilepath} <!-- 직인 파일 경로 -->
, OFFCS_FILE_NM = #{sgg.officialSealFilename} <!-- 직인 파일 명 -->
</if>
WHERE SGG_CD = #{sgg.sggID}
</update>
<resultMap id="deptRow" type="cokr.xit.fims.mngt.FimsDepartment"> <!-- 부서 정보 -->
<result property="deptID" column="DEPT_CD" /> <!-- 부서 코드 -->
<result property="sggID" column="SGG_CD" /> <!-- 시군구 코드 -->
<result property="instCode" column="INST_CD" /> <!-- 기관 코드 -->
<result property="name" column="DEPT_NM" /> <!-- 부서 명 -->
<result property="telno" column="DEPT_TELNO" /> <!-- 부서 전화번호 -->
<result property="faxno" column="DEPT_FXNO" /> <!-- 부서 팩스번호 -->
<result property="cvlcptLinkSeCd" column="CVLCPT_LINK_SE_CD" /> <!-- 민원 연계 구분 코드 -->
<result property="vrbacntLinkSeCd" column="VRBACNT_LINK_SE_CD" /> <!-- 가상계좌 연계 구분 코드 -->
<result property="pstofcNm" column="PSTOFC_NM" /> <!-- 우체국 명 -->
<result property="rgNoHeader" column="RG_NO_HEADER" /> <!-- 등기 번호 헤더 -->
<result property="sndngLinkSeCd" column="SNDNG_LINK_SE_CD" /> <!-- 발송 연계 구분 코드 -->
<result property="egpConOrg" column="EGP_CON_ORG" /> <!-- E그린 외부기관구분코드 -->
<result property="egpRceptId" column="EGP_RCEPT_ID" /> <!-- E그린 접수우체국국기호 -->
<result property="egpApvlNb" column="EGP_APVL_NB" /> <!-- E그린 후납계약승인번호 -->
<result property="egpEsbPath" column="EGP_ESB_PATH" /> <!-- E그린 ESB경로 -->
<result property="egpPostInstId" column="EGP_POST_INST_ID" /> <!-- E그린 우정정보센터 기관ID -->
<result property="egpCertCn" column="EGP_CERT_CN" /> <!-- E그린 인증서CN -->
<result property="ensInterfaceId" column="ENS_INTERFACE_ID" /> <!-- 세외수입 인터페이스ID -->
<result property="ensSourceCd" column="ENS_SOURCE_CD" /> <!-- 세외수입 소스코드 -->
<result property="ensTargetCd" column="ENS_TARGET_CD" /> <!-- 세외수입 타겟코드 -->
<result property="ensUrl" column="ENS_URL" /> <!-- 세외수입 URL -->
<result property="nxrpLinkYn" column="NXRP_LINK_YN" /> <!-- 세외수입 연계 여부 -->
<result property="nxrpLinkSrvcUrl" column="NXRP_LINK_SRVC_URL" /> <!-- 세외수입 연계 서비스 URL -->
<result property="nxrpRgnSeCd" column="NXRP_RGN_SE_CD" /> <!-- 세외수입 지역 구분 코드 -->
<result property="dtbnBankNm" column="DTBN_BANK_NM" /> <!-- 교부 은행 명 -->
<result property="dtbnActno" column="DTBN_ACTNO" /> <!-- 교부 계좌번호 -->
<result property="docHeader" column="DOC_HEADER" /> <!-- 문서 머릿말 -->
<result property="srvrOs" column="SRVR_OS" /> <!-- 서버 OS -->
<result property="useYn" column="USE_YN" /> <!-- 사용 여부 -->
<result property="createdAt" column="REG_DT" /> <!-- 등록 일시 -->
<result property="createdBy" column="RGTR" /> <!-- 등록자 -->
<result property="lastModified" column="MDFCN_DT" /> <!-- 수정 일시 -->
<result property="modifiedBy" column="MDFR" /> <!-- 수정자 -->
</resultMap>
<sql id="selectDept"> <sql id="selectDept">
SELECT D.DEPT_CD <!-- 부서 코드 --> SELECT D.DEPT_CD <!-- 부서 코드 -->
@ -238,11 +42,13 @@ UPDATE TB_SGG
FROM TB_DEPT D FROM TB_DEPT D
</sql> </sql>
<select id="selectDeptList" parameterType="map" resultType="dataobject"> <select id="selectDepts" parameterType="map" resultType="dataobject">
/* 부서 목록 조회(ogdpMapper.selectDeptList) */ /* 부서 객체 가져오기(fimsOgdpMapper.selectDepts) */
<include refid="utility.paging-prefix" />
<include refid="selectDept" /> <include refid="selectDept" />
WHERE D.SGG_CD = #{sggCd} <!-- 시군구 코드 --> <where>
<if test="sggCd != null">
AND D.SGG_CD = #{sggCd} <!-- 시군구 코드 -->
</if>
<if test="deptCd != null"> <if test="deptCd != null">
AND D.DEPT_CD = #{deptCd} <!-- 부서 코드 --> AND D.DEPT_CD = #{deptCd} <!-- 부서 코드 -->
</if> </if>
@ -252,17 +58,15 @@ UPDATE TB_SGG
<if test="useYn != null"> <if test="useYn != null">
AND D.USE_YN = #{useYn} <!-- 사용 여부 --> AND D.USE_YN = #{useYn} <!-- 사용 여부 -->
</if> </if>
</where>
<include refid="utility.orderBy" /> <include refid="utility.orderBy" />
<include refid="utility.paging-suffix" />
</select> </select>
<select id="selectDepts" parameterType="map" resultType="dataobject"> <select id="selectDeptList" parameterType="map" resultType="dataobject">
/* 부서 객체 가져오기(ogdpMapper.selectDepts) */ /* 부서 목록 조회(fimsOgdpMapper.selectDeptList) */
<include refid="utility.paging-prefix" />
<include refid="selectDept" /> <include refid="selectDept" />
<where> WHERE D.SGG_CD = #{sggCd} <!-- 시군구 코드 -->
<if test="sggCd != null">
AND D.SGG_CD = #{sggCd} <!-- 시군구 코드 -->
</if>
<if test="deptCd != null"> <if test="deptCd != null">
AND D.DEPT_CD = #{deptCd} <!-- 부서 코드 --> AND D.DEPT_CD = #{deptCd} <!-- 부서 코드 -->
</if> </if>
@ -272,12 +76,12 @@ UPDATE TB_SGG
<if test="useYn != null"> <if test="useYn != null">
AND D.USE_YN = #{useYn} <!-- 사용 여부 --> AND D.USE_YN = #{useYn} <!-- 사용 여부 -->
</if> </if>
</where>
<include refid="utility.orderBy" /> <include refid="utility.orderBy" />
<include refid="utility.paging-suffix" />
</select> </select>
<insert id="insertDept" parameterType="map"> <insert id="insertDept" parameterType="map">
/* 부서 등록(ogdpMapper.insertDept) */ /* 부서 등록(fimsOgdpMapper.insertDept) */
INSERT INSERT
INTO TB_DEPT ( INTO TB_DEPT (
DEPT_CD <!-- 부서 코드 --> DEPT_CD <!-- 부서 코드 -->
@ -349,7 +153,7 @@ UPDATE TB_SGG
</insert> </insert>
<update id="updateDept" parameterType="map"> <update id="updateDept" parameterType="map">
/* 부서 수정(ogdpMapper.updateDept) */ /* 부서 수정(fimsOgdpMapper.updateDept) */
UPDATE TB_DEPT UPDATE TB_DEPT
SET SGG_CD = #{dept.sggID} <!-- 시군구 코드 --> SET SGG_CD = #{dept.sggID} <!-- 시군구 코드 -->
, INST_CD = #{dept.instCode} <!-- 기관 코드 --> , INST_CD = #{dept.instCode} <!-- 기관 코드 -->
@ -383,14 +187,4 @@ UPDATE TB_SGG
AND USE_YN = 'Y' AND USE_YN = 'Y'
</update> </update>
<update id="setStatus" parameterType="map">
/* 부서 사용 여부 변경(ogdpMapper.setStatus) */
UPDATE TB_DEPT
SET USE_YN = #{useYn} <!-- 사용 여부 -->
, MDFCN_DT = <include refid="utility.now" /> <!-- 수정 일시 -->
, MDFR = #{currentUser.id} <!-- 수정자 -->
WHERE DEPT_CD IN ( <foreach collection="deptCds" item="deptCd" separator=","> #{deptCd} </foreach> )<!-- 부서 코드 -->
</update>
</mapper> </mapper>

@ -0,0 +1,174 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cokr.xit.applib.ogdp.dao.CmmnOgdpMapper">
<select id="selectAllOgdpList" resultType="dataobject">
/* 전체 기관,부서 목록 조회(cmmnOgdpMapper.selectAllOgdpList) */
SELECT CONCAT(A.INST_CD,'/',B.DEPT_CD) AS OGDP_CD
, CONCAT(A.INST_NM,' / ',B.DEPT_NM) AS OGDP_NM
, A.INST_CD
, A.INST_NM
, B.DEPT_CD
, B.DEPT_NM
, A.SGG_CD
, A.SGG_NM
FROM TB_SGG A
LEFT OUTER JOIN TB_DEPT B ON (A.INST_CD = B.INST_CD)
UNION
SELECT ('default/default') AS OGDP_CD
, CONCAT('기본 기관',' / ','기본 부서') AS OGDP_NM
, 'default' AS INST_CD
, '기본 기관' AS INST_NM
, 'default' AS DEPT_CD
, '기본 부서' AS DEPT_NM
, 'default' AS SGG_CD
, '기본 시군구' AS SGG_NM
FROM DUAL
</select>
<select id="selectAbleOgdpList" parameterType="map" resultType="dataobject">
/* 사용가능한 기관,부서 목록 조회(cmmnOgdpMapper.selectAbleOgdpList) */
SELECT CONCAT(A.INST_CD,'/',B.DEPT_CD) AS OGDP_CD
, CONCAT(A.INST_NM,' / ',B.DEPT_NM) AS OGDP_NM
, A.INST_CD
, A.INST_NM
, B.DEPT_CD
, B.DEPT_NM
, A.SGG_CD
, A.SGG_NM
FROM TB_SGG A
LEFT OUTER JOIN TB_DEPT B ON (A.INST_CD = B.INST_CD)
<choose>
<when test='anonymous == "Y" '>
WHERE A.INST_CD = #{institute}
</when>
<otherwise>
<if test="currentUser.institute != 'default'">
WHERE A.SGG_CD = #{currentUser.user.orgID}
</if>
<if test="currentUser.institute == 'default'">
UNION
SELECT 'default/default' AS OGDP_CD
, CONCAT('기본 기관',' / ','기본 부서') AS OGDP_NM
, 'default' AS INST_CD
, '기본 기관' AS INST_NM
, 'default' AS DEPT_CD
, '기본 부서' AS DEPT_NM
, 'default' AS SGG_CD
, '기본 시군구' AS SGG_NM
FROM DUAL
</if>
</otherwise>
</choose>
</select>
<select id="selectOgdpInfoOfUser" parameterType="string" resultType="dataobject">
/* 사용자의 시군구,기관,부서 조회(cmmnOgdpMapper.selectOgdpInfoOfUser) */
SELECT S.SGG_CD
, S.SGG_NM
, U.NSTT_CD AS INST_CD
, S.INST_NM
, U.DEPT_CD
, D.DEPT_NM
FROM TB_USER U
LEFT OUTER JOIN TB_SGG S ON (U.ORG_ID = S.SGG_CD)
LEFT OUTER JOIN TB_DEPT D ON (U.DEPT_CD = D.DEPT_CD)
WHERE U.USER_ID = #{userId}
</select>
<select id="selectAllSggList" parameterType="string" resultType="dataobject">
/* 모든 시군구 조회(cmmnOgdpMapper.selectAllSggList) */
SELECT SGG_CD
, SGG_NM
FROM TB_SGG
WHERE USE_YN = 'Y'
</select>
<select id="selectAllInstList" parameterType="string" resultType="dataobject">
/* 모든 기관 조회(cmmnOgdpMapper.selectAllInstList) */
SELECT INST_CD
, INST_NM
FROM TB_SGG
WHERE USE_YN = 'Y'
</select>
<sql id="selectSgg">
SELECT S.SGG_CD <!-- 시군구 코드 -->
, S.SGG_NM <!-- 시군구 명 -->
, S.INST_SE_CD <!-- 기관 구분 코드 -->
, S.INST_CD <!-- 기관 코드 -->
, S.INST_NM <!-- 기관 명 -->
, (CASE
WHEN S.INST_DADDR IS NULL OR S.INST_DADDR = ''
THEN S.INST_ADDR
ELSE CONCAT(S.INST_ADDR,' ',S.INST_DADDR)
END) AS INST_FULL_ADDR <!-- 기관 전체 주소 -->
, S.INST_ADDR <!-- 기관 기본 주소 -->
, S.INST_DADDR <!-- 기관 상세 주소 -->
, S.INST_ZIP <!-- 기관 우편번호 -->
, S.SYMBOL_FILE_PATH <!-- 상징 파일 경로 -->
, S.SYMBOL_FILE_NM <!-- 상징 파일 명 -->
, S.LOGO_FILE_PATH <!-- 로고 파일 경로 -->
, S.LOGO_FILE_NM <!-- 로고 파일 명 -->
, S.OFFCS_FILE_PATH <!-- 직인 파일 경로 -->
, S.OFFCS_FILE_NM <!-- 직인 파일 명 -->
FROM TB_SGG S
</sql>
<select id="selectSggs" parameterType="map" resultType="dataobject">
/* 시군구 객체 가져오기(cmmnOgdpMapper.selectSggs) */
<include refid="selectSgg" />
<where>
<if test="sggCd != null">
AND S.SGG_CD = #{sggCd} <!-- 시군구 코드 -->
</if>
<if test="useYn != null">
AND S.USE_YN = #{useYn} <!-- 사용 여부 -->
</if>
</where>
<include refid="utility.orderBy" />
</select>
<select id="selectSggCdByDeptCd" parameterType="string" resultType="string">
/* 부서에 따른 시군구코드 조회(cmmnOgdpMapper.selectSggCdByDeptCd) */
SELECT SGG_CD
FROM TB_DEPT
WHERE DEPT_CD = #{deptCd}
</select>
<update id="updateSgg" parameterType="map">
/* 시군구 설정정보 수정 (cmmnOgdpMapper.updateSgg) */
UPDATE TB_SGG
SET MDFCN_DT = <include refid="utility.now" />
, MDFR = #{sgg.modifiedBy}
, INST_ZIP = #{sgg.instituteZipCode} <!-- 기관 우편번호 -->
, INST_ADDR = #{sgg.instAddress} <!-- 기관 기본 주소 -->
, INST_DADDR = #{sgg.instDetailAddress} <!-- 기관 상세 주소 -->
<if test="sgg.symbolFilepath != null">
, SYMBOL_FILE_PATH = #{sgg.symbolFilepath} <!-- 상징 파일 경로 -->
, SYMBOL_FILE_NM = #{sgg.symbolFilename} <!-- 상징 파일 명 -->
</if>
<if test="sgg.logoFilepath != null">
, LOGO_FILE_PATH = #{sgg.logoFilepath} <!-- 로고 파일 경로 -->
, LOGO_FILE_NM = #{sgg.logoFilename} <!-- 로고 파일 명 -->
</if>
<if test="sgg.officialSealFilepath != null">
, OFFCS_FILE_PATH = #{sgg.officialSealFilepath} <!-- 직인 파일 경로 -->
, OFFCS_FILE_NM = #{sgg.officialSealFilename} <!-- 직인 파일 명 -->
</if>
WHERE SGG_CD = #{sgg.sggID}
</update>
<update id="setStatus" parameterType="map">
/* 부서 사용 여부 변경(cmmnOgdpMapper.setStatus) */
UPDATE TB_DEPT
SET USE_YN = #{useYn} <!-- 사용 여부 -->
, MDFCN_DT = <include refid="utility.now" /> <!-- 수정 일시 -->
, MDFR = #{currentUser.id} <!-- 수정자 -->
WHERE DEPT_CD IN ( <foreach collection="deptCds" item="deptCd" separator=","> #{deptCd} </foreach> )<!-- 부서 코드 -->
</update>
</mapper>

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cokr.xit.applib.ogdp.dao.DefaultOgdpMapper">
<sql id="selectDept">
SELECT D.DEPT_CD <!-- 부서 코드 -->
, D.SGG_CD <!-- 시군구 코드 -->
, (SELECT SGG_NM FROM TB_SGG WHERE SGG_CD = D.SGG_CD) AS SGG_NM <!-- 시군구 명 -->
, D.INST_CD <!-- 기관 코드 -->
, (SELECT INST_NM FROM TB_SGG WHERE INST_CD = D.INST_CD) AS INST_NM <!-- 기관 명 -->
, D.DEPT_NM <!-- 부서 명 -->
, D.DEPT_TELNO <!-- 부서 전화번호 -->
, D.DEPT_FXNO <!-- 부서 팩스번호 -->
, D.USE_YN <!-- 사용 여부 -->
, GET_CODE_NM('CMN003', D.USE_YN) AS USE_YN_NM <!-- 사용 여부 명 -->
, D.REG_DT <!-- 등록 일시 -->
, D.RGTR <!-- 등록자 -->
, D.MDFCN_DT <!-- 수정 일시 -->
, D.MDFR <!-- 수정자 -->
FROM TB_DEPT D
</sql>
<select id="selectDeptList" parameterType="map" resultType="dataobject">
/* 부서 목록 조회(defaultOgdpMapper.selectDeptList) */
<include refid="utility.paging-prefix" />
<include refid="selectDept" />
WHERE D.SGG_CD = #{sggCd} <!-- 시군구 코드 -->
<if test="deptCd != null">
AND D.DEPT_CD = #{deptCd} <!-- 부서 코드 -->
</if>
<if test="instCd != null">
AND D.INST_CD = #{instCd} <!-- 기관 코드 -->
</if>
<if test="useYn != null">
AND D.USE_YN = #{useYn} <!-- 사용 여부 -->
</if>
<include refid="utility.orderBy" />
<include refid="utility.paging-suffix" />
</select>
<select id="selectDepts" parameterType="map" resultType="dataobject">
/* 부서 객체 가져오기(defaultOgdpMapper.selectDepts) */
<include refid="selectDept" />
<where>
<if test="sggCd != null">
AND D.SGG_CD = #{sggCd} <!-- 시군구 코드 -->
</if>
<if test="deptCd != null">
AND D.DEPT_CD = #{deptCd} <!-- 부서 코드 -->
</if>
<if test="instCd != null">
AND D.INST_CD = #{instCd} <!-- 기관 코드 -->
</if>
<if test="useYn != null">
AND D.USE_YN = #{useYn} <!-- 사용 여부 -->
</if>
</where>
<include refid="utility.orderBy" />
</select>
<insert id="insertDept" parameterType="map">
/* 부서 등록(defaultOgdpMapper.insertDept) */
INSERT
INTO TB_DEPT (
DEPT_CD <!-- 부서 코드 -->
, SGG_CD <!-- 시군구 코드 -->
, INST_CD <!-- 기관 코드 -->
, DEPT_NM <!-- 부서 명 -->
, DEPT_TELNO <!-- 부서 전화번호 -->
, DEPT_FXNO <!-- 부서 팩스번호 -->
, USE_YN <!-- 사용 여부 -->
, REG_DT <!-- 등록 일시 -->
, RGTR <!-- 등록자 -->
, MDFCN_DT <!-- 수정 일시 -->
, MDFR <!-- 수정자 -->
) VALUES (
#{dept.deptID} <!-- 부서 코드 -->
, #{dept.sggID} <!-- 시군구 코드 -->
, #{dept.instCode} <!-- 기관 코드 -->
, #{dept.name} <!-- 부서 명 -->
, #{dept.telno} <!-- 부서 전화번호 -->
, #{dept.faxno} <!-- 부서 팩스번호 -->
, 'Y' <!-- 사용 여부 -->
, <include refid="utility.now" /> <!-- 등록 일시 -->
, #{dept.createdBy} <!-- 등록자 -->
, <include refid="utility.now" /> <!-- 수정 일시 -->
, #{dept.modifiedBy} <!-- 수정자 -->
)
</insert>
<update id="updateDept" parameterType="map">
/* 부서 수정(defaultOgdpMapper.updateDept) */
UPDATE TB_DEPT
SET SGG_CD = #{dept.sggID} <!-- 시군구 코드 -->
, INST_CD = #{dept.instCode} <!-- 기관 코드 -->
, DEPT_NM = #{dept.name} <!-- 부서 명 -->
, DEPT_TELNO = #{dept.telno} <!-- 부서 전화번호 -->
, DEPT_FXNO = #{dept.faxno} <!-- 부서 팩스번호 -->
, MDFCN_DT = <include refid="utility.now" /> <!-- 수정 일시 -->
, MDFR = #{dept.modifiedBy} <!-- 수정자 -->
WHERE DEPT_CD = #{dept.deptID}
AND USE_YN = 'Y'
</update>
</mapper>
Loading…
Cancel
Save