소스정리

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.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.applib.SQLUtil;
import cokr.xit.fims.base.OgdpQuery;
import cokr.xit.fims.base.FimsSigungu;
import cokr.xit.fims.base.OgdpQuery;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
@ -136,8 +135,8 @@ public interface OgdpMapper extends AbstractMapper {
* <li> false</li>
* </ul>
*/
default boolean updateSgg(FimsSigungu sgg) {
return sgg != null && updateSgg(params().set("sgg", sgg)) == 1;
default boolean updateSggStng(FimsSigungu sgg) {
return sgg != null && updateSggStng(params().set("sgg", sgg)) == 1;
}
/** .
@ -148,7 +147,7 @@ public interface OgdpMapper extends AbstractMapper {
* @return
*/
@Update(SQLUtil.SCRIPT_START+"""
/* 시군구 설정정보 수정 (ogdpMapper.updateSgg) */
/* 시군구 설정 정보 수정 (ogdpMapper.updateSggStng) */
UPDATE TB_SGG
SET MDFCN_DT =
"""
@ -169,7 +168,7 @@ public interface OgdpMapper extends AbstractMapper {
</if>
WHERE SGG_CD = #{sgg.sggID}
"""+SQLUtil.SCRIPT_END)
int updateSgg(Map<String, Object> params);
int updateSggStng(Map<String, Object> params);
/** .
* @param req
@ -238,36 +237,42 @@ public interface OgdpMapper extends AbstractMapper {
@UpdateProvider(type=OgdpMapper.class, method="updateDeptProvider")
int updateDept(Map<String, Object> params);
public static String updateDeptProvider(Map<String, Object> params) {
String comment = "/* 부서 수정(ogdpMapper.updateDept) */ ";
String updateSet = """
UPDATE TB_DEPT
@Update(SQLUtil.SCRIPT_START+"""
/* 부서 설정 수정(ogdpMapper.updateDeptStng) */
UPDATE TB_DEPT
SET MDFCN_DT =
"""
+SQLUtil.now
+"""
"""+SQLUtil.now+"""
<!-- -->
, MDFR = #{dept.modifiedBy} <!-- -->
""";
String where = """
WHERE DEPT_CD = #{dept.deptID}
AND USE_YN = 'Y'
""";
, 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 -->
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")

@ -8,10 +8,9 @@ import javax.annotation.Resource;
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.FimsSigungu;
import cokr.xit.fims.base.OgdpQuery;
import cokr.xit.fims.base.dao.OgdpMapper;
import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.component.AbstractBean;
@ -102,8 +101,8 @@ public class OgdpBean extends AbstractBean {
* <li> false</li>
* </ul>
*/
public boolean updateSgg(FimsSigungu sgg) {
return ogdpMapper.updateSgg(sgg);
public boolean updateSggStng(FimsSigungu sgg) {
return ogdpMapper.updateSggStng(sgg);
}
/** .
@ -140,41 +139,12 @@ public class OgdpBean extends AbstractBean {
public boolean updateDept(Department 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 -->
""";
public boolean updateDeptStng(FimsDepartment dept) {
boolean result = ogdpMapper.updateDept(
new DataObject()
.set("currentUser", currentUser())
.set("dept", fimsDept)
.set("updateSetAdd", updateSetAdd)) == 1;
boolean result = ogdpMapper.updateDeptStng(new DataObject().set("currentUser", currentUser()).set("dept", dept)) == 1;
return result;
return result;
}
return false;
}

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

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

Loading…
Cancel
Save