Order processing method and device, equipment and medium
Through the calculation rules of automatic matching and calculating orders, the problems of low accuracy and high cost when manually calculating commissions are solved, and efficient and accurate order processing and commission settlement are achieved.
Patent Information
- Application Number
- CN202411913571.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-05-30
AI Technical Summary
In the order sales scenario, manual commission calculation is low and costly, especially when product types and sales channels increase.
By obtaining the pending order and its order data, for each pending order, the calculation rules matching the pending order are configured according to the preset rules, and then in different order types (down payment orders and installment orders), the expense data of the pending orders is determined according to the corresponding expense calculation formula, and the expense data corresponding to the personnel information is summarized.
The calculation rules for automatically matching orders are realized, and various orders are handled accurately and efficiently, reducing the accuracy and cost of manual calculations, improving processing efficiency, and able to meet complex commission settlement needs.
Smart Images

Figure CN120070070A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data processing, and particularly to an order processing method, apparatus, device, and medium. Background Art
[0002] In the current order sales scenario, commission rewards are usually given to the personnel of sales orders. For different orders, due to differences in product types, sales channels, etc., and complex situations such as down payments and installments, the commission calculation process is complex.
[0003] Currently, by manually judging the calculation rules applicable to sales orders and performing calculations, with the increase in product types and sales channels, the manual method has low accuracy and high labor costs. Summary of the Invention
[0004] The present disclosure provides an order processing method, apparatus, device, and medium to solve the technical problems of low accuracy and high labor costs in manual commission settlement.
[0005] In a first aspect, an embodiment of the present disclosure provides an order processing method, including:
[0006] Obtaining a to-be-processed order from an order table in a historical specified time period, and obtaining order data corresponding to the to-be-processed order; the order data includes an order number, an order type, and personnel information;
[0007] For each to-be-processed order, determining a calculation rule matching the to-be-processed order according to a preset rule configuration; the calculation rule includes a fee calculation formula;
[0008] When the order type is a down payment order, determining the fee data of the to-be-processed order according to the down payment ratio corresponding to the order number and according to a first fee calculation formula;
[0009] When the order type is an installment order, determining the fee data of the to-be-processed order according to the down payment ratio, the number of installment periods, and the number of payment periods in the historical specified time period corresponding to the order number and according to a second fee calculation formula;
[0010] For each personnel information, determining the fee data corresponding to the personnel information according to the fee data of all to-be-processed orders corresponding to the personnel information.
[0011] In a second aspect, an embodiment of the present disclosure provides an order processing apparatus, including:
[0012] An obtaining module, configured to obtain a to-be-processed order from an order table in a historical specified time period, and obtain order data corresponding to the to-be-processed order; the order data includes an order number, an order type, and personnel information;
[0013] A matching module, configured to determine, for each order to be processed, a calculation rule that matches the order to be processed according to a preset rule configuration; the calculation rule includes a fee calculation formula.
[0014] A first processing module, configured to, when the order type is a down payment order, determine the fee data of the order to be processed according to the down payment ratio corresponding to the order number and in accordance with a first fee calculation formula.
[0015] A second processing module, configured to, when the order type is an installment order, determine the fee data of the order to be processed according to the down payment ratio corresponding to the order number, the number of installments, and the number of payment periods in the historical specified time period, and in accordance with a second fee calculation formula.
[0016] A determination module, configured to determine, for each piece of personnel information, the fee data corresponding to the personnel information according to the fee data of all orders to be processed corresponding to the personnel information.
[0017] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor; a memory for storing executable instructions of the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the order processing method described in the first aspect above.
[0018] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, where the storage medium stores a computer program, and when the computer program is executed by a processor, the order processing method described in the first aspect above is implemented.
[0019] The technical solutions provided by the embodiments of the present disclosure have the following advantages compared with the prior art: By obtaining the order to be processed and its order data, for each order to be processed, a calculation rule matching the order to be processed is determined according to the preset rule configuration. Further, in the case where the order type is a down payment order, according to the down payment ratio corresponding to the order number, the cost data of the order to be processed is determined according to the first cost calculation formula. In the case where the order type is an installment order, according to the down payment ratio, the number of installments, and the number of payment periods in the historical specified time period corresponding to the order number, the cost data of the order to be processed is determined according to the second cost calculation formula. Furthermore, for each personnel information, according to the cost data of all orders to be processed corresponding to the personnel information, the cost data corresponding to the personnel information is determined. Thus, it is possible to automatically match the calculation rules of the orders, determine the cost data for each down payment order and installment order, and then determine the cost data corresponding to the personnel information. In view of the problem that the commission calculation is complex with the increase in product types and sales channels, manual calculation is time-consuming and inaccurate, accurate and efficient order processing is achieved, which has higher accuracy than manual calculation, saves labor costs, improves processing efficiency, and can meet the complex requirements of the commission settlement scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present disclosure and, together with the specification, are used to explain the principles of the present disclosure.
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0022] Figure 1 It is a schematic flowchart of an order processing method provided by an embodiment of the present disclosure;
[0023] Figure 2 It is a schematic diagram of a rule configuration interface provided by an embodiment of the present disclosure;
[0024] Figure 3 It is a schematic flowchart of another order processing method provided by an embodiment of the present disclosure;
[0025] Figure 4 It is a schematic flowchart of another order processing method provided by an embodiment of the present disclosure;
[0026] Figure 5 It is a schematic structural diagram of an order processing device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] To more clearly understand the above objects, features, and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments may be combined with each other.
[0028] In the following description, many specific details are set forth in order to fully understand the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all the embodiments.
[0029] Figure 1 The flowchart of an order processing method provided by an embodiment of the present disclosure can be executed by an order processing device. The device can be implemented by software and / or hardware and can be integrated on any electronic device with computing capabilities.
[0030] As Figure 1 shown, the order processing method provided by an embodiment of the present disclosure may include:
[0031] Step 101, obtain the orders to be processed from the order table in the historical specified time period, and obtain the order data corresponding to the orders to be processed.
[0032] In this embodiment, the database includes an order table, and the orders are recorded in the order table. In the commission settlement scenario, the orders in the historical specified time period are obtained from the order table as the orders to be processed, and the order data corresponding to the orders to be processed is obtained.
[0033] Among them, the order data includes an order number, an order type, and personnel information. The order number is used to distinguish different orders. The order type includes a down payment order and an installment order. The personnel information is used to represent the business personnel corresponding to the order, and the types of personnel information include sales personnel and manager personnel.
[0034] Optionally, the order data further includes an order amount, an order creation time, a payment method, a product type, store information where the order is generated, etc. Among them, the payment method is, for example, full payment, down payment installment, or full installment, etc. The product type represents the type corresponding to the actually sold product, for example, one-year vehicle extended warranty, two-year vehicle extended warranty, etc.
[0035] As an example, the historical specified time period is the last month. The order table includes multiple order records. Order records with the order creation time in the last month are extracted from the order table through Structured Query Language. The extracted dataset contains multiple key fields, including order number, order amount, order creation time, payment method, product type, salesperson name, manager name, and store information. In this example, after the data is extracted, a data transformation step is executed to adjust the data format and perform logical verification to ensure that the data complies with the expected business rules and quality standards. For example, the payment method is standardized and classified, and the product type is encoded. The correctness of the correspondence between the salesperson name and the manager name is verified, etc. Further, after the data extraction and transformation, data loading is performed to load the data into the intermediate table. The above process adopts the ETL (Extract-Transform-Load) mode, which ensures the accuracy and consistency of the data and improves the data availability at the same time.
[0036] Step 102, for each order to be processed, determine the calculation rule matching the order to be processed according to the preset rule configuration.
[0037] In this embodiment, the preset rule configuration includes at least one pre-set calculation rule. The calculation rule is used to calculate the cost data of the order to be processed. The calculation rule includes a cost calculation formula. The cost calculation formula includes, for example, a fixed amount calculation formula and an adjustment coefficient calculation formula according to the calculation method, and includes a salesperson calculation formula and a manager calculation formula according to the personnel information. After obtaining the order to be processed, traverse the orders to be processed one by one, and obtain the calculation rule matching the order to be processed according to the order data.
[0038] As an example, when configuring the preset rules, corresponding calculation rules can be set for different product types, vehicle series configurations, combined order modes, value-added product rules, in-store expense ratios, etc. Furthermore, according to the information such as the product type, vehicle series configuration, combined order mode, value-added product rule, and in-store expense ratio of the order to be processed, a match is made to determine the calculation rule matching the order to be processed from the preset calculation rules. In this example, the cost data of the orders to be processed with different calculation rules can be calculated separately. For example, different product types can be matched with different calculation rules, and the orders of different product types use the corresponding calculation rules to calculate the cost data. Optionally, if the order to be processed matches multiple calculation rules, the first matched calculation rule is used as the calculation rule matching the order to be processed.
[0039] Refer to Figure 2 , Figure 2It is a schematic diagram of a rule configuration interface, which shows the calculation rule configuration. The corresponding calculation rules can be set according to the product type, etc., including the method of determining the adjustment coefficient through single-number conversion or amount conversion under the set calculation rules, and the configuration of the fixed-amount calculation formula and the adjustment coefficient calculation formula.
[0040] Step 103, in the case where the order type is a down payment order, according to the down payment ratio corresponding to the order number, determine the expense data of the order to be processed according to the first expense calculation formula.
[0041] In an embodiment of the present disclosure, when calculating the expense data of the order to be processed, obtain the initial expense data, down payment ratio corresponding to the order number, and obtain the adjustment coefficient. Among them, the initial expense data represents the order profit information. Furthermore, according to the initial expense data, adjustment coefficient, and down payment ratio, calculate the expense data of the order to be processed according to the first expense calculation formula. Among them, the adjustment coefficient can be preset or determined according to the calculation rules. Through the adjustment coefficient, the expense data calculated for the order can be optimized.
[0042] In this embodiment, calculate the expense data of the order to be processed according to the product of the initial expense data, adjustment coefficient, and down payment ratio. Among them, the initial expense data is determined according to the order amount, flexible employment amount, and in-store expense. For example, by calculating the first sum value between the flexible employment amount and the in-store expense, and according to the difference between the order amount and this first sum value, determine the initial expense data. Optionally, the database also includes a flexible employment table and an in-store expense table. The order table is pre-associated with the flexible employment table and the in-store expense table through the order number. During the processing, query the order table according to the order number to obtain the order amount corresponding to the order number, query the flexible employment table according to the order number to obtain the flexible employment amount corresponding to the order number, and query the in-store expense table according to the order number to obtain the in-store expense corresponding to the order number. Thus, when calculating the expense data of the order, relevant cost factors can be automatically obtained, so as to obtain more accurate expense data, reduce labor costs, and improve processing efficiency.
[0043] As an example, the personnel information of the order to be processed includes A and B. The type of personnel information A is a salesperson, and the type of personnel information B is a manager. For personnel information A, the expense data of this order to be processed = (order amount - flexible employment amount - in-store expense) * adjustment coefficient * down payment ratio. For personnel information B, the expense data of this order to be processed = (order amount - flexible employment amount - in-store expense) * adjustment coefficient * manager coefficient * down payment ratio, where the manager coefficient can be preset. In this example, the calculated expense data can be filled into the commission details table in the database.
[0044] In one embodiment of the present disclosure, when calculating the fee data of a to-be-processed order, the initial fee data and the down payment ratio corresponding to the order number are obtained. Furthermore, according to the initial fee data and the down payment ratio, the fee data of the to-be-processed order is calculated according to the first fee calculation formula.
[0045] As an example, taking the fixed amount calculation formula as an example, the fixed amount set in the rule configuration interface in advance is used as the initial fee data. Then the first fee calculation formula is as follows: the fee data of the to-be-processed order = the initial fee data * the down payment ratio.
[0046] Step 104, in the case where the order type is an installment order, according to the down payment ratio, the number of installments, and the number of payment periods in the historical specified time period corresponding to the order number, the fee data of the to-be-processed order is determined according to the second fee calculation formula.
[0047] In one embodiment of the present disclosure, when calculating the fee data of a to-be-processed order, the initial fee data, the down payment ratio, the number of installments, the number of payment periods in the historical specified time period corresponding to the order number are obtained, and an adjustment coefficient is obtained. Furthermore, according to the initial fee data, the adjustment coefficient, the down payment ratio, the number of installments, and the number of payment periods in the historical specified time period, the fee data of the to-be-processed order is calculated according to the second fee calculation formula. Among them, the adjustment coefficient can be set in advance or determined according to the calculation rule.
[0048] In this embodiment, the non-down payment ratio is determined according to the down payment ratio. The ratio between the product of the initial fee data, the adjustment coefficient, and the non-down payment ratio and the number of installments is used to determine the fee data of each installment. The fee data of the to-be-processed order is determined according to the product of the fee data of each installment and the number of payment periods. Among them, the initial fee data is determined according to the order amount, the flexible employment amount, and the in-store fee. For example, by calculating the first sum value between the flexible employment amount and the in-store fee, and according to the difference between the order amount and the first sum value, the initial fee data is determined. Obtaining the initial fee data can refer to the foregoing steps and will not be elaborated here.
[0049] As an example, the personnel information of the to-be-processed order includes A and B. The type of personnel information A is a salesperson, and the type of personnel information B is a manager. For personnel information A, the fee data of the to-be-processed order = (order amount - flexible employment amount - in-store fee) * adjustment coefficient * (1 - down payment ratio) / number of installments * number of payment periods. For personnel information B, the fee data of the to-be-processed order = (order amount - flexible employment amount - in-store fee) * adjustment coefficient * manager coefficient * (1 - down payment ratio) / number of installments * number of payment periods. Among them, the manager coefficient can be set in advance. In this example, the calculated fee data can be filled into the commission detail table in the database.
[0050] In one embodiment of the present disclosure, when calculating the fee data of a pending order, the initial fee data corresponding to the order number, the down payment ratio, the number of installments, and the number of payment periods in a historical specified time period are obtained. Furthermore, according to the initial fee data, the down payment ratio, the number of installments, and the number of payment periods, the fee data of the pending order is calculated according to the second fee calculation formula.
[0051] As an example, taking the fixed amount calculation formula as an example, the fixed amount set in advance in the rule configuration interface is used as the initial fee data, and the fee data of the pending order = initial fee data * (1 - down payment ratio) / number of installments * number of payment periods.
[0052] Step 105, for each personnel information, determine the fee data corresponding to the personnel information according to the fee data of all pending orders corresponding to the personnel information.
[0053] In this embodiment, after determining the fee data for each pending order of each personnel information, the fee data of all pending orders corresponding to the same personnel information are aggregated to obtain the fee data corresponding to the personnel information. After determining the fee data corresponding to each personnel information, it can be used for commission settlement based on this fee data, such as generating a commission detail list for display, or conducting commission payment, etc.
[0054] According to the technical solution of the embodiment of the present disclosure, by obtaining a pending order and its order data, for each pending order, a calculation rule matching the pending order is determined according to a preset rule configuration. Furthermore, in the case where the order type is a down payment order, according to the down payment ratio corresponding to the order number, the fee data of the pending order is determined according to the first fee calculation formula. In the case where the order type is an installment order, according to the down payment ratio, the number of installments, and the number of payment periods in a historical specified time period corresponding to the order number, the fee data of the pending order is determined according to the second fee calculation formula. Further, for each personnel information, the fee data corresponding to the personnel information is determined according to the fee data of all pending orders corresponding to the personnel information. Thus, it is possible to automatically match the calculation rules of the orders, determine the fee data for each down payment order and installment order, and then determine the fee data corresponding to the personnel information. Aiming at the problem that the commission calculation is complex with the increase of product types and sales channels, manual calculation is time-consuming and has low accuracy, accurate and efficient order processing is realized, which has higher accuracy than manual calculation, saves labor costs, improves processing efficiency, and can meet the complex requirements of the commission settlement scenario.
[0055] Based on the above embodiment, the adjustment coefficient can be obtained according to the calculation rule. Before calculating the fee data of the pending order according to the adjustment coefficient, the adjustment coefficient can be obtained. Figure 3 It is a schematic flowchart of another order processing method provided by the embodiment of the present disclosure, asFigure 3 As shown in Figure 3 , in this method, obtaining the adjustment coefficient includes:
[0056] Step 301, when the calculation rule includes a single conversion rule, obtain the converted single number corresponding to the personnel information.
[0057] In this embodiment, the single conversion rule can be set in the rule configuration interface. When the calculation rule includes the single conversion rule, for each personnel information, determine the converted single number of the order to be processed according to the initial cost data of each order to be processed, and then determine the converted single number corresponding to the personnel information based on the converted single numbers of each order to be processed. For example, the sum of the converted single numbers of each order to be processed corresponding to the personnel information within a specified historical time period is used as the converted single number corresponding to the personnel information.
[0058] Among them, the initial cost data is determined according to the order amount, the flexible employment amount, and the in-store cost. The single conversion rule can include the corresponding relationship between the initial cost data and the converted single number. Based on the single conversion rule and the initial cost data of each order to be processed, the converted single number of each order to be processed can be determined.
[0059] In an embodiment of the present disclosure, obtaining the converted single number corresponding to the personnel information includes: for each order to be processed corresponding to the personnel information, if there is an associated product field in the order to be processed, obtain the amount corresponding to the associated product field, and calculate the second sum value between the initial cost data of the order to be processed and the amount corresponding to the associated product field. If the second sum value is greater than the first threshold, determine that the converted single number of the order to be processed is the first single number; if the second sum value is less than the second threshold, determine that the converted single number of the order to be processed is the second single number. Among them, the first threshold is greater than the second threshold, the first single number is greater than 1, and the second single number is less than 1. As an example, the first single number is set to 1.5, and the second single number is set to 0. Thus, the single conversion rule is used as an adjustable parameter, enabling users to set the converted single number corresponding to each order according to their needs, improving the adaptability and scalability of the system.
[0060] In this embodiment, it is determined whether there is an associated product field in the order to be processed. If there is an associated product field, query the corresponding amount according to the coding information of the associated product field, and then determine the converted single number of the order to be processed according to the sum value between the initial cost data and the amount. If there is no associated product field, determine the converted single number of the order to be processed according to the initial cost data. Optionally, the associated product includes value-added products associated with the order. Thus, it is possible to determine whether there is an associated product field in the order to be processed, accurately determine the converted single number of the order to be processed in combination with the amount of the associated product, so as to determine the adjustment coefficient according to the converted single number, meet the requirements of the current commission settlement scenario for the input of the commission ladder interval, solve the problem of complex and time-consuming manual processing, and improve the processing efficiency.
[0061] Step 302: Query the preset first correspondence according to the converted single number, and determine the adjustment coefficient corresponding to the converted single number.
[0062] In this embodiment, the first correspondence is preset, and the first correspondence includes the relationship between the converted single number and the adjustment coefficient.
[0063] As an example, the first correspondence includes: the converted single number in the range [0, 1) corresponds to the first adjustment coefficient, the converted single number in the range [1, 10) corresponds to the second adjustment coefficient, and the converted single number in the range [10, 1000) corresponds to the third adjustment coefficient, and the first adjustment coefficient is less than the second adjustment coefficient and less than the third adjustment coefficient. In this example, for a certain personnel information, according to the converted single number corresponding to the personnel information, the adjustment coefficient corresponding to the personnel information is determined, so as to calculate the cost data of the corresponding order to be processed according to the adjustment coefficient. Thus, the corresponding adjustment coefficient can be automatically determined through the converted single number corresponding to the personnel information, meeting the requirements for the commission ladder interval input in the commission settlement scenario, solving the problem of complex and time-consuming manual processing, and improving the processing efficiency.
[0064] In an embodiment of the present disclosure, data can be cleaned according to different calculation rules, and the data can be stored in slices according to the calculation rules. After the sliced storage, the steps of determining the converted single number, the adjustment coefficient, and calculating the cost data are performed on the data. In this embodiment, the converted single number and the cost data can be respectively determined for the orders to be processed with different calculation rules, so as to meet the requirements for more diverse rules in the commission settlement scenario with the increase in product types and sales channels.
[0065] As an example, the structured query language script is used for data cleaning to ensure the consistency of data format and data integrity, and the built-in string processing functions and logical judgments are used to normalize and verify the data. According to the business requirements and rule configurations, the order data is sliced. For example, through the partitioning function of the database management system, the order data is sliced according to the product type. Different product types can match different calculation rules, and the data of each product type is assigned to the corresponding data partition. By storing the order data of each product type separately, it is convenient for independent processing and calculation, improving the data access efficiency.
[0066] In an embodiment of the present disclosure, there is a situation where a user requests a refund after an order is created. When determining the converted order quantity, the method further includes: for each personnel information, obtaining the refund orders that have been refunded within a historical specified time period. If the order start time of the refund order is within the historical specified time period, the refund order is excluded from the orders to be processed; if the order start time of the refund order is not within the historical specified time period, obtaining the historical converted order quantity corresponding to the refund order, and combining the opposite of the historical converted order quantity corresponding to the refund order with the converted order quantity corresponding to the personnel information.
[0067] In this embodiment, the orders to be processed are orders within a historical specified time period. However, in actual applications, there are cases where an order is refunded in the same month or a refund occurs during the process of an installment order that has not been completed. For a refund order whose status has changed to a refund status within the historical specified time period, obtain the order start time of the refund order. The order start time can be the earliest order creation time corresponding to the order number of the refund order. If the order start time is within the historical specified time period, before obtaining the converted order quantity corresponding to the personnel information, the refund order is excluded from the orders to be processed. If the order start time is not within the historical specified time period, obtain the corresponding historical converted order quantity according to the order number of the refund order. The historical converted order quantity of the refund order can be determined and recorded during historical commission settlement. Then, after obtaining the converted order quantity corresponding to the personnel information, combine the opposite of the historical converted order quantity corresponding to the refund order with the converted order quantity corresponding to the personnel information to correct the converted order quantity corresponding to the personnel information, and determine the adjustment coefficient based on the corrected converted order quantity of the personnel information. Thus, it is possible to correct the converted order quantity corresponding to the personnel information this time according to the historical converted order quantity of the refund order, so as to meet the requirement of the commission settlement scenario to avoid inaccurate commission settlement caused by order refunds, solve the problem of complex and time-consuming manual processing, and improve the processing efficiency.
[0068] Further, after determining the adjustment coefficient corresponding to the converted order quantity, the expense data can be calculated according to the method corresponding to the order type based on the adjustment coefficient.
[0069] Optionally, for installment orders, a time series data model can be established to record the installment payment status of each installment through the time series data model. Also, analyze the query pattern and data characteristics to create and adjust indexes, reduce query time, and improve overall performance. Improve data security through access control and data encryption. Use reporting tools or business intelligence systems to display and analyze the calculation results. Through the above technical measures, it is possible to achieve automation, high efficiency, high precision, security and reliability in the process of calculating expense data, and meet the business requirements.
[0070] The following explains the calculation rules including the amount range conversion rules.
[0071] In one embodiment of the present disclosure, when the calculation rule includes an amount range conversion rule, obtain the total order amount corresponding to the personnel information. Further, query the preset second corresponding relationship according to the total order amount to determine the adjustment coefficient corresponding to the total order amount.
[0072] In this embodiment, the amount range conversion rule can be preset in the rule configuration interface, and the second corresponding relationship is preset. The second corresponding relationship includes the relationship between the total order amount and the adjustment coefficient. Among them, the total order amount is determined by the sum of the order amounts of the orders to be processed within the historical specified time. For each personnel information, determine the total order amount corresponding to the personnel information according to the order amount of the order to be processed corresponding to the personnel information, and then determine the adjustment coefficient corresponding to the total order amount.
[0073] It should be noted that the foregoing descriptions of parts such as sharding storage and refund orders in the single conversion rule also apply to the amount range conversion rule, which will not be elaborated here. Thus, the corresponding adjustment coefficient can be automatically determined through the total order amount corresponding to the personnel information, providing more flexible rule configuration. The flexibility of rule configuration allows the system to adapt to different business scenarios and calculation requirements, improves the adaptability and scalability of the system, meets the requirements of the commission settlement scenario for the commission ladder interval input, solves the problem of complex and time-consuming manual processing, and improves the processing efficiency.
[0074] Based on the above embodiment, Figure 4 is a schematic flowchart of another order processing method provided by an embodiment of the present disclosure. As Figure 4 shown, the method further includes:
[0075] Step 401, for each personnel information, obtain the refund orders refunded within the historical specified time period and their corresponding historical expense data.
[0076] In this embodiment, if the order start time of the refund order is not within the historical specified time period, obtain the historical expense data corresponding to the refund order. Among them, the order start time can be the earliest order creation time corresponding to the order number of the refund order.
[0077] Optionally, if the order start time of the refund order is within the historical specified time period, before calculating the expense data, exclude the refund order from the orders to be processed to avoid duplicate processing.
[0078] Optionally, for the orders that have stopped paying installments and have not been refunded, mark the order type of the order as an invalid order, and exclude the invalid orders when obtaining the orders to be processed.
[0079] Step 402, update the expense data corresponding to the personnel information according to the difference between the expense data corresponding to the personnel information and the historical expense data.
[0080] In this embodiment, for each personnel information, after determining the cost data corresponding to the personnel information, the difference between the cost data corresponding to the personnel information and the historical cost data of each corresponding refund order is calculated to update the cost data corresponding to the personnel information.
[0081] For example, Order 1 is an installment order with an order amount of 10,000 yuan, a down payment ratio of 30%, 12 installment periods, 4 paid periods, an adjustment coefficient of 5%, and a manager coefficient of 1.1; Order 2 is an installment order with an order amount of 15,000 yuan, a down payment ratio of 50%, 6 installment periods, 2 paid periods, and an adjustment coefficient of 4%; Order 3 is a down payment order with an order amount of 8,000 yuan, a down payment ratio of 100%, no installments, and an adjustment coefficient of 6%, and a manager coefficient of 1.1.
[0082] In this example, the above orders are refund orders, and the corresponding salespersons and managers of the orders are the same. For Order 1: For the installment refund part, the historical cost data corresponding to the salesperson = 116.67 yuan, the number of orders after converting the original order = 0.5 order, and the historical cost data corresponding to the manager = 128.33 yuan. For Order 2: The salesperson and the manager use the same logic. For the installment refund part, the historical cost data = 333.33 yuan, and the number of orders after converting the original order = 1 order. For Order 3: The historical cost data corresponding to the salesperson = 480 yuan, the historical cost data corresponding to the manager = 528 yuan, and the number of orders after converting the original order = 1.5 orders. For the salesperson, the total historical cost data = 930 yuan, and the number of historical conversion orders = 3 orders. For the manager, the total historical cost data = 989.66 yuan, and the number of historical conversion orders = 3 orders.
[0083] In the embodiments of the present disclosure, the cost data corresponding to the personnel information this time can be updated according to the historical cost data of the refund order to meet the requirements of the commission settlement scenario for refunding the commission of the refund order, quickly and accurately determine the commission to be refunded, comprehensively consider the refund status of the order, improve the accuracy of the order cost data calculation, solve the problem of complex and time-consuming manual processing, and improve the processing efficiency.
[0084] In one embodiment of the present disclosure, the method further includes: obtaining payment records within a historical specified time, comparing the payment records with the orders to be processed, so as to accurately determine the orders to be processed with actual payments. Taking installment payment as an example, when paying an installment order, an installment payment record is generated in the system. The installment payment record includes information such as the order number of the original order, the payment amount for each installment, and the payment date. The original order refers to a complete sales order, which, for example, includes the order number, the total order amount, customer information, order type, personnel information, and the down payment cost data and installment cost data recorded in the order table after calculation of cost data. The installment payment record and the original order are associated through the order number. For example, for an installment order with 12 installments, the 4th and 6th installments were paid last month, generating 2 installment payment records. The installment payment records paid last month are obtained through the payment date, and then the corresponding orders to be processed are determined through the order numbers of the installment payment records, so as to handle situations such as early payment and overdue payment.
[0085] Among them, the installment cost data field recorded in the original order can also be queried according to the order number of the installment payment record, and the installment payment details and the installment cost data corresponding to each installment payment record are generated according to the actual number of paid installments corresponding to the installment payment record, so as to fill in the commission detail table, without repeating the calculation for each installment, which can reduce the calculation amount and improve the processing efficiency. When querying, structured query language statements can be used to improve the query speed, and by batch processing or using background tasks, the impact on the database performance can be reduced. Through data security and access control, it is ensured that only authorized users can perform the above operations, improving security.
[0086] In one embodiment of the present disclosure, the method further includes: generating and displaying a commission detail table. Among them, the calculation results of each step of the order processing method can be added to the commission detail table as needed. For example, the commission detail table includes, but is not limited to, the converted order quantity, adjustment coefficient, fixed amount, cost data of each order to be processed, down payment cost data of the down payment order, installment cost data of the installment order, total cost data, historical converted order quantity of the refund order, historical cost data of the refund order, etc. For the data in the commission detail table, consistency and integrity verification are performed with the data of the original order and the installment payment record to ensure data accuracy. Optionally, data is summarized and merged according to personnel information into a summary table, with each personnel information corresponding to one record. The table includes information such as salespersons, manager personnel, and cost data. For example, the table includes serial number, name, employee number, employee category, cost center, personnel type, number of issued orders, adjustment coefficient, actual received turnover, installment turnover, commission payable, previous installment commission, etc. Thus, the cost data of salespersons and manager personnel can be accurately calculated, providing a basis for summary reports, detailed displays, and commission payments.
[0087] In this embodiment, a rule configuration interface, an employee information import page, a manager coefficient configuration interface, an adjustment coefficient configuration interface, an output result display interface, etc. can be set in advance. Users can configure employee information and calculation rules through the above interfaces, and can also configure manager coefficients and adjustment coefficients. When the business changes, the rule configuration can be adjusted and updated according to the actual business changes, ensuring the flexibility and accuracy of commission settlement.
[0088] Figure 5 As shown in the following figure, it is a schematic structural diagram of an order processing device provided by an embodiment of the present disclosure. Figure 5 As shown, the order processing device includes: an acquisition module 51, a matching module 52, a first processing module 53, a second processing module 54, and a determination module 55.
[0089] The acquisition module 51 is used to acquire the orders to be processed from the order table in the historical specified time period, and acquire the order data corresponding to the orders to be processed; the order data includes order numbers, order types, and personnel information.
[0090] The matching module 52 is used to determine the calculation rules matching the orders to be processed according to the preset rule configuration for each order to be processed; the calculation rules include expense calculation formulas.
[0091] The first processing module 53 is used to, when the order type is a down payment order, determine the expense data of the order to be processed according to the down payment ratio corresponding to the order number and in accordance with the first expense calculation formula.
[0092] The second processing module 54 is used to, when the order type is an installment order, determine the expense data of the order to be processed according to the down payment ratio, the number of installments, and the number of payment periods in the historical specified time period corresponding to the order number and in accordance with the second expense calculation formula.
[0093] The determination module 55 is used to determine the expense data corresponding to the personnel information according to the expense data of all the orders to be processed corresponding to the personnel information for each personnel information.
[0094] In an embodiment of the present disclosure, the device further includes:
[0095] A second acquisition module, used to acquire the initial expense data corresponding to the order number and acquire the adjustment coefficient.
[0096] The first processing module 53 is specifically used to: determine the expense data of the order to be processed according to the product of the initial expense data, the adjustment coefficient, and the down payment ratio.
[0097] The second processing module 54 is specifically configured to: determine the fee data for each installment according to the ratio between the product of the initial fee data, the adjustment coefficient, and the non-down payment ratio, and the number of installments; the non-down payment ratio is determined according to the down payment ratio; determine the fee data of the order to be processed according to the product of the fee data for each installment and the number of payment periods.
[0098] In an embodiment of the present disclosure, the second acquisition module is specifically configured to:
[0099] Query the order table according to the order number to obtain the order amount corresponding to the order number;
[0100] Query the flexible employment table according to the order number to obtain the flexible employment amount corresponding to the order number;
[0101] Query the in-store expense table according to the order number to obtain the in-store expense corresponding to the order number;
[0102] Calculate the first sum value between the flexible employment amount and the in-store expense, and determine the initial fee data according to the difference between the order amount and the first sum value.
[0103] In an embodiment of the present disclosure, the second acquisition module is specifically configured to:
[0104] When the calculation rule includes a single-number conversion rule, obtain the converted single number corresponding to the personnel information;
[0105] Query the preset first correspondence according to the converted single number to determine the adjustment coefficient corresponding to the converted single number;
[0106] When the calculation rule includes an amount-range conversion rule, obtain the total order amount corresponding to the personnel information;
[0107] Query the preset second correspondence according to the total order amount to determine the adjustment coefficient corresponding to the total order amount.
[0108] In an embodiment of the present disclosure, the second acquisition module is specifically configured to:
[0109] For each order to be processed corresponding to the personnel information, if there is an associated product field in the order to be processed, obtain the amount corresponding to the associated product field;
[0110] Calculate the second sum value between the initial fee data of the order to be processed and the amount corresponding to the associated product field;
[0111] If the second sum value is greater than the first threshold, determine that the converted single number of the order to be processed is the first single number;
[0112] If the second summation value is less than the second threshold, determine the converted order quantity of the order to be processed as the second order quantity; wherein, the first threshold is greater than the second threshold, the first order quantity is greater than 1, and the second order quantity is less than 1.
[0113] In an embodiment of the present disclosure, the device further includes:
[0114] A first adjustment module, configured to obtain, for each personnel information, refund orders that have been refunded within a historical specified time period;
[0115] If the order start time of the refund order is within the historical specified time period, remove the refund order from the orders to be processed;
[0116] If the order start time of the refund order is not within the historical specified time period, obtain the historical converted order quantity corresponding to the refund order;
[0117] Merge the opposite of the historical converted order quantity corresponding to the refund order with the converted order quantity corresponding to the personnel information.
[0118] In an embodiment of the present disclosure, the device further includes:
[0119] A second adjustment module, configured to obtain, for each personnel information, refund orders that have been refunded within a historical specified time period;
[0120] If the order start time of the refund order is not within the historical specified time period, obtain the historical cost data corresponding to the refund order;
[0121] Update the cost data corresponding to the personnel information according to the difference between the cost data corresponding to the personnel information and the historical cost data.
[0122] The order processing device provided by the embodiments of the present disclosure can execute any order processing method provided by the embodiments of the present disclosure, and has the corresponding functional modules and beneficial effects for executing the method. The content not described in detail in the embodiments of the present disclosure device can be referred to the description in any method embodiment of the present disclosure.
[0123] An electronic device provided by an embodiment of the present disclosure includes one or more processors and a memory. The processor may be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions. The memory may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage media, and the processor may run the program instructions to implement the methods of the embodiments of the present disclosure above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage media.
[0124] In one example, the electronic device may further include: an input device and an output device, and these components are interconnected through a bus system and / or other forms of connection mechanisms. In addition, the input device may include, for example, a keyboard, a mouse, etc. The output device may output various information to the outside, including the determined distance information, direction information, etc. The output device may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc. In addition, according to specific application scenarios, the electronic device may further include any other appropriate components such as a bus, an input / output interface, etc.
[0125] In addition to the above methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions that cause the processor to execute any method provided by the embodiments of the present disclosure when being run by the processor.
[0126] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the embodiments of the present disclosure. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, executed as an independent software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0127] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are run by a processor, the processor is caused to execute any method provided by the embodiments of the present disclosure.
[0128] The computer-readable storage medium may employ any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0129] It should be noted that, in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0130] The above are only specific embodiments of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but rather will be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An order processing method, characterized in that: include: Obtaining pending orders from an order table of a specified historical time period, and obtaining order data corresponding to the pending orders, wherein the order data includes order number, order type, and personnel information; For each pending order, determine a calculation rule matching the pending order according to a preset rule configuration, wherein the calculation rule includes a fee calculation formula; In the case where the order type is a down payment order, determining the fee data of the to-be-processed order according to the down payment ratio corresponding to the order number and the first fee calculation formula; In the case where the order type is an installment order, the fee data of the pending order is determined according to the second fee calculation formula based on the down payment ratio, the number of installments, and the number of payment periods in the historical specified time period corresponding to the order number; For each piece of personnel information, the cost data corresponding to the personnel information is determined according to the cost data of all pending orders corresponding to the personnel information.
2. The method according to claim 1, characterized in that The method further comprises: Obtaining the initial cost data corresponding to the order number, and obtaining the adjustment coefficient; The step of determining the fee data of the pending order according to the first fee calculation formula based on the down payment ratio corresponding to the order number includes: Determining the fee data of the pending order according to the product of the initial fee data, the adjustment coefficient and the down payment ratio; The determining the fee data of the pending order according to the second fee calculation formula based on the down payment ratio, the number of installments, and the number of payment periods in the historical specified time period corresponding to the order number includes: Determine the cost data of each installment according to the ratio between the product of the initial cost data, the adjustment coefficient and the non-down payment ratio and the number of installments; the non-down payment ratio is determined according to the down payment ratio; The fee data of the order to be processed is determined according to the product of the fee data of each installment and the number of payment periods.
3. The method according to claim 2, characterized in that The obtaining of the initial fee data corresponding to the order number includes: Query the order table according to the order number to obtain the order amount corresponding to the order number; Query the flexible employment table according to the order number to obtain the flexible employment amount corresponding to the order number; Query the store fee table according to the order number to obtain the store fee corresponding to the order number; A first sum value between the flexible employment amount and the store-based fee is calculated, and the initial fee data is determined according to a difference between the order amount and the first sum value.
4. The method according to claim 2, characterized in that The obtaining of the adjustment coefficient comprises: When the calculation rule includes an odd number conversion rule, obtaining the converted odd number corresponding to the personnel information; According to the conversion order number, a preset first corresponding relationship is searched to determine an adjustment coefficient corresponding to the conversion order number; When the calculation rule includes an amount interval conversion rule, obtaining the total order amount corresponding to the personnel information; A preset second corresponding relationship is queried according to the total order amount to determine an adjustment coefficient corresponding to the total order amount.
5. The method according to claim 4, characterized in that The obtaining of the conversion number corresponding to the personnel information includes: For each pending order corresponding to the personnel information, if there is an associated product field in the pending order, obtain the amount corresponding to the associated product field; Calculating a second sum value between the initial cost data of the pending order and the amount corresponding to the associated product field; If the second sum value is greater than the first threshold value, determining the converted order number of the to-be-processed order to be the first order number; If the second sum value is less than a second threshold, the converted number of orders for the pending order is determined to be a second number of orders; wherein the first threshold is greater than the second threshold, the first number of orders is greater than 1, and the second number of orders is less than 1.
6. The method according to claim 5, characterized in that The method further comprises: For each person information, obtain the refund orders refunded within the specified time period of the history; If the order start time of the refund order is within the historical specified time period, the refund order is removed from the pending orders; If the order start time of the refund order is not within the historical specified time period, then the number of historical conversion orders corresponding to the refund order is obtained; The reverse number of the historical conversion order number corresponding to the refund order is combined with the conversion order number corresponding to the personnel information.
7. The method according to claim 1, characterized in that The method further comprises: For each person information, obtain the refund orders refunded within the specified time period of the history; If the order start time of the refund order is not within the historical specified time period, obtaining the historical fee data corresponding to the refund order; The expense data corresponding to the personnel information is updated according to the difference between the expense data corresponding to the personnel information and the historical expense data.
8. An order processing device, characterized in that: include: An acquisition module is used to acquire pending orders from an order table in a specified historical time period, and acquire order data corresponding to the pending orders, wherein the order data includes order number, order type, and personnel information; A matching module, configured to determine, for each pending order, a calculation rule that matches the pending order according to a preset rule configuration, wherein the calculation rule includes a fee calculation formula; A first processing module, configured to determine the fee data of the order to be processed according to a first fee calculation formula based on the down payment ratio corresponding to the order number when the order type is a down payment order; A second processing module is used to determine the fee data of the to-be-processed order according to a second fee calculation formula based on the down payment ratio, the number of installments, and the number of payment periods in the historical specified time period corresponding to the order number when the order type is an installment order; The determination module is used to determine the cost data corresponding to each piece of personnel information according to the cost data of all pending orders corresponding to the personnel information.
9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the order processing method described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the order processing method described in any one of claims 1 to 7 is implemented.