|
|
|
|
@ -36,14 +36,14 @@ public class OgdpBean extends AbstractBean {
|
|
|
|
|
List<DataObject> ogdpList = new ArrayList<>();
|
|
|
|
|
List<DataObject> sggs = sigunguBean.getSigunguList(new SigunguQuery());
|
|
|
|
|
|
|
|
|
|
for(DataObject sgg : sggs) {
|
|
|
|
|
for (DataObject sgg : sggs) {
|
|
|
|
|
DataObject noDept = sgg.clone()
|
|
|
|
|
.set("DEPT_CD", "EMPTY00")
|
|
|
|
|
.set("DEPT_NM", "(부서 없음)");
|
|
|
|
|
ogdpList.add(noDept);
|
|
|
|
|
|
|
|
|
|
List<DataObject> depts = departmentBean.getDepartmentList(new DepartmentQuery().setSggID(sgg.string("SGG_CD")));
|
|
|
|
|
for(DataObject dept : depts)
|
|
|
|
|
for (DataObject dept : depts)
|
|
|
|
|
ogdpList.add(dept.clone());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -63,20 +63,20 @@ public class OgdpBean extends AbstractBean {
|
|
|
|
|
public List<DataObject> selectAbleOgdpList(boolean anonymous, String sggCd) {
|
|
|
|
|
List<DataObject> ogdpList = new ArrayList<>();
|
|
|
|
|
SigunguQuery sggQuery = new SigunguQuery();
|
|
|
|
|
if(anonymous) {
|
|
|
|
|
if (anonymous) {
|
|
|
|
|
sggQuery.setSggIDs(sggCd);
|
|
|
|
|
} else if(!currentUser().getInstitute().equals("ADMIN00")){
|
|
|
|
|
} else if (!currentUser().getInstitute().equals("ADMIN00")){
|
|
|
|
|
sggQuery.setSggIDs(currentUser().getOrgID());
|
|
|
|
|
}
|
|
|
|
|
List<DataObject> sggs = sigunguBean.getSigunguList(sggQuery);
|
|
|
|
|
for(DataObject sgg : sggs) {
|
|
|
|
|
for (DataObject sgg : sggs) {
|
|
|
|
|
DataObject noDept = sgg.clone()
|
|
|
|
|
.set("DEPT_CD", "EMPTY00")
|
|
|
|
|
.set("DEPT_NM", "(부서 없음)");
|
|
|
|
|
ogdpList.add(noDept);
|
|
|
|
|
|
|
|
|
|
List<DataObject> depts = departmentBean.getDepartmentList(new DepartmentQuery().setSggID(sgg.string("SGG_CD")));
|
|
|
|
|
for(DataObject dept : depts) {
|
|
|
|
|
for (DataObject dept : depts) {
|
|
|
|
|
DataObject ogdp = sgg.clone()
|
|
|
|
|
.set("DEPT_CD", dept.string("DEPT_CD"))
|
|
|
|
|
.set("DEPT_NM", dept.string("DEPT_NM"));
|
|
|
|
|
@ -84,7 +84,7 @@ public class OgdpBean extends AbstractBean {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!anonymous && "ADMIN00".equals(currentUser().getInstitute())) {
|
|
|
|
|
if (!anonymous && "ADMIN00".equals(currentUser().getInstitute())) {
|
|
|
|
|
ogdpList.add(new DataObject()
|
|
|
|
|
.set("SGG_CD", "ADMIN")
|
|
|
|
|
.set("SGG_NM", "관리자 시군구")
|
|
|
|
|
@ -117,22 +117,15 @@ public class OgdpBean extends AbstractBean {
|
|
|
|
|
public void initUserInfo(UserInfo userInfo) {
|
|
|
|
|
DataObject ogdpInfo = userMapper.getUserInfo(userInfo.getId());
|
|
|
|
|
|
|
|
|
|
boolean empty = ogdpInfo == null;
|
|
|
|
|
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"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
infoMap.put("sggCd", !empty ? ogdpInfo.string("SGG_CD") : "");
|
|
|
|
|
infoMap.put("sggNm", !empty ? ogdpInfo.string("SGG_NM") : "");
|
|
|
|
|
infoMap.put("instCd", !empty ? ogdpInfo.string("INST_CD") : "");
|
|
|
|
|
infoMap.put("instNm", !empty ? ogdpInfo.string("INST_NM") : "");
|
|
|
|
|
infoMap.put("deptCd", !empty ? ogdpInfo.string("DEPT_CD") : "");
|
|
|
|
|
infoMap.put("deptNm", !empty ? ogdpInfo.string("DEPT_NM") : "");
|
|
|
|
|
|
|
|
|
|
userInfo.setInfo(infoMap);
|
|
|
|
|
}
|
|
|
|
|
@ -159,7 +152,7 @@ public class OgdpBean extends AbstractBean {
|
|
|
|
|
public List<DataObject> getDeptStngList(OgdpQuery query) {
|
|
|
|
|
// 기본 정렬
|
|
|
|
|
if (query.getOrderBy() == null) {
|
|
|
|
|
if(query.getFetchSize() > 0) {
|
|
|
|
|
if (query.getFetchSize() > 0) {
|
|
|
|
|
query.setOrderBy("QBODY.DEPT_CD DESC");
|
|
|
|
|
} else {
|
|
|
|
|
query.setOrderBy("D.DEPT_CD DESC");
|
|
|
|
|
@ -173,10 +166,10 @@ public class OgdpBean extends AbstractBean {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean updateDeptStng(FimsDepartment dept) {
|
|
|
|
|
return ogdpMapper.updateDeptStng(new DataObject()
|
|
|
|
|
return dept != null
|
|
|
|
|
&& ogdpMapper.updateDeptStng(new DataObject()
|
|
|
|
|
.set("currentUser", currentUser())
|
|
|
|
|
.set("dept", dept)
|
|
|
|
|
) == 1;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|