A method and system for configuring wave rules to support dual mode execution

CN123011965APending Publication Date: 2026-10-30CHONGQING SAIMEI SHUZHI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611224702.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

第一,规则表达能力有限

Benefits of technology

[0015]相比于现有技术,本发明的优点及有益效果在于:通过加载波次规则,检测波次规则中的脚本标识字段,在脚本标识字段为空时,采用规则条件模式,根据配置的条件明细,通过字段映射机制识别条件字段所属数据库表,动态构建表关联并生成SQL语句执行,得到查询结果,适用于简单场景下的波次查询;在脚本标识字段为非空时,采用SQL脚本模式,加载对应SQL脚本并执行,得到查询结果,适配于复杂场景下多条件组合的波次查询,对查询结果进行多层限制过滤,得到波次订单并返回波次订单ID,通过两种模式的组合,使得方法扩展性强,便于适配业务需求变化,配置灵活,能够适用于简易或复杂的波次订单查询。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123011965A_ABST
    Figure CN123011965A_ABST
Patent Text Reader

Abstract

The application provides a wave order rule configuration method and system supporting dual-mode execution, wherein the method comprises the following steps: loading a wave order rule, detecting a script identification field in the wave order rule; if the script identification field is empty, adopting a rule condition mode, identifying a database table to which a condition field belongs through a field mapping mechanism according to a configured condition detail, dynamically constructing table association and generating an SQL statement for execution, obtaining a query result; if the script identification field is not empty, adopting an SQL script mode, loading an SQL script and executing the same, obtaining a query result; and performing multi-layer restriction filtering on the query result, obtaining a wave order and returning a wave order ID. The application can support simple or complex wave order queries, has strong expansibility, high flexibility and a short development cycle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of warehouse management technology, and in particular to a wave rule configuration method and system that supports dual-mode execution. Background Technology

[0002] In warehouse management systems, wave management is a core component of outbound operations. Wave rules are used to filter out a set of orders that meet specific conditions from a large number of outbound orders, enabling subsequent replenishment, picking, and other operations. Traditional wave rule configuration mainly relies on a rule engine, where field values, operators, and thresholds are configured through a visual interface, and the system dynamically generates SQL query statements based on the configuration. However, this traditional method has the following drawbacks: First, the expressive power of rules is limited. Traditional rule engines only support simple combinations of conditions (such as equal to, contain, range, etc.), and cannot effectively express complex scenarios such as multi-table joins, subqueries, and aggregation calculations.

[0003] Second, it has poor scalability. When business requirements change or new query scenarios emerge, it is necessary to modify the rule engine code or add new condition types, which results in high development costs and long development cycles.

[0004] Third, there is a lack of flexibility. In certain special scenarios, business personnel may need to write complex SQL to implement specific order filtering logic, but the existing system does not support the direct execution of custom SQL scripts. It can only break down all the logic into combinations of conditions that the rule engine can understand, resulting in complex configuration and a high risk of errors. Summary of the Invention

[0005] Therefore, it is necessary to provide a wave rule configuration method and system that supports dual-mode execution to address the aforementioned technical problems.

[0006] A wave rule configuration method supporting dual-mode execution includes the following steps: loading the wave rule and detecting the script identifier field in the wave rule; if the script identifier field is empty, the rule condition mode is adopted, and the database table to which the condition field belongs is identified through a field mapping mechanism according to the configured condition details, the table association is dynamically constructed and an SQL statement is generated and executed to obtain the query result; if the script identifier field is not empty, the SQL script mode is adopted, the SQL script is loaded and executed to obtain the query result; the query result is subjected to multi-level restriction filtering to obtain the wave order and return the wave order ID.

[0007] In one embodiment, before loading the wave rule, the method further includes: expanding the script content field of the wave rule, the script content field being used to store SQL script content; and generating a script identifier field based on whether the content of the script content field is empty, the script identifier field being empty or not empty.

[0008] In one embodiment, the step of identifying the database table to which the condition fields belong through a field mapping mechanism based on the configured condition details, dynamically constructing table associations, generating and executing SQL statements to obtain query results includes: loading all condition details associated with the wave rule, wherein the condition details include condition fields, operators, logical types, first condition values, and second condition values; mapping the condition fields to corresponding mapping tables to identify the database tables to which the condition fields belong; associating the conditions with their respective database tables based on the fields contained in the conditions; grouping the conditions according to the logical types to form condition groups; generating SQL fragments corresponding to each condition based on the condition grouping results and field mapping results, connecting all SQL fragments in the condition groups to obtain SQL statements; executing the SQL statements to obtain execution results, and restricting and filtering the execution results according to order restrictions to obtain query results.

