Esempio n. 1
0
def _init_doc_requisities(config):
    from services.osago.documents.initial_db_data import load_data
    data = load_data(config)

    templates = ("OSAGO_MAIL_LIST_TEMPLATE", "OSAGO_PRETENSION_TEMPLATE",
                 "OSAGO_DOCUMENTS_CLAIM_TEMPLATE",
                 "OSAGO_TRUST_SUBMISSION_DOCS_TEMPLATE",
                 "OSAGO_TRUST_OBTAIN_DOCS_TEMPLATE",
                 "OSAGO_TRUST_SUBMISION_OBTAIN_DOCS_TEMPLATE",
                 "OSAGO_CLAIM_COURT_ABSENT_TEMPLATE",
                 "OSAGO_CLAIM_ALL_EXECUTION_ACT_TEMPLATE",
                 "OSAGO_CLAIM_GUILTY_EXECUTION_ACT_TEMPLATE",
                 "OSAGO_CLAIM_INSURANCE_EXECUTION_ACT_TEMPLATE",
                 "OSAGO_LAWSUIT_TEMPLATE",
                 "OSAGO_OSAGO_COURT_MAIL_LIST_TEMPLATE")

    for template_name in templates:
        DocRequisitiesStorage.add_template(data[template_name]['doc_name'],
                                           data[template_name])

    schemas = ("OSAGO_SCHEMA", "OSAGO_MAIL_LIST_SCHEMA",
               "OSAGO_PRETENSION_SCHEMA", "OSAGO_DOCUMENTS_CLAIM_SCHEMA",
               "OSAGO_TRUST_SUBMISSION_DOCS_SCHEMA",
               "OSAGO_TRUST_OBTAIN_DOCS_SCHEMA",
               "OSAGO_TRUST_SUBMISION_OBTAIN_DOCS_SCHEMA",
               "OSAGO_CLAIM_COURT_ABSENT_SCHEMA",
               "OSAGO_CLAIM_ALL_EXECUTION_ACT_SCHEMA",
               "OSAGO_CLAIM_GUILTY_EXECUTION_ACT_SCHEMA",
               "OSAGO_CLAIM_INSURANCE_EXECUTION_ACT_SCHEMA",
               "OSAGO_LAWSUIT_SCHEMA", "OSAGO_OSAGO_COURT_MAIL_LIST_SCHEMA")

    for schema_name in schemas:
        DocRequisitiesStorage.add_schema(data[schema_name]['doc_name'],
                                         data[schema_name])

    bd = dict(batch_type=DocumentBatchTypeEnum.DBT_OSAGO,
              doc_types=[
                  DocumentTypeEnum.DT_OSAGO_MAIL_LIST,
                  DocumentTypeEnum.DT_OSAGO_PRETENSION,
                  DocumentTypeEnum.DT_OSAGO_DOCUMENTS_CLAIM,
                  DocumentTypeEnum.DT_OSAGO_TRUST_SUBMISSION_DOCS,
                  DocumentTypeEnum.DT_OSAGO_TRUST_OBTAIN_DOCS,
                  DocumentTypeEnum.DT_OSAGO_TRUST_SUBMISION_OBTAIN_DOCS,
                  DocumentTypeEnum.DT_OSAGO_CLAIM_COURT_ABSENT,
                  DocumentTypeEnum.DT_OSAGO_CLAIM_ALL_EXECUTION_ACT,
                  DocumentTypeEnum.DT_OSAGO_CLAIM_GUILTY_EXECUTION_ACT,
                  DocumentTypeEnum.DT_OSAGO_CLAIM_INSURANCE_EXECUTION_ACT,
                  DocumentTypeEnum.DT_OSAGO_LAWSUIT,
                  DocumentTypeEnum.DT_OSAGO_COURT_MAIL_LIST
              ],
              result_fields=data['OSAGO_RESULT_FIELDS'],
              fields=data['OSAGO_SCHEMA']['fields'],
              initial_status='pretension',
              actions=data['OSAGO_ACTIONS'],
              transitions=data['OSAGO_TRANSITIONS'],
              validation_condition=data['VALIDATION_CONDITION'],
              fixed_on_states=['generating_pretension', 'generating_claim'])

    DocRequisitiesStorage.add_batch_descriptor(DocumentBatchTypeEnum.DBT_OSAGO,
                                               bd)
