시군구코드 조회 수정

main
이범준 1 year ago
parent 0a39830452
commit fa05e251e3

@ -19,15 +19,11 @@ public interface GlobalStngMapper extends AbstractMapper {
*/
String selectBasicAmt(CrdnQuery query);
/** .<br />
* @param institute
/** .<br />
* @param deptCode
* @return
*/
String selectSggCd(String institute);
default String selectSggCdForCurrentUser() {
return selectSggCd(currentUser().getInstitute());
};
String selectSggCd(String deptCode);
/** .<br />
* @param sggCd
@ -35,12 +31,6 @@ public interface GlobalStngMapper extends AbstractMapper {
*/
List<String> selectStdgNmList(String sggCd);
default List<String> selectStdgNmListForCurrentUser() {
String sggCd = selectSggCd(currentUser().getInstitute());
return selectStdgNmList(sggCd);
};
/** .
* @param query
* @return

@ -8,6 +8,12 @@ import cokr.xit.foundation.data.DataObject;
public interface CrdnStngService {
/** .
* @param sggCd , taskSeCd , instCd , deptCd
* @return
*/
List<LayoutDescriptor> getLinkFileLayoutMetadata(String sggCd, String taskSeCd, String instCd, String deptCd);
/** .
* @param query
* @return
@ -20,9 +26,5 @@ public interface CrdnStngService {
*/
DataObject getTeamInfo(String teamId);
/** .
* @param sggCd , taskSeCd , instCd , deptCd
* @return
*/
List<LayoutDescriptor> getLinkFileLayoutMetadata(String sggCd, String taskSeCd, String instCd, String deptCd);
}

@ -201,6 +201,21 @@ public class CrdnStngBean extends AbstractComponent {
return amt;
}
/** .
* @param query
* @return
*/
public List<LayoutDescriptor> getLinkFileLayoutMetadata(CrdnQuery query) {
return globalStngMapper.selectLinkFileLayoutMetadata(query);
}
public LayoutDescriptor getLinkFileLayoutMetadata(String fileLayoutId) {
CrdnQuery query = new CrdnQuery();
query.setFileLayoutId(fileLayoutId);
List<LayoutDescriptor> list = globalStngMapper.selectLinkFileLayoutMetadata(query);
return list == null ? null : list.get(0);
}
/** .
* @param query
* @return
@ -217,18 +232,4 @@ public class CrdnStngBean extends AbstractComponent {
return crdnTeamMapper.selectTeamInfo(teamId);
}
/** .
* @param query
* @return
*/
public List<LayoutDescriptor> getLinkFileLayoutMetadata(CrdnQuery query) {
return globalStngMapper.selectLinkFileLayoutMetadata(query);
}
public LayoutDescriptor getLinkFileLayoutMetadata(String fileLayoutId) {
CrdnQuery query = new CrdnQuery();
query.setFileLayoutId(fileLayoutId);
List<LayoutDescriptor> list = globalStngMapper.selectLinkFileLayoutMetadata(query);
return list == null ? null : list.get(0);
}
}

@ -18,16 +18,6 @@ public class CrdnStngServiceBean extends AbstractServiceBean implements CrdnStng
@Resource(name="crdnStngBean")
protected CrdnStngBean crdnStngBean;
@Override
public List<DataObject> getTeamList(CrdnQuery query) {
return crdnStngBean.selectTeamList(query);
}
@Override
public DataObject getTeamInfo(String teamId) {
return crdnStngBean.selectTeamInfo(teamId);
}
@Override
public List<LayoutDescriptor> getLinkFileLayoutMetadata(String sggCd, String taskSeCd, String instCd, String deptCd) {
CrdnQuery query = new CrdnQuery();
@ -38,4 +28,14 @@ public class CrdnStngServiceBean extends AbstractServiceBean implements CrdnStng
return crdnStngBean.getLinkFileLayoutMetadata(query);
}
@Override
public List<DataObject> getTeamList(CrdnQuery query) {
return crdnStngBean.selectTeamList(query);
}
@Override
public DataObject getTeamInfo(String teamId) {
return crdnStngBean.selectTeamInfo(teamId);
}
}

