From 857e7047d33252adbc3078f8a1b84a426e5563b3 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Thu, 10 Aug 2023 11:19:22 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AF=BC=EC=9B=90=20=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cokr/xit/fims/crdn/Crdn.java | 5 +++++ .../java/cokr/xit/fims/crdn/dao/Crdn01Mapper.java | 5 ++--- .../cokr/xit/fims/crdn/service/bean/Crdn01Bean.java | 6 +++--- .../xit/fims/crdn/service/bean/CrdnServiceBean.java | 11 ++++++++++- .../java/cokr/xit/fims/crdn/web/Crdn01Controller.java | 1 + .../resources/sql/mapper/fims/crdn/crdn01-mapper.xml | 4 +--- .../resources/sql/mapper/fims/crdn/crdn06-mapper.xml | 2 +- 7 files changed, 23 insertions(+), 11 deletions(-) diff --git a/src/main/java/cokr/xit/fims/crdn/Crdn.java b/src/main/java/cokr/xit/fims/crdn/Crdn.java index 5be6df67..6dd749f6 100644 --- a/src/main/java/cokr/xit/fims/crdn/Crdn.java +++ b/src/main/java/cokr/xit/fims/crdn/Crdn.java @@ -431,4 +431,9 @@ public class Crdn extends AbstractEntity { * 연계 테이블 명 */ private String linkNm; + + /** + * 민원 연계 여부 + */ + private String cvlcptLinkYn; } diff --git a/src/main/java/cokr/xit/fims/crdn/dao/Crdn01Mapper.java b/src/main/java/cokr/xit/fims/crdn/dao/Crdn01Mapper.java index e9c69920..864481c0 100644 --- a/src/main/java/cokr/xit/fims/crdn/dao/Crdn01Mapper.java +++ b/src/main/java/cokr/xit/fims/crdn/dao/Crdn01Mapper.java @@ -5,7 +5,6 @@ import java.util.Map; import org.egovframe.rte.psl.dataaccess.mapper.Mapper; -import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.CrdnCvlcpt; import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.foundation.component.AbstractMapper; @@ -74,10 +73,10 @@ public interface Crdn01Mapper extends AbstractMapper { */ int insertCvlcpt(CrdnCvlcpt cvlcpt); - /** 민원접수 초기자료를 수정한다. TODO : mybatis작성 + /** 단속민원을 수정한다. * @param crdn 민원정보 * @return 저장된 정보 수 */ - int updateCvlcpt(Crdn crdn); + int updateCvlcpt(CrdnCvlcpt cvlcpt); } diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn01Bean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn01Bean.java index 28b36950..63f970bd 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn01Bean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn01Bean.java @@ -9,7 +9,7 @@ import javax.annotation.Resource; import org.springframework.stereotype.Component; -import cokr.xit.fims.crdn.Crdn; +import cokr.xit.fims.crdn.CrdnCvlcpt; import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.dao.Crdn01Mapper; import cokr.xit.foundation.AbstractComponent; @@ -43,8 +43,8 @@ public class Crdn01Bean extends AbstractComponent { return crdn01Mapper.selectCivilComplaintOriginalInfo(crdnQuery); } - public boolean update(Crdn crdn) { - return crdn01Mapper.updateCvlcpt(crdn) == 1 ? true : false; + public boolean update(CrdnCvlcpt cvlcpt) { + return crdn01Mapper.updateCvlcpt(cvlcpt) == 1 ? true : false; } } diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java index cd1272ca..405e1684 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java @@ -24,6 +24,7 @@ import cokr.xit.fims.cmmn.hwp.AddingParagraphBetweenHWPFile; import cokr.xit.fims.cmmn.hwp.InsertingImageCell; import cokr.xit.fims.cmmn.service.bean.CrdnSttsHstryBean; import cokr.xit.fims.crdn.Crdn; +import cokr.xit.fims.crdn.CrdnCvlcpt; import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.dao.Crdn01Mapper; import cokr.xit.fims.crdn.dao.Crdn05Mapper; @@ -334,7 +335,15 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService crdn.setFileChgCnt(fileInsertEffected - fileDeleteEffected); - saved = crdn01Bean.update(crdn); + if(ifEmpty(crdn.getCvlcptLinkYn(),() -> "").equals("Y")) { + CrdnCvlcpt crdnCvlcpt = new CrdnCvlcpt(); + crdnCvlcpt.setCvlcptLinkId(crdn.getLinkId()); + //crdnCvlcpt.set(crdn.get); + //crdnCvlcpt.set(crdn.get); + //crdnCvlcpt.set(crdn.get); + //saved = crdn01Bean.update(crdnCvlcpt); + } + saved = crdn06Bean.update(crdn); return saved; } diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java index 71f47d65..3940e8b8 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java @@ -262,6 +262,7 @@ public class Crdn01Controller extends ApplicationController { } } + crdn.setCvlcptLinkYn("Y"); saved = crdnService.update(crdn, newFileInfoList); return new ModelAndView("jsonView") diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn01-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn01-mapper.xml index e7e68c47..598a1b1e 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdn01-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdn01-mapper.xml @@ -378,7 +378,6 @@ INSERT INTO TB_CRDN_CVLCPT ( , DEL_DT , DLTR , DEL_RSN - , CRDN_ID ) VALUES ( #{cvlcptLinkId} , #{cvlcptInptSeCd} @@ -410,10 +409,9 @@ INSERT INTO TB_CRDN_CVLCPT ( , #{removedAt} , #{removedBy} , #{delRsn} - , #{crdnId} ) - + /* 민원정보 수정(crdn01Mapper.updateCvlcpt) */ UPDATE TB_CRDN_CVLCPT SET MDFCN_DT = /* 수정일시 */ diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn06-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn06-mapper.xml index 060ed525..6e9d4223 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdn06-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdn06-mapper.xml @@ -415,7 +415,7 @@ SELECT C.CRDN_ID /* 표지정보확인 수정(crdn06Mapper.updateTagInformation) */ - UPDATE TB_CRDN + UPDATE TB_CRDN_ADI SET PARKNG_PSBLTY_RSLT_CD = '1' , MDFCN_DT = /* 수정일시 */ , MDFR = #{modifiedBy} /* 수정자 */