| | |
| | | jsonObject.put("UpdateTime", new Date()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("baseInfoVehicleTotalMile", jsonObject.toJSONString()); |
| | | String result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/baseInfoVehicleTotalMile", map,null,"form"); |
| | | System.out.println("网约车车辆里程信息:" + result); |
| | | Map<String, String> header = new HashMap<>(); |
| | | header.put("Connection", "keep-alive"); |
| | | header.put("Content-Type", "application/x-www-form-urlencoded"); |
| | | header.put("Accept", "*/*"); |
| | | header.put("Accept-Encoding", "gzip"); |
| | | header.put("Accept-Charset", "utf-8"); |
| | | String result = null; |
| | | try { |
| | | result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/baseInfoVehicleTotalMile", map, header,"form").toString(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | System.err.println("--------------------------网约车车辆里程信息------------------------:" + result); |
| | | } |
| | | |
| | | |
| | |
| | | jsonObject.put("FareType", query.get("id").toString());//运价类型编码 |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("orderCreate", jsonObject.toJSONString()); |
| | | String result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/orderCreate", map,null,"form"); |
| | | System.out.println("订单发起接口:" + result); |
| | | Map<String, String> header = new HashMap<>(); |
| | | header.put("Connection", "keep-alive"); |
| | | header.put("Content-Type", "application/x-www-form-urlencoded"); |
| | | header.put("Accept", "*/*"); |
| | | header.put("Accept-Encoding", "gzip"); |
| | | header.put("Accept-Charset", "utf-8"); |
| | | String result = null; |
| | | try { |
| | | result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/orderCreate", map, header,"form").toString(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | System.err.println("---------------------------订单发起接口----------------------:" + result); |
| | | } |
| | | |
| | | |
| | |
| | | jsonObject.put("DistributeTime", new Date());//派单成功时间YYYYMMDDhhmmss |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("orderMatch", jsonObject.toJSONString()); |
| | | String result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/orderMatch", map,null,"form"); |
| | | System.out.println("订单成功接口:" + result); |
| | | |
| | | Map<String, String> header = new HashMap<>(); |
| | | header.put("Connection", "keep-alive"); |
| | | header.put("Content-Type", "application/x-www-form-urlencoded"); |
| | | header.put("Accept", "*/*"); |
| | | header.put("Accept-Encoding", "gzip"); |
| | | header.put("Accept-Charset", "utf-8"); |
| | | String result = null; |
| | | try { |
| | | result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/orderMatch", map, header,"form").toString(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | System.err.println("--------------------------------订单成功接口---------------------------:" + result); |
| | | } |
| | | |
| | | |
| | |
| | | jsonObject.put("Encrypt", 1);//坐标加密标识(1:GCJ-02测绘局标准,2:WGS84 GPS标准,3:BD-09百度标准,4:CGCS2000北斗标准,0:其他) |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("operateLogin", jsonObject.toJSONString()); |
| | | String result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/operateLogin", map,null,"form"); |
| | | System.out.println("车辆经营上线接口:" + result); |
| | | Map<String, String> header = new HashMap<>(); |
| | | header.put("Connection", "keep-alive"); |
| | | header.put("Content-Type", "application/x-www-form-urlencoded"); |
| | | header.put("Accept", "*/*"); |
| | | header.put("Accept-Encoding", "gzip"); |
| | | header.put("Accept-Charset", "utf-8"); |
| | | String result = null; |
| | | try { |
| | | result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/operateLogin", map, header,"form").toString(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | System.err.println("--------------------------车辆经营上线接口------------------------:" + result); |
| | | } |
| | | } |
| | | |
| | |
| | | jsonObject.put("Encrypt", 1);//坐标加密标识(1:GCJ-02测绘局标准,2:WGS84 GPS标准,3:BD-09百度标准,4:CGCS2000北斗标准,0:其他) |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("operateLogout", jsonObject.toJSONString()); |
| | | String result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/operateLogout", map,null,"form"); |
| | | System.out.println("车辆经营下线接口:" + result); |
| | | Map<String, String> header = new HashMap<>(); |
| | | header.put("Connection", "keep-alive"); |
| | | header.put("Content-Type", "application/x-www-form-urlencoded"); |
| | | header.put("Accept", "*/*"); |
| | | header.put("Accept-Encoding", "gzip"); |
| | | header.put("Accept-Charset", "utf-8"); |
| | | String result = null; |
| | | try { |
| | | result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/operateLogout", map, header,"form").toString(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | System.err.println("--------------------------------车辆经营下线接口------------------------:" + result); |
| | | } |
| | | } |
| | | |
| | |
| | | jsonObject.put("WaitTime", orderPrivateCar.getWait() * 60);//等待时间(秒) |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("operateDepart", jsonObject.toJSONString()); |
| | | String result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/operateDepart", map,null,"form"); |
| | | System.out.println("经营出发接口:" + result); |
| | | |
| | | Map<String, String> header = new HashMap<>(); |
| | | header.put("Connection", "keep-alive"); |
| | | header.put("Content-Type", "application/x-www-form-urlencoded"); |
| | | header.put("Accept", "*/*"); |
| | | header.put("Accept-Encoding", "gzip"); |
| | | header.put("Accept-Charset", "utf-8"); |
| | | String result = null; |
| | | try { |
| | | result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/operateDepart", map,header,"form").toString(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | System.err.println("--------------------------------经营出发接口-------------------------:" + result); |
| | | } |
| | | |
| | | |
| | |
| | | jsonObject.put("DriveTime", Double.valueOf((orderPrivateCar.getGetoffTime().getTime() - orderPrivateCar.getBoardingTime().getTime()) / 1000).intValue());//载客时间(秒) |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("operateArrive", jsonObject.toJSONString()); |
| | | String result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/operateArrive", map,null,"form"); |
| | | System.out.println("经营到达接口:" + result); |
| | | Map<String, String> header = new HashMap<>(); |
| | | header.put("Connection", "keep-alive"); |
| | | header.put("Content-Type", "application/x-www-form-urlencoded"); |
| | | header.put("Accept", "*/*"); |
| | | header.put("Accept-Encoding", "gzip"); |
| | | header.put("Accept-Charset", "utf-8"); |
| | | String result = null; |
| | | try { |
| | | result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/operateArrive", map, header,"form").toString(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | System.err.println("-------------------------------经营到达接口-------------------------:" + result); |
| | | } |
| | | |
| | | |
| | |
| | | jsonObject.put("InvoiceStatus", "0");//发票状态(0:未开票,1:已开票,2:未知) |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("operatePay", jsonObject.toJSONString()); |
| | | String result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/operatePay", map,null,"form"); |
| | | System.out.println("经营支付接口:" + result); |
| | | Map<String, String> header = new HashMap<>(); |
| | | header.put("Connection", "keep-alive"); |
| | | header.put("Content-Type", "application/x-www-form-urlencoded"); |
| | | header.put("Accept", "*/*"); |
| | | header.put("Accept-Encoding", "gzip"); |
| | | header.put("Accept-Charset", "utf-8"); |
| | | String result = null; |
| | | try { |
| | | result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/operatePay", map, header,"form").toString(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | System.err.println("-----------------------经营支付接口-----------------------:" + result); |
| | | } |
| | | |
| | | |
| | |
| | | jsonObject.put("OrderId", orderNum);//订单编号 |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("positionDriver", jsonObject.toJSONString()); |
| | | String result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/positionDriver", map,null,"form"); |
| | | System.out.println("驾驶员定位信息:" + result); |
| | | |
| | | Map<String, String> header = new HashMap<>(); |
| | | header.put("Connection", "keep-alive"); |
| | | header.put("Content-Type", "application/x-www-form-urlencoded"); |
| | | header.put("Accept", "*/*"); |
| | | header.put("Accept-Encoding", "gzip"); |
| | | header.put("Accept-Charset", "utf-8"); |
| | | String result = null; |
| | | try { |
| | | result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/positionDriver", map, header,"form").toString(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | System.err.println("-----------------------------驾驶员定位信息------------------------:" + result); |
| | | } |
| | | |
| | | |
| | |
| | | jsonObject.put("OrderId", orderNum);//订单编号(非营运状态下填"0") |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("positionVehicle", jsonObject.toJSONString()); |
| | | String result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/positionVehicle", map,null,"form"); |
| | | System.out.println("车辆定位信息:" + result); |
| | | Map<String, String> header = new HashMap<>(); |
| | | header.put("Connection", "keep-alive"); |
| | | header.put("Content-Type", "application/x-www-form-urlencoded"); |
| | | header.put("Accept", "*/*"); |
| | | header.put("Accept-Encoding", "gzip"); |
| | | header.put("Accept-Charset", "utf-8"); |
| | | String result = null; |
| | | try { |
| | | result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/positionVehicle", map, header,"form").toString(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | System.err.println("----------------------------车辆定位信息---------------------------:" + result); |
| | | } |
| | | |
| | | |