Esempio n. 1
0
def CreateBorrowTicket():
    req = CreateBorrowTicketReq(request.json)
    try:
        result = BorrowTicketSvc.CreateBorrowTicket(req)
        return jsonify(result)
    except ErrorRsp as e:
        return json.dumps(e.__dict__, ensure_ascii=False).encode('utf-8'), 401
Esempio n. 2
0
def GetBorrowTickets():
    req = GetItemsByPageReq(request.json)
    result = BorrowTicketSvc.GetBorrowTicketsByPage(req)
    res = GetItemsByPageRsp(has_next=result['has_next'],
                            has_prev=result['has_prev'],
                            items=result['borrow_tickets']).serialize()
    return jsonify(res)
Esempio n. 3
0
def SearchBorrowTicket():
    req = SearchBorrowTicketReq(request.json)
    result = BorrowTicketSvc.SearchBorrowTicket(req)
    res = SearchBorrowTicketRsp(result).serialize()
    return jsonify(res)
Esempio n. 4
0
def DeleteBorrowTicket():
    req = DeleteBorrowTicketReq(request.json)
    result = BorrowTicketSvc.DeleteBorrowTicket(req)
    return jsonify(result)
Esempio n. 5
0
def FinishBorrowTicket():
    req = FinishBorrowTicketReq(request.json)
    result = BorrowTicketSvc.FinishBorrowTicket(req)
    return jsonify(result)
Esempio n. 6
0
def UpdateBorrowTicket():
    req = UpdateBorrowTicketReq(request.json)
    result = BorrowTicketSvc.UpdateBorrowTicket(req)
    return jsonify(result)
def SendEmailForLateBorrowTicket():
    req = SendEmailForLateBorrowTicketReq(request.json)
    result = BorrowTicketSvc.SendMessageForLate(req)
    return jsonify(result)