Esempio n. 2
0
def _init_doc_requisities(config):
    from services.ip_reg.documents.initial_db_data_ip import load_data
    data = load_data(config)

    templates = (
        "P21001_TEMPLATE",
        "IP_DOV_FILING_TEMPLATE",
        "IP_DOV_RECEIVING_TEMPLATE",
        "IP_DOV_FILING_RECEIVING_TEMPLATE",
        "IP_LETTER_INVENTORY_TEMPLATE",
        "IP_USN_TEMPLATE",
        "IP_ESHN_TEMPLATE"
    )

    for template_name in templates:
        DocRequisitiesStorage.add_template(data[template_name]['doc_name'], data[template_name])

    schemas = (
        "P21001_SCHEMA",
        "IP_REG_BATCH_SCHEMA",
        "IP_STATE_DUTY_SCHEMA",
        "IP_DOV_FILING_SCHEMA",
        "IP_DOV_RECEIVING_SCHEMA",
        "IP_DOV_FILING_RECEIVING_SCHEMA",
        "IP_LETTER_INVENTORY_SCHEMA",
        "IP_USN_SCHEMA",
        "IP_ESHN_SCHEMA"
    )

    for schema_name in schemas:
        DocRequisitiesStorage.add_schema(data[schema_name]['doc_name'], data[schema_name])

    matchers = (
        "P21001_MATCHER",
        "IP_USN_MATCHER",
        "IP_ESHN_MATCHER"
    )

    for matcher_name in matchers:
        DocRequisitiesStorage.add_field_matcher(data[matcher_name]['doc_name'], data[matcher_name])

    bd = dict(
        batch_type=DocumentBatchTypeEnum.DBT_NEW_IP,
        doc_types=[
            DocumentTypeEnum.DT_P21001,
            DocumentTypeEnum.DT_IP_STATE_DUTY,
            DocumentTypeEnum.DT_IP_DOV_FILING_DOCS,
            DocumentTypeEnum.DT_IP_DOV_RECEIVING_DOCS,
            DocumentTypeEnum.DT_IP_DOV_FILING_RECEIVING_DOCS,
            DocumentTypeEnum.DT_IP_USN_CLAIM,
            DocumentTypeEnum.DT_IP_ESHN_CLAIM,
            DocumentTypeEnum.DT_IP_LETTER_INVENTORY
        ],
        result_fields=data['IP_REG_RESULT_FIELDS'],
        deferred_render_docs=data['IP_REG_DEFER_DOCS'],
        fields=data['IP_REG_BATCH_SCHEMA']["fields"]
    )

    DocRequisitiesStorage.add_batch_descriptor(DocumentBatchTypeEnum.DBT_NEW_IP, bd)
