package com.yem.wm.fm.gathering.list;

import kd.bos.form.events.SetFilterEvent;
import kd.bos.list.IListView;
import kd.bos.list.plugin.AbstractListPlugin;
import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
import kd.sdk.plugin.Plugin;

/**
 * @author power
 * @ClassName 收款单列表  yem_gathering
 * @description: 列表过滤插件 根据单据类型过滤插件数据 列表插件
 * @date 2023/8/18
 */
public class GatheringListPlugln extends AbstractListPlugin implements Plugin {
    @Override
    public void setFilter(SetFilterEvent e) {
        super.setFilter(e);
        billTypeFilter(e);
    }

    /**
     * @Description 根据打开的布局的单据类型 过滤列表显示数据
     * @param e
     */
    public void billTypeFilter(SetFilterEvent e){
        String billFormId = ((IListView) this.getView()).getBillFormId();
//        if("yem_gathering_yw".equals(billFormId)){
//            e.addCustomQFilter(new QFilter("billstatus", QCP.equals,"C"));
//        }
        e.addCustomQFilter(new QFilter("billstatus", QCP.equals,"C"));
//        else if("yem_gathering_yw".equals(billFormId)){
//            e.addCustomQFilter(new QFilter("yem_billtype.number", QCP.equals,"yem_gathering_YW"));
//        }
    }
}
