通过DEP添加的F7字段,如何在bos代码里面调用
在dep里面通过元数据检查,找到bosType参数,然后传入F7基础资料表名,以及选择的对象名称
public CoreBaseInfo getInfo(Context ctx,String bosType,String tableName,String name){
EntityObjectInfo entityObjectInfo = MetaDataLoaderFactory.getMetaDataLoader(ctx)
.getEntity(BOSObjectType.create(bosType));
CoreBaseInfo coreBaseInfo = null;
try {
IObjectValue objectInfo = Utils.newObjectValueInstance(entityObjectInfo);
coreBaseInfo =(CoreBaseInfo)objectInfo;
String sql="select fid,fname_l2 from "+tableName+" where fname_l2 ='"+name+"' and fstate=1";
IRowSet executeQuery = DbUtil.executeQuery(ctx, sql);
if(executeQuery.next()){
coreBaseInfo.setId(BOSUuid.read(executeQuery.getString("fid")));
}
} catch (InvalidDAOMetaDataException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (UuidException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (BOSException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return coreBaseInfo;
}
通过put方法,引入对象
通过DEP添加的F7字段,如何在bos代码里面调用
本文2024-09-17 01:12:34发表“s-hr cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-shr-65957.html