预付单上拉费用申请单botp插件
This commit is contained in:
parent
cec3803e54
commit
39719f98a7
|
@ -0,0 +1,39 @@
|
||||||
|
package zcgj.zcdev.zcdev.fs.plugin.other;
|
||||||
|
|
||||||
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||||
|
import kd.bos.dataentity.utils.OrmUtils;
|
||||||
|
import kd.bos.entity.ExtendedDataEntity;
|
||||||
|
import kd.bos.entity.botp.plugin.AbstractConvertPlugIn;
|
||||||
|
import kd.bos.entity.botp.plugin.args.AfterBuildDrawFilterEventArgs;
|
||||||
|
import kd.bos.entity.botp.plugin.args.AfterConvertEventArgs;
|
||||||
|
import kd.bos.entity.botp.plugin.args.BeforeBuildRowConditionEventArgs;
|
||||||
|
import kd.bos.orm.query.QCP;
|
||||||
|
import kd.bos.orm.query.QFilter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预付单上拉费用申请单botp插件
|
||||||
|
*/
|
||||||
|
public class PrepaybillWriteoffapplyBotpPlugin extends AbstractConvertPlugIn {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterBuildDrawFilter(AfterBuildDrawFilterEventArgs e) {
|
||||||
|
//选单过滤
|
||||||
|
super.afterBuildDrawFilter(e);
|
||||||
|
System.out.println("afterBuildDrawFilter——>");
|
||||||
|
QFilter plugFilter = e.getPlugFilter();//插件追加的选单条件
|
||||||
|
String sourceLayout = e.getSourceLayout();//获取插件设置的选单时打开的源单列表布局
|
||||||
|
DynamicObject targetDataEntity = e.getTargetDataEntity();//当前数据包
|
||||||
|
DynamicObjectCollection writeoffapplyCollection = targetDataEntity.getDynamicObjectCollection("zcgj_writeoffapply");
|
||||||
|
List<Long> ids = new ArrayList<>();
|
||||||
|
for (DynamicObject dynamicObject : writeoffapplyCollection) {
|
||||||
|
long aLong = dynamicObject.getLong("zcgj_sourceapplybillid");
|
||||||
|
ids.add(aLong);
|
||||||
|
}
|
||||||
|
QFilter filter = new QFilter("id", QCP.not_in, ids);
|
||||||
|
e.setPlugFilter(filter);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue