From e1b330b1a024aec9d04dc2d266f8ee0b97cc1c34 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Thu, 22 Sep 2022 16:58:09 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=D0=B8=20=D0=BD=D0=BE=D0=B2=D0=BE=D0=B5=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D0=B5=20selectLeasingWithoutKasko?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Sections/sectionsList.ts | 1 + .../Calculation/Elements/components.ts | 1 + .../Containers/Calculation/Elements/titles.ts | 1 + .../Containers/Calculation/Elements/values.ts | 1 + .../Containers/Calculation/types/elements.ts | 1 + .../CalculationStore/config/initialValues.ts | 1 + .../stores/CalculationStore/init/variables.ts | 1 + .../query/options/main_options.graphql | 13 +++++++ .../CrmService/graphql/schema.graphql | 37 ++++++++++++------- .../services/CrmService/types/entities.ts | 1 + src/core/types/Calculation/Store/values.ts | 1 + 11 files changed, 45 insertions(+), 14 deletions(-) diff --git a/src/client/Containers/Calculation/Components/Sections/sectionsList.ts b/src/client/Containers/Calculation/Components/Sections/sectionsList.ts index 36bb55b..c11507c 100644 --- a/src/client/Containers/Calculation/Components/Sections/sectionsList.ts +++ b/src/client/Containers/Calculation/Components/Sections/sectionsList.ts @@ -284,6 +284,7 @@ const sections: ISection[] = [ 'selectLeaseObjectCategory', 'tbxLeaseObjectMotorPower', 'tbxEngineVolume', + 'selectLeasingWithoutKasko', ], }, { diff --git a/src/client/Containers/Calculation/Elements/components.ts b/src/client/Containers/Calculation/Elements/components.ts index 27da392..27e9f9e 100644 --- a/src/client/Containers/Calculation/Elements/components.ts +++ b/src/client/Containers/Calculation/Elements/components.ts @@ -144,6 +144,7 @@ export default { labelIrrInfo: Label, labelRegistrationDescription: Label, labelImportProgramSum: Label, + selectLeasingWithoutKasko: Select, /** Result Elements */ labelResultTotalGraphwithNDS: Label, diff --git a/src/client/Containers/Calculation/Elements/titles.ts b/src/client/Containers/Calculation/Elements/titles.ts index 6e0a107..8367d67 100644 --- a/src/client/Containers/Calculation/Elements/titles.ts +++ b/src/client/Containers/Calculation/Elements/titles.ts @@ -130,6 +130,7 @@ export const elementsTitles: Partial> = { labelImportProgramSum: 'Скидка от производителя, руб., с НДС', tbxAddEquipmentPrice: 'Стоимость доп.оборудования', tbxVIN: 'VIN', + selectLeasingWithoutKasko: 'Лизинг без КАСКО', /** Result Elements */ labelResultTotalGraphwithNDS: 'Итого по графику, с НДС', diff --git a/src/client/Containers/Calculation/Elements/values.ts b/src/client/Containers/Calculation/Elements/values.ts index d1a63f0..3eda07c 100644 --- a/src/client/Containers/Calculation/Elements/values.ts +++ b/src/client/Containers/Calculation/Elements/values.ts @@ -136,6 +136,7 @@ const elementsValues: Record = { selectImportProgram: 'importProgram', tbxAddEquipmentPrice: 'addEquipmentPrice', tbxVIN: 'vin', + selectLeasingWithoutKasko: 'leasingWithoutKasko', /** Result Elements */ labelResultTotalGraphwithNDS: 'resultTotalGraphwithNDS', diff --git a/src/client/Containers/Calculation/types/elements.ts b/src/client/Containers/Calculation/types/elements.ts index 598a760..7259059 100644 --- a/src/client/Containers/Calculation/types/elements.ts +++ b/src/client/Containers/Calculation/types/elements.ts @@ -123,6 +123,7 @@ export type ElementsNames = | 'tbxVATInLeaseObjectPrice' | 'tbxAddEquipmentPrice' | 'tbxVIN' + | 'selectLeasingWithoutKasko' /** Result Elements */ | 'labelResultTotalGraphwithNDS' | 'labelResultPlPrice' diff --git a/src/client/stores/CalculationStore/config/initialValues.ts b/src/client/stores/CalculationStore/config/initialValues.ts index 209452c..7085736 100644 --- a/src/client/stores/CalculationStore/config/initialValues.ts +++ b/src/client/stores/CalculationStore/config/initialValues.ts @@ -94,5 +94,6 @@ const initialValues: Partial> = { legalClientTown: null, infuranceOPF: null, addEquipmentPrice: 0, + leasingWithoutKasko: null, }; export default initialValues; diff --git a/src/client/stores/CalculationStore/init/variables.ts b/src/client/stores/CalculationStore/init/variables.ts index b2a26ec..59bb579 100644 --- a/src/client/stores/CalculationStore/init/variables.ts +++ b/src/client/stores/CalculationStore/init/variables.ts @@ -15,6 +15,7 @@ export const mainOptionsVariables: telematic_product_type: 100000004, techcard_product_type: 100000000, fuelcard_product_type: 100000005, + leasing_without_kasko_product_type: 100000007, }; export const insuranceVariables: Partial> = { diff --git a/src/core/services/CrmService/graphql/query/options/main_options.graphql b/src/core/services/CrmService/graphql/query/options/main_options.graphql index c99ee71..73d79d4 100644 --- a/src/core/services/CrmService/graphql/query/options/main_options.graphql +++ b/src/core/services/CrmService/graphql/query/options/main_options.graphql @@ -13,6 +13,7 @@ query GetMainOptions( $telematic_product_type: Int $fuelcard_product_type: Int $techcard_product_type: Int + $leasing_without_kasko_product_type: Int ) { selectSupplierCurrency: transactioncurrencies(statecode: $statecode) { transactioncurrencyid @@ -296,4 +297,16 @@ query GetMainOptions( } evo_subsidy_type } + selectLeasingWithoutKasko: evo_addproduct_types( + statecode: $statecode + evo_product_type: $leasing_without_kasko_product_type + evo_datefrom_param: { lte: $currentDate } + evo_dateto_param: { gte: $currentDate } + ) { + ...evo_addproduct_types_fields + evo_leasingobject_types { + evo_leasingobject_typeid + } + evo_visible_calc + } } diff --git a/src/core/services/CrmService/graphql/schema.graphql b/src/core/services/CrmService/graphql/schema.graphql index c310c4b..dc9dd33 100644 --- a/src/core/services/CrmService/graphql/schema.graphql +++ b/src/core/services/CrmService/graphql/schema.graphql @@ -50,7 +50,7 @@ type Query { account(accountid: Uuid!): account """Контрагенты. statecode по умолчанию 0""" - accounts(evo_accnumber: String, evo_account_type: [Int!], evo_agency_agreementid: Uuid, evo_broker_accountid: Uuid, evo_fin_department_accountid: Uuid, evo_id_elt: String, evo_inn: String, evo_inn_param: StringParamInput, evo_kpp: String, evo_kpp_param: StringParamInput, evo_legal_form: Int, evo_type_ins_policy: [Int!], name: String, ownerid: Uuid, owner_domainname: String, statecode: Int): [account] + accounts(evo_accnumber: String, evo_account_type: [Int!], evo_agency_agreementid: Uuid, evo_broker_accountid: Uuid, evo_fin_department_accountid: Uuid, evo_id_elt: String, evo_inn: String, evo_inn_param: StringParamInput, evo_kpp: String, evo_kpp_param: StringParamInput, evo_legal_form: Int, evo_type_ins_policy: [Int!], ownerid: Uuid, owner_domainname: String, statecode: Int): [account] """Брокер. statecode по умолчанию 0""" broker_agents(ownnerid: Uuid!, statecode: Int): [account] @@ -68,7 +68,7 @@ type Query { evo_baseproduct(evo_baseproductid: Uuid!): evo_baseproduct evo_baseproducts(evo_datefrom_param: DateParamInput, evo_dateto_param: DateParamInput, evo_relation: [Int!], statecode: Int): [evo_baseproduct] evo_brand(evo_brandid: Uuid!): evo_brand - evo_brands(evo_name: String, evo_vehicle_type: [Int!], statecode: Int): [evo_brand] + evo_brands(evo_vehicle_type: [Int!], statecode: Int): [evo_brand] evo_businessunits(statecode: Int): [evo_businessunit] evo_client_risks(statecode: Int): [evo_client_risk] evo_client_types(statecode: Int): [evo_client_type] @@ -96,7 +96,7 @@ type Query { evo_leasingobject_type(evo_leasingobject_typeid: Uuid!): evo_leasingobject_type evo_leasingobject_types(statecode: Int): [evo_leasingobject_type] evo_model(evo_modelid: Uuid!): evo_model - evo_models(evo_brandid: Uuid, evo_name: String, evo_vehicle_type: Int, statecode: Int): [evo_model] + evo_models(evo_brandid: Uuid, evo_vehicle_type: Int, statecode: Int): [evo_model] evo_orglegalform(evo_orglegalformid: Uuid!): evo_orglegalform evo_orglegalforms(statecode: Int = 0): [evo_orglegalform] evo_paymentorders(evo_dds_1c: String, evo_name: String, evo_paydate_param: DateParamInput, evo_payment_number_1c: String, evo_paysum: Decimal, statecode: Int, statuscode: Int): [evo_paymentorder] @@ -183,6 +183,10 @@ type evo_request_client { evo_owner_systemuseridData: systemuser evo_phonecallid: Uuid evo_request_clientid: Uuid + evo_site_email: String + evo_site_name: String + evo_site_telephone: String + evo_site_text: String evo_statuscodeid: Uuid evo_statuscodeidData: evo_statuscode evo_storage: String @@ -258,6 +262,7 @@ type incidentGraphQL { evo_accountid_new: Uuid evo_cession_opportunityid: Uuid evo_contracts: [evo_contract] + evo_creat_request_client: Uuid evo_fast_advice: Boolean evo_plan_execut_date: DateTime evo_statuscodeid: Uuid @@ -415,7 +420,6 @@ type account { evo_ifns_code_branch: String evo_ifns_name: String evo_inn: String - evo_insurance_agent_accountid: Uuid evo_invoice_number_fix: String evo_invoice_number_rules: Int evo_kpp: String @@ -444,7 +448,6 @@ type account { evo_state_liquidation_date: DateTime evo_state_registration_date: DateTime evo_state_status: Int - evo_storage: String evo_subsidies(statecode: Int): [evo_subsidy] evo_supplier_type: Int evo_tax_system: Int @@ -544,6 +547,7 @@ type evo_addproduct_type { evo_description: String evo_equipment_1_name: String evo_equip_cost: Decimal + evo_evokasko_calc_type: Int evo_gibdd_region: Boolean evo_graph_price: Decimal evo_graph_price_withoutnds: Decimal @@ -606,7 +610,6 @@ type evo_graph { evo_cost_price_telematics_withoutnds_sum: Decimal evo_cost_telematics_sum: Decimal evo_cost_telematics_withoutnds_sum: Decimal - evo_graf_date_approve: DateTime evo_graphid: Uuid evo_name: String evo_nds: Decimal @@ -635,6 +638,7 @@ type evo_insurance_period { evo_dateto: DateTime evo_dgo_price: Decimal evo_elt_id: String + evo_evokasko_price: Decimal evo_exp_drivers: Int evo_franchise: Decimal evo_id: String @@ -702,6 +706,9 @@ type evo_addproduct { evo_addproductnumberidData: evo_addproductnumber evo_addproduct_typeid: Uuid evo_addproduct_typeidData: evo_addproduct_type + evo_beacon1_imei: String + evo_beacon2_imei: String + evo_connect_telematics_evo_addproductid: Uuid evo_contractid: Uuid evo_cs_actualdate: DateTime evo_date_instal: DateTime @@ -783,7 +790,6 @@ type evo_leasingobject { evo_color: String evo_contractid: Uuid evo_create_contract_purchase: Boolean - evo_date_withdrawal: DateTime evo_delivery_time: Int evo_driving_axle: String evo_ecological_class: Int @@ -1035,6 +1041,7 @@ type quote { evo_agent_accountid: Uuid evo_agent_reward_conditionid: Uuid evo_agent_reward_summ: Decimal + evo_agent_reward_tech: Decimal evo_agent_reward_total: Decimal evo_age_drivers: Int evo_another_payments: Decimal @@ -1048,6 +1055,7 @@ type quote { evo_broker_accountid: Uuid evo_broker_reward_conditionid: Uuid evo_broker_reward_summ: Decimal + evo_broker_reward_tech: Decimal evo_broker_reward_total: Decimal evo_calc_irr: Decimal evo_calc_profit: Decimal @@ -1070,8 +1078,10 @@ type quote { evo_dealer_broker_accountid: Uuid evo_dealer_broker_reward_conditionid: Uuid evo_dealer_broker_reward_summ: Decimal + evo_dealer_broker_reward_tech: Decimal evo_dealer_broker_reward_total: Decimal evo_dealer_person_accountid: Uuid + evo_dealer_person_reward_tech: Decimal evo_dealer_reward_conditionid: Uuid evo_dealer_reward_summ: Decimal evo_dealer_reward_total: Decimal @@ -1093,6 +1103,7 @@ type quote { evo_double_agent_accountid: Uuid evo_double_agent_reward_conditionid: Uuid evo_double_agent_reward_summ: Decimal + evo_double_agent_reward_tech: Decimal evo_double_agent_reward_total: Decimal evo_economic: Decimal evo_economic_with_nds: Decimal @@ -1102,6 +1113,9 @@ type quote { evo_equipmentid: Uuid evo_equip_price: Decimal evo_equity_capital: Decimal + evo_evokasko_insurer_accountid: Uuid + evo_evokasko_insurer_accountidData: account + evo_evokasko_price: Decimal evo_exp_drivers: Int evo_fingap_accountid: Uuid evo_fingap_bonus_sum: Decimal @@ -1112,6 +1126,7 @@ type quote { evo_fin_department_accountid: Uuid evo_fin_department_reward_conditionid: Uuid evo_fin_department_reward_summ: Decimal + evo_fin_department_reward_tech: Decimal evo_fin_department_reward_total: Decimal evo_first_dgo_price: Decimal evo_first_kasko_accountid: Uuid @@ -1543,7 +1558,6 @@ type evo_request_payment { evo_finegibddidData: evo_finegibdd evo_id: String evo_inn: String - evo_insurance_addcontractid: Uuid evo_insurance_periodid: Uuid evo_insurance_policyid: Uuid evo_insurance_policyidData: evo_insurance_policy @@ -1656,7 +1670,6 @@ type evo_contract { evo_debt_penalty_fee: Decimal evo_debt_total: Decimal evo_delay_days_count: Int - evo_delay_period: DateTime evo_director_bonus: Decimal evo_director_fingap_bonus: Decimal evo_director_nsib_bonus: Decimal @@ -1732,7 +1745,6 @@ type evo_contract { evo_name: String evo_nds_in_price_supplier_currency: Decimal evo_nds_perc: Decimal - evo_nearest_payment_num: String evo_net_irr: Decimal evo_niatinception_msfo: Decimal evo_niatinception_msfo_actual: Decimal @@ -1760,7 +1772,6 @@ type evo_contract { evo_rate: Decimal evo_rateid: Uuid evo_reason_change_account: Int - evo_redemption_archive_date: DateTime evo_ref_opportunityid: Uuid evo_region_director_bonus: Decimal evo_region_director_fingap_bonus: Decimal @@ -2293,7 +2304,6 @@ type evo_addcontract { evo_date_addcontract: DateTime evo_date_calculation_done: DateTime evo_date_offset_change: Boolean - evo_date_offset_type: Int evo_deadline_date: DateTime evo_dealer_broker_accountid: Uuid evo_dealer_broker_accountid_new: Uuid @@ -2313,7 +2323,6 @@ type evo_addcontract { evo_dealer_person_reward_summ_new: Decimal evo_deviation_investments_withoutnds: Decimal evo_deviation_irr: Decimal - evo_deviation_irr_change: Boolean evo_dgo_price: Decimal evo_dgo_price_new: Decimal evo_director_bonus: Decimal @@ -2550,12 +2559,12 @@ type email { evo_accountid: Uuid modifiedon: DateTime regardingobjectid_account: Uuid - regardingobjectid_evo_addcontract: Uuid regardingobjectid_evo_contract: Uuid regardingobjectid_evo_insurance_period: Uuid regardingobjectid_evo_insurance_policy: Uuid regardingobjectid_evo_insurance_policyData: evo_insurance_policy regardingobjectid_evo_list: Uuid + regardingobjectid_incident: Uuid regardingobjectid_opportunity: Uuid statuscode: Int subject: String diff --git a/src/core/services/CrmService/types/entities.ts b/src/core/services/CrmService/types/entities.ts index 89a8b15..9c97126 100644 --- a/src/core/services/CrmService/types/entities.ts +++ b/src/core/services/CrmService/types/entities.ts @@ -402,6 +402,7 @@ export interface IEvoAddproductType extends BaseEntity { evo_gibdd_region?: boolean; evo_type_calc_cerebellum?: number; evo_addproduct_types?: IEvoAddproductType[]; + evo_evokasko_calc_type?: number; } export interface IEvoTarif extends BaseEntity { diff --git a/src/core/types/Calculation/Store/values.ts b/src/core/types/Calculation/Store/values.ts index a330754..d9f967e 100644 --- a/src/core/types/Calculation/Store/values.ts +++ b/src/core/types/Calculation/Store/values.ts @@ -119,6 +119,7 @@ export type ValuesNames = | 'fuelCard' | 'minPriceChange' | 'vin' + | 'leasingWithoutKasko' | 'resultTotalGraphwithNDS' | 'resultPlPrice' | 'resultPriceUpPr'