package com.kingdee.eas.custom.dormitorysystem.application.handler;

import com.kingdee.bos.Context;
import com.kingdee.shr.base.syssetting.context.SHRContext;
import org.apache.log4j.Logger;

/**
 * @author qingwu
 * @date 2025/4/28
 * @apiNote
 */
public class RoomChangeApplicationListHandler extends DormitoryApplicationListHandler {
    private Logger logger = Logger.getLogger(this.getClass());
    private Context ctx = SHRContext.getInstance().getContext();

    //@Override
    //public String deleteAction(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) throws SHRWebException {
    //    String billId = this.getBillId(request);
    //    FilterInfo fIlterInfo = new FilterInfo();
    //    FilterItemCollection filterItems = fIlterInfo.getFilterItems();
    //    filterItems.add(new FilterItemInfo("id", AtsUtil.toSet(billId), CompareType.INCLUDE));
    //    filterItems.add(new FilterItemInfo("billState", "0", CompareType.NOTEQUALS));
    //    EntityViewInfo entityViewInfo = EntityViewInfo.getInstance(fIlterInfo, null, null);
    //
    //    CoreBaseCollection collection = new CoreBaseCollection();
    //
    //    IRoomChangeApplication iRoomChangeApplication = RoomChangeApplicationFactory.getLocalInstance(ctx);
    //    RoomChangeApplicationCollection roomChangeApplicationCollection = iRoomChangeApplication.getRoomChangeApplicationCollection(entityViewInfo);
    //    return super.deleteAction(request, response, modelMap);
    //}

    //public void againstApproveAction(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) throws SHRWebException, BOSException, EASBizException {
    //    Map<String, Object> res = new HashMap();
    //    Set<String> successIds = new HashSet();
    //    res.put("successIds", successIds);
    //    String billIds = this.getBillId(request);
    //    FilterInfo fIlterInfo = new FilterInfo();
    //    FilterItemCollection filterItems = fIlterInfo.getFilterItems();
    //    filterItems.add(new FilterItemInfo("id", AtsUtil.toSet(billIds), CompareType.INCLUDE));
    //    EntityViewInfo entityViewInfo = EntityViewInfo.getInstance(fIlterInfo, null, null);
    //
    //    CoreBaseCollection collection = new CoreBaseCollection();
    //
    //    IRoomChangeApplication iRoomChangeApplication = RoomChangeApplicationFactory.getLocalInstance(ctx);
    //    RoomChangeApplicationCollection roomChangeApplicationCollection = iRoomChangeApplication.getRoomChangeApplicationCollection(entityViewInfo);
    //    for (int i = 0; i < roomChangeApplicationCollection.size(); i++) {
    //        RoomChangeApplicationInfo roomChangeApplicationInfo = roomChangeApplicationCollection.get(i);
    //        successIds.add(roomChangeApplicationInfo.getId().toString());
    //        roomChangeApplicationInfo.setBillState(HRBillStateEnum.SAVED);
    //        collection.add(roomChangeApplicationInfo);
    //    }
    //    SelectorItemCollection sic = new SelectorItemCollection();
    //    sic.add("billState");
    //    iRoomChangeApplication.save(collection);
    //    res.put("msg", MLUtile.getRes(AtsOverTimeBillResEnum.againstApproveSuccess, this.ctx));
    //    JSONUtils.writeJson(response, res);
    //}

}
