自定义方法:
var easName = JavaImporter();
easName.importPackage(Packages.com.kingdee.eas.util.app);
easName.importPackage(Packages.com.kingdee.bos);
with(easName){
var ctx = pluginCtx.getContext();
var orgunid = methodCtx.getParamValue(0);
var materialid = methodCtx.getParamValue(1);
var sql="select cfmanuprocnumbos from T_BD_MaterialPlan";
sql = sql +" where FOrgUnit='"+orgunid+"' and FMaterialID='"+materialid+"' ";
var rowset = DbUtil.executeQuery(ctx,sql);
if(rowset.size()<=0){
methodCtx.setResultValue(" ");
}else{
rowset.first();
methodCtx.setResultValue(rowset.getObject(1));
}
}
客户端调用代码:
for(var i=0;i
var params = [moStorageOrgid,materialid];
var result = BOClientTool.callCmethod(PK,name,params);
sktable.getCell(i,"mamhao").setValue(result);
}
rowcount为700行,执行速度好慢?怎回事?