[0009] In one embodiment, the mapping table includes a first group of mapping tables, a second group of mapping tables, a third group of mapping tables, and a fourth group of mapping tables; wherein, the first group of mapping tables consists of outbound order master table fields, including external order number, priority, planned outbound time, planned delivery time, and order creation time; the second group of mapping tables consists of outbound order detail table fields, including product code; the third group of mapping tables consists of customer table fields, including owner code, customer code, and carrier code; and the fourth group of mapping tables consists of field table fields, including outbound order type and transportation method.

[0010] In one embodiment, associating the conditions with their respective database tables based on the fields included in the conditions includes: detecting the fields included in the conditions; if the conditions include a product code field, then associating the conditions with the outbound order details table, with the association condition being that the order ID is equal and the order has not been deleted; if the conditions include a shipper code field, then associating the conditions with the customer table, with the association condition being that the shipper code is equal and the customer type is shipper; if the conditions include a customer code field, then associating the conditions with the customer table, with the association condition being that the customer code is equal and the customer type is customer; if the conditions include a carrier code field, then associating the conditions with the customer table, with the association condition being that the carrier code is equal and the customer type is carrier; if the conditions include an order type field, then associating the conditions with a dictionary table, with the association condition being that the dictionary value is equal to the order type and the dictionary type is outbound order type; if the conditions include a transportation mode field, then associating the conditions with a dictionary table, with the association condition being that the dictionary value is equal to the transportation mode and the dictionary type is transportation mode.

[0011] In one embodiment, grouping conditions according to the logical type to form multiple condition groups includes: detecting the logical type; if the logical type of the current condition is OR connection and the current condition group is not empty, saving the current condition group and creating a new condition group; if the logical type of the current condition is AND connection, or the current condition group is empty, continuing to accumulate conditions into the current condition group; ORing the resulting multiple condition groups, and the conditions within the condition group are AND connections.

[0012] In one embodiment, the order restrictions include a limit on the total number of items in a single order, a limit on the packaging volume of a single order, a limit on the packaging weight of a single order, a limit on the number of detail lines in a single order, a limit on the number of orders in a wave, a limit on the number of lines in a wave, a limit on the total volume of a wave, a limit on the total weight of a wave, and a segmentation restriction.

[0013] In one embodiment, the method further includes: in rule-condition mode, if the condition details are empty, a message is sent indicating that the wave condition of the wave rule is empty; if the condition field does not exist in the field mapping, an error log is recorded and an exception is thrown, indicating that the wave rule condition is invalid; if the operator is not in the predetermined operator list, a warning log is recorded; in SQL script mode, if the SQL script validity check fails, an error log is recorded and an exception is thrown, indicating that the SQL script is invalid; if the SQL script execution fails, an exception is thrown; in rule-condition mode or SQL script mode, if there are no orders that meet the conditions in the query results, a business exception message is thrown.

[0014] A wave rule configuration system supporting dual-mode execution is provided to implement the wave rule configuration method described above. The system includes: a script identifier detection module for loading wave rules and detecting the script identifier field in the wave rules; a rule condition query module for using rule condition mode when the script identifier field is empty, identifying the database table to which the condition field belongs through a field mapping mechanism based on the configured condition details, dynamically constructing table associations, generating SQL statements for execution, and obtaining query results; an SQL script query module for using SQL script mode when the script identifier field is not empty, loading and executing SQL scripts to obtain query results; and a wave order acquisition module for performing multi-level restriction filtering on the query results to obtain wave orders and return wave order IDs.

[0015] Compared to existing technologies, the advantages and beneficial effects of this invention are as follows: By loading wave rules and detecting the script identifier field in the wave rules, when the script identifier field is empty, the rule condition mode is adopted. Based on the configured condition details, the database table to which the condition field belongs is identified through the field mapping mechanism, the table association is dynamically constructed, and SQL statements are generated and executed to obtain the query results. This is suitable for wave queries in simple scenarios. When the script identifier field is not empty, the SQL script mode is adopted. The corresponding SQL script is loaded and executed to obtain the query results. This is suitable for wave queries with multiple conditions in complex scenarios. The query results are subjected to multi-level restriction filtering to obtain wave orders and return the wave order ID. Through the combination of the two modes, the method has strong scalability, is easy to adapt to changes in business needs, has flexible configuration, and can be applied to simple or complex wave order queries. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating a wave rule configuration method that supports dual-mode execution in one embodiment.

