def update_case_plan_schema_detail_state(state, detail_id):
    template_sql = '''UPDATE `case_plan_schema_detail{}` SET state=%s WHERE detail_id=%s'''.format(
        TABLE_NAME_SUFFIX)
    db_lawcase_helper.insert(template_sql, (
        state,
        detail_id,
    ))
Exemple #2
0
def update_case_plan_schema(schema_day):
    template_sql = '''UPDATE `case_plan_schema` SET state=%s WHERE state=%s AND schema_day=%s'''
    db_helper.insert(template_sql, (
        CASE_PLAN_SCHEMA_STATE_10,
        CASE_PLAN_SCHEMA_STATE_00,
        schema_day,
    ))
def insert_case_plan_schema_detail(rule_id, page_index, schema_day, json_text):
    template_sql = '''INSERT INTO `case_plan_schema_detail{}`
         (`detail_id`,
         `rule_id`,
         `page_index`,
          `schema_day`,
          `state`,
          `json_text`
           )  VALUES (%s, %s, %s, %s, %s, %s)'''.format(TABLE_NAME_SUFFIX)
    _id = str(uuid.uuid1())
    db_lawcase_helper.insert(template_sql, (
        _id,
        rule_id,
        page_index,
        schema_day,
        CASE_PLAN_SCHEMA_DETAIL_00,
        json_text,
    ))
def insert_case_detail(*args):
    template_sql = """
    INSERT INTO case_detail{}(
                detail_id,
                remarks,
                doc_id,
                schema_day,
                rule_id,
                state,
                doc_level,
                doc_num,
                doc_reason,
                doc_type,
                doc_judge_date,
                doc_title,
                doc_court
    ) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)
    """.format(TABLE_NAME_SUFFIX)
    db_lawcase_helper.insert(template_sql, *args)
Exemple #5
0
def insert_case_detail(*args):
    TEMPLATE_SQL = """
    INSERT INTO case_detail(
                detail_id,
                remarks,
                doc_id,
                schema_day,
                rule_id,
                state,
                doc_level,
                doc_num,
                doc_source,
                doc_reason,
                doc_type,
                doc_judge_date,
                doc_title,
                doc_court
    ) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)
    """
    db_helper.insert(TEMPLATE_SQL, *args)
Exemple #6
0
def insert_case_plan_schema(
    total_count,
    batch_count,
    schema_day,
    schema_search,
):
    template_sql = '''INSERT INTO `case_plan_schema`
         (`rule_id`,
         `total_count`,
          `batch_count`,
          `schema_day`,
          `schema_search`,
          `state`
           )  VALUES (%s, %s, %s, %s, %s,%s)'''
    _id = str(uuid.uuid1())
    db_helper.insert(template_sql, (
        _id,
        total_count,
        batch_count,
        schema_day,
        schema_search,
        CASE_PLAN_SCHEMA_STATE_00,
    ))
Exemple #7
0
def update_case_plan_schema_detail_state(state, detail_id):
    template_sql = '''UPDATE `case_plan_schema_detail` SET state=%s WHERE detail_id=%s'''
    db_helper.insert(template_sql, (
        state,
        detail_id,
    ))