@ -17,6 +17,8 @@ import org.springframework.stereotype.Service;
import cokr.xit.base.file.FileInfo;
import cokr.xit.base.file.service.bean.FileBean;
import cokr.xit.base.file.web.FileInfoFactory;
import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.dao.GlobalStngMapper;
import cokr.xit.fims.crdn.parsing.SingleFileParser;
@ -44,6 +46,9 @@ public class ImportServiceBean extends AbstractServiceBean implements ImportServ
private CrdnBean crdnBean;
@Resource(name = "globalStngMapper")
private GlobalStngMapper globalStngMapper;
@Resource(name="userMapper")
protected UserMapper userMapper;
@Override
public int createCrdns(List<String> interfaceSequences) {
@ -86,12 +91,12 @@ public class ImportServiceBean extends AbstractServiceBean implements ImportServ
String fileGroupType = processInfo.get("fileGroupType");
Crdn crdn = new Crdn();
crdn.setCrdnRegSeCd("07");
crdn.setTaskSeCd(taskSeCd);
crdn.setSggCd(globalStngMapper.selectSggCdForCurrentUser());
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), institute);
String deptCd = currentUser.getDeptCode();
crdn.setSggCd(globalStngMapper.selectSggCd(deptCd));
Map<String, Object> dividedInfo = this.divideInformation(linkFileInfoList, fileGroupType);
DataObject metaFileInfo = (DataObject) dividedInfo.get("metaInfo");