[0017] Figure 2 This is a flowchart of a wave rule configuration method that supports dual-mode execution in one embodiment.

[0018] Figure 3 This is a schematic diagram of the structure of a wave rule configuration system that supports dual-mode execution in one embodiment.

[0019] Figure 4 This is a schematic diagram of the architecture of a wave rule configuration system that supports dual-mode execution in one embodiment. Detailed Implementation

[0020] Before describing the specific embodiments of the present invention, the overall concept of the present invention will be explained as follows: This invention is mainly based on the development of warehouse management process. Currently, wave management has limited rule expression capabilities, poor scalability, and insufficient flexibility.

[0021] Therefore, this invention proposes a wave rule configuration method that supports dual-mode execution. By loading wave rules and detecting the script identifier field within them, when the script identifier field is empty, a rule condition mode is used. Based on the configured condition details, a field mapping mechanism identifies the database table to which the condition field belongs, dynamically constructs table associations, generates and executes SQL statements, and obtains query results. This method is suitable for wave queries in simple scenarios. When the script identifier field is not empty, an SQL script mode is used. The corresponding SQL script is loaded and executed, and query results are obtained. This method is suitable for wave queries with multiple condition combinations in complex scenarios. The query results are subjected to multi-level filtering restrictions to obtain wave orders and return wave order IDs. The combination of these two modes makes the method highly scalable, easily adaptable to changes in business needs, and flexible in configuration, applicable to both simple and complex wave order queries.

[0022] Having introduced the overall concept of the present invention, to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below through specific embodiments in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.

[0023] In one embodiment, such as Figure 1-2 As shown, a wave rule configuration method supporting dual-mode execution is provided, including the following steps: Step S110: Load wavelet rules and detect the script identifier field in the wavelet rules. Specifically, after loading the wave rules, the system automatically determines whether the script content field is empty based on the script identifier field, so as to determine whether to use the rule condition mode or the SQL script mode in the future.

[0024] Prior to step S110, the method further includes: extending the script content field of the wave rule, which is used to store the SQL script content; and generating a script identifier field based on whether the content of the script content field is empty, wherein the script identifier field is empty or not empty.

[0025] Specifically, before loading wave rules, the script content field and script identifier field are expanded based on the existing wave rule entity. The script content field stores the SQL script content. When this field is empty, the system uses the rule condition mode; when the field is not empty, the system uses the SQL script mode. The script identifier field is automatically derived by the system from the script content field. It is marked as empty when the script content field is empty, and as not empty when the script content field is not empty.

[0026] In step S120, if the script identifier field is empty, the rule condition mode is adopted. Based on the configured condition details, the database table to which the condition field belongs is identified through the field mapping mechanism, the table association is dynamically constructed, and the SQL statement is generated and executed to obtain the query result.

[0027] Specifically, when the script identifier field is empty, the rule-based condition mode is adopted. Based on the configured condition details, the database table to which the condition field in the condition details belongs is identified based on the field mapping mechanism. The condition is associated with the corresponding database table, and an SQL statement is generated based on the condition details and the associated database table. The SQL statement is executed to obtain the corresponding query results. This is suitable for simple conditions, automatically generating query statements, improving query efficiency, and shortening the configuration and deployment cycle.

[0028] Step S120 includes: loading all condition details associated with the wave rule, the condition details including condition fields, operators, logical types, first condition values, and second condition values; mapping the condition fields to the corresponding mapping tables and identifying the database tables to which the condition fields belong; associating the conditions with the database tables to which they belong based on the fields contained in the conditions; grouping the conditions according to the logical types to form multiple condition groups; generating SQL fragments corresponding to each condition based on the condition grouping results and field mapping results, connecting all SQL fragments in the condition groups to obtain SQL statements; executing the generated SQL statements to obtain execution results, and filtering the execution results according to order restrictions to obtain query results.

