From 7caca5835891cecf05ce9a464349ab7435c2119f Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Wed, 16 Aug 2023 18:01:25 +0900 Subject: [PATCH] =?UTF-8?q?=EC=86=8C=EC=8A=A4=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/crdn/service/bean/CrdnBean.java | 23 ++++++++++++++++++- .../crdn/service/bean/CrdnServiceBean.java | 4 ++-- .../cvlc/service/bean/CrdnCvlcptBean.java | 21 ----------------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnBean.java index f7b7c46a..1cf6f047 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnBean.java @@ -1,5 +1,8 @@ package cokr.xit.fims.crdn.service.bean; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; import java.util.Map; import javax.annotation.Resource; @@ -10,6 +13,7 @@ import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.dao.CrdnInstMapper; import cokr.xit.fims.crdn.dao.CrdnUpdtMapper; import cokr.xit.foundation.AbstractComponent; +import cokr.xit.foundation.UserInfo; /** 단속 관리 Bean * @author leebj @@ -30,7 +34,7 @@ public class CrdnBean extends AbstractComponent { *
  • 그렇지 않으면 false
  • * */ - public boolean insertCrdn(Crdn crdn) { + public boolean create(Crdn crdn) { int effected = crdnInstMapper.insertCrdn(crdn); if(effected != 1) { @@ -64,4 +68,21 @@ public class CrdnBean extends AbstractComponent { } } + /**단속 정보를 삭제한다. + * @param crdnIDs 단속아이디 목록 + * @return 저장 여부 + * + */ + public boolean remove(String... crdnIDs) { + if (isEmpty(crdnIDs)) return false; + + Map paramMap = new HashMap(); + List crdnIdList = Arrays.asList(crdnIDs); + paramMap.put("crdnIDs", crdnIdList); + paramMap.put("removedBy", UserInfo.current().getId()); + + return crdnUpdtMapper.removeCrdn(paramMap) == 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 e7c4468b..ec81c920 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 @@ -136,7 +136,7 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService @Override public boolean remove(String... crdnIDs) { - return crdnCvlcptBean.remove(crdnIDs); + return crdnBean.remove(crdnIDs); } @@ -174,7 +174,7 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService String currentSggCd = globalStngMapper.selectSggCdForCurrentUser(); crdn.setSggCd(currentSggCd); - boolean result = crdnBean.insertCrdn(crdn); + boolean result = crdnBean.create(crdn); SimpleDateFormat yyyyMMdd = new SimpleDateFormat("yyyyMMdd"); Date curTime = new Date(); diff --git a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptBean.java b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptBean.java index 1f36abde..8576c675 100644 --- a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptBean.java +++ b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptBean.java @@ -1,8 +1,5 @@ package cokr.xit.fims.cvlc.service.bean; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; import java.util.Map; import javax.annotation.Resource; @@ -38,24 +35,6 @@ public class CrdnCvlcptBean extends AbstractComponent { @Resource(name="globalStngMapper") protected GlobalStngMapper globalStngMapper; - /**민원 정보를 삭제한다. - * @param crdnIDs 단속아이디 목록 - * @return 저장 여부 - *
    • 저장됐으면 true
    • - *
    • 그렇지 않으면 false
    • - *
    - */ - public boolean remove(String... crdnIDs) { - if (isEmpty(crdnIDs)) return false; - - Map paramMap = new HashMap(); - List crdnIdList = Arrays.asList(crdnIDs); - paramMap.put("crdnIDs", crdnIdList); - paramMap.put("removedBy", UserInfo.current().getId()); - - return crdnUpdtMapper.removeCrdn(paramMap) == 1 ? true : false; - } - /**민원 원본 정보를 조회한다. * @param query 조회 요청 * @return 민원 원본 정보