@ -140,9 +140,10 @@ public class Crdn05Controller extends ApplicationController {
String institute = currentUser().getInstitute();
String taskSeCd = hReq.getParameter("taskSeCd");
String sggCd = globalStngMapper.selectSggCdForCurrentUser();
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), institute);
String deptCd = currentUser.getDeptCode();
String sggCd = globalStngMapper.selectSggCd(deptCd);
List<LayoutDescriptor> layoutDescriptors = crdnStngService.getLinkFileLayoutMetadata(sggCd, taskSeCd, institute, deptCd);
for(int i=0; i < layoutDescriptors.size(); i++) {
@ -195,9 +196,10 @@ public class Crdn05Controller extends ApplicationController {
String institute = currentUser().getInstitute();
String taskSeCd = hReq.getParameter("taskSeCd");
String sggCd = globalStngMapper.selectSggCdForCurrentUser();
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), institute);
String deptCd = currentUser.getDeptCode();
String sggCd = globalStngMapper.selectSggCd(deptCd);
List<LayoutDescriptor> layoutDescriptors = crdnStngService.getLinkFileLayoutMetadata(sggCd, taskSeCd, institute, deptCd);
@ -241,9 +243,10 @@ public class Crdn05Controller extends ApplicationController {
String taskSeCd = hReq.getParameter("taskSeCd");
String institute = currentUser().getInstitute();
String sggCd = globalStngMapper.selectSggCdForCurrentUser();
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), institute);
String deptCd = currentUser.getDeptCode();
String sggCd = globalStngMapper.selectSggCd(deptCd);
List<LayoutDescriptor> layoutDescriptors = crdnStngService.getLinkFileLayoutMetadata(sggCd, taskSeCd, institute, deptCd);
Map<String, List<CommonCode>> codeInfo = getCodesOf("FIM007","WEB002","FIM005","FIM006","FIM005","FIM061");
@ -371,9 +374,13 @@ public class Crdn05Controller extends ApplicationController {
mav.addObject("pageName", "crdn05030-info");
String urlTaskSeCd = hReq.getServletPath().split("/")[1];
mav.addObject("taskSeCd", urlTaskSeCd);
mav.addObject("sggCd", globalStngMapper.selectSggCdForCurrentUser());
mav.addObject("stdgNmList", globalStngMapper.selectStdgNmListForCurrentUser());
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), currentUser().getInstitute());
String curDeptCode = currentUser.getDeptCode();
String sggCd = globalStngMapper.selectSggCd(curDeptCode);
mav.addObject("sggCd", sggCd);
mav.addObject("stdgNmList", globalStngMapper.selectStdgNmList(sggCd));
String vltnByTask = "";
@ -390,7 +397,7 @@ public class Crdn05Controller extends ApplicationController {
mav.addObject("VLTNList", commonCodes.get(vltnByTask));
CrdnQuery query = new CrdnQuery();
query.setSggCd(globalStngMapper.selectSggCdForCurrentUser());
query.setSggCd(sggCd);
query.setTaskSeCd(urlTaskSeCd);
List<DataObject> teamList = crdnStngService.getTeamList(query);
@ -427,8 +434,9 @@ public class Crdn05Controller extends ApplicationController {
*/
public ModelAndView createCrdnDataByManual(HttpServletRequest hReq, Crdn crdn, MultipartFile[] newFileList) {
boolean saved = false;
crdn.setSggCd(globalStngMapper.selectSggCdForCurrentUser());
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), currentUser().getInstitute());
String deptCd = currentUser.getDeptCode();
crdn.setSggCd(globalStngMapper.selectSggCd(deptCd));
crdn.setCrdnRegSeCd("01");
crdn.setCrdnInptSeCd("03");//TODO : 사용자 기관의 시청,구청 구분

@ -8,6 +8,8 @@ import javax.annotation.Resource;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery;
@ -42,6 +44,9 @@ public class Crdn06Controller extends ApplicationController {
@Resource(name="crdnStngService")
private CrdnStngService crdnStngService;
@Resource(name="userMapper")
protected UserMapper userMapper;
@Resource(name="globalStngMapper")
protected GlobalStngMapper globalStngMapper;
@ -111,7 +116,10 @@ public class Crdn06Controller extends ApplicationController {
ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/crdn/crdn06020-info");
// 법정동
mav.addObject("stdgNmList", globalStngMapper.selectStdgNmListForCurrentUser());
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), currentUser().getInstitute());
String curDeptCode = currentUser.getDeptCode();
String sggCd = globalStngMapper.selectSggCd(curDeptCode);
mav.addObject("stdgNmList", globalStngMapper.selectStdgNmList(sggCd));
// 공통코드 - 위반 내역 코드
String vltnByTask = "";

@ -16,6 +16,8 @@ import cokr.xit.base.code.CommonCode;
import cokr.xit.base.file.FileInfo;
import cokr.xit.base.file.FileInfo.Relation;
import cokr.xit.base.file.web.FileInfoFactory;
import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery;
@ -51,6 +53,9 @@ public class Cvlc01Controller extends ApplicationController {
@Resource(name="globalStngMapper")
protected GlobalStngMapper globalStngMapper;
@Resource(name="userMapper")
protected UserMapper userMapper;
@Resource(name="crdnService")
private CrdnService crdnService;
@ -151,7 +156,10 @@ public class Cvlc01Controller extends ApplicationController {
mav.addObject("openerPageName", hReq.getParameter("openerPageName"));
mav.addObject("stdgNmList", globalStngMapper.selectStdgNmListForCurrentUser());
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), currentUser().getInstitute());
String curDeptCode = currentUser.getDeptCode();
String sggCd = globalStngMapper.selectSggCd(curDeptCode);
mav.addObject("stdgNmList", globalStngMapper.selectStdgNmList(sggCd));
String vltnByTask = "";
switch(urlTaskSeCd) {
@ -198,7 +206,9 @@ public class Cvlc01Controller extends ApplicationController {
*/
public ModelAndView saveCivilComplaintProcessSection(HttpServletRequest hReq, CrdnCvlcpt crdnCvlcpt, Crdn crdn, MultipartFile[] newFileList, MultipartFile[] modifyFileList) {
String sggCd = globalStngMapper.selectSggCdForCurrentUser();
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), currentUser().getInstitute());
String deptCd = currentUser.getDeptCode();
String sggCd = globalStngMapper.selectSggCd(deptCd);
crdn.setSggCd(sggCd);
crdnCvlcpt.setSggCd(sggCd);

@ -8,6 +8,8 @@ import javax.annotation.Resource;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.dao.GlobalStngMapper;
@ -41,6 +43,9 @@ public class Cvlc04Controller extends ApplicationController {
@Resource(name="globalStngMapper")
protected GlobalStngMapper globalStngMapper;
@Resource(name="userMapper")
private UserMapper userMapper;
/** .
* @return fims/cvlc/cvlc04010-main
*/
@ -61,8 +66,9 @@ public class Cvlc04Controller extends ApplicationController {
* @return jsonView
*/
public ModelAndView getDmndDataList(CrdnQuery query) {
query.setSggCd(globalStngMapper.selectSggCdForCurrentUser());
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), currentUser().getInstitute());
String deptCd = currentUser.getDeptCode();
query.setSggCd(globalStngMapper.selectSggCd(deptCd));
setFetchSize(query);
return setCollectionInfo(new ModelAndView("jsonView"), crdnCvlcptService.getDmndDataList(query),"");
@ -79,7 +85,9 @@ public class Cvlc04Controller extends ApplicationController {
*/
public ModelAndView createDmndDataInfo(CrdnCvlcpt crdnCvlcpt) {
crdnCvlcpt.setSggCd(globalStngMapper.selectSggCdForCurrentUser());
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), currentUser().getInstitute());
String deptCd = currentUser.getDeptCode();
crdnCvlcpt.setSggCd(globalStngMapper.selectSggCd(deptCd));
boolean saved = false;

@ -71,7 +71,9 @@ public class Cvlc05Controller extends ApplicationController {
ModelAndView mav = new ModelAndView();
mav.setViewName("jsonView");
String currentSggCd = globalStngMapper.selectSggCdForCurrentUser();
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), currentUser().getInstitute());
String deptCd = currentUser.getDeptCode();
String currentSggCd = globalStngMapper.selectSggCd(deptCd);
crdnQuery.setSggCd(currentSggCd);
Map<String, Object> info = crdnCvlcptService.getCvlcptAnswerWordsInfo(crdnQuery);
@ -106,7 +108,9 @@ public class Cvlc05Controller extends ApplicationController {
public ModelAndView saveCvlcptAnswerWordsInfo(HttpServletRequest hReq, CrdnCvlcpt crdnCvlcpt) {
boolean saved = false;
String currentSggCd = globalStngMapper.selectSggCdForCurrentUser();
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), currentUser().getInstitute());
String deptCd = currentUser.getDeptCode();
String currentSggCd = globalStngMapper.selectSggCd(deptCd);
crdnCvlcpt.setSggCd(currentSggCd);
String saveData = hReq.getParameter("saveData");

@ -8,6 +8,8 @@ import javax.annotation.Resource;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.dao.GlobalStngMapper;
@ -36,6 +38,9 @@ public class Cvlc06Controller extends ApplicationController {
@Resource(name="globalStngMapper")
private GlobalStngMapper globalStngMapper;
@Resource(name="userMapper")
private UserMapper userMapper;
/** .
* @return fims/cvlc/cvlc06010-main
*/
@ -55,7 +60,9 @@ public class Cvlc06Controller extends ApplicationController {
* @return fims/cvlc/cvlc06010-info
*/
public ModelAndView getWarningWordsList(CrdnQuery crdnQuery) {
String currentSggCd = globalStngMapper.selectSggCdForCurrentUser();
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), currentUser().getInstitute());
String deptCd = currentUser.getDeptCode();
String currentSggCd = globalStngMapper.selectSggCd(deptCd);
crdnQuery.setSggCd(currentSggCd);
return setCollectionInfo(new ModelAndView("jsonView"), crdnCvlcptService.getWarningWordsList(crdnQuery),"");
}
@ -71,7 +78,9 @@ public class Cvlc06Controller extends ApplicationController {
public ModelAndView saveCvlcptAnswerWordsInfo(CrdnCvlcpt crdnCvlcpt) {
boolean saved = false;
String currentSggCd = globalStngMapper.selectSggCdForCurrentUser();
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), currentUser().getInstitute());
String deptCd = currentUser.getDeptCode();
String currentSggCd = globalStngMapper.selectSggCd(deptCd);
crdnCvlcpt.setSggCd(currentSggCd);
saved = crdnCvlcptService.saveWarningWordsInfo(crdnCvlcpt);

@ -44,10 +44,10 @@ SELECT AMT
</select>
<select id="selectSggCd" parameterType="string" resultType="string">
/* 시군구코드 조회(globalStngMapper.selectSggCd) */
/* 부서에 따른 시군구코드 조회(globalStngMapper.selectSggCd) */
SELECT SGG_CD
FROM TB_SGG_INFO
WHERE INST_CD = #{institute}
FROM TB_DEPT_INFO
WHERE DEPT_CD = #{deptCode}
</select>
<select id="selectStdgNmList" parameterType="string" resultType="string">

Loading…
Cancel
Save