[0029] Specifically, the system loads all condition details associated with wave rules from the database, iterates through all condition details, and identifies the database table type to which the condition fields belong based on their affiliation in the mapping table. It then associates the conditions with their respective database tables based on the fields they contain, establishing a correspondence between conditions and database tables. Conditions are grouped according to their logical types, resulting in multiple condition groups to facilitate obtaining corresponding query results. Each condition's corresponding SQL fragment is generated, and all SQL fragments within a condition group are concatenated to obtain an SQL statement. The SQL statement is executed, generating corresponding execution results, and these results are then restricted based on order limitations to obtain the final query result. This system enables visual configuration of rules and automatic generation of query statements, allowing for fast, flexible, and easy-to-use wave order queries.

[0030] The mapping tables include four groups: Group 1, Group 2, Group 3, and Group 4. Group 1 consists of fields from the outbound order master table, including external order number, priority, planned outbound time, planned delivery time, and order creation time. Group 2 consists of fields from the outbound order details table, including product code. Group 3 consists of fields from the customer table, including owner code, customer code, and carrier code. Group 4 consists of fields from the field table, including outbound order type and transportation method.

[0031] Specifically, it iterates through all condition details and automatically identifies the database table type (outbound order master table, outbound order details table, customer table, or dictionary table) based on the condition field's affiliation in the four mapping tables.

[0032] The steps for associating conditions with database tables include: checking the fields contained in the conditions; if the condition contains a product code field, associating the condition with the outbound order details table, with the association condition being that the order ID is equal and the order has not been deleted; if the condition contains a shipper code field, associating the condition with the customer table, with the association condition being that the shipper code is equal and the customer type is shipper; if the condition contains a customer code field, associating the condition with the customer table, with the association condition being that the customer code is equal and the customer type is customer; if the condition contains a carrier code field, associating the condition with the customer table, with the association condition being that the carrier code is equal and the customer type is carrier; if the condition contains an order type field, associating the condition with a dictionary table, with the association condition being that the dictionary value is equal to the order type and the dictionary type is outbound order type; if the condition contains a transportation mode field, associating the condition with a dictionary table, with the association condition being that the dictionary value is equal to the transportation mode and the dictionary type is transportation mode.

[0033] Specifically, by detecting fields included in the conditions, such as product code, owner code, customer code, carrier code, order type, etc., the corresponding tables that need to be associated are dynamically determined, such as outbound order details table, customer table, dictionary table, etc., and the association is determined based on the association conditions to facilitate the association between the conditions and the corresponding database tables.

[0034] The steps for forming multiple condition groups include: detecting the logic type; if the logic type of the current condition is OR connection and the current condition group is not empty, saving the current condition group and creating a new condition group; if the logic type of the current condition is AND connection, or the current condition group is empty, continuing to accumulate conditions into the current condition group; performing an OR connection on the resulting multiple condition groups, and ensuring that the conditions within each condition group are AND connections.

[0035] Specifically, the logical type of the condition is detected, and the condition is grouped according to its logical type. If the logical type of the current condition is OR and the current group is not empty, the current group is saved and a new group is created. When the logical type is AND or empty, the condition continues to accumulate into the current group. Finally, multiple condition groups are formed, with conditions within a group connected by AND and conditions between condition groups connected by OR, thus realizing condition grouping and logical combination.

[0036] The order restrictions include the following: the total number of items in a single order, the packaging volume in a single order, the packaging weight in a single order, the number of detail lines in a single order, the maximum number of orders per wave, the maximum number of lines in a wave, the maximum total volume of a wave, the maximum total weight of a wave, and segment restrictions.

[0037] Specifically, after executing the generated SQL statement and obtaining the query results, the following restrictions are applied to the query results in sequence: total number of items in a single order, packaging volume in a single order, packaging weight in a single order, number of detail rows in a single order, maximum number of orders in a wave, maximum number of rows in a wave, maximum total volume in a wave, maximum total weight in a wave, and segmentation restrictions.

[0038] In step S130, if the script identifier field is not empty, the SQL script mode is used to load and execute the SQL script to obtain the query result.

[0039] Specifically, when the script identifier field is not empty, it indicates that a corresponding SQL script exists. In this case, the SQL script mode is adopted, and the SQL script is directly read from the script content field and executed. It supports queries of any complexity, such as multi-table joins, subqueries, and aggregate calculations, to obtain query results. The wave conditions can be flexibly configured through the SQL script, making it easy to adapt to complex combinations of wave conditions.