Esempio n. 3
0
def _init_doc_requisities(config):
    from services.test_svc.documents.db_data import load_data
    data = load_data(config)

    templates = (
        "TEST_DOC_1_TEMPLATE",
        "TEST_DOC_2_TEMPLATE",
        "TEST_DOC_3_TEMPLATE",
    )

    for template_name in templates:
        DocRequisitiesStorage.add_template(data[template_name]['doc_name'], data[template_name])

    schemas = (
        "TEST_BATCH_SCHEMA",
        "TEST_DOC_3_SCHEMA",
        "TEST_DOC_2_SCHEMA",
        "TEST_DOC_1_SCHEMA"
    )

    for schema_name in schemas:
        DocRequisitiesStorage.add_schema(data[schema_name]['doc_name'], data[schema_name])

    matchers = (
        "TEST_DOC_1_MATCHER",
    )

    for matcher_name in matchers:
        DocRequisitiesStorage.add_field_matcher(data[matcher_name]['doc_name'], data[matcher_name])

    bd = dict(
        batch_type=DocumentBatchTypeEnum.DBT_TEST_TYPE,
        doc_types=[
            DocumentTypeEnum.DT_TEST_DOC_1,
            DocumentTypeEnum.DT_TEST_DOC_2,
            DocumentTypeEnum.DT_TEST_DOC_3
        ],
        result_fields=data['TEST_BATCH_RESULT_FIELDS'],
        deferred_render_docs=data['TEST_BATCH_DEFER_DOCS'],
        transitions=data['TEST_BATCH_TRANSITIONS'],
        actions=data['TEST_BATCH_ACTIONS'],
        initial_status="new",
        statuses=["new", "finalisation", "finalised", "edited"],
        fields=data["TEST_BATCH_SCHEMA"]['fields']
    )

    DocRequisitiesStorage.add_batch_descriptor(DocumentBatchTypeEnum.DBT_TEST_TYPE, bd)
Esempio n. 4
0
def _init_doc_requisities(config):
    from services.ip_reg.documents.initial_db_data_ip import load_data
    data = load_data(config)

    templates = ("P21001_TEMPLATE", "IP_DOV_FILING_TEMPLATE",
                 "IP_DOV_RECEIVING_TEMPLATE",
                 "IP_DOV_FILING_RECEIVING_TEMPLATE",
                 "IP_LETTER_INVENTORY_TEMPLATE", "IP_USN_TEMPLATE",
                 "IP_ESHN_TEMPLATE")

    for template_name in templates:
        DocRequisitiesStorage.add_template(data[template_name]['doc_name'],
                                           data[template_name])

    schemas = ("P21001_SCHEMA", "IP_REG_BATCH_SCHEMA", "IP_STATE_DUTY_SCHEMA",
               "IP_DOV_FILING_SCHEMA", "IP_DOV_RECEIVING_SCHEMA",
               "IP_DOV_FILING_RECEIVING_SCHEMA", "IP_LETTER_INVENTORY_SCHEMA",
               "IP_USN_SCHEMA", "IP_ESHN_SCHEMA")

    for schema_name in schemas:
        DocRequisitiesStorage.add_schema(data[schema_name]['doc_name'],
                                         data[schema_name])

    matchers = ("P21001_MATCHER", "IP_USN_MATCHER", "IP_ESHN_MATCHER")

    for matcher_name in matchers:
        DocRequisitiesStorage.add_field_matcher(data[matcher_name]['doc_name'],
                                                data[matcher_name])

    bd = dict(batch_type=DocumentBatchTypeEnum.DBT_NEW_IP,
              doc_types=[
                  DocumentTypeEnum.DT_P21001,
                  DocumentTypeEnum.DT_IP_STATE_DUTY,
                  DocumentTypeEnum.DT_IP_DOV_FILING_DOCS,
                  DocumentTypeEnum.DT_IP_DOV_RECEIVING_DOCS,
                  DocumentTypeEnum.DT_IP_DOV_FILING_RECEIVING_DOCS,
                  DocumentTypeEnum.DT_IP_USN_CLAIM,
                  DocumentTypeEnum.DT_IP_ESHN_CLAIM,
                  DocumentTypeEnum.DT_IP_LETTER_INVENTORY
              ],
              result_fields=data['IP_REG_RESULT_FIELDS'],
              deferred_render_docs=data['IP_REG_DEFER_DOCS'],
              fields=data['IP_REG_BATCH_SCHEMA']["fields"])

    DocRequisitiesStorage.add_batch_descriptor(
        DocumentBatchTypeEnum.DBT_NEW_IP, bd)
