如何获取参数值并分配给源块中的代理

发布于 2025-01-25 04:50:08 字数 978 浏览 0 评论 0原文

我有一个带有参数的代理accountno开始日期end_datevalue type> type> type_of_account ,<代码> cycle_time 。 对于AccountNo,我已经根据实际数据创建了一个自定义分发。因此,当在源块上生成代理时,将分配一个accountno值。现在,在代理离开源块之前,我想从SQL表更新其他参数 SQL表具有accountno,<代码>值,type_of_account ,cycle_time_time字段。 在源处的退出时,我想更新以下代理参数:

  1. agent.start_date = date()
  2. agent.end_date = agent.start_date+ cypec_time+ cypec_time(来自同一代理的SQL表基于同一帐户编号)
  3. agent.type_of_acount = type_of_account(来自SQL表,基于同一帐户编号的相应值) 如何从SQL表分配参数值?我试过 编写查询以从数据库获得值。

 ((MyAgent1)agent).start_time=date();

  double a= ((MyAgent1)agent).actno;

  double b = selectFirstValue(false, double.class, "SELECT cycle_time FROM sheet1 WHERE actno = a;");

它正在投掷错误

用户缺乏未找到的特权或对象

是否有一种更新参数值的好方法?

I have an agent with parameters AccountNo, start date,end_date ,Value,type_of_account,cycle_time.
For AccountNo I have created a custom distribution based on the actual data. So when an agent is generated at source block it will be assigned an AccountNo value. Now before agent leaves source block i want to update other parameter from the SQL table
SQL table has AccountNo , Value,type_of_account, Cycle_time fields.
On exit at source I want to update the agent parameters as below:

  1. agent.start_date=date()
  2. agent.end_date= agent.start_date+ cycle_time (from SQL table for same agent based on same account no)
  3. agent.type_of_acount=type_of_account (from sql table with corresponding value based on same account No)
    How I can assign the parameter values from SQL table? I tried
    writing query to get the value from db.

.

 ((MyAgent1)agent).start_time=date();

  double a= ((MyAgent1)agent).actno;

  double b = selectFirstValue(false, double.class, "SELECT cycle_time FROM sheet1 WHERE actno = a;");

It is throwing error

user lacks privilege or object not found

is there a good way to update parameter values ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文