[0040] In SQL script mode, multi-table joins, subqueries, and aggregation calculations can be directly written into a single SQL statement with clear logic, facilitating condition matching and later maintenance. Furthermore, when new query requirements arise, SQL scripts can be written and saved directly without modifying the rule engine code or upgrading the system.

[0041] Step S140: Perform multi-level filtering on the query results to obtain the wave orders and return the wave order ID.

[0042] Specifically, after obtaining the query results, the query results are filtered through multiple layers of restrictions to obtain the wave orders, and the wave order ID is returned to realize the wave rule configuration.

[0043] The above method also includes: in rule-condition mode, if the condition details are empty, a message will be displayed indicating that the wave condition of the wave rule is empty; if the condition field does not exist in the field mapping, an error log will be recorded and an exception will be thrown, indicating that the wave rule condition is invalid; if the operator is not in the predefined operator list, a warning log will be recorded; in SQL script mode, if the SQL script validity check fails, an error log will be recorded and an exception will be thrown, indicating that the SQL script is invalid; if the SQL script execution fails, an exception will be thrown; in rule-condition mode or SQL script mode, if there are no orders that meet the conditions in the query results, a business exception message will be thrown.

[0044] Specifically, in rule-condition mode, if the condition details are empty, the system throws a business exception message "the wave condition of the wave rule cannot be empty". If the condition field does not exist in the field mapping, the system records an error log and throws an exception, prompting "invalid field of wave rule condition". If the operator is not in the predefined operator list, the system records a warning log.

[0045] In SQL script mode, if the SQL script fails the validity check, the system logs an error and throws an exception, indicating "SQL script is invalid"; if the SQL script fails to execute, the database query executor throws an exception, which is captured and handled uniformly by the upper layer. In both of the above modes, if no orders meet the criteria after filtering, the system will issue a business exception message: "No data can be calculated".

[0046] The above operations enable exception handling in both modes, facilitating the troubleshooting of system anomalies.

[0047] In this embodiment, by loading wave rules and detecting the script identifier field in the wave rules, when the script identifier field is empty, the rule condition mode is adopted. Based on the configured condition details, the database table to which the condition field belongs is identified through the field mapping mechanism, the table association is dynamically constructed, and an SQL statement is generated and executed to obtain the query result. This is suitable for wave queries in simple scenarios. When the script identifier field is not empty, the SQL script mode is adopted. The corresponding SQL script is loaded and executed to obtain the query result. This is suitable for wave queries with multiple conditions in complex scenarios. The query results are filtered with multiple layers of restrictions to obtain the wave order and return the wave order ID. By combining the two modes, the method has strong scalability, is easy to adapt to changes in business needs, and has flexible configuration. It can be applied to both simple and complex wave order queries.

[0048] like Figure 3-4As shown, a wave rule configuration system 100 supporting dual-mode execution is provided to implement the wave rule configuration method supporting dual-mode execution as described above. It includes: a script identifier detection module 10, a rule condition query module 20, an SQL script query module 30, and a wave order acquisition module 40, wherein: The script identifier detection module 10 is used to load wave rules and detect the script identifier field in the wave rules; The rule-condition query module 20 is used to adopt the rule-condition mode when the script identifier field is empty. Based on the configured condition details, it identifies the database table to which the condition field belongs through the field mapping mechanism, dynamically builds table associations, generates SQL statements for execution, and obtains query results. The SQL script query module 30 is used to load and execute the SQL script in SQL script mode when the script identifier field is not empty, and obtain the query results. The wave order acquisition module 40 is used to perform multi-level filtering on the query results, obtain the wave orders, and return the wave order ID.

[0049] In one embodiment, the script identifier detection module 10 is further configured to: extend the script content field of the wave rule, the script content field being used to store SQL script content; and generate a script identifier field based on whether the content of the script content field is empty, wherein the script identifier field is empty or not empty.

[0050] In one embodiment, the rule condition query module 20 is specifically used for: loading all condition details associated with the wave rule, the condition details including condition fields, operators, logical types, first condition values, and second condition values; mapping the condition fields to the corresponding mapping tables and identifying the database tables to which the condition fields belong; associating the conditions with the database tables to which they belong based on the fields contained in the conditions; grouping the conditions according to the logical types to form condition groups; generating SQL fragments corresponding to each condition based on the condition grouping results and field mapping results; connecting all SQL fragments in the condition groups to obtain SQL statements; executing the SQL statements to obtain execution results; and restricting and filtering the execution results according to order restrictions to obtain query results.

