合同列表增加过滤条件-经办人
This commit is contained in:
parent
ec549fcb7c
commit
5746057c7c
|
@ -0,0 +1,44 @@
|
||||||
|
package shkd.repc.recon.listplugin;
|
||||||
|
|
||||||
|
import kd.bos.config.client.util.StringUtils;
|
||||||
|
import kd.bos.filter.FilterColumn;
|
||||||
|
import kd.bos.form.events.FilterContainerInitArgs;
|
||||||
|
import kd.bos.form.plugin.AbstractFormPlugin;
|
||||||
|
import kd.bos.list.plugin.AbstractListPlugin;
|
||||||
|
import kd.bos.logging.Log;
|
||||||
|
import kd.bos.logging.LogFactory;
|
||||||
|
import kd.bos.servicehelper.user.UserServiceHelper;
|
||||||
|
import kd.sdk.plugin.Plugin;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态表单插件
|
||||||
|
* 合同列表增加过滤条件-经办人
|
||||||
|
*/
|
||||||
|
public class ContractListFilterPlugin extends AbstractListPlugin implements Plugin {
|
||||||
|
|
||||||
|
private final static Log logger = LogFactory.getLog(ContractListFilterPlugin.class);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void filterContainerInit(FilterContainerInitArgs args) {
|
||||||
|
super.filterContainerInit(args);
|
||||||
|
|
||||||
|
String formId = this.getView().getFormShowParameter().getFormId();
|
||||||
|
if (StringUtils.isEmpty(formId) || !"bos_listf7".equals(formId)) {
|
||||||
|
//获取常用过滤条件
|
||||||
|
List<FilterColumn> commonFilterColumns = args.getFilterContainerInitEvent().getCommonFilterColumns();
|
||||||
|
for (FilterColumn commonFilterColumn : commonFilterColumns) {
|
||||||
|
//过滤控件
|
||||||
|
String fieldName = commonFilterColumn.getFieldName();
|
||||||
|
//经办人
|
||||||
|
if ("handler.id".equals(fieldName)) {
|
||||||
|
//设置为当前用户
|
||||||
|
String userId = String.valueOf(UserServiceHelper.getCurrentUserId());
|
||||||
|
commonFilterColumn.setDefaultValues(userId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logger.info(String.format("shkd.repc.recon.listplugin.ContractListFilterPlugin:界面标识:%s", formId));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue