예제 #1
0
def createBatch():
    json_dict = RequestBody()
    entities = [
        json_dict_entity(entity, DocNewCheckPlan) for entity in json_dict
    ]
    docNewCheckPlanService.create_batch(entities)
    return ReturnUtil().ok()
예제 #2
0
def remover_by_id():
    json_dict = RequestBody()
    entity = json_dict_entity(json_dict, DocNewCheckPlan)
    entity = docNewCheckPlanService.delete_by_guid(guid)
    if entity is not None:
        return ReturnUtil().ok(entity)
    else:
        return ReturnUtil().falid()
예제 #3
0
def save():
    json_dict = RequestBody()
    entity = json_dict_entity(json_dict, DocNewCheckPlan)
    entity = docNewCheckPlanService.update(entity)
    if entity is not None:
        return ReturnUtil().ok(entity)
    else:
        return ReturnUtil().falid()
def remover_by_id():
    json_dict = RequestBody()
    entity = json_dict_entity(json_dict, First)
    entity = first_service.delete_by_guid(guid)
    if entity is not None:
        return ReturnUtil().ok(entity)
    else:
        return ReturnUtil().falid()
def save():
    json_dict = RequestBody()
    entity = json_dict_entity(json_dict, First)
    entity = FirstService().update(entity)
    if entity is not None:
        return ReturnUtil().ok(entity)
    else:
        return ReturnUtil().falid()
예제 #6
0
def create():
    dict_json = RequestBody()
    entity = json_dict_entity(dict_json, DocNewCheckPlan)
    entity = docNewCheckPlanService.create(entity)
    return ReturnUtil().ok(entity)
def createBatch():
    json_dict = RequestBody()
    entities = [json_dict_entity(entity, First) for entity in json_dict]
    FirstService().create_batch(entities)
    return ReturnUtil().ok()
def create():
    dict_json = RequestBody()
    entity = json_dict_entity(dict_json, First)
    entity = first_service.create(entity)
    return ReturnUtil().ok(entity)