소스정리

main
이범준 5 months ago
parent a27c860cab
commit 183636b84d

@ -6,12 +6,11 @@ import java.util.Map;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider; import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update; import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.applib.SQLUtil; import cokr.xit.applib.SQLUtil;
import cokr.xit.fims.base.OgdpQuery;
import cokr.xit.fims.base.FimsSigungu; import cokr.xit.fims.base.FimsSigungu;
import cokr.xit.fims.base.OgdpQuery;
import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
@ -136,8 +135,8 @@ public interface OgdpMapper extends AbstractMapper {
* <li> false</li> * <li> false</li>
* </ul> * </ul>
*/ */
default boolean updateSgg(FimsSigungu sgg) { default boolean updateSggStng(FimsSigungu sgg) {
return sgg != null && updateSgg(params().set("sgg", sgg)) == 1; return sgg != null && updateSggStng(params().set("sgg", sgg)) == 1;
} }
/** . /** .
@ -148,7 +147,7 @@ public interface OgdpMapper extends AbstractMapper {
* @return * @return
*/ */
@Update(SQLUtil.SCRIPT_START+""" @Update(SQLUtil.SCRIPT_START+"""
/* 시군구 설정정보 수정 (ogdpMapper.updateSgg) */ /* 시군구 설정 정보 수정 (ogdpMapper.updateSggStng) */
UPDATE TB_SGG UPDATE TB_SGG
SET MDFCN_DT = SET MDFCN_DT =
""" """
@ -169,7 +168,7 @@ public interface OgdpMapper extends AbstractMapper {
</if> </if>
WHERE SGG_CD = #{sgg.sggID} WHERE SGG_CD = #{sgg.sggID}
"""+SQLUtil.SCRIPT_END) """+SQLUtil.SCRIPT_END)
int updateSgg(Map<String, Object> params); int updateSggStng(Map<String, Object> params);
/** . /** .
* @param req * @param req
@ -238,36 +237,42 @@ public interface OgdpMapper extends AbstractMapper {
@UpdateProvider(type=OgdpMapper.class, method="updateDeptProvider") @Update(SQLUtil.SCRIPT_START+"""
int updateDept(Map<String, Object> params); /* 부서 설정 수정(ogdpMapper.updateDeptStng) */
UPDATE TB_DEPT
public static String updateDeptProvider(Map<String, Object> params) {
String comment = "/* 부서 수정(ogdpMapper.updateDept) */ ";
String updateSet = """
UPDATE TB_DEPT
SET MDFCN_DT = SET MDFCN_DT =
""" """+SQLUtil.now+"""
+SQLUtil.now
+"""
<!-- --> <!-- -->
, MDFR = #{dept.modifiedBy} <!-- --> , MDFR = #{dept.modifiedBy} <!-- -->
"""; , CVLCPT_LINK_SE_CD = #{dept.cvlcptLinkSeCd} <!-- -->
String where = """ , VRBACNT_LINK_SE_CD = #{dept.vrbacntLinkSeCd} <!-- -->
WHERE DEPT_CD = #{dept.deptID} , PSTOFC_NM = #{dept.pstofcNm} <!-- -->
AND USE_YN = 'Y' , RG_NO_HEADER = #{dept.rgNoHeader} <!-- -->
"""; , SNDNG_LINK_SE_CD = #{dept.sndngLinkSeCd} <!-- -->
, EGP_CON_ORG = #{dept.egpConOrg} <!-- E -->
, EGP_RCEPT_ID = #{dept.egpRceptId} <!-- E -->
, EGP_APVL_NB = #{dept.egpApvlNb} <!-- E -->
, EGP_ESB_PATH = #{dept.egpEsbPath} <!-- E ESB -->
, EGP_POST_INST_ID = #{dept.egpPostInstId} <!-- E ID -->
, EGP_CERT_CN = #{dept.egpCertCn} <!-- E CN -->
, ENS_INTERFACE_ID = #{dept.ensInterfaceId} <!-- ID -->
, ENS_SOURCE_CD = #{dept.ensSourceCd} <!-- -->
, ENS_TARGET_CD = #{dept.ensTargetCd} <!-- -->
, ENS_URL = #{dept.ensUrl} <!-- URL -->
, NXRP_LINK_YN = #{dept.nxrpLinkYn} <!-- -->
, NXRP_RGN_SE_CD = #{dept.nxrpRgnSeCd} <!-- -->
, DTBN_BANK_NM = #{dept.dtbnBankNm} <!-- -->
, DTBN_ACTNO = #{dept.dtbnActno} <!-- -->
, DOC_HEADER = #{dept.docHeader} <!-- 릿 -->
, SRVR_OS = #{dept.srvrOs} <!-- OS -->
WHERE DEPT_CD = #{dept.deptID}
AND USE_YN = 'Y'
"""
+SQLUtil.SCRIPT_END)
int updateDeptStng(Map<String, Object> params);
String updateSetAdd = params.get("updateSetAdd") == null ? "" : (String)params.get("updateSetAdd");
return SQLUtil.SCRIPT_START
+ comment
+ updateSet + updateSetAdd + where
+ SQLUtil.SCRIPT_END;
}
@SelectProvider(type=OgdpMapper.class, method="selectDeptInfoProvider") @SelectProvider(type=OgdpMapper.class, method="selectDeptInfoProvider")

@ -8,10 +8,9 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import cokr.xit.base.user.Department;
import cokr.xit.fims.base.OgdpQuery;
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.dao.OgdpMapper; import cokr.xit.fims.base.dao.OgdpMapper;
import cokr.xit.foundation.UserInfo; import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.component.AbstractBean; import cokr.xit.foundation.component.AbstractBean;
@ -102,8 +101,8 @@ public class OgdpBean extends AbstractBean {
* <li> false</li> * <li> false</li>
* </ul> * </ul>
*/ */
public boolean updateSgg(FimsSigungu sgg) { public boolean updateSggStng(FimsSigungu sgg) {
return ogdpMapper.updateSgg(sgg); return ogdpMapper.updateSggStng(sgg);
} }
/** . /** .
@ -140,41 +139,12 @@ public class OgdpBean extends AbstractBean {
public boolean updateDept(Department dept) { public boolean updateDeptStng(FimsDepartment dept) {
if(dept != null && dept instanceof FimsDepartment fimsDept) {
String updateSetAdd = """
, CVLCPT_LINK_SE_CD = #{dept.cvlcptLinkSeCd} <!-- -->
, VRBACNT_LINK_SE_CD = #{dept.vrbacntLinkSeCd} <!-- -->
, PSTOFC_NM = #{dept.pstofcNm} <!-- -->
, RG_NO_HEADER = #{dept.rgNoHeader} <!-- -->
, SNDNG_LINK_SE_CD = #{dept.sndngLinkSeCd} <!-- -->
, EGP_CON_ORG = #{dept.egpConOrg} <!-- E -->
, EGP_RCEPT_ID = #{dept.egpRceptId} <!-- E -->
, EGP_APVL_NB = #{dept.egpApvlNb} <!-- E -->
, EGP_ESB_PATH = #{dept.egpEsbPath} <!-- E ESB -->
, EGP_POST_INST_ID = #{dept.egpPostInstId} <!-- E ID -->
, EGP_CERT_CN = #{dept.egpCertCn} <!-- E CN -->
, ENS_INTERFACE_ID = #{dept.ensInterfaceId} <!-- ID -->
, ENS_SOURCE_CD = #{dept.ensSourceCd} <!-- -->
, ENS_TARGET_CD = #{dept.ensTargetCd} <!-- -->
, ENS_URL = #{dept.ensUrl} <!-- URL -->
, NXRP_LINK_YN = #{dept.nxrpLinkYn} <!-- -->
, NXRP_RGN_SE_CD = #{dept.nxrpRgnSeCd} <!-- -->
, DTBN_BANK_NM = #{dept.dtbnBankNm} <!-- -->
, DTBN_ACTNO = #{dept.dtbnActno} <!-- -->
, DOC_HEADER = #{dept.docHeader} <!-- 릿 -->
, SRVR_OS = #{dept.srvrOs} <!-- OS -->
""";
boolean result = ogdpMapper.updateDept( boolean result = ogdpMapper.updateDeptStng(new DataObject().set("currentUser", currentUser()).set("dept", dept)) == 1;
new DataObject()
.set("currentUser", currentUser()) return result;
.set("dept", fimsDept)
.set("updateSetAdd", updateSetAdd)) == 1;
return result;
}
return false;
} }

@ -14,8 +14,8 @@ import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.base.OgdpQuery;
import cokr.xit.fims.base.FimsSigungu; import cokr.xit.fims.base.FimsSigungu;
import cokr.xit.fims.base.OgdpQuery;
import cokr.xit.fims.base.service.bean.OgdpBean; import cokr.xit.fims.base.service.bean.OgdpBean;
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;
@ -42,7 +42,7 @@ public class Mngt03Controller extends ApplicationController {
getSggInfo = "/010/getSggInfo.do", getSggInfo = "/010/getSggInfo.do",
getTasks = "/010/getTasks.do", getTasks = "/010/getTasks.do",
getVltns = "/010/getVltns.do", getVltns = "/010/getVltns.do",
updateSgg = "/010/updateSgg.do", updateSggStng = "/010/updateSgg.do",
updateTaskStng = "/010/updateTaskStng.do", updateTaskStng = "/010/updateTaskStng.do",
createTaskStng = "/010/createTaskStng.do" createTaskStng = "/010/createTaskStng.do"
; ;
@ -130,15 +130,15 @@ public class Mngt03Controller extends ApplicationController {
return setCollectionInfo(new ModelAndView("jsonView"), result, "vltn"); return setCollectionInfo(new ModelAndView("jsonView"), result, "vltn");
} }
/** . /** .
* @param sgg , symbol , logo , offcs * @param sgg , symbol , logo , offcs
* @return jsonView * @return jsonView
* <pre><code> { * <pre><code> {
* "saved": true, false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@RequestMapping(name="시군구 정보 수정", value=METHOD_URL.updateSgg) @RequestMapping(name="시군구 설정 정보 수정", value=METHOD_URL.updateSggStng)
public ModelAndView updateSgg(FimsSigungu sgg, MultipartFile symbol, MultipartFile logo, MultipartFile offcs) { public ModelAndView updateSggStng(FimsSigungu 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();
@ -158,7 +158,7 @@ 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 = ogdpBean.updateSgg(sgg); boolean saved = ogdpBean.updateSggStng(sgg);
mav.addObject("saved", saved); mav.addObject("saved", saved);
return mav; return mav;

@ -29,10 +29,10 @@ public class Mngt04Controller extends ApplicationController {
public class METHOD_URL { public class METHOD_URL {
public static final String public static final String
deptMngtMain = "/010/main.do" deptStngMngtMain = "/010/main.do"
, getDeptList = "/010/list.do" , getDeptList = "/010/list.do"
, getDeptInfo = "/020/info.do" , getDeptInfo = "/020/info.do"
, updateDept = "/020/update.do" , updateDeptStng = "/020/update.do"
; ;
} }
@ -44,11 +44,11 @@ public class Mngt04Controller extends ApplicationController {
private OgdpBean ogdpBean; private OgdpBean ogdpBean;
/** . /** .
* @return fims/mngt/mngt04010-main * @return fims/mngt/mngt04010-main
*/ */
@RequestMapping(name="부서 정보 관리 메인", value=METHOD_URL.deptMngtMain) @RequestMapping(name="부서 설정 정보 관리 메인", value=METHOD_URL.deptStngMngtMain)
public ModelAndView deptMngtMain() { public ModelAndView deptStngMngtMain() {
ModelAndView mav = new ModelAndView(); ModelAndView mav = new ModelAndView();
mav.setViewName("fims/mngt/mngt04010-main"); mav.setViewName("fims/mngt/mngt04010-main");
@ -110,10 +110,10 @@ public class Mngt04Controller extends ApplicationController {
* "saved": true, false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@RequestMapping(name="부서 수정", value=METHOD_URL.updateDept) @RequestMapping(name="부서 설정 수정", value=METHOD_URL.updateDeptStng)
public ModelAndView updateDept(FimsDepartment dept) { public ModelAndView updateDeptStng(FimsDepartment dept) {
ModelAndView mav = new ModelAndView("jsonView"); ModelAndView mav = new ModelAndView("jsonView");
boolean saved = ogdpBean.updateDept(dept); boolean saved = ogdpBean.updateDeptStng(dept);
mav.addObject("saved", saved); mav.addObject("saved", saved);
return mav; return mav;

Loading…
Cancel
Save