zhibing.pu
2024-06-28 85d8efdb96a9b4900dbceef524a29690e13b7800
UserZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushMinistryOfTransportUtil.java
@@ -66,7 +66,7 @@
    @Autowired
    private IOrderEvaluateService orderEvaluateService;
    private String path = "http://120.77.11.218:8868/";
    private String path = "http://127.0.0.1:8868/";
    /**
@@ -85,8 +85,19 @@
        jsonObject.put("UpdateTime", new Date());
        Map<String, Object> map = new HashMap<>();
        map.put("baseInfoPassenger", jsonObject.toJSONString());
        String result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/baseInfoPassenger", 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/baseInfoPassenger", map, header,"form").getData();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.err.println("---------------------------乘客基本信息--------------------------:" + result);
    }
@@ -120,8 +131,19 @@
        jsonObject.put("CancelReason", query.getReason());//撤销或违约原因
        Map<String, Object> map = new HashMap<>();
        map.put("orderCancel", jsonObject.toJSONString());
        String result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/orderCancel", 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/orderCancel", map, header,"form").getData();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.err.println("----------------------------订单撤销接口------------------:" + result);
    }
@@ -138,7 +160,7 @@
        TransactionDetails transactionDetails = transactionDetailsService.selectById(new EntityWrapper<TransactionDetails>().eq("orderType", 1).eq("orderId", orderId));
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("OrderId", orderPrivateCar.getOrderNum());//订单号
        jsonObject.put("OnArea", 450204);//上车位置行政区划代码
        jsonObject.put("OnArea", 530602);//上车位置行政区划代码
        jsonObject.put("DriverName", driver.getName());//机动车驾驶员
        jsonObject.put("LicenseId", driver.getDriveCard());//机动车驾驶证号
        jsonObject.put("FareType", query.get("id").toString());//运价类型编码(由网约车公司定义,与运价信息接口保持一街)
@@ -199,8 +221,19 @@
        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").getData();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.err.println("------------------------经营支付接口----------------------:" + result);
    }
@@ -219,8 +252,21 @@
        jsonObject.put("Detail", orderEvaluate.getContent());//评价内容
        Map<String, Object> map = new HashMap<>();
        map.put("ratedPassenger", jsonObject.toJSONString());
        String result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/ratedPassenger", 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/ratedPassenger", map, header,"form").getData();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.err.println("-----------------------------乘客评价信息----------------------:" + result);
    }
@@ -243,8 +289,19 @@
        jsonObject.put("TestDepartment", "广西云森科技有限公司");//服务质量信誉考核机构
        Map<String, Object> map = new HashMap<>();
        map.put("ratedDriver", jsonObject.toJSONString());
        String result = httpClientUtil.pushHttpRequset("POST", path + "ministryOfTransport/ratedDriver", 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/ratedDriver", map, header,"form").getData();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.err.println("---------------------------驾驶员信誉信息-----------------------:" + result);
    }