From 7cd3135e54fd1ac640e0e7c891ac3f59a02d2315 Mon Sep 17 00:00:00 2001 From: Bo Date: Sun, 15 Aug 2021 19:43:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0TOPGP=E7=AD=BE=E6=94=B6?= =?UTF-8?q?=E5=90=8E=E8=BF=94=E5=9B=9E=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ExpSubsPushApiController.java | 29 ++- .../bps/service/IExpSubsPushApiService.java | 9 +- .../impl/ExpSubsPushApiServiceImpl.java | 180 ++++++++++-------- .../bps/expTopgpLog/expTopgpLog.html | 1 + .../conrtroller/XmlWebserviceController.java | 2 +- .../com/ruoyi/common/utils/TopgpXmlUtils.java | 108 +++++++++-- 6 files changed, 230 insertions(+), 99 deletions(-) diff --git a/box-bps/src/main/java/com/ruoyi/bps/controller/ExpSubsPushApiController.java b/box-bps/src/main/java/com/ruoyi/bps/controller/ExpSubsPushApiController.java index 8d0abc5f4..dd190880f 100644 --- a/box-bps/src/main/java/com/ruoyi/bps/controller/ExpSubsPushApiController.java +++ b/box-bps/src/main/java/com/ruoyi/bps/controller/ExpSubsPushApiController.java @@ -13,6 +13,7 @@ import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RestController; @@ -35,14 +36,15 @@ public class ExpSubsPushApiController extends BaseController { @Autowired IExpSubsPushApiService expSubsPushApiService; - //推送 + //快递100推送 @CrossOrigin - @PostMapping("anon/subscribeCallBackUrl") + @PostMapping("anon/subscribeCallBackUrl/{salt}") @ApiOperation("快递信息订阅推送接受") - public SubscribeResp SubscribeCallBackUrl(HttpServletRequest request) { - return expSubsPushApiService.ExpressSubscribeCallBackUrl(request); + public SubscribeResp SubscribeCallBackUrl(@PathVariable("salt") String salt, HttpServletRequest request) { + return expSubsPushApiService.ExpressSubscribeCallBackUrl(request,salt); } + //订阅 @CrossOrigin @PostMapping("anon/subscribe") @@ -58,12 +60,29 @@ public class ExpSubsPushApiController extends BaseController { @ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String", dataTypeClass = String.class), @ApiImplicitParam(name = "requestJson", value = "请求json",required = true, paramType = "body", dataType = "String", dataTypeClass = String.class) }) - @PostMapping("api/express/topgpSubscribe") public String topgpSubscribe(HttpServletRequest request, HttpServletResponse response) throws IOException { return expSubsPushApiService.ExpressSubscribeFromTopgp(request); } + //接受topgp转签收单完成后的消息推送 + @Log(title = "TOPGP出货已转签收", businessType = BusinessType.OTHER) + @CrossOrigin + @ApiOperation(value="接受TOPGP已转签收消息推送",notes = "request body格式: {\"requestId\":\"topgpSign1628584040740\"," + + "\"signedInfoList\":[{\"deliveryNo\":\"S301-2108020001\",\"signNo\":\"S501-2108020001\"},{\"deliveryNo\":\"S301-2108020002\",\"signNo\":\"S501-2108020002\"}]," + + "\"expressNo\":\"300444235610\",\"company\":\"annengwuliu\",\"phone\":\"13800138000\",\"status\":\"0\"}" + ) + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String", dataTypeClass = String.class), + @ApiImplicitParam(name = "requestJson", value = "请求json",required = true, paramType = "body", dataType = "String", dataTypeClass = String.class) + }) + @PostMapping("api/express/topgpSigned") + public String topgpSigned(HttpServletRequest request, HttpServletResponse response) throws IOException { + // return expSubsPushApiService.ExpressSubscribeFromTopgp(request); + return expSubsPushApiService.TopgpDeliverySigned(request); + } + + } diff --git a/box-bps/src/main/java/com/ruoyi/bps/service/IExpSubsPushApiService.java b/box-bps/src/main/java/com/ruoyi/bps/service/IExpSubsPushApiService.java index 1b72bbf21..6ee2dc1db 100644 --- a/box-bps/src/main/java/com/ruoyi/bps/service/IExpSubsPushApiService.java +++ b/box-bps/src/main/java/com/ruoyi/bps/service/IExpSubsPushApiService.java @@ -25,7 +25,7 @@ public interface IExpSubsPushApiService { * 成功结果返回例子: {"result":true,"returnCode":"200","message":"提交成功"} * */ - public SubscribeResp ExpressSubscribeCallBackUrl(HttpServletRequest request); + public SubscribeResp ExpressSubscribeCallBackUrl(HttpServletRequest request,String salt); /** * 获取Topgp推送的快递信息,向快递100推送订阅请求 @@ -33,4 +33,11 @@ public interface IExpSubsPushApiService { * @return */ public String ExpressSubscribeFromTopgp(HttpServletRequest request) throws IOException; + + /** + * Topgp将出货单转为签收单后的信息推送处理 + * @param request + * @return + */ + public String TopgpDeliverySigned(HttpServletRequest request) throws IOException; } diff --git a/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpSubsPushApiServiceImpl.java b/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpSubsPushApiServiceImpl.java index 4348c9701..85be23795 100644 --- a/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpSubsPushApiServiceImpl.java +++ b/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpSubsPushApiServiceImpl.java @@ -1,5 +1,6 @@ package com.ruoyi.bps.service.impl; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.kuaidi100.sdk.api.Subscribe; import com.kuaidi100.sdk.contant.ApiInfoConstant; @@ -40,14 +41,7 @@ import java.util.Map; @Service public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService { - /*String key = PropertiesReader.get("key"); - String customer = PropertiesReader.get("customer"); - String secret = PropertiesReader.get("secret"); - String siid = PropertiesReader.get("siid"); - String userid = PropertiesReader.get("userid"); - String tid = PropertiesReader.get("tid"); - String secret_key = PropertiesReader.get("secret_key"); - String secret_secret = PropertiesReader.get("secret_secret"); */ + /*String key = PropertiesReader.get("key");*/ private static final Logger log = LoggerFactory.getLogger(HttpUtils.class); @Value("${express.key}") private String key; @@ -77,22 +71,26 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService { if(StringUtils.isEmpty(expSubscribe.getRequestFrom())){ expSubscribe.setRequestFrom("local"); } - + //如果订阅来源是topgp,则取TOPGP的时间戳,否则自己生成时间戳 if( StringUtils.isEmpty(expSubscribe.getRequestId())) { //expSubscribe.setRequestId("local"+System.currentTimeMillis()); //获取时间戳,生成本地请求的requestId expSubscribe.setRequestId("local"+ LocalDateTime.now()); } + //如果订阅来源是topgp,则取TOPGP的订阅时间,否则自己生成订阅时间 if(StringUtils.isEmpty(expSubscribe.getSubscribeTime())){ expSubscribe.setSubscribeTime(DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss")); } - String salt="bpsemi"; //定义salt字符串 + //如果订阅来源是topgp,则取TOPGP传来的salt值topgp,否则使用bpsemi + if(StringUtils.isEmpty(expSubscribe.getSalt())) { + expSubscribe.setSalt("bpsemi");//定义salt字符串 + } //组合订阅参数 SubscribeParameters subscribeParameters = new SubscribeParameters(); SubscribeResp subscribeResp = new SubscribeResp(); - subscribeParameters.setCallbackurl("http://report.bpsemi.cn:8081/it_war/anon/subscribeCallBackUrl"); + subscribeParameters.setCallbackurl("http://report.bpsemi.cn:8081/it_war/anon/subscribeCallBackUrl/"+expSubscribe.getSalt().trim()); subscribeParameters.setPhone(expSubscribe.getPhone()); - subscribeParameters.setSalt(salt); + subscribeParameters.setSalt(expSubscribe.getSalt()); SubscribeParam subscribeParam = new SubscribeParam(); subscribeParam.setParameters(subscribeParameters); subscribeParam.setCompany(expSubscribe.getCompany()); @@ -118,14 +116,13 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService { return subscribeResp; } - //订阅记录写入数据库 ExpSubscribe newExpSubscribe = new ExpSubscribe(); newExpSubscribe.setSid(expSubscribe.getSid()); //将时间戳设为Sid 210810 yangbo newExpSubscribe.setCompany(expSubscribe.getCompany()); newExpSubscribe.setNumber(expSubscribe.getNumber()); newExpSubscribe.setPhone(expSubscribe.getPhone()); - newExpSubscribe.setSalt(salt); + newExpSubscribe.setSalt(expSubscribe.getSalt()); newExpSubscribe.setSubscribeTime(expSubscribe.getSubscribeTime()); newExpSubscribe.setResult((subscribeResp.isResult())?"true":"false"); newExpSubscribe.setReturnCode(subscribeResp.getReturnCode()); @@ -167,7 +164,7 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService { @Override public String ExpressSubscribeFromTopgp(HttpServletRequest request) throws IOException { //定义Return变量 - String retrunStr; + String returnStr; //获取httpServletRequest传过来的Json字符串,并进行解析 JSONObject contentJson= JSONObject.parseObject(ServletUtils.getRequestContent(request)); @@ -210,10 +207,8 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService { map.put("responseCode",subscribeResp.getReturnCode()); //返回码 map.put("result",subscribeResp.isResult()); //订阅结果 - //返回Json字符串给TOPGP - retrunStr= JSONObject.toJSONString(map); - + returnStr= JSONObject.toJSONString(map); //记录本次TOPGP订阅请求的Log ExpTopgpLog expTopgpLog=new ExpTopgpLog(); @@ -224,22 +219,57 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService { expTopgpLog.setRequestStr(contentJson.toString()); expTopgpLog.setRequestTime(subscribeTime); expTopgpLog.setResponseCode(subscribeResp.getReturnCode()); - expTopgpLog.setResponseStr(retrunStr); + expTopgpLog.setResponseStr(returnStr); + //插入TOPGPLOG数据库 + expTopgpLogService.insertExpTopgpLog(expTopgpLog); + //返回TOPGP json字符串 + return returnStr; + } + /** + * Topgp将出货单转为签收单后的信息推送处理 + * + * @param request + * @return + */ + @Override + public String TopgpDeliverySigned(HttpServletRequest request) throws IOException { + //获取httpServletRequest传过来的Json字符串,并进行解析 + String returnStr; + JSONObject contentJson= JSONObject.parseObject(ServletUtils.getRequestContent(request)); + + Map map=new HashMap<>(); + map.put("requestId",contentJson.getString("requestId")); + map.put("responseCode","200"); + map.put("expressNum",contentJson.getString("expressNum")); + returnStr= JSONObject.toJSONString(map); + + //写入TOPGP记录档 + String deliveryNum=""; + JSONArray jsonArray = JSONArray.parseArray(contentJson.getString("signedList")); + for(Object object :jsonArray){ + JSONObject jsonObject= JSONObject.parseObject(object.toString()); + deliveryNum += jsonObject.getString("deliveryNum"); + if(jsonArray.indexOf(object) map) { - String param = TopgpXmlUtils.GetTopgpRequestXml(tip, map); - String returnXml = HttpUtils.sendXmlPost(url, param); - return TopgpXmlUtils.GetStatusFromTopgpResponse(returnXml); - } - - - /** * 处理快递100订阅的快递推送信息,并返回响应结果 * @@ -247,7 +277,7 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService { * @return 结果 */ @Override - public SubscribeResp ExpressSubscribeCallBackUrl(HttpServletRequest request) { + public SubscribeResp ExpressSubscribeCallBackUrl(HttpServletRequest request,String salt) { //如果推送信息中没有包含 if(StringUtils.isEmpty(request.getParameter("param")) || StringUtils.isEmpty(request.getParameter("sign"))) { @@ -260,9 +290,7 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService { String param= request.getParameter("param"); String sign = request.getParameter("sign"); - //log.debug("快递100订阅推送回调结果|{}|{}",param,sign); - //订阅时传的salt - String salt = "bpsemi"; + String ourSign = SignUtils.sign(param + salt); SubscribeResp subscribeResp = new SubscribeResp(); subscribeResp.setResult(Boolean.TRUE); @@ -277,58 +305,21 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService { SubscribePushParamResp subscribePushParamResp=JSONObject.parseObject(param,SubscribePushParamResp.class); SubscribePushResult subscribePushResult = subscribePushParamResp.getLastResult(); - //快递单号 - String nu = subscribePushResult.getNu(); + //监控状态 (polling:监控中,shutdown:结束,abort:中止,updateall:重新推送。其中当快递单为已签收时status=shutdown) - String status= subscribePushParamResp.getStatus(); - if(status.equals("abort")){ + if(subscribePushParamResp.getStatus().equals("abort")){ //todo //当message为“3天查询无记录”或“60天无变化时”status= abort ,对于status=abort的状态的处理逻辑 //将Abort信息存档。然后预警 } + //如果是快递100推送的快递单状态为签收(state=3),并且为TOPGP订阅 //快递单当前状态 (0在途,1揽收,2疑难,3签收,4退签,5派件,6退回,7转单,10待清关,11清关中,12已清关,13清关异常,14收件人拒签) - String state = subscribePushResult.getState(); - - //处理签收逻辑 - //如果是快递100推送的快递单状态为签收(state=3),并且TOPGP未反馈该快递单已被签收 - if(state.equals("3")) { - //如果该快递信息没有推送给TOPGP且TOPGP已反馈生成签收单成功记录,则推送给TOPGP - ExpTopgpLog expTopgpLog=new ExpTopgpLog(); - expTopgpLog.setExpressNumber(subscribePushResult.getNu()); - expTopgpLog.setRequestType("toTopgp"); - expTopgpLog.setResponseCode("200"); - List expTopgpLogList= expTopgpLogService.selectExpTopgpLogList(expTopgpLog); - if(null==expTopgpLogList || expTopgpLogList.size()<1){ - Map requestMap = new HashMap<>(); - requestMap.put("expressNum", subscribePushResult.getNu()); - requestMap.put("expressCom", subscribePushResult.getCom()); - requestMap.put("expressState", subscribePushResult.getState()); - - //一个快递单号,对应多个出货单请求? - - - //调用topgp Webservice接口 - //topgp返回的? - JSONObject jsonObject= SendRequestToTopgp(webserviceUrl, "express_testRequest",requestMap); - log.info(jsonObject.toJSONString()); - if(jsonObject.getString("returnCode").equals("200")){ - //一个快递单号对应多个出货单号怎么处理?如果有多个出货单号,部分已签收,部分未签收又怎么处理? 如果推送到ERP时,ERP已经人工生成签收单了,又该怎么处理? - - - } - - } - - - - - - - } - - //将快递流转状态存入数据库 - expSubsPushRespService.insertExpSubsPushResp(ToExpSubsPushResp(subscribePushParamResp)); //无论数据库中存在快递单号+快递公司编码,都更新数据库 210809 yangbo 修正 + if(subscribePushResult.getState().equals("3") && salt.equals("topgp")) { + pushExpressInfoToTopgp(subscribePushResult); + } + //将快递流转状态存入数据库 + expSubsPushRespService.insertExpSubsPushResp(ToExpSubsPushResp(subscribePushParamResp)); //无论数据库中存在快递单号+快递公司编码,都更新数据库 210809 yangbo 修正 /*ExpSubsPushResp expSubsPushResp=new ExpSubsPushResp(); expSubsPushResp.setLastResultNu(subscribePushResult.getNu()); @@ -346,11 +337,40 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService { //如果数据库中没有快递单号+快递公司编码,则更插入新记录 expSubsPushRespService.insertExpSubsPushResp(ToExpSubsPushResp(subscribePushParamResp)); }*/ - - return subscribeResp; } + //根据快递100推送的快递信息,推送给TOPGP,并将TOPGP返回信息记录到exp_topgp_log表 + private void pushExpressInfoToTopgp(SubscribePushResult subscribePushResult){ + Map requestMap = new HashMap<>(); + requestMap.put("requestId","toTopgp"+LocalDateTime.now()); //生成推送requestId + requestMap.put("expressNum", subscribePushResult.getNu()); + requestMap.put("expressCom", subscribePushResult.getCom()); + requestMap.put("expressState", subscribePushResult.getState()); + + //将签收信息推送给TOPGP,让TOPGP处理签收 + String returnXml = HttpUtils.sendXmlPost(webserviceUrl, TopgpXmlUtils.GetTopgpRequestXml("express_testRequest", requestMap)); + JSONObject jsonObject = TopgpXmlUtils.TopgpResponseXmlToJson(returnXml); + log.info(jsonObject.toJSONString()); + + //记录本次TOPGP订阅请求的Log + ExpTopgpLog expTopgpLog=new ExpTopgpLog(); + expTopgpLog.setRequestId(requestMap.get("requestId").toString()); + expTopgpLog.setRequestType("toTopgp"); + expTopgpLog.setExpressNumber(requestMap.get("expressNum").toString()); + expTopgpLog.setRequestStr(JSONObject.toJSONString(requestMap)); + expTopgpLog.setRequestTime(DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss")); + JSONObject object = jsonObject.getJSONObject("execution"); + expTopgpLog.setResponseCode(object.getString("code")); + expTopgpLog.setResponseStr(returnXml); + //插入TOPGPLOG数据库 + expTopgpLogService.insertExpTopgpLog(expTopgpLog); + + } + + + + /** * 将快递100推送的信息转换为ExpSubsPushResp * @param subscribePushParamResp diff --git a/box-bps/src/main/resources/templates/bps/expTopgpLog/expTopgpLog.html b/box-bps/src/main/resources/templates/bps/expTopgpLog/expTopgpLog.html index 0449183b2..010215e84 100644 --- a/box-bps/src/main/resources/templates/bps/expTopgpLog/expTopgpLog.html +++ b/box-bps/src/main/resources/templates/bps/expTopgpLog/expTopgpLog.html @@ -78,6 +78,7 @@ sortName: "requesttime", //不要用驼峰式变量requestTime,mybatis会转换成request_time sortOrder: "desc", modalName: "ERP订阅推送日志", + escape: true, columns: [{ checkbox: true }, diff --git a/box-test/src/main/java/com/ruoyi/test/conrtroller/XmlWebserviceController.java b/box-test/src/main/java/com/ruoyi/test/conrtroller/XmlWebserviceController.java index 831579088..d8bf9f162 100644 --- a/box-test/src/main/java/com/ruoyi/test/conrtroller/XmlWebserviceController.java +++ b/box-test/src/main/java/com/ruoyi/test/conrtroller/XmlWebserviceController.java @@ -20,7 +20,7 @@ public class XmlWebserviceController { String param = TopgpXmlUtils.GetTopgpRequestXml("express_testRequest", map); String url = "http://192.168.2.81:85/web/ws/r/aws_ttsrv2_toptest"; String returnXml = HttpUtils.sendXmlPost(url,param); - return TopgpXmlUtils.GetStatusFromTopgpResponse(returnXml).toString(); + return TopgpXmlUtils.TopgpResponseXmlToJson(returnXml).toString(); } } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/TopgpXmlUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/TopgpXmlUtils.java index bdea1d873..95ba7ad04 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/TopgpXmlUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/TopgpXmlUtils.java @@ -1,5 +1,6 @@ package com.ruoyi.common.utils; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.ruoyi.common.utils.http.HttpUtils; import org.json.XML; @@ -44,7 +45,7 @@ public class TopgpXmlUtils { " </RequestContent>\n" + " </Request>\n" + " \n" + - " \n" + + " \n" + " \n" + ""); log.info("=======生成xml结束======"); @@ -52,19 +53,102 @@ public class TopgpXmlUtils { } /** - * 将TOPGP返回的XML转化为Json,并提出返回Status - * @param TopgpResponseXml 调用TOPGP的Webservice的方法名 如:express_testRequest + * 将TOPGP返回的XML转化为Json + * @param topgpResponseXml * @return Status JsonObject */ - public static JSONObject GetStatusFromTopgpResponse(String TopgpResponseXml) { - JSONObject jsonObject = JSONObject.parseObject(XML.toJSONObject(TopgpResponseXml).toString()); - JSONObject envelope = jsonObject.getJSONObject("SOAP-ENV:Envelope"); - JSONObject body = envelope.getJSONObject("SOAP-ENV:Body"); - JSONObject express_testResponse = body.getJSONObject("fjs1:express_testResponse"); - JSONObject fjs1Response = express_testResponse.getJSONObject("fjs1:response"); - JSONObject response = fjs1Response.getJSONObject("Response"); - JSONObject execution = response.getJSONObject("Execution"); - return execution.getJSONObject("Status"); + public static JSONObject TopgpResponseXmlToJson(String topgpResponseXml) { + //String xmlString= TopgpResponseTestXml(); //开发测试用xml + String xmlString =XML.toJSONObject(topgpResponseXml).toString(); + JSONObject xmlJson = JSONObject.parseObject(xmlString); + JSONObject response = xmlJson.getJSONObject("SOAP-ENV:Envelope") + .getJSONObject("SOAP-ENV:Body").getJSONObject("fjs1:express_testResponse") + .getJSONObject("fjs1:response").getJSONObject("Response"); + + JSONObject returnJsonObject=new JSONObject(); + + if(StringUtils.isNotEmpty(response.getString("ResponseContent"))){ + JSONObject responseContent = response.getJSONObject("ResponseContent"); + if(StringUtils.isNotEmpty(responseContent.getString("Parameter"))){ + JSONObject parameter=responseContent.getJSONObject("Parameter"); + if(StringUtils.isNotEmpty(parameter.getString("Record"))){ + JSONObject record= parameter.getJSONObject("Record"); + if(StringUtils.isNotEmpty(record.getString("Field"))){ + returnJsonObject.put("Parameter",parameter.getJSONObject("Record").getJSONObject("Field")); //回传参数资料 + } + } + }else { + returnJsonObject.put("Parameter",""); //回传参数资料 + } + if(StringUtils.isNotEmpty(responseContent.getString("Document"))){ + JSONObject document= responseContent.getJSONObject("Document"); + if(StringUtils.isNotEmpty(document)){ + returnJsonObject.put("document",document.getJSONObject("RecordSet")); //回传单据的单头单身资料 + } + }else { + returnJsonObject.put("document",""); + } + } + if(StringUtils.isNotEmpty(response.getJSONObject("Execution"))){ + if(response.getJSONObject("Execution").containsKey("Status")){ + returnJsonObject.put("execution",response.getJSONObject("Execution").getJSONObject("Status")); //服务执行结果 + }else { + returnJsonObject.put("execution",""); + } + } + return returnJsonObject; + } + + //TOPGP返回XML的标准格式,开发时可使用该XML进行测试。 + private static String TopgpResponseTestXml(){ + return "\n" + + " \n" + + " \n" + + " \n" + + "\n" + + " \t\n" + + " \n" + + " \n" + + " \n" + + " \t\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \t\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "\n" + + "\n" + + " \n" + + " \n" + + ""; }