多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# 组件源码 /** * <b>方法描述:</b> 组报文(前置) <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2020-12-17 16:08:00 <br/> * * @param system * 入参|系统编号|{@link java.lang.String} * @param tardeNo * 入参|交易号|{@link java.lang.String} * @param kevalue * 入参|组报文值|{@link java.util.Map} * @param tag * 出参|组包后base64编码字符串|{@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-17 04:08:00") @InParams(param = {@Param(name = "system", comment = "系统编号", type = java.lang.String.class), @Param(name = "tardeNo", comment = "交易号", type = java.lang.String.class), @Param(name = "kevalue", comment = "组报文值", type = java.util.Map.class)}) @OutParams(param = {@Param(name = "tag", comment = "组包后base64编码字符串", type = java.lang.String.class)}) @Returns(returns = {@Return(id = "0", desp = "失败"), @Return(id = "1", desp = "成功")}) @Order(value = 2) public static ResultBase P_yfePack(String system, String tardeNo, Map kevalue) { try { java.util.Map mapReq = new java.util.LinkedHashMap(); mapReq.put("system", system); mapReq.put("transCode", tardeNo); mapReq.put("request", kevalue); String result = null; if (DebugUtil.debug) { result = HttpClientUtil.doPost(DebugUtil.getYfeUnPackUrl(), String.class, mapReq, null); } else { result = BundleUtil.invokeYfePackMsg(mapReq); } if (!StringUtil.isEmpty(result)) return ResultBase.newSuccessResult(result); return ResultBase.newFailureResult("TPTK0013", "调用YFE组包失败,返回为空"); } catch (Exception e) { return ResultBase.newFailureResult("TPTK0014", "组报文异常:" + AppLog.errorMsg(e)); } } # 交易中组件使用方式 ![](https://img.kancloud.cn/3a/51/3a5185ac242cce9a606cd882a750939c_1193x750.jpg) # 参数说明及示例 ## 入口参数 系统编号:通讯前置页面配置的接入系统或接出系统的系统编码,示例: `"sysIn"` 交易号:通讯前置页面配置的报文配置的交易码,示例: `"code"` 组报文值:需要组包的报文值对象,示例: `{"sex":"man","age":"54"}` ## 出口参数 组包后base64编码字符串:返回组包后的base64编码字符串,示例: `__INNER__["package"]` > 通过服务名调用通讯前置组报文