소스 정리

main
이범준 4 months ago
parent 0389e95ebf
commit b9880f7c43

@ -141,29 +141,6 @@ public interface OgdpMapper extends AbstractMapper {
List<DataObject> selectAbleOgdpList(Map<String, Object> params); List<DataObject> selectAbleOgdpList(Map<String, Object> params);
/** ,,,,, .<br />
* @param ID
* @return ,,,,,
*/
@Select(SQLUtil.SCRIPT_START+"""
/* 사용자의 시군구,기관,부서 조회(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}
"""+SQLUtil.SCRIPT_END)
DataObject selectOgdpInfoOfUser(String userId);
@Select(SQLUtil.SCRIPT_START+""" @Select(SQLUtil.SCRIPT_START+"""
/* 유저 수 조회(ogdpMapper.countUser) */ /* 유저 수 조회(ogdpMapper.countUser) */
SELECT COUNT(*) SELECT COUNT(*)

@ -8,6 +8,7 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.fims.base.FimsDepartment; import cokr.xit.fims.base.FimsDepartment;
import cokr.xit.fims.base.FimsSigungu; import cokr.xit.fims.base.FimsSigungu;
import cokr.xit.fims.base.OgdpQuery; import cokr.xit.fims.base.OgdpQuery;
@ -25,6 +26,9 @@ public class OgdpBean extends AbstractBean {
@Resource(name="ogdpMapper") @Resource(name="ogdpMapper")
private OgdpMapper ogdpMapper; private OgdpMapper ogdpMapper;
@Resource(name="userMapper")
private UserMapper userMapper;
public Object selectAllOgdpList() { public Object selectAllOgdpList() {
return ogdpMapper.selectAllOgdpList(); return ogdpMapper.selectAllOgdpList();
@ -38,9 +42,6 @@ public class OgdpBean extends AbstractBean {
return ogdpMapper.countUser(sggCd); return ogdpMapper.countUser(sggCd);
} }
public DataObject selectOgdpInfoOfUser(String userId){
return ogdpMapper.selectOgdpInfoOfUser(userId);
}
/**userInfo ,, . /**userInfo ,, .
@ -49,7 +50,7 @@ public class OgdpBean extends AbstractBean {
*/ */
public void initUserInfo(UserInfo userInfo) { public void initUserInfo(UserInfo userInfo) {
DataObject ogdpInfo = ogdpMapper.selectOgdpInfoOfUser(userInfo.getId()); DataObject ogdpInfo = userMapper.getUserInfo(userInfo.getId());
Map<String, Object> infoMap = userInfo.getInfo(); Map<String, Object> infoMap = userInfo.getInfo();
if(ogdpInfo == null) { if(ogdpInfo == null) {

@ -60,7 +60,6 @@ SELECT A.USER_ID
, A.EML_ADRS , A.EML_ADRS
, A.POS_NM , A.POS_NM
, A.GRP_ID , A.GRP_ID
, A.ORG_ID
, A.CRTFC_DN , A.CRTFC_DN
, A.LOCK_YN , A.LOCK_YN
, A.LOCK_CNT , A.LOCK_CNT
@ -73,7 +72,8 @@ SELECT A.USER_ID
, (CASE WHEN A.NSTT_CD = 'default' THEN '기본 기관' ELSE B.INST_NM END) AS INST_NM , (CASE WHEN A.NSTT_CD = 'default' THEN '기본 기관' ELSE B.INST_NM END) AS INST_NM
, A.DEPT_CD AS DEPT_CD , A.DEPT_CD AS DEPT_CD
, (CASE WHEN A.DEPT_CD = 'default' THEN '기본 부서' ELSE B.DEPT_NM END) AS DEPT_NM , (CASE WHEN A.DEPT_CD = 'default' THEN '기본 부서' ELSE B.DEPT_NM END) AS DEPT_NM
, B.SGG_CD AS SGG_CD , A.ORG_ID AS ORG_ID
, A.ORG_ID AS SGG_CD
, B.SGG_NM AS SGG_NM , B.SGG_NM AS SGG_NM
FROM TB_USER A FROM TB_USER A
LEFT OUTER JOIN ( LEFT OUTER JOIN (

Loading…
Cancel
Save