[0051] In one embodiment, the above-mentioned wave rule configuration method supporting dual-mode execution is applied to the wave order generation of a spare parts warehousing management system for an automotive manufacturing industry.

[0052] Application Scenario: A spare parts warehouse of an automotive manufacturing company is responsible for supplying spare parts to four major production lines: stamping, welding, painting, and final assembly. It processes thousands of outbound orders daily, covering various types such as production line replenishment, equipment maintenance material requisition, and supplier returns. The center uses a wave management model to group orders for picking operations. There are two typical wave rule requirements: one is simple order filtering based on supplier and spare parts attributes (such as high-priority replenishment orders from core suppliers), and the other is complex requiring multi-table join queries (such as filtering obsolete parts by vehicle model BOM level and inventory age). In the traditional model, all wave rules can only be configured through a rule engine. The first type of requirement is intuitive to configure, but the second type involves multi-table joins and aggregation calculations, which the rule engine cannot effectively express, requiring developers to modify the code. This invention adapts to both types of requirements through data modeling and system configuration rule condition modes and SQL script modes.

[0053] The rule-condition mode allows for the creation of a "Production Line Emergency Replenishment Wave" rule. Business personnel create the rule in the wave rule management interface and configure it as follows: Rule Name: Emergency Replenishment Waves on Production Line Warehouse: Spare Parts Center Warehouse Maximum number of orders: 30 Maximum total volume: 50 cubic meters Condition details (4 in total): Condition 1: Supplier code, equal to "SUP-A001", logical type: AND Condition 2: Priority, greater than or equal to, "4", logical type: AND Condition 3: Planned outbound time, between "2026-07-01" and "2026-07-31", logical type: OR Condition 4: Order type, equal to "Urgent Replenishment", logical type: AND After saving the rule conditions, the system detects that the scriptContent field is empty and automatically sets scriptFlag=0 (rule condition mode).

[0054] SQL script mode: Create a "multi-model shared parts wave" rule.

[0055] For complex scenarios requiring multi-table joins and aggregation calculations, business personnel create rules in the wave rule management interface, select SQL script mode, and directly write SQL scripts. A certain automobile manufacturing company has multiple models (sedans, SUVs, MPVs) sharing the same spare parts. It needs to prioritize the processing of shared parts that are applicable to three or more models and have a total demand exceeding 10 units to improve picking efficiency. After saving the SQL script, the system detects that the scriptContent field is not empty and automatically sets scriptFlag=1 (SQL script mode).

[0056] As can be seen from the above steps, this invention adopts a dual-mode combination of rule conditions and SQL scripts to achieve dynamic switching between rule condition mode and SQL script mode, taking into account both the visual ease of use of the rule engine and the flexibility and power of SQL scripts.

[0057] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a computer storage medium (ROM / RAM, magnetic disk, optical disk) for execution by the computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Therefore, the present invention is not limited to any particular hardware and software combination.

[0058] The above description, in conjunction with specific embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such deductions or substitutions should be considered within the scope of protection of the present invention.

Claims

1. A wave rule configuration method supporting dual-mode execution, characterized in that, Includes the following steps: Load wavelet rules and detect the script identifier field in the wavelet rules; If the script identifier field is empty, the rule-based condition mode is used. Based on the configured condition details, the database table to which the condition field belongs is identified through the field mapping mechanism, the table association is dynamically constructed, and the SQL statement is generated and executed to obtain the query results. If the script identifier field is not empty, the SQL script mode is used, the SQL script is loaded and executed, and the query results are obtained. The query results are filtered through multiple layers to obtain wave orders and return wave order IDs.

2. The wave rule configuration method supporting dual-mode execution according to claim 1, characterized in that, Prior to the loading wavelet rules, the following is also included: The script content field of the wave rule is extended, and the script content field is used to store the SQL script content; A script identifier field is generated based on whether the content of the script content field is empty or not.