Esempio n. 5
0
def _init_doc_requisities(config):
    from services.test_svc.documents.db_data import load_data
    data = load_data(config)

    templates = (
        "TEST_DOC_1_TEMPLATE",
        "TEST_DOC_2_TEMPLATE",
        "TEST_DOC_3_TEMPLATE",
    )

    for template_name in templates:
        DocRequisitiesStorage.add_template(data[template_name]['doc_name'],
                                           data[template_name])

    schemas = ("TEST_BATCH_SCHEMA", "TEST_DOC_3_SCHEMA", "TEST_DOC_2_SCHEMA",
               "TEST_DOC_1_SCHEMA")

    for schema_name in schemas:
        DocRequisitiesStorage.add_schema(data[schema_name]['doc_name'],
                                         data[schema_name])

    matchers = ("TEST_DOC_1_MATCHER", )

    for matcher_name in matchers:
        DocRequisitiesStorage.add_field_matcher(data[matcher_name]['doc_name'],
                                                data[matcher_name])

    bd = dict(batch_type=DocumentBatchTypeEnum.DBT_TEST_TYPE,
              doc_types=[
                  DocumentTypeEnum.DT_TEST_DOC_1,
                  DocumentTypeEnum.DT_TEST_DOC_2,
                  DocumentTypeEnum.DT_TEST_DOC_3
              ],
              result_fields=data['TEST_BATCH_RESULT_FIELDS'],
              deferred_render_docs=data['TEST_BATCH_DEFER_DOCS'],
              transitions=data['TEST_BATCH_TRANSITIONS'],
              actions=data['TEST_BATCH_ACTIONS'],
              initial_status="new",
              statuses=["new", "finalisation", "finalised", "edited"],
              fields=data["TEST_BATCH_SCHEMA"]['fields'])

    DocRequisitiesStorage.add_batch_descriptor(
        DocumentBatchTypeEnum.DBT_TEST_TYPE, bd)
