소스 정리

main
이범준 1 year ago
parent 88fc4e503d
commit 7caca58358

@ -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 {
* <li> false</li>
* </ul>
*/
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
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean remove(String... crdnIDs) {
if (isEmpty(crdnIDs)) return false;
Map<String, Object> paramMap = new HashMap<String, Object>();
List<String> crdnIdList = Arrays.asList(crdnIDs);
paramMap.put("crdnIDs", crdnIdList);
paramMap.put("removedBy", UserInfo.current().getId());
return crdnUpdtMapper.removeCrdn(paramMap) == 1 ? true : false;
}
}

@ -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();

@ -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
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean remove(String... crdnIDs) {
if (isEmpty(crdnIDs)) return false;
Map<String, Object> paramMap = new HashMap<String, Object>();
List<String> crdnIdList = Arrays.asList(crdnIDs);
paramMap.put("crdnIDs", crdnIdList);
paramMap.put("removedBy", UserInfo.current().getId());
return crdnUpdtMapper.removeCrdn(paramMap) == 1 ? true : false;
}
/** .
* @param query
* @return

Loading…
Cancel
Save