3. The wave rule configuration method supporting dual-mode execution according to claim 1, characterized in that, The process involves identifying the database table to which the condition fields belong through a field mapping mechanism based on the configured condition details, dynamically constructing table relationships, generating SQL statements for execution, and obtaining query results, including: Load all condition details associated with the wave rule, the condition details including condition fields, operators, logical types, first condition values ​​and second condition values; Map the condition fields to the corresponding mapping tables to identify the database tables to which the condition fields belong; Based on the fields included in the conditions, associate the conditions with the corresponding database tables; The conditions are grouped according to the logical type to form condition groups; Based on the condition grouping results and field mapping results, generate the SQL fragment corresponding to each condition, and connect all the SQL fragments in the condition group to obtain the SQL statement; The SQL statement is executed, the execution result is obtained, and the execution result is filtered according to the order restrictions to obtain the query result.

4. The wave rule configuration method supporting dual-mode execution according to claim 3, characterized in that, The mapping table includes a first group of mapping tables, a second group of mapping tables, a third group of mapping tables, and a fourth group of mapping tables; The first set of mapping tables consists of fields from the outbound order master table, including external order number, priority, planned outbound time, planned delivery time, and order creation time. The second set of mapping tables consists of fields from the outbound order details table, including product codes; The third set of mapping tables consists of customer table fields, including cargo owner code, customer code, and carrier code; The fourth mapping table is a field table with fields including outbound order type and transportation method.

5. The wave rule configuration method supporting dual-mode execution according to claim 4, characterized in that, The step of associating conditions with their respective database tables based on the fields contained in the conditions includes: If the field included in the detection condition is the product code field, then the condition will be associated with the outbound order details table. The association condition is that the order ID is equal and the order has not been deleted. If the condition includes a cargo owner code field, then the condition will be associated with the customer table, with the association condition being that the cargo owner codes are equal and the customer type is cargo owner; If the condition includes a customer code field, then the condition will be associated with the customer table, and the association condition will be that the customer codes are equal and the customer type is customer. If the condition includes a carrier code field, then the condition is associated with the customer table, and the association condition is that the carrier codes are equal and the customer type is a carrier. If the condition includes an order type field, then the condition is associated with the dictionary table, and the association condition is that the dictionary value is equal to the order type and the dictionary type is the outbound order type; If the condition includes a transportation method field, then the condition is associated with a dictionary table, where the association condition is that the dictionary value equals the transportation method and the dictionary type is transportation method.

6. The wave rule configuration method supporting dual-mode execution according to claim 3, characterized in that, The condition is grouped according to the logical type to form multiple condition groups, including: If the logic type of the current condition is OR connection and the current condition group is not empty, save the current condition group and create a new condition group. If the current condition is logically ANDed, or if the current condition group is empty, continue accumulating conditions into the current condition group; Multiple condition groups are ORed together, and the conditions within each condition group are ANDed together.

7. The wave rule configuration method supporting dual-mode execution according to claim 3, characterized in that, The order restrictions include the total number of items in a single order, the packaging volume in a single order, the packaging weight in a single order, the number of detail lines in a single order, the maximum number of orders per wave, the maximum number of lines in a wave, the maximum total volume of a wave, the maximum total weight of a wave, and segment restrictions.

8. The wave rule configuration method supporting dual-mode execution according to claim 1, characterized in that, Also includes: In rule-condition mode, if the condition details are empty, it will indicate that the wave condition of the wave rule is empty; if the condition field does not exist in the field mapping, it will record an error log and throw an exception, indicating that the wave rule condition is invalid; if the operator is not in the predefined operator list, it will record a warning log. In SQL script mode, if the SQL script fails the validity check, an error log is logged and an exception is thrown, indicating that the SQL script is invalid. If the SQL script fails to execute, an exception is thrown. In rule-based or SQL script-based mode, if no matching orders are found in the query results, a business exception message will be displayed.

9. A wave rule configuration system supporting dual-mode execution, characterized in that, A wave rule configuration method supporting dual-mode execution as described in any one of claims 1-8 includes: The script identifier detection module is used to load wave rules and detect the script identifier field in the wave rules; The rule-based query module is used to use the rule-based mode when the script identifier field is empty. Based on the configured condition details, it identifies the database table to which the condition field belongs through the field mapping mechanism, dynamically builds table associations, generates SQL statements for execution, and obtains query results. The SQL script query module is used to load and execute the SQL script in SQL script mode when the script identifier field is not empty, and obtain the query results. The wave order acquisition module is used to perform multi-level restriction filtering on the query results, obtain wave orders, and return wave order IDs.