企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 组件源码 ``` /** * <b>方法描述:</b> 字符串转BigDecimal <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2018-05-11 11:49:28 <br/> * * @param instr * 入参|输入字符串|{@link java.lang.Object} * @param outobj * 出参|输出对象|{@link Object} * @return 0 失败<br/> * 1 成功<br/> */ @Component(label = "字符串转BigDecimal", style = "判断型", type = "同步组件", comment = "字符串金额转BigDecimal对象格式", version = "1.0.0", deprecated = false, author = "admin", date = "2018-05-11 11:49:28") @InParams(param = {@Param(name = "instr", comment = "输入金额字符串", type = java.lang.Object.class)}) @OutParams(param = {@Param(name = "outobj", comment = "BigDecimal对象", type = Object.class)}) @Returns(returns = {@Return(id = "0", desp = "失败"), @Return(id = "1", desp = "成功")}) public static ResultBase P_convToBigdecimal(Object instr) { BigDecimal d = transform(instr); if (d == null) return ResultBase.newFailureResult("TPTA0005", "输入不是合法金额数据,输入数据:" + instr); return ResultBase.newSuccessResult(d); } ``` # 交易中组件使用方式 ![](https://img.kancloud.cn/3b/e8/3be82ae6b070bdba1b02724e1e3a28bc_1872x866.png) # 参数说明及示例 ## 入口参数 输入金额字符串:输入一个字符串型的数值,示例: `"6,665.45"` ## 出口参数 BigDecimal 对象:根据字符串转换为金额类型,示例: `__INNER__["result"]`