com.visionet.platform.cooperation.controller.OrderController.java Source code

Java tutorial

Introduction

Here is the source code for com.visionet.platform.cooperation.controller.OrderController.java

Source

package com.visionet.platform.cooperation.controller;

import com.visionet.core.support.Response;
import com.visionet.platform.cooperation.model.CarUser;
import com.visionet.platform.cooperation.service.CarUserService;
import com.visionet.platform.cooperation.service.OrderService;

import io.swagger.annotations.*;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.math.BigDecimal;
import java.net.URLDecoder;

import static com.visionet.core.util.Constants.UTF_8;

@Controller
@RequestMapping("cooperation/order")
@Api(value = "cooperation/order", tags = { "Order API" }, description = "?API")
public class OrderController {

    @Autowired
    private OrderService orderService;
    @Autowired
    private CarUserService carUserService;

    /**
     * ?  ?
     *
     * @param orderNo        ??
     * @param partnerOrderNo ???
     * @param evaluateScore  
     * @param describe       
     * @param sign           ??
     * @param channel        ?
     * @return
     * @author ?
     */
    @RequestMapping(value = "evaluateDriver", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "?  ?", httpMethod = "POST", response = Response.class, value = "?  ?")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> evaluateDriver(
            @ApiParam(required = true, value = "??") @RequestParam("orderNo") String orderNo,
            @ApiParam(required = true, value = "???") @RequestParam("partnerOrderNo") String partnerOrderNo,
            @ApiParam(required = true, value = "?15") @RequestParam("evaluateScore") Integer evaluateScore,
            @ApiParam(required = true, value = "") @RequestParam("describe") String describe,
            @ApiParam(required = true, value = "??1.8 sign?") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "???") @RequestParam("channel") String channel)
            throws Exception {
        orderService.evaluateDriver(orderNo, partnerOrderNo, evaluateScore, URLDecoder.decode(describe, UTF_8));
        return Response.OK();
    }

    /**
     * ??  ?
     *
     * @return
     * @author  2016/11/23
     */
    @RequestMapping(value = "getCarsModelList", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "??  ?", httpMethod = "POST", response = Response.class, value = "??  ?")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> getCarsModelList(
            @ApiParam(required = true, value = "ID") @RequestParam("cityId") Integer cityId,
            @ApiParam(required = true, value = "??1.8 sign?") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "???") @RequestParam("channel") String channel)
            throws Exception {
        return Response.OK(orderService.getCarsModelList(cityId));
    }

    /**
     * ?  ??
     *
     * @return
     * @author  2016/11/23
     */
    @RequestMapping(value = "newOrder", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "?  ??", httpMethod = "POST", response = Response.class, value = "?  ??")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> newOrder(
            @ApiParam(required = true, value = "???ID") @RequestParam("partnerOrderId") String partnerOrderId,
            @ApiParam(required = true, value = "???") @RequestParam("partnerOrderNo") String partnerOrderNo,
            @ApiParam(required = true, value = ",1") @RequestParam("businessType") Integer businessType,
            @ApiParam(required = true, value = "?6") @RequestParam("orderType") Integer orderType,
            @ApiParam(required = true, value = " ?;?012? 0;1;2") @RequestParam("carType") String carType,
            @ApiParam(required = true, value = "??") @RequestParam("startPlace") String startPlace,
            @ApiParam(required = true, value = "??,???121.43684,31.216673") @RequestParam("startGps") String startGps,
            @ApiParam(required = true, value = "") @RequestParam("endPlace") String endPlace,
            @ApiParam(required = true, value = " ??Km") @RequestParam("expectedKm") Double expectedKm,
            @ApiParam(required = true, value = "???? 121.43684,31.216673") @RequestParam("endGps") String endGps,
            @ApiParam(required = true, value = "?") @RequestParam("expectedPrice") String expectedPrice,
            @ApiParam(required = true, value = "?") @RequestParam("customerPhone") String customerPhone,
            @ApiParam(required = true, value = "??") @RequestParam("customerName") String customerName,
            @ApiParam(required = true, value = " 2016-11-11 15:16:46") @RequestParam("callDate") String callDate,
            @ApiParam(required = true, value = " 2016-11-11 15:16:46") @RequestParam("bookDate") String bookDate,
            @ApiParam(required = true, value = "??,4") @RequestParam("orderSource") Integer orderSource,
            @ApiParam(required = true, value = "") @RequestParam("city") String city,
            @ApiParam(required = true, value = "ID") @RequestParam("cityId") Integer cityId,
            @ApiParam(required = true, value = "??1.8 sign?") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "???") @RequestParam("channel") String channel)
            throws Exception {
        return Response.OK(orderService.insertOrder(partnerOrderId, partnerOrderNo, businessType, orderType,
                URLDecoder.decode(carType, UTF_8), URLDecoder.decode(startPlace, UTF_8),
                URLDecoder.decode(startGps, UTF_8), URLDecoder.decode(endPlace, UTF_8), expectedKm,
                URLDecoder.decode(endGps, UTF_8), URLDecoder.decode(expectedPrice, UTF_8), customerPhone,
                URLDecoder.decode(customerName, UTF_8), URLDecoder.decode(callDate, UTF_8),
                URLDecoder.decode(bookDate, UTF_8), orderSource, URLDecoder.decode(city, UTF_8), cityId, sign,
                channel));
    }

    /**
     * ??  
     *
     * @param orderNo
     * @param partnerOrderNo
     * @param sign
     * @param channel
     * @return
     * @author ?
     */
    @RequestMapping(value = "settlementNotice", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "??  ", httpMethod = "POST", response = Response.class, value = "??  ")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> settlementNotice(
            @ApiParam(required = true, value = "??1.8 sign?") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "???") @RequestParam("channel") String channel,
            @ApiParam(required = true, value = "??") @RequestParam("orderNo") String orderNo,
            @ApiParam(required = true, value = "???") @RequestParam("partnerOrderNo") String partnerOrderNo,
            @ApiParam(required = true, value = "1  2 ?") @RequestParam("payType") String payType,
            @ApiParam(required = true, value = "???") @RequestParam("payAmount") BigDecimal payAmount) {
        orderService.settlementNotice(sign, channel, orderNo, partnerOrderNo, payType, payAmount);
        return Response.OK();
    }

    /**
     * ??
     *
     * @param orderNo
     * @param partnerOrderNo
     * @param cancelType
     * @param reason
     * @param sign
     * @param channel
     * @return
     * @author ?
     */
    @RequestMapping(value = "cancelOrder", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "??  ??", httpMethod = "POST", response = Response.class, value = "??  ??")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> cancelOrder(
            @ApiParam(required = true, value = "??") @RequestParam("orderNo") String orderNo,
            @ApiParam(required = true, value = "???") @RequestParam("partnerOrderNo") String partnerOrderNo,
            @ApiParam(required = true, value = "1 ? 2?? 3 ") @RequestParam("cancelType") Integer cancelType,
            @ApiParam(required = true, value = "??") @RequestParam("cancelAmount") BigDecimal cancelAmount,
            @ApiParam(required = true, value = "?") @RequestParam("reason") String reason,
            @ApiParam(required = true, value = "??1.8 sign?") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "???") @RequestParam("channel") String channel)
            throws Exception {
        orderService.cancelOrder(orderNo, partnerOrderNo, cancelType, cancelAmount,
                URLDecoder.decode(reason, UTF_8));
        return Response.OK();
    }

    /**
     * ???
     *
     * @param orderNo
     * @param partnerOrderNo
     * @param invoiceTitle
     * @param invoiceContent
     * @param address
     * @param postCode
     * @param addressee
     * @param phone
     * @param amount
     * @param sign
     * @param channel
     * @return
     * @author fangren
     */
    @RequestMapping(value = "postInvoice", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "? ???", hidden = true, httpMethod = "POST", response = Response.class, value = "? ???")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> postInvoice(
            @ApiParam(required = true, value = "??") @RequestParam("orderNo") String orderNo,
            @ApiParam(required = true, value = "???") @RequestParam("partnerOrderNo") String partnerOrderNo,
            @ApiParam(required = true, value = "?,URLEncode") @RequestParam("invoiceTitle") String invoiceTitle,
            @ApiParam(required = true, value = "?, URLEncode") @RequestParam("invoiceContent") String invoiceContent,
            @ApiParam(required = true, value = "?, URLEncode") @RequestParam("address") String address,
            @ApiParam(required = true, value = "") @RequestParam("postCode") String postCode,
            @ApiParam(required = true, value = ", URLEncode") @RequestParam("addressee") String addressee,
            @ApiParam(required = true, value = "??") @RequestParam("phone") String phone,
            @ApiParam(required = true, value = "?(??,)") @RequestParam("amount") BigDecimal amount,
            @ApiParam(required = true, value = "??1.8 sign?") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "???") @RequestParam("channel") String channel)
            throws Exception {
        orderService.postInvoice(orderNo, partnerOrderNo, URLDecoder.decode(invoiceTitle, UTF_8),
                URLDecoder.decode(invoiceContent, UTF_8), URLDecoder.decode(address, UTF_8), postCode,
                URLDecoder.decode(addressee, UTF_8), phone, amount, sign, channel);
        return Response.OK();
    }

    /**
     * ???? - ????
     *
     * @param orderNo
     * @param partnerOrderNo
     * @param driverId
     * @param driverName
     * @param vehicleLicense
     * @param driverPhone
     * @param carModel
     * @param driverRate
     * @param driverPhoto
     * @param latitude
     * @param longitude
     * @param sign
     * @param channel
     * @return
     * @throws Exception
     * @author 
     */
    @RequestMapping(value = "syncOrderInformation", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "???? - ????", httpMethod = "POST", response = Response.class, hidden = true, value = "???? - ????")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> syncOrderInformation(
            @ApiParam(required = true, value = "??") @RequestParam("orderNo") String orderNo,
            @ApiParam(required = true, value = "???") @RequestParam("partnerOrderNo") String partnerOrderNo,
            @ApiParam(required = true, value = "?id") @RequestParam("driverId") Integer driverId,
            @ApiParam(required = true, value = "???") @RequestParam("driverName") String driverName,
            @ApiParam(required = true, value = "?") @RequestParam("vehicleLicense") String vehicleLicense,
            @ApiParam(required = true, value = "??") @RequestParam("driverPhone") String driverPhone,
            @ApiParam(required = true, value = "") @RequestParam("carModel") String carModel,
            @ApiParam(required = true, value = "?1-5") @RequestParam("driverRate") String driverRate,
            @ApiParam(required = true, value = "??URL") @RequestParam("driverPhoto") String driverPhoto,
            @ApiParam(required = true, value = "??") @RequestParam("latitude") String latitude,
            @ApiParam(required = true, value = "???") @RequestParam("latitude") String longitude,
            @ApiParam(required = true, value = "??1.8 sign?") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "???") @RequestParam("channel") String channel)
            throws Exception {
        orderService.checkSyncOrderInfoDTO(orderNo, partnerOrderNo, driverId, driverName, vehicleLicense,
                driverPhone, carModel, driverRate, driverPhoto, latitude, longitude, sign, channel);
        CarUser carUser = new CarUser();
        carUser.setId(driverId);
        carUser.setName(URLDecoder.decode(driverName, UTF_8));
        carUser.setCarNumber(URLDecoder.decode(vehicleLicense, UTF_8));
        carUser.setPhone(driverPhone);
        carUser.setGrade(Double.valueOf(driverRate));
        carUser.setCarType(Integer.valueOf(carModel));
        carUser.setHeadPic(driverPhoto);
        carUser.setType(1);
        carUser.setIsValid(1);
        carUser.setDriverSource(1);
        carUserService.valiCarUserExist(carUser);
        orderService.syncOrderInformation(orderNo, driverId);
        return Response.OK();
    }

    /**
     * ??  ??
     *
     * @param orderNo
     * @param partnerOrderNo
     * @param sign
     * @param channel
     * @return
     * @throws Exception
     * @author 
     */
    @RequestMapping(value = "pollingOrder", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "??  ??", hidden = true, httpMethod = "POST", response = Response.class, value = "??  ??")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> pollingOrder(
            @ApiParam(required = true, value = "??") @RequestParam("orderNo") String orderNo,
            @ApiParam(required = true, value = "???") @RequestParam("partnerOrderNo") String partnerOrderNo,
            @ApiParam(required = true, value = "??1.8 sign?") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "???") @RequestParam("channel") String channel)
            throws Exception {
        return Response.OK(orderService.pollingOrder(orderNo, partnerOrderNo, sign, channel));
    }

    /**
     * ??  
     *
     * @param orderNo
     * @param amount
     * @param partnerOrderNo
     * @param sign
     * @param channel
     * @return
     * @throws Exception
     * @author 
     */
    @RequestMapping(value = "payNotify", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "??  ", httpMethod = "POST", response = Response.class, value = "??  ")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> payNotify(
            @ApiParam(required = true, value = "??") @RequestParam("orderNo") String orderNo,
            @ApiParam(required = true, value = "??") @RequestParam("amount") BigDecimal amount,
            @ApiParam(required = true, value = "???") @RequestParam("partnerOrderNo") String partnerOrderNo,
            @ApiParam(required = true, value = "??1.8 sign?") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "???") @RequestParam("channel") String channel)
            throws Exception {
        orderService.payNotify(orderNo, amount);
        return Response.OK();
    }

    /**
     *   ??
     * 
     * @param meta
     * @param eventId
     * @param eventTime
     * @param expiredTime
     * @param sign
     * @param channel
     * @return
     * @throws Exception
     * @author ?
     */
    @RequestMapping(value = "carUserOrderTaking", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "  ??", httpMethod = "POST", response = Response.class, value = "  ??")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> carUserOrderTaking(
            @ApiParam(required = true, value = "?json") @RequestParam("meta") String meta,
            @ApiParam(required = true, value = "id,") @RequestParam("eventId") String eventId,
            @ApiParam(required = true, value = "?") @RequestParam("eventTime") int eventTime,
            @ApiParam(required = true, value = "") @RequestParam("expiredTime") int expiredTime,
            @ApiParam(required = true, value = "??????") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "") @RequestParam("channel") String channel)
            throws Exception {
        orderService.carUserOrderTaking(URLDecoder.decode(meta, UTF_8));
        return Response.OK();
    }

    /**
     *   ??
     * 
     * @param meta
     * @param eventId
     * @param eventTime
     * @param expiredTime
     * @param sign
     * @param channel
     * @return
     * @throws Exception
     * @author ?
     */
    @RequestMapping(value = "carUserSetOut", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "  ??", httpMethod = "POST", response = Response.class, value = "  ??")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> carUserSetOut(
            @ApiParam(required = true, value = "?json") @RequestParam("meta") String meta,
            @ApiParam(required = true, value = "id,") @RequestParam("eventId") String eventId,
            @ApiParam(required = true, value = "?") @RequestParam("eventTime") int eventTime,
            @ApiParam(required = true, value = "") @RequestParam("expiredTime") int expiredTime,
            @ApiParam(required = true, value = "??????") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "") @RequestParam("channel") String channel)
            throws Exception {
        orderService.carUserSetOut(URLDecoder.decode(meta, UTF_8));
        return Response.OK();
    }

    /**
     *   ?
     * 
     * @param meta
     * @param eventId
     * @param eventTime
     * @param expiredTime
     * @param sign
     * @param channel
     * @return
     * @throws Exception
     * @author ?
     */
    @RequestMapping(value = "carUserReach", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "  ?", httpMethod = "POST", response = Response.class, value = "  ?")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> carUserReach(
            @ApiParam(required = true, value = "?json") @RequestParam("meta") String meta,
            @ApiParam(required = true, value = "id,") @RequestParam("eventId") String eventId,
            @ApiParam(required = true, value = "?") @RequestParam("eventTime") int eventTime,
            @ApiParam(required = true, value = "") @RequestParam("expiredTime") int expiredTime,
            @ApiParam(required = true, value = "??????") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "") @RequestParam("channel") String channel)
            throws Exception {
        orderService.carUserReach(URLDecoder.decode(meta, UTF_8));
        return Response.OK();
    }

    /**
     *   ??
     * 
     * @param meta
     * @param eventId
     * @param eventTime
     * @param expiredTime
     * @param sign
     * @param channel
     * @return
     * @throws Exception
     * @author ?
     */
    @RequestMapping(value = "orderStart", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "  ??", httpMethod = "POST", response = Response.class, value = "  ??")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> orderStart(
            @ApiParam(required = true, value = "?json") @RequestParam("meta") String meta,
            @ApiParam(required = true, value = "id,") @RequestParam("eventId") String eventId,
            @ApiParam(required = true, value = "?") @RequestParam("eventTime") int eventTime,
            @ApiParam(required = true, value = "") @RequestParam("expiredTime") int expiredTime,
            @ApiParam(required = true, value = "??????") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "") @RequestParam("channel") String channel)
            throws Exception {
        orderService.orderStart(URLDecoder.decode(meta, UTF_8));
        return Response.OK();
    }

    /**
     *   ?
     * 
     * @param meta
     * @param eventId
     * @param eventTime
     * @param expiredTime
     * @param sign
     * @param channel
     * @return
     * @throws Exception
     * @author ?
     */
    @RequestMapping(value = "orderReassign", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "  ?", httpMethod = "POST", response = Response.class, value = "  ?")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> orderReassign(
            @ApiParam(required = true, value = "?json") @RequestParam("meta") String meta,
            @ApiParam(required = true, value = "id,") @RequestParam("eventId") String eventId,
            @ApiParam(required = true, value = "?") @RequestParam("eventTime") int eventTime,
            @ApiParam(required = true, value = "") @RequestParam("expiredTime") int expiredTime,
            @ApiParam(required = true, value = "??????") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "") @RequestParam("channel") String channel)
            throws Exception {
        orderService.orderReassign(URLDecoder.decode(meta, UTF_8));
        return Response.OK();
    }

    /**
     *   ?
     * 
     * @param meta
     * @param eventId
     * @param eventTime
     * @param expiredTime
     * @param sign
     * @param channel
     * @return
     * @throws Exception
     * @author ?
     */
    @RequestMapping(value = "carUserPay", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "  ??", httpMethod = "POST", response = Response.class, value = "  ??")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> carUserPay(
            @ApiParam(required = true, value = "?json") @RequestParam("meta") String meta,
            @ApiParam(required = true, value = "id,") @RequestParam("eventId") String eventId,
            @ApiParam(required = true, value = "?") @RequestParam("eventTime") int eventTime,
            @ApiParam(required = true, value = "") @RequestParam("expiredTime") int expiredTime,
            @ApiParam(required = true, value = "??????") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "") @RequestParam("channel") String channel)
            throws Exception {
        orderService.carUserPay(URLDecoder.decode(meta, UTF_8));
        return Response.OK();
    }

    /**
     *   ???/??
     * 
     * @param meta
     * @param eventId
     * @param eventTime
     * @param expiredTime
     * @param sign
     * @param channel
     * @return
     * @throws Exception
     * @author ?
     */
    @RequestMapping(value = "syCancelOrder", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "  ???/??", httpMethod = "POST", response = Response.class, value = "  ???/??")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> syCancelOrder(
            @ApiParam(required = true, value = "?json") @RequestParam("meta") String meta,
            @ApiParam(required = true, value = "id,") @RequestParam("eventId") String eventId,
            @ApiParam(required = true, value = "?") @RequestParam("eventTime") int eventTime,
            @ApiParam(required = true, value = "") @RequestParam("expiredTime") int expiredTime,
            @ApiParam(required = true, value = "??????") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "") @RequestParam("channel") String channel)
            throws Exception {
        orderService.syCancelOrder(URLDecoder.decode(meta, UTF_8));
        return Response.OK();
    }

    /**
     *   ??
     * 
     * @param meta
     * @param eventId
     * @param eventTime
     * @param expiredTime
     * @param sign
     * @param channel
     * @return
     * @throws Exception
     * @author ?
     */
    @RequestMapping(value = "orderCompleted", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = " - ??", httpMethod = "POST", response = Response.class, value = "  ??")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> orderCompleted(
            @ApiParam(required = true, value = "?json") @RequestParam("meta") String meta,
            @ApiParam(required = true, value = "id,") @RequestParam("eventId") String eventId,
            @ApiParam(required = true, value = "?") @RequestParam("eventTime") int eventTime,
            @ApiParam(required = true, value = "") @RequestParam("expiredTime") int expiredTime,
            @ApiParam(required = true, value = "??????") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "") @RequestParam("channel") String channel)
            throws Exception {
        orderService.orderCompleted(URLDecoder.decode(meta, UTF_8));
        return Response.OK();
    }

    /**
     *   ??
     * 
     * @param meta
     * @param eventId
     * @param eventTime
     * @param expiredTime
     * @param sign
     * @param channel
     * @return
     * @throws Exception
     * @author ?
     */
    @RequestMapping(value = "printInvoiceApplication", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = " - ??", httpMethod = "POST", response = Response.class, value = "  ??")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> printInvoiceApplication(
            @ApiParam(required = true, value = "?json") @RequestParam("meta") String meta,
            @ApiParam(required = true, value = "id,") @RequestParam("eventId") String eventId,
            @ApiParam(required = true, value = "?") @RequestParam("eventTime") int eventTime,
            @ApiParam(required = true, value = "") @RequestParam("expiredTime") int expiredTime,
            @ApiParam(required = true, value = "??????") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "") @RequestParam("channel") String channel)
            throws Exception {
        return Response.OK(orderService.printInvoiceApplication(URLDecoder.decode(meta, UTF_8)));
    }

    /**
     * ????
     * @param orderNo
     * @param partnerOrderNo
     * @param driverId
     * @param sign
     * @param channel
     * @return
     * @throws Exception
     * @author 
     */
    @RequestMapping(value = "usingTheDriver", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "????", httpMethod = "POST", response = Response.class, value = "????")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> usingTheDriver(
            @ApiParam(required = true, value = "??") @RequestParam("orderNo") String orderNo,
            @ApiParam(required = true, value = "???") @RequestParam("partnerOrderNo") String partnerOrderNo,
            @ApiParam(required = true, value = "?ID") @RequestParam("driverId") Integer driverId,
            @ApiParam(required = true, value = "??1.8 sign?") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "???") @RequestParam("channel") String channel)
            throws Exception {
        orderService.usingTheDriver(orderNo, partnerOrderNo, driverId, sign, channel);
        return Response.OK();
    }

    /**
     * ??
     * @param orderNo
     * @param amount
     * @param partnerOrderNo
     * @param sign
     * @param channel
     * @return
     * @throws Exception
     * @author 
     */
    @RequestMapping(value = "noticeDriver", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "???", httpMethod = "POST", response = Response.class, value = "???")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> noticeDriver(
            @ApiParam(required = true, value = "??") @RequestParam("orderNo") String orderNo,
            @ApiParam(required = true, value = "?") @RequestParam("amount") BigDecimal amount,
            @ApiParam(required = true, value = "???") @RequestParam("partnerOrderNo") String partnerOrderNo,
            @ApiParam(required = true, value = "??1.8 sign?") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "???") @RequestParam("channel") String channel)
            throws Exception {
        orderService.noticeDriver(orderNo, partnerOrderNo, amount);
        return Response.OK();
    }

    /**
     * ?????
     * @param orderNo
     * @param partnerOrderNo
     * @param driverId
     * @param sign
     * @param channel
     * @return
     * @throws Exception
     * @author 
     */
    @RequestMapping(value = "stopAssNotice", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(notes = "?????", httpMethod = "POST", response = Response.class, value = "?????")
    @ApiResponses(value = { @ApiResponse(code = 405, message = "invalid input") })
    public Response<?> stopAssNotice(
            @ApiParam(required = true, value = "??") @RequestParam("orderNo") String orderNo,
            @ApiParam(required = true, value = "???") @RequestParam("partnerOrderNo") String partnerOrderNo,
            @ApiParam(required = true, value = "??1.8 sign?") @RequestParam("sign") String sign,
            @ApiParam(required = true, value = "???") @RequestParam("channel") String channel)
            throws Exception {
        orderService.stopAssNotice(orderNo, partnerOrderNo);
        return Response.OK();
    }
}