预览加载中,请您耐心等待几秒...
1/6
2/6
3/6
4/6
5/6
6/6

在线预览结束,喜欢就下载吧,查找使用更方便

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

packagecom.yitong.mbank.cmbc; importjava.text.SimpleDateFormat; importjava.util.Date; importjava.util.List; importorg.apache.log4j.Logger; importorg.dom4j.Element; importorg.springframework.beans.factory.annotation.Autowired; importcom.yitong.app.bean.IBusinessContext; importcom.yitong.app.bean.MBTransConfBean; importcom.yitong.app.bean.MBTransItem; importcom.yitong.app.net.IEBankConfParser; importcom.yitong.app.net.IRequstBuilder; importcom.yitong.app.service.IMobileService; importcom.yitong.commons.model.AppConstants; importcom.yitong.commons.util.DateUtil; importcom.yitong.commons.util.StringUtil; /** *请求报文组装 * *@authoryaoym * */ publicclassRequestBuilder4bttimplementsIRequstBuilder{ privateLoggerlogger=Logger.getLogger(this.getClass()); @Autowired privateIEBankConfParsereBankConfParser; @Autowired privateIMobileServicemobileService; @Override publicbooleanbuildSendMessage(IBusinessContextbusiContext, StringtransCode){ //动态报文体 MBTransConfBeanconf=eBankConfParser.findTransConfById(transCode); if(conf!=null){ logger.info("loadedtransconfsuccessfully!"+transCode); }else{ logger.error("loadedtransconffailed!"+transCode); busiContext.setErrorInfo(AppConstants.STATUS_FAIL,"交易定义加载失败!", transCode); returnfalse; } returnbuildDocument(busiContext,conf,transCode); } /** *创建请求消息体 * *@paramdataMap *@paramrst *@return */ privatebooleanbuildDocument(IBusinessContextctx,MBTransConfBeanconf, StringtransCode){ try{ Elementarea=ctx.getRequestContext(transCode); List<MBTransItem>sed=conf.getSed(); //共性结构 buildHeadContent(area,ctx,transCode); //特定结构 returnbuildBodyContent(area,sed,ctx,transCode); }catch(Exceptione){ logger.error("buildthexmlheaderror!",e); } ctx.setErrorInfo(AppConstants.STATUS_FAIL,"请求消息体加载失败!",transCode); returnfalse; } privatebooleanbuildHeadContent(Elementparent,IBusinessContextctx, StringtransCode){ StringtransId=ctx.getParam("BttTransId"); //机构号 //parent.addElem