电子面单HTML
查看技术文档 重置为默认值
请求参数
请求数据
public void testPrintHtml() throws Exception{ ManInfo recManInfo = new ManInfo(); recManInfo.setName("李四"); recManInfo.setMobile("13812312345"); recManInfo.setPrintAddr("北京市海淀区长春桥路"); ManInfo sendManInfo = new ManInfo(); sendManInfo.setName("张三"); sendManInfo.setMobile("13012312345"); sendManInfo.setPrintAddr("深圳市南山区金蝶软件园"); PrintHtmlParam printHtmlParam = new PrintHtmlParam(); printHtmlParam.setKuaidicom(CompanyConstant.ZJS); printHtmlParam.setCount(2); printHtmlParam.setNeedChild(1); //如果需要返回电子面单,需要设置 printHtmlParam.setNeedTemplate("1"); printHtmlParam.setSendMan(sendManInfo); printHtmlParam.setRecMan(recManInfo); String t = System.currentTimeMillis() + ""; String param = new Gson().toJson(printHtmlParam); String sign = SignUtils.printSign(param,t,key,secret); PrintReq printReq = new PrintReq(); printReq.setKey(key); printReq.setMethod(ApiInfoConstant.ELECTRONIC_ORDER_HTML_METHOD); printReq.setT(t); printReq.setSign(sign); printReq.setParam(param); IBaseClient printHtml = new PrintHtml(); System.out.println(printHtml.execute(printReq)); }