企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 组件源码 ``` /** * <b>方法描述:</b> 取金额绝对值 <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2018-05-11 11:49:39 <br/> * * @param amt * 入参|金额|{@link Object} * @param amt * 出参|金额绝对值|{@link BigDecimal} * @return 0 失败<br/> * 1 成功<br/> */ @Component(label = "取金额绝对值", style = "判断型", type = "同步组件", comment = "取金额绝对值", version = "1.0.0", deprecated = false, author = "admin", date = "2018-05-11 11:49:33") @InParams(param = {@Param(name = "amt", comment = "输入金额", type = Object.class)}) @OutParams(param = {@Param(name = "retamt", comment = "返回金额绝对值", type = BigDecimal.class)}) @Returns(returns = {@Return(id = "1", desp = "成功")}) public static ResultBase P_absAmt(Object amt) { BigDecimal d = transform(amt); if (d == null) return ResultBase.newFailureResult("TPTA0006", "输入不是合法金额数据,输入数据:" + amt); return ResultBase.newSuccessResult(d.abs()); } ``` # 交易中组件使用方式 ![](https://img.kancloud.cn/76/45/7645a40b12904b371a9e1db57e4cb0aa_1870x865.png) # 参数说明及示例 ## 入口参数 输入金额:传入一个数值型参数,示例: `-56.23` ## 出口参数 返回金额绝对值:根据所传金额返回它的绝对值,示例: `__INNER__["result"]`