123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- package com.kingdee.shr.ats.web.handler.util;
- import com.kingdee.bos.BOSException;
- import com.kingdee.bos.Context;
- import com.kingdee.bos.dao.IObjectPK;
- import com.kingdee.eas.common.EASBizException;
- import com.kingdee.eas.custom.ats.AtsLeaveBillDetailSameFactory;
- import com.kingdee.eas.hr.ats.AtsLeaveBillEntryCollection;
- import com.kingdee.eas.hr.ats.AtsLeaveBillEntryFactory;
- import com.kingdee.eas.hr.ats.AtsLeaveBillInfo;
- import com.kingdee.shr.ats.web.handler.util.AtsLeaveBillSameSplitHelper;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- /**
- * 操作工具类工具类
- * @author zkwuh
- *
- */
- public class AtsLeaveBillOperationUtil {
-
- private static final Logger logger = LoggerFactory.getLogger(AtsLeaveBillOperationUtil.class);
-
-
- /**
- * 将数据存入新的拆分表
- * @param ctx
- * @param atsLeaveBillInfo
- * @throws BOSException
- * @throws EASBizException
- */
- public static void saveInfo(Context ctx,AtsLeaveBillInfo atsLeaveBillInfo) {
-
- try {
- logger.info("AtsLeaveBillOperationUtil....saveInfo....start");
- int size = atsLeaveBillInfo.getEntries().size();
- AtsLeaveBillEntryCollection billEntryColl = AtsLeaveBillEntryFactory.getLocalInstance(ctx)
- .getAtsLeaveBillEntryCollection(" where bill='" + atsLeaveBillInfo.getId().toString() + "'");
- for (int i = 0; i < size; ++i) {
- AtsLeaveBillSameSplitHelper atsLeaveBillSplitHelper = new AtsLeaveBillSameSplitHelper(ctx, atsLeaveBillInfo,
- billEntryColl.get(i));
- atsLeaveBillSplitHelper.splitLeaveBill();
- }
-
- }catch(Exception e) {
- logger.info("AtsLeaveBillOperationUtil....saveInfo...",e);
- }
-
- }
-
-
- /**
- * 删除拆分表数据
- * @param ctx
- * @param atsLeaveBillInfo
- * @throws EASBizException
- * @throws BOSException
- */
- public static void deleteInfo(Context ctx,String Id) {
- try {
- String sql=" where leavebill in "+Id +" ";
- IObjectPK[] delete = AtsLeaveBillDetailSameFactory.getLocalInstance(ctx).delete(sql);
- }catch(Exception e) {
- logger.info("AtsLeaveBillOperationUtil....deleteInfo...",e);
- }
- }
-
-
-
-
- }
|