Esempio n. 6
0
def _init_doc_requisities(config):
    from services.osago.documents.initial_db_data import load_data
    data = load_data(config)

    templates = (
        "OSAGO_MAIL_LIST_TEMPLATE",
        "OSAGO_PRETENSION_TEMPLATE",
        "OSAGO_DOCUMENTS_CLAIM_TEMPLATE",
        "OSAGO_TRUST_SUBMISSION_DOCS_TEMPLATE",
        "OSAGO_TRUST_OBTAIN_DOCS_TEMPLATE",
        "OSAGO_TRUST_SUBMISION_OBTAIN_DOCS_TEMPLATE",
        "OSAGO_CLAIM_COURT_ABSENT_TEMPLATE",
        "OSAGO_CLAIM_ALL_EXECUTION_ACT_TEMPLATE",
        "OSAGO_CLAIM_GUILTY_EXECUTION_ACT_TEMPLATE",
        "OSAGO_CLAIM_INSURANCE_EXECUTION_ACT_TEMPLATE",
        "OSAGO_LAWSUIT_TEMPLATE",
        "OSAGO_OSAGO_COURT_MAIL_LIST_TEMPLATE"
    )

    for template_name in templates:
        DocRequisitiesStorage.add_template(data[template_name]['doc_name'], data[template_name])

    schemas = (
        "OSAGO_SCHEMA",
        "OSAGO_MAIL_LIST_SCHEMA",
        "OSAGO_PRETENSION_SCHEMA",
        "OSAGO_DOCUMENTS_CLAIM_SCHEMA",
        "OSAGO_TRUST_SUBMISSION_DOCS_SCHEMA",
        "OSAGO_TRUST_OBTAIN_DOCS_SCHEMA",
        "OSAGO_TRUST_SUBMISION_OBTAIN_DOCS_SCHEMA",
        "OSAGO_CLAIM_COURT_ABSENT_SCHEMA",
        "OSAGO_CLAIM_ALL_EXECUTION_ACT_SCHEMA",
        "OSAGO_CLAIM_GUILTY_EXECUTION_ACT_SCHEMA",
        "OSAGO_CLAIM_INSURANCE_EXECUTION_ACT_SCHEMA",
        "OSAGO_LAWSUIT_SCHEMA",
        "OSAGO_OSAGO_COURT_MAIL_LIST_SCHEMA"
    )

    for schema_name in schemas:
        DocRequisitiesStorage.add_schema(data[schema_name]['doc_name'], data[schema_name])

    bd = dict(
        batch_type=DocumentBatchTypeEnum.DBT_OSAGO,
        doc_types=[
            DocumentTypeEnum.DT_OSAGO_MAIL_LIST,
            DocumentTypeEnum.DT_OSAGO_PRETENSION,
            DocumentTypeEnum.DT_OSAGO_DOCUMENTS_CLAIM,
            DocumentTypeEnum.DT_OSAGO_TRUST_SUBMISSION_DOCS,
            DocumentTypeEnum.DT_OSAGO_TRUST_OBTAIN_DOCS,
            DocumentTypeEnum.DT_OSAGO_TRUST_SUBMISION_OBTAIN_DOCS,

            DocumentTypeEnum.DT_OSAGO_CLAIM_COURT_ABSENT,
            DocumentTypeEnum.DT_OSAGO_CLAIM_ALL_EXECUTION_ACT,
            DocumentTypeEnum.DT_OSAGO_CLAIM_GUILTY_EXECUTION_ACT,
            DocumentTypeEnum.DT_OSAGO_CLAIM_INSURANCE_EXECUTION_ACT,
            DocumentTypeEnum.DT_OSAGO_LAWSUIT,
            DocumentTypeEnum.DT_OSAGO_COURT_MAIL_LIST
        ],
        result_fields=data['OSAGO_RESULT_FIELDS'],
        fields=data['OSAGO_SCHEMA']['fields'],
        initial_status='pretension',
        actions=data['OSAGO_ACTIONS'],
        transitions=data['OSAGO_TRANSITIONS'],
        validation_condition=data['VALIDATION_CONDITION'],
        fixed_on_states=['generating_pretension', 'generating_claim']
    )

    DocRequisitiesStorage.add_batch_descriptor(DocumentBatchTypeEnum.DBT_OSAGO, bd)
