资源简介

海关联调服务 ,js 轮询 版本 针对没有外网 通信电脑专做。

资源截图

代码片段和文件信息

package test;

import java.io.IOException;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.logging.Logger;

import javax.annotation.Resource;

import net.sf.json.JSONArray;
import net.sf.json.JSONobject;
import test.haiguan.HaiGuanApi;
import test.haiguan.payExchangeInfoHead;
import test.haiguan.payExchangeInfoLists;
import test.http.HttpsPostUtil;
 
/**
 * 

描述:oms工程中的Java类[LoginController]


 * 类描述:系统登录处理
 *
 * @version 1.0
 **/
@Controller
@Scope(“prototype“)
public class OrderSearchController extends baseController {

Logger log = LoggerFactory.getLogger(OrderSearchController.class);
@Resource
private OrderzzmsgManager orderzzmsgManager;
@Resource
private OrderManager orderManager;
@Resource
private OrderDAO orderDAO;
  
/**
 *  海关请求传递值
 * @param request
 * @param filter
 * @param map
 * @return
 */
@RequestMapping(method=RequestMethod.POST   value=“custom/platDataOpen“  headers=“content-type=application/x-www-form-urlencoded“)
public void  platDataOpen(HttpServletRequest request HttpServletResponse response OrderFilter filter ModelMap map) {
HaiGuanApi  api = new HaiGuanApi();
PrintWriter writer = null;
try {
writer = response.getWriter();
} catch (IOException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
}


response.setContentType(“text/html;charset=utf-8“);
 
response.setHeader(“Access-Control-Allow-Origin“ “*“);
response.setHeader(“Cache-Control““no-cache“); 
String openReq = request.getParameter(“openReq“);
openReq = openReq.replaceAll(“"“ “\““);
JSONobject json =   JSONobject.fromobject(openReq);
String orderNo = json.getString (“orderNo“);
String sessionID = json.getString(“sessionID“);
Long serviceTime = json.getLong (“serviceTime“); 
  
if(null!=orderNo&& null !=sessionID&& null!=serviceTime){
try {

api.setOrderNo(orderNo);
api.setServiceTime(serviceTime+““);
api.setSessionID(sessionID);
boolean putPostMsg = api.putPostMsg(orderNo);
if(putPostMsg){
     writer.print( api.responseService(serviceTime));
}else{
writer.print( api.responseServiceError());
}
             //休息10秒
             Thread.sleep(1000*5);
      
       
} catch (Exception e) {
System.out.println(“errror“);
// TODO Auto-generated catch block
e.printStackTrace();
writer.print( api.responseServiceError());
}finally{
System.out.println(   “待加签数据大小:“+api.MAP_VALUE.size());


writer.close();
 
}
 
}

else{

/*
api.setOrderNo(orderNo);
api.setServiceTime(serviceTime);
api.setSessionID(sessionID);*/
         try {
writer.print( api.responseServiceError() );
//根据订单流水号查询
} catch (Exception e1

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-03-21 11:21  java_js_demo\
     目录           0  2019-03-21 11:23  java_js_demo\asgn\
     文件       26852  2018-12-24 14:31  java_js_demo\asgn\client.js
     文件        3613  2019-03-21 11:23  java_js_demo\asgn\index.html
     文件       20241  2018-09-10 15:21  java_js_demo\asgn\json2.js
     目录           0  2019-03-21 11:20  java_js_demo\test\
     文件        9383  2019-03-21 11:19  java_js_demo\test\OrderSearchController.java
     文件        3571  2018-07-18 09:01  java_js_demo\test\RMB.java
     目录           0  2019-03-21 11:21  java_js_demo\test\alipay\
     文件        3925  2019-03-21 10:49  java_js_demo\test\alipay\AlipayConfig.java
     文件     2023755  2019-03-21 10:45  java_js_demo\test\alipay\alipay-sdk-java-1.0.jar
     目录           0  2019-03-21 11:21  java_js_demo\test\haiguan\
     文件        2799  2019-03-21 10:50  java_js_demo\test\haiguan\AlipaySearchOrder.java
     文件        6157  2019-03-21 11:12  java_js_demo\test\haiguan\HaiGuanApi.java
     文件      159123  2019-03-21 10:29  java_js_demo\test\haiguan\json-lib-2.4-jdk15.jar
     文件       23931  2019-03-21 10:29  java_js_demo\test\haiguan\json-simple-1.1.1.jar
     文件        3937  2019-03-21 11:00  java_js_demo\test\haiguan\payExchangeInfoHead.java
     文件        2315  2019-03-21 10:32  java_js_demo\test\haiguan\payExchangeInfoLists.java
     目录           0  2019-03-21 11:20  java_js_demo\test\http\
     文件        8130  2019-03-21 11:09  java_js_demo\test\http\HttpsPostUtil.java
     文件      727567  2019-03-21 10:52  java_js_demo\test\http\httpclient-4.5.jar
     文件      321639  2019-03-21 10:53  java_js_demo\test\http\httpcore-4.4.jar
     文件      355662  2019-03-21 10:53  java_js_demo\test\http\httpcore-nio-4.4.jar
     文件     1059500  2019-02-28 14:02  java_js_demo\test\org.eclipse.jface.text_3.15.0.v20181119-1708.jar
     目录           0  2019-03-21 11:16  java_js_demo\加签获取证书工具\
     文件     8708876  2018-12-20 18:05  java_js_demo\加签获取证书工具\debug.rar
     文件          63  2019-03-21 11:18  java_js_demo\如何使用加签获取证书步骤.txt
     目录           0  2019-03-21 11:16  java_js_demo\海关文档\
     文件         443  2019-03-18 10:33  java_js_demo\海关文档\推送地址.txt
     文件        6185  2019-02-28 10:43  java_js_demo\海关文档\数据抓取常见问题(2).txt.txt
     文件      408648  2018-12-27 10:53  java_js_demo\海关文档\海关加签调试步骤.docx
............此处省略1个文件信息

评论

共有 条评论

相关资源