企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 组件源码 ``` /** * <b>方法描述:</b> 加 <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2020-12-16 10:32:37 <br/> * * @param amt1 * 入参|金额1|{@link Object} * @param amt2 * 入参|金额2|{@link Object} * @param amt3 * 出参|和|{@link java.lang.String} * @return 0 失败<br/> * 1 成功<br/> */ @Component(label = "加", style = "判断型", type = "同步组件", comment = "两个金额数据相加,支持千分符输入", version = "1.0.0", deprecated = false, author = "admin", date = "2020-12-16 10:32:37") @InParams(param = {@Param(name = "amt1", comment = "金额1", type = Object.class), @Param(name = "amt2", comment = "金额2", type = Object.class)}) @OutParams(param = {@Param(name = "amt3", comment = "和", type = java.lang.String.class)}) @Returns(returns = {@Return(id = "0", desp = "失败"), @Return(id = "1", desp = "成功")}) @Order(value = 2) public static ResultBase P_add(Object amt1, Object amt2) { BigDecimal d1 = transform(amt1); BigDecimal d2 = transform(amt2); if (d1 != null && d2 != null) { return ResultBase.newSuccessResult(d1.add(d2).toString()); } return ResultBase.newFailureResult("TPTA0009", "输入计算金额数据不是合法数据,输入值1=" + amt1 + ",值2=" + amt2); } ``` # 交易中组件使用方式 ![](https://img.kancloud.cn/d8/d4/d8d42a4a115365594eca5dee91c0e290_1866x866.png) # 参数说明及示例 ## 入口参数 金额1:传入数值型参数,示例: `50.36` 金额2:传入数值型参数,示例: `28.26` ## 出口参数 和:两个金额数据相加,示例: `__INNER__["result"]`