Esempio n. 7
0
def _init_doc_requisities(config):
    from services.llc_reg.documents.initial_db_data import load_data
    from services.llc_reg.documents.third_stage_llc_reg_initial_db_data import load_data as third_stage_load_data
    data = load_data(config)
    data.update(third_stage_load_data(config))

    templates = (
        "P11001_TEMPLATE", "ARTICLES_TEMPLATE", "ACT_TEMPLATE", "USN_TEMPLATE",
        "ESHN_TEMPLATE", "DECISION_TEMPLATE", "CONTRACT_TEMPLATE",
        "DOVERENNOST_TEMPLATE", "DOVERENNOST_OBTAIN_TEMPLATE",
        "PROTOCOL_TEMPLATE", "SOGLASIE_SOBSTVENNIKOV_TEMPLATE",
        "GARANT_LETTER_ARENDA_TEMPLATE", "GARANT_LETTER_SUBARENDA_TEMPLATE",
        "GENERAL_MANAGER_CONTRACT_TEMPLATE", "GENERAL_MANAGER_ORDER_TEMPLATE",
        "ACCOUNTANT_CONTRACT_TEMPLATE", "ACCOUNTANT_IMPOSITION_ORDER_TEMPLATE",
        "ACCOUNTANT_ORDER_TEMPLATE", "ROSSTAT_CLAIM_TEMPLATE",
        "FSS_CLAIM_TEMPLATE", "PFR_CLAIM_TEMPLATE", "FOUNDERS_LIST_TEMPLATE",
        "COMPANY_DETAILS_TEMPLATE")

    for template_name in templates:
        DocRequisitiesStorage.add_template(data[template_name]['doc_name'],
                                           data[template_name])

    schemas = ("P11001_SCHEMA", "ARTICLES_SCHEMA", "ACT_SCHEMA", "USN_SCHEMA",
               "ESHN_SCHEMA", "DECISION_SCHEMA", "PROTOCOL_SCHEMA",
               "CONTRACT_SCHEMA", "REG_FEE_INVOICE_SCHEMA",
               "DOVERENNOST_SCHEMA", "DOVERENNOST2_SCHEMA",
               "SOGLASIE_SOBSTVENNIKOV_SCHEMA", "GARANT_LETTER_ARENDA_SCHEMA",
               "GARANT_LETTER_SUBARENDA_SCHEMA", "LLC_REG_BATCH_SCHEMA",
               "OOO_BANK_PARTNER_APPLICATION_SCHEMA",
               "GENERAL_MANAGER_CONTRACT_SCHEMA",
               "GENERAL_MANAGER_ORDER_SCHEMA", "ACCOUNTANT_CONTRACT_SCHEMA",
               "ACCOUNTANT_IMPOSITION_ORDER_SCHEMA", "ACCOUNTANT_ORDER_SCHEMA",
               "ROSSTAT_CLAIM_SCHEMA", "FSS_CLAIM_SCHEMA", "PFR_CLAIM_SCHEMA",
               "FOUNDERS_LIST_SCHEMA", "COMPANY_DETAILS_SCHEMA")

    for schema_name in schemas:
        DocRequisitiesStorage.add_schema(data[schema_name]['doc_name'],
                                         data[schema_name])

    matchers = ("P11001_MATCHER", "USN_MATCHER", "ESHN_MATCHER",
                "ACCOUNTANT_ORDER_MATCHER")

    for matcher_name in matchers:
        DocRequisitiesStorage.add_field_matcher(data[matcher_name]['doc_name'],
                                                data[matcher_name])

    bd = dict(
        batch_type=DocumentBatchTypeEnum.DBT_NEW_LLC,
        doc_types=[
            DocumentTypeEnum.DT_P11001, DocumentTypeEnum.DT_ARTICLES,
            DocumentTypeEnum.DT_USN, DocumentTypeEnum.DT_DECISION,
            DocumentTypeEnum.DT_PROTOCOL, DocumentTypeEnum.DT_ESHN,
            DocumentTypeEnum.DT_CONTRACT,
            DocumentTypeEnum.DT_REGISTRATION_FEE_INVOICE,
            DocumentTypeEnum.DT_DOVERENNOST,
            DocumentTypeEnum.DT_DOVERENNOST_OBTAIN,
            DocumentTypeEnum.DT_SOGLASIE_SOBSTVENNIKOV,
            DocumentTypeEnum.DT_GARANT_LETTER_ARENDA,
            DocumentTypeEnum.DT_GARANT_LETTER_SUBARENDA,
            DocumentTypeEnum.DT_GENERAL_MANAGER_CONTRACT,
            DocumentTypeEnum.DT_GENERAL_MANAGER_ORDER,
            DocumentTypeEnum.DT_ACCOUNTANT_CONTRACT,
            DocumentTypeEnum.DT_ACCOUNTANT_IMPOSITION_ORDER,
            DocumentTypeEnum.DT_ACCOUNTANT_ORDER,
            DocumentTypeEnum.DT_ROSSTAT_CLAIM, DocumentTypeEnum.DT_FSS_CLAIM,
            DocumentTypeEnum.DT_PFR_CLAIM, DocumentTypeEnum.DT_FOUNDERS_LIST,
            DocumentTypeEnum.DT_COMPANY_DETAILS
        ],
        result_fields=data['LLC_REG_RESULT_FIELDS'],
        deferred_render_docs=data['LLC_REG_DEFER_DOCS'],
        fields=data['LLC_REG_BATCH_SCHEMA']['fields'])

    DocRequisitiesStorage.add_batch_descriptor(
        DocumentBatchTypeEnum.DBT_NEW_LLC, bd)