|
|
@ -1,5 +1,8 @@
|
|
|
|
package cokr.xit.fims.crdn.service.bean;
|
|
|
|
package cokr.xit.fims.crdn.service.bean;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
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.CrdnInstMapper;
|
|
|
|
import cokr.xit.fims.crdn.dao.CrdnUpdtMapper;
|
|
|
|
import cokr.xit.fims.crdn.dao.CrdnUpdtMapper;
|
|
|
|
import cokr.xit.foundation.AbstractComponent;
|
|
|
|
import cokr.xit.foundation.AbstractComponent;
|
|
|
|
|
|
|
|
import cokr.xit.foundation.UserInfo;
|
|
|
|
|
|
|
|
|
|
|
|
/** 단속 관리 Bean
|
|
|
|
/** 단속 관리 Bean
|
|
|
|
* @author leebj
|
|
|
|
* @author leebj
|
|
|
@ -30,7 +34,7 @@ public class CrdnBean extends AbstractComponent {
|
|
|
|
* <li>그렇지 않으면 false</li>
|
|
|
|
* <li>그렇지 않으면 false</li>
|
|
|
|
* </ul>
|
|
|
|
* </ul>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public boolean insertCrdn(Crdn crdn) {
|
|
|
|
public boolean create(Crdn crdn) {
|
|
|
|
|
|
|
|
|
|
|
|
int effected = crdnInstMapper.insertCrdn(crdn);
|
|
|
|
int effected = crdnInstMapper.insertCrdn(crdn);
|
|
|
|
if(effected != 1) {
|
|
|
|
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;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|