CN116167882A - Conditional expression dynamic configuration method, accounting condition calculation method and accounting condition calculation device - Google Patents

Conditional expression dynamic configuration method, accounting condition calculation method and accounting condition calculation device Download PDF

Info

Publication number
CN116167882A
CN116167882A CN202310191889.5A CN202310191889A CN116167882A CN 116167882 A CN116167882 A CN 116167882A CN 202310191889 A CN202310191889 A CN 202310191889A CN 116167882 A CN116167882 A CN 116167882A
Authority
CN
China
Prior art keywords
conditional expression
expression
conditional
target
identification code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310191889.5A
Other languages
Chinese (zh)
Inventor
胡振宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Pinwei Software Co Ltd
Original Assignee
Guangzhou Pinwei Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Pinwei Software Co Ltd filed Critical Guangzhou Pinwei Software Co Ltd
Priority to CN202310191889.5A priority Critical patent/CN116167882A/en
Publication of CN116167882A publication Critical patent/CN116167882A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • General Business, Economics & Management (AREA)
  • Computational Linguistics (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Technology Law (AREA)
  • General Health & Medical Sciences (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

本申请提供了一种条件表达式动态配置方法、会计条件计算方法及装置。所述条件表达式动态配置方法包括:响应于条件表达式创建请求,显示表达式编辑页面,并解析条件表达式创建请求确定目标应用系统;识别用户通过表达式编辑页面配置的编辑项;根据内部运算符、对象参数的来源代码、条件值类型和条件值常量创建单体条件式;若识别到多个单体条件式,则识别用户配置的用于连接各单体条件式的逻辑运算符及结合符号;根据逻辑运算符、结合符号以及各单体条件式的排序将各单体条件式构建条件表达式;将标识代码与条件表达式进行关联;将条件表达式保存至目标应用系统对应的表达式数据库。本申请能够根据会计工作需求动态配置条件表达式以进行条件计算。

Figure 202310191889

The application provides a method for dynamically configuring conditional expressions, a method and device for calculating accounting conditions. The method for dynamically configuring conditional expressions includes: responding to a conditional expression creation request, displaying an expression editing page, and analyzing the conditional expression creation request to determine a target application system; identifying the editing items configured by the user through the expression editing page; according to internal Operators, source codes of object parameters, conditional value types, and conditional value constants to create a single conditional expression; if multiple single conditional expressions are identified, then identify the logical operator and Combination symbols; construct conditional expressions for each single conditional expression according to the logical operator, combination symbol and the ordering of each single conditional expression; associate the identification code with the conditional expression; save the conditional expression to the target application system corresponding Expression database. This application can dynamically configure conditional expressions to perform conditional calculations according to accounting work requirements.

Figure 202310191889

Description

条件表达式动态配置方法、会计条件计算方法及装置Conditional expression dynamic configuration method, accounting condition calculation method and device

技术领域technical field

本申请涉及计算机技术领域,尤其涉及一种条件表达式动态配置方法、会计条件计算方法及装置。The present application relates to the field of computer technology, in particular to a method for dynamically configuring conditional expressions, a method and a device for calculating accounting conditions.

背景技术Background technique

在财务会计分录中需要进行大量的条件计算,包括会计定义、行类型、账户推导规则、日记账行定义等都需要进行复杂的条件表达式计算,现有的计算工具无法提供可动态调整的条件计算,对于条件计算大多需要会计人员进行人工计算后再录入系统,需要花费大量的时间,且容易出现错误。A large number of conditional calculations are required in financial accounting entries, including accounting definitions, line types, account derivation rules, journal line definitions, etc., all of which require complex conditional expression calculations. Existing calculation tools cannot provide dynamically adjustable conditions For calculation, most of the conditional calculations require accountants to manually calculate and then enter the system, which takes a lot of time and is prone to errors.

发明内容Contents of the invention

本申请实施例提供了一种条件表达式动态配置方法、会计条件方法及装置,能够根据会计工作需求动态配置条件表达式用以进行条件计算,准确快速地实现会计条件计算。The embodiment of the present application provides a conditional expression dynamic configuration method, accounting condition method and device, which can dynamically configure conditional expressions according to accounting work requirements for conditional calculation, and accurately and quickly realize accounting conditional calculation.

第一方面,本申请提供了一种条件表达式动态配置方法,包括:In the first aspect, the present application provides a method for dynamically configuring conditional expressions, including:

响应于条件表达式创建请求,显示表达式编辑页面,并解析所述条件表达式创建请求确定目标应用系统;In response to a conditional expression creation request, display an expression editing page, and analyze the conditional expression creation request to determine a target application system;

识别用户通过所述表达式编辑页面配置的单体条件式中的内部运算符、对象参数的来源代码、条件值类型和条件值常量,以及所述条件表达式的标识代码;所述内部运算符包括算术运算符和/或关系运算符;Identify the internal operator in the single conditional expression configured by the user through the expression editing page, the source code of the object parameter, the conditional value type and the conditional value constant, and the identification code of the conditional expression; the internal operator include arithmetic and/or relational operators;

根据所述内部运算符、对象参数的来源代码、条件值类型和条件值常量创建单体条件式;creating a singleton conditional from said internal operator, the source code of the object parameter, the conditional value type and the conditional value constant;

若识别到多个单体条件式,则识别用户配置的用于连接各单体条件式的逻辑运算符及结合符号;If multiple monomer conditional expressions are identified, identify the logical operators and combination symbols configured by the user for connecting each monomer conditional expression;

根据逻辑运算符、结合符号以及各单体条件式的排序将各单体条件式构建所述条件表达式;Constructing the conditional expressions for each individual conditional expression according to logical operators, combination symbols and the ordering of each individual conditional expression;

将所述标识代码与所述条件表达式进行关联;associating the identification code with the conditional expression;

将所述条件表达式保存至所述目标应用系统对应的表达式数据库。The conditional expression is saved to an expression database corresponding to the target application system.

在其中一个实施例中,所述方法还包括:In one embodiment, the method also includes:

若仅识别到一个单体条件式,则将所述单体条件式作为所述条件表达式;If only one single conditional expression is identified, then use the single conditional expression as the conditional expression;

将所述标识代码与所述条件表达式进行关联;associating the identification code with the conditional expression;

将所述条件表达式保存至所述目标应用系统对应的表达式数据库。The conditional expression is saved to an expression database corresponding to the target application system.

在其中一个实施例中,所述方法还包括:In one embodiment, the method also includes:

获取条件表达式编辑请求;所述条件表达式编辑请求包括待编辑条件表达式的标识代码;Obtain a conditional expression editing request; the conditional expression editing request includes an identification code of the conditional expression to be edited;

根据所述待标记条件表达式的标识代码获取所述待编辑条件表达式,并在表达式编辑页面显示编辑项;所述编辑项包括结合符号、内部运算符、对象参数的来源代码、条件值类型、条件值常量及逻辑运算符;Obtain the conditional expression to be edited according to the identification code of the conditional expression to be marked, and display the editing item on the expression editing page; the editing item includes a combination symbol, an internal operator, a source code of an object parameter, and a conditional value Types, conditional value constants, and logical operators;

若任意编辑项发生修改,则根据修改后编辑项更新所述待编辑条件表达式。If any edited item is modified, the conditional expression to be edited is updated according to the modified edited item.

在其中一个实施例中,所述方法还包括:In one embodiment, the method also includes:

在所述表达式编辑页面预览所述条件表达式;previewing the conditional expression on the expression editing page;

响应于用户输入模拟计算请求,基于所述模拟计算请求中的模拟对象参数和模拟条件值常量,根据所述条件表达式构建后缀表达式进行模拟计算;In response to the user inputting a simulation calculation request, based on the simulation object parameters and simulation condition value constants in the simulation calculation request, constructing a suffix expression according to the conditional expression to perform simulation calculation;

将所述条件表达式及模拟计算结果在所述表达式编辑页面进行展示。Display the conditional expression and simulation calculation results on the expression editing page.

在其中一个实施例中,所述方法还包括:In one embodiment, the method also includes:

获取条件表达式删除请求;所述条件表达式删除请求包括待删除条件表达式的标识代码;Obtain a conditional expression deletion request; the conditional expression deletion request includes the identification code of the conditional expression to be deleted;

根据所述待删除条件表达式的标识代码查找所述待删除条件表达式并执行删除操作。Searching for the conditional expression to be deleted according to the identification code of the conditional expression to be deleted and performing a deletion operation.

第二方面,本申请提供一种会计条件计算方法,所述方法包括:In a second aspect, the present application provides a method for calculating accounting conditions, the method comprising:

获取条件计算请求;所述条件计算请求包括目标条件表达式的标识代码及请求者的身份信息;其中,所述目标条件表达式为根据如上述任一项实施例所述的条件表达式动态配置方法预先配置生成的至少一个条件表达式;Obtain a conditional calculation request; the conditional calculation request includes the identification code of the target conditional expression and the identity information of the requester; wherein, the target conditional expression is dynamically configured according to the conditional expression as described in any one of the above-mentioned embodiments At least one conditional expression generated by method pre-configuration;

根据所述身份信息及所述目标条件表达式的标识代码判断所述请求者是否具备所述目标条件表达式的调用权限;judging whether the requester has the calling authority of the target conditional expression according to the identity information and the identification code of the target conditional expression;

若所述请求者具备所述目标条件表达式的调用权限,则根据所述目标条件表达式的标识代码调用所述目标条件表达式;If the requester has the calling authority of the target conditional expression, calling the target conditional expression according to the identification code of the target conditional expression;

根据所述目标条件表达式中对象参数的来源代码获取对象参数;Obtaining the object parameter according to the source code of the object parameter in the target condition expression;

基于所述目标条件表达式及所述对象参数创建后缀表达式进行计算得到条件计算结果。A suffix expression is created based on the target condition expression and the object parameter to perform calculation to obtain a condition calculation result.

第三方面,本申请提供了一种条件表达式动态配置装置,所述装置包括:In a third aspect, the present application provides a device for dynamically configuring conditional expressions, the device comprising:

页面显示模块,用于响应于条件表达式创建请求,显示表达式编辑页面,并解析所述条件表达式创建请求确定目标应用系统;A page display module, configured to display an expression editing page in response to a conditional expression creation request, and analyze the conditional expression creation request to determine a target application system;

识别模块,用于识别用户通过所述表达式编辑页面配置的单体条件式中的内部运算符、对象参数的来源代码、条件值类型和条件值常量,以及所述条件表达式的标识代码;所述内部运算符包括算术运算符和/或关系运算符;An identification module, used to identify the internal operator in the single conditional expression configured by the user through the expression editing page, the source code of the object parameter, the conditional value type and the conditional value constant, and the identification code of the conditional expression; The internal operators include arithmetic operators and/or relational operators;

条件式创建模块,用于根据所述内部运算符、对象参数的来源代码、条件值类型和条件值常量创建单体条件式;A conditional expression creation module, which is used to create a single conditional expression according to the internal operator, the source code of the object parameter, the conditional value type and the conditional value constant;

第一获取模块,用于在识别到多个单体条件式时,识别用户配置的用于连接各单体条件式的逻辑运算符及结合符号;The first acquisition module is used to identify logical operators and combination symbols configured by the user for connecting the individual conditional expressions when multiple individual conditional expressions are identified;

表达式构建模块,用于根据逻辑运算符、结合符号以及各单体条件式的排序将各单体条件式构建所述条件表达式;An expression building module, which is used to construct the conditional expression for each individual conditional expression according to the logical operator, the combination symbol and the ordering of each individual conditional expression;

关联模块,用于将所述标识代码与所述条件表达式进行关联;an association module, configured to associate the identification code with the conditional expression;

保存模块,用于将所述条件表达式保存至所述目标应用系统对应的表达式数据库。A saving module, configured to save the conditional expression to an expression database corresponding to the target application system.

第四方面,本申请提供了一种会计条件计算装置,包括:In a fourth aspect, the present application provides an accounting condition calculation device, including:

第二获取模块,用于获取条件计算请求;所述条件计算请求包括目标条件表达式的标识代码及请求者的身份信息;其中,所述目标条件表达式为根据如上述任一项实施例所述的条件表达式动态配置方法预先配置生成的至少一个条件表达式;The second obtaining module is used to obtain a condition calculation request; the condition calculation request includes the identification code of the target condition expression and the identity information of the requester; wherein, the target condition expression is according to any one of the above-mentioned embodiments The above-mentioned conditional expression dynamic configuration method pre-configures at least one conditional expression generated;

权限识别模块,用于根据所述身份信息及所述目标条件表达式的标识代码判断所述请求者是否具备所述目标条件表达式的调用权限;An authority identification module, configured to judge whether the requester has the calling authority of the target condition expression according to the identity information and the identification code of the target condition expression;

调用模块,用于在所述请求者具备所述目标条件表达式的调用权限时,根据所述目标条件表达式的标识代码调用所述目标条件表达式;A calling module, configured to call the target conditional expression according to the identification code of the target conditional expression when the requester has the calling authority of the target conditional expression;

第三获取模块,用于根据所述目标条件表达式中对象参数的来源代码获取对象参数;The third obtaining module is used to obtain the object parameter according to the source code of the object parameter in the target condition expression;

计算模块,用于基于所述目标条件表达式及所述对象参数创建后缀表达式进行计算得到条件计算结果。A calculation module, configured to create a suffix expression based on the target condition expression and the object parameter to perform calculation to obtain a condition calculation result.

本申请提供的条件表达式动态配置方法及装置,在用户发起条件表达式创建请求时,触发条件表达式的创建,显示表达式编辑页面,用户通过表达式编辑页面进行单体条件式的配置,利用算术运算符、关系运算符配置以对象参数为计算对象,与各种条件值类型的条件值常量进行条件计算的单体条件式,并且可以通过配置逻辑运算符和结合符号组合多个单体条件式,在存在多个单体条件式时,根据单体条件式的排序,根据用户配置的逻辑运算符进行组合,构建出用户需要的条件表达式,将用户配置的标识代码与条件表达式进行关联,并保存至用户在发起条件表达式创建请求时选择的条件表达式所属的目标应用系统中,便于后续进行条件表达式的管理和使用,能够根据需要动态配置条件表达式用以帮助会计人员实现条件计算。The method and device for dynamically configuring conditional expressions provided by this application triggers the creation of conditional expressions when a user initiates a request for creating conditional expressions, and displays an expression editing page. The user configures a single conditional expression through the expression editing page. Arithmetic operators and relational operators are used to configure single conditional expressions that take object parameters as calculation objects and perform conditional calculations with conditional value constants of various conditional value types, and multiple monomers can be combined by configuring logical operators and combination symbols Conditional expression, when there are multiple single conditional expressions, according to the sorting of the single conditional expressions and the combination of logical operators configured by the user, the conditional expression required by the user is constructed, and the identification code configured by the user is combined with the conditional expression Correlate and save to the target application system to which the conditional expression selected by the user when initiating a conditional expression creation request facilitates subsequent management and use of conditional expressions, and can dynamically configure conditional expressions as needed to help accountants Personnel implements conditional calculations.

另一方面,本申请提供的会计条件计算方法及装置,根据请求者发起的条件计算请求触发条件计算,条件计算请求包括请求者需要使用的目标条件表达式的标识代码以及请求者的身份信息,目标条件表达式为用户根据需要基于条件表达式动态配置方法预先配置生成,接收到条件计算请求时,基于请求者的身份信息验证其是否具备目标条件表达式的调用权限,在验证请求者具备调用权限是,执行目标条件表达式的调用,根据目标条件表达式中的对象参数的来源代码获取对象参数,并创建后缀表达式进行计算即可得到条件计算结果,能够根据不同的计算需要快速实现条件计算,使用方便且计算准确,能够提高会计分录的效率。On the other hand, the accounting condition calculation method and device provided by this application trigger condition calculation according to the condition calculation request initiated by the requester, and the condition calculation request includes the identification code of the target condition expression that the requester needs to use and the identity information of the requester, The target condition expression is pre-configured and generated by the user based on the condition expression dynamic configuration method according to the user's needs. When the condition calculation request is received, it is verified based on the identity information of the requester whether he has the call permission of the target condition expression. After verifying that the requester has the call The authority is to execute the call of the target condition expression, obtain the object parameter according to the source code of the object parameter in the target condition expression, and create a suffix expression for calculation to obtain the condition calculation result, which can quickly realize the condition according to different calculation needs Calculation, easy to use and accurate calculation, can improve the efficiency of accounting entries.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present application. Those skilled in the art can also obtain other drawings based on these drawings without any creative effort.

图1为一个实施例中,条件表达式动态配置方法的流程示意图;Fig. 1 is a schematic flow diagram of a conditional expression dynamic configuration method in one embodiment;

图2为一个实施例中,条件表达式动态配置方法还包括的步骤流程示意图;Fig. 2 is a schematic flow diagram of steps further included in the conditional expression dynamic configuration method in one embodiment;

图3为一个实施例中,会计条件计算方法的流程示意图;Fig. 3 is a schematic flow chart of an accounting condition calculation method in one embodiment;

图4为一个实施例中,条件表达式动态配置装置的结构框图;FIG. 4 is a structural block diagram of a conditional expression dynamic configuration device in an embodiment;

图5为一个实施例中,会计条件计算装置的结构框图;Fig. 5 is in an embodiment, the structural block diagram of accounting condition calculating device;

图6为一个实施例中,计算机设备的内部结构图。Fig. 6 is an internal structure diagram of a computer device in one embodiment.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

如图1所示,本申请实施例提供了一种条件表达式动态配置方法,包括:As shown in Figure 1, the embodiment of this application provides a method for dynamically configuring conditional expressions, including:

步骤S101,响应于条件表达式创建请求,显示表达式编辑页面,并解析所述条件表达式创建请求确定目标应用系统。Step S101 , in response to a conditional expression creation request, display an expression editing page, and analyze the conditional expression creation request to determine a target application system.

用户在需要创建新的条件表达式时,发起条件表达式创建请求进行触发,条件表达式创建请求中包含了用户选择的目标应用系统的信息,目标应用系统是指用户本次创建的条件表达式需要应用的应用系统,在创建时将条件表达式与目标应用系统进行绑定,便于后续管理和使用。表达式编辑页面用于供用户进行条件表达式的配置。When the user needs to create a new conditional expression, the user initiates a conditional expression creation request to trigger it. The conditional expression creation request contains the information of the target application system selected by the user. The target application system refers to the conditional expression created by the user this time. For the application system that needs to be applied, the conditional expression is bound to the target application system when creating it, which is convenient for subsequent management and use. The expression editing page is used for users to configure conditional expressions.

步骤S102,识别用户通过所述表达式编辑页面配置的单体条件式中内部运算符、对象参数的来源代码、条件值类型和条件值常量,以及所述条件表达式的标识代码。Step S102, identifying the internal operator in the single conditional expression configured by the user through the expression editing page, the source code of the object parameter, the conditional value type, the conditional value constant, and the identification code of the conditional expression.

其中,所述内部运算符包括算术运算符和/或关系运算符,算术运算符包括但不限于“+”、“-”、“*”、“/”,关系运算符包括但不限于“>”、“<”、“=”、“≠”、“≥”、“≤”、“in”、“not in”、“like”、“not like”。单体条件式是指仅包括一个条件计算的计算式,通过配置对象参数的来源代码、内部运算符、条件值类型和条件值常量即可实现对每个单体条件式的编辑。条件值是预先配置的用于进行条件计算的参考常量,条件值类型包括常量、常量列表和常量map。条件表达式的标识代码即为用户为该条件表达式定义的唯一标识,后续可以通过标识代码进行查找、调用、编辑等操作。Wherein, the internal operators include arithmetic operators and/or relational operators, arithmetic operators include but not limited to "+", "-", "*", "/", relational operators include but not limited to "> ", "<", "=", "≠", "≥", "≤", "in", "not in", "like", "not like". A single conditional expression refers to a calculation expression that includes only one conditional calculation. Each single conditional expression can be edited by configuring the source code, internal operator, conditional value type, and conditional value constant of the object parameter. The condition value is a pre-configured reference constant for condition calculation, and the condition value types include constant, constant list and constant map. The identification code of the conditional expression is the unique identification defined by the user for the conditional expression, and subsequent operations such as searching, calling, and editing can be performed through the identification code.

步骤S103,根据所述内部运算符、对象参数的来源代码、条件值类型和条件值常量创建单体条件式。Step S103, creating a single conditional expression according to the internal operator, the source code of the object parameter, the conditional value type and the conditional value constant.

基于用户配置的单个单体条件式的内部运算符、对象参数的来源代码、条件值类型和条件值常量完成单体条件式的构建。The construction of a single conditional expression is completed based on the internal operator of the single single conditional expression configured by the user, the source code of the object parameter, the condition value type and the condition value constant.

例如,配置的单体条件式的对象参数来源代码为yy,内部运算符为>,条件值类型为常量,条件值常量为22,则单体条件式即为yy>22,根据来源代码获取对象参数,若yy对应的对象参数为30,则此单体条件式输出结果为ture;若yy对应的对象参数为10,则此单体条件式输出结果为fulse。For example, if the source code of the object parameter of the configured single conditional expression is yy, the internal operator is >, the condition value type is constant, and the conditional value constant is 22, then the single conditional expression is yy>22, and the object is obtained according to the source code Parameters, if the object parameter corresponding to yy is 30, the output result of this single conditional expression is true; if the object parameter corresponding to yy is 10, the output result of this single conditional expression is false.

步骤S104,识别是否存在多个单体条件式。Step S104, identifying whether there are multiple single conditional expressions.

步骤S105,若仅识别到一个单体条件式,则将所述单体条件式作为所述条件表达式。Step S105, if only one single conditional expression is identified, then use the single conditional expression as the conditional expression.

对于用户仅创建了一个单体条件式的情况,即认为用户本次所要创建的条件表达式仅由一个单体条件式构成,因此直接将该单体条件式作为条件表达式进行后续步骤处理。For the case where the user has created only one single conditional expression, it is considered that the conditional expression to be created by the user this time consists of only one single conditional expression, so the single conditional expression is directly used as a conditional expression for subsequent steps.

步骤S106,若识别到多个单体条件式,则识别用户配置的用于连接各单体条件式的逻辑运算符和结合符号。Step S106, if multiple individual conditional expressions are identified, then identify logical operators and combination symbols configured by the user for connecting individual individual conditional expressions.

对于用户创建了多个单体条件式的情况,则认为用户本次需要创建由多个单体条件式组合构成的条件表达式,此时需要识别用户配置的逻辑运算符和结合符号。其中,逻辑运算符包括“and”、“or”,结合符号是指用于改变各单体条件式优先级的操作符,包括但不限于“(”和“)”。If the user has created multiple single conditional expressions, it is considered that the user needs to create a conditional expression composed of multiple single conditional expressions this time. At this time, it is necessary to identify the logical operators and combination symbols configured by the user. Among them, logical operators include "and" and "or", and combination symbols refer to operators used to change the priority of individual conditional expressions, including but not limited to "(" and ")".

步骤S107,根据逻辑运算符、结合符号以及各单体条件式的排序将各单体条件式构建所述条件表达式。Step S107, construct the conditional expression for each individual conditional expression according to the logical operators, combination symbols and the ordering of each individual conditional expression.

单体条件式的排序可以用户自行配置,若未配置,则按照单体条件式的创建顺序进行排序,按照单体条件式的创建顺序从前往后,结合用户配置的逻辑运算符进行相邻单体条件式的连接。The sorting of single conditional expressions can be configured by the user. If not configured, it will be sorted according to the order of creation of single conditional expressions, from front to back according to the creation order of single conditional expressions, and combined with logical operators configured by users body conditional connection.

示例性的,如表1所示,用户配置了如下的两条单体条件式:Exemplarily, as shown in Table 1, the user configures the following two single conditional expressions:

Figure BDA0004105923480000071
Figure BDA0004105923480000071

表1Table 1

则上述两条单体条件式组合构成的条件表达式如下:Then the conditional expression formed by the combination of the above two single conditional expressions is as follows:

(yy=11and rt>22)(yy=11 and rt>22)

不同条件表达式之间也可以进行相互组合,在上述条件表达式与其他条件表达式组合时,通过结合符号将此条件表达式作为一个整体进行计算,避免在与其他条件表达式组合时导致计算错误。Different conditional expressions can also be combined with each other. When the above conditional expression is combined with other conditional expressions, the conditional expression is calculated as a whole by combining symbols to avoid calculation when combined with other conditional expressions mistake.

步骤S108,将所述标识代码与构建的条件表达式进行关联。Step S108, associating the identification code with the constructed conditional expression.

每个创建的条件表达式均有一个唯一的标识代码,在创建时通过将用户定义的标识代码与条件表达式进行关联,通过标识代码可以进行条件表达式的管理。Each created conditional expression has a unique identification code, and the user-defined identification code is associated with the conditional expression during creation, and the conditional expression can be managed through the identification code.

步骤S109,将所述条件表达式保存至所述目标应用系统对应的表达式数据库。Step S109, saving the conditional expression to an expression database corresponding to the target application system.

为了便于对条件表达式的管理和使用,将每个应用系统所属的表达式进行分别保存,创建条件表达式后,将条件表达式保存至用户选择的目标应用系统对应的表达式数据库。In order to facilitate the management and use of conditional expressions, the expressions belonging to each application system are saved separately. After the conditional expressions are created, the conditional expressions are saved to the expression database corresponding to the target application system selected by the user.

本实施例中,在用户发起条件表达式创建请求时,触发条件表达式的创建,显示表达式编辑页面,用户通过表达式编辑页面进行单体条件式的配置,利用算术运算符、关系运算符配置以对象参数为计算对象,与各种条件值类型的条件值常量进行条件计算的单体条件式,并且可以通过配置逻辑运算符和结合符号组合多个单体条件式,在存在多个单体条件式时,根据单体条件式的排序,根据用户配置的逻辑运算符进行组合,构建出用户需要的条件表达式,将用户配置的标识代码与条件表达式进行关联,并保存至用户在发起条件表达式创建请求时选择的条件表达式所属的目标应用系统中,便于后续进行条件表达式的管理和使用,能够根据需要动态配置条件表达式用以帮助会计人员实现条件计算。In this embodiment, when the user initiates a conditional expression creation request, the creation of the conditional expression is triggered, and the expression editing page is displayed. The user configures the single conditional expression through the expression editing page, using arithmetic operators and relational operators Configure a single conditional expression that takes object parameters as the calculation object and performs conditional calculation with condition value constants of various condition value types, and can combine multiple single conditional expressions by configuring logical operators and combination symbols. When there are multiple single conditional expressions When using a single conditional expression, the conditional expression required by the user is constructed according to the ordering of the single conditional expression and the logical operators configured by the user, and the identification code configured by the user is associated with the conditional expression, and saved to the user in the In the target application system to which the conditional expression is selected when initiating a conditional expression creation request, it is convenient for subsequent management and use of the conditional expression, and the conditional expression can be dynamically configured as needed to help accountants realize conditional calculation.

如图2所示,在其中一个实施例中,所述方法还包括:As shown in Figure 2, in one of the embodiments, the method also includes:

步骤S201,获取条件表达式编辑请求。Step S201, obtaining a conditional expression editing request.

其中,条件表达式编辑请求为用户发起的针对已创建的条件表达式进行编辑的操作请求,条件表达式编辑请求包括待编辑条件表达式的标识代码,用户可以通过在表达式管理目录中选择需要进行编辑的条件表达式,基于选择的条件表达式获取标识代码自动生成条件表达式编辑请求,或者手动输入需要编辑的条件表达式的标识代码,进而生成条件表达式编辑请求。Among them, the conditional expression editing request is an operation request initiated by the user to edit the created conditional expression. The conditional expression editing request includes the identification code of the conditional expression to be edited. The user can select the desired To edit the conditional expression, obtain the identification code based on the selected conditional expression to automatically generate a conditional expression editing request, or manually enter the identification code of the conditional expression to be edited, and then generate a conditional expression editing request.

步骤S202,根据所述待标记条件表达式的标识代码获取所述待编辑条件表达式,并在表达式编辑页面显示编辑项。Step S202, obtaining the conditional expression to be edited according to the identification code of the conditional expression to be marked, and displaying the edit item on the expression editing page.

其中,所述编辑项包括结合符号、内部运算符、对象参数的来源代码、条件值类型、条件值常量及逻辑运算符。Wherein, the editing items include combination symbols, internal operators, source codes of object parameters, conditional value types, conditional value constants and logical operators.

识别待编辑条件表达式的各编辑项,并将编辑项在表达式编辑页面显示,即以可编辑的状态进行显示,使得用户能够对条件表达式的部分或全部进行编辑。例如,可以仅对内部运算符进行修改,也可以对所有编辑项进行修改。Identify each editing item of the conditional expression to be edited, and display the editing item on the expression editing page, that is, display it in an editable state, so that the user can edit part or all of the conditional expression. For example, modifications can be made to internal operators only, or to all edit items.

步骤S203,若任意编辑项发生修改,则根据修改后编辑项更新所述待编辑条件表达式。Step S203, if any edited item is modified, update the conditional expression to be edited according to the modified edited item.

如果识别到用户对待编辑条件表达式的任意一个或多个编辑项发生修改,在用户确认修改时,则以修改后的编辑项替换原来的对应编辑项,更新待编辑条件表达式后保存。If it is recognized that any one or more edit items of the conditional expression to be edited by the user have been modified, when the user confirms the modification, the modified edited item is used to replace the original corresponding edited item, and the conditional expression to be edited is updated and saved.

本实施例中用户能够随时根据需要对已有条件表达式进行动态修改,在计算规则发生变化,或者发现条件表达式存在错误需要修改时,直接在已创建的条件表达式上即可进行修改,无需重新创建并手动删除原有的条件表达式,灵活性高,使用方便。In this embodiment, the user can dynamically modify the existing conditional expression at any time as needed. When the calculation rule changes, or when an error is found in the conditional expression and needs to be modified, the user can modify it directly on the created conditional expression. There is no need to recreate and manually delete the original conditional expressions, which is highly flexible and easy to use.

在其中一个实施例中,所述方法还包括:In one embodiment, the method also includes:

在表达式编辑页面预览条件表达式;Preview conditional expressions on the expression editing page;

响应于用户输入模拟计算请求,基于模拟计算请求中的模拟对象参数和模拟条件值常量,根据所述条件表达式构建后缀表达式进行模拟计算;In response to the user inputting a simulation calculation request, based on the simulation object parameters and simulation condition value constants in the simulation calculation request, constructing a suffix expression according to the conditional expression to perform simulation calculation;

将所述条件表达式及模拟计算结果在所述表达式编辑页面进行展示。Display the conditional expression and simulation calculation results on the expression editing page.

本实施例,能够在创建或修改条件表达式时对当前编辑中的条件表达式进行预览,用户能够对表达式编辑页面预览的条件表达式进行检查,若存在错误能够及时进行修改,并且用户可以发起模拟计算请求,模拟计算请求用于触发对当前预览的条件表达式进行模拟计算,用户发起的模拟计算请求中包括了用户配置的模拟对象参数和模拟条件值常量,即模拟计算时不进行对象参数和条件值常量的调用,而是以模拟对象参数和模拟条件值常量作为计算的操作数进行计算。基于当前预览的条件表达式以及模拟对象参数和模拟条件值常量构建后缀表达式进行计算。In this embodiment, when creating or modifying a conditional expression, the conditional expression currently being edited can be previewed, and the user can check the conditional expression previewed on the expression editing page, and if there is an error, it can be modified in time, and the user can Initiate a simulation calculation request. The simulation calculation request is used to trigger the simulation calculation of the currently previewed conditional expression. The simulation calculation request initiated by the user includes the user-configured simulation object parameters and simulation condition value constants, that is, the simulation calculation does not perform object The parameters and condition value constants are called, but the simulation object parameters and simulation condition value constants are used as the operands of the calculation. Build postfix expressions based on the currently previewed conditional expressions, simulation object parameters and simulation condition value constants for calculation.

其中,对条件表达式的计算过程为:对后缀表达式从前往后进行遍历,通过常量栈和运算符栈进行压栈计算,若遍历到空格则跳过,遍历到操作数则压入操作数栈,若遍历到内部运算符、结合符号或逻辑运算符,则压入运算符栈,若栈内运算符比当前遍历到的运算符优先级高或者同等优先级,则将常量栈中的操作数弹出栈进行运算,并将计算结果压入常量栈,继续遍历直至得到计算结果后输出。Among them, the calculation process of the conditional expression is: traverse the suffix expression from front to back, push the stack calculation through the constant stack and operator stack, skip if it traverses to a space, and push the operand when it traverses to an operand Stack. If an internal operator, combination symbol or logical operator is traversed, it will be pushed into the operator stack. If the operator in the stack has a higher or equal priority than the currently traversed operator, the operation in the constant stack The number is popped from the stack for calculation, and the calculation result is pushed into the constant stack, and the traversal continues until the calculation result is obtained and output.

在其中一个实施例中,所述方法还包括:In one embodiment, the method also includes:

获取条件表达式删除请求;所述条件表达式删除请求包括待删除条件表达式的标识代码;Obtain a conditional expression deletion request; the conditional expression deletion request includes the identification code of the conditional expression to be deleted;

根据所述待删除条件表达式的标识代码查找所述待删除条件表达式并执行删除操作。Searching for the conditional expression to be deleted according to the identification code of the conditional expression to be deleted and performing a deletion operation.

本实施例中,用户通过发起条件表达式删除请求对待删除条件表达式执行删除操作,用户可以通过在表达式管理目录中选择需要进行删除的条件表达式,基于选择的条件表达式获取标识代码自动生成条件表达式删除请求,或者手动输入需要删除的条件表达式的标识代码,进而生成条件表达式删除请求,基于条件表达式删除请求中的待删除条件表达式的标识代码在数据库中查找到待删除条件表达式执行删除操作。In this embodiment, the user initiates a conditional expression deletion request to perform a deletion operation on the conditional expression to be deleted. The user can select the conditional expression to be deleted in the expression management directory, and obtain the identification code automatically based on the selected conditional expression. Generate a conditional expression deletion request, or manually enter the identification code of the conditional expression to be deleted, and then generate a conditional expression deletion request, based on the identification code of the conditional expression to be deleted in the conditional expression deletion request, find the A delete conditional expression performs a delete operation.

如图3所示,本申请实施例提供一种会计条件计算方法,所述方法包括:As shown in Figure 3, the embodiment of this application provides a calculation method for accounting conditions, the method includes:

步骤S301,获取条件计算请求。Step S301, acquiring a condition calculation request.

其中,所述条件计算请求包括目标条件表达式的标识代码及请求者的身份信息;所述目标条件表达式为根据如上述任一项实施例所述的条件表达式动态配置方法预先配置生成的至少一个条件表达式。Wherein, the condition calculation request includes the identification code of the target condition expression and the identity information of the requester; the target condition expression is pre-configured and generated according to the condition expression dynamic configuration method described in any one of the above embodiments At least one conditional expression.

请求者在发起条件计算请求时,会在条件计算请求中携带身份信息,身份信息为请求者的账号或身份ID,管理员可以通过身份信息为各使用者分配条件表达式的调用权限。When the requester initiates a conditional calculation request, it will carry identity information in the conditional calculation request. The identity information is the account number or ID of the requester. The administrator can assign the calling authority of the conditional expression to each user through the identity information.

在其中一个实施例中,管理员可以直接对单个条件表达式的调用权限进行分配。在其中一个实施例中,管理员可以以每个应用系统所包含的条件表达式进行权限分配,即为使用者分配了任意应用系统的条件表达式调用权限,则该使用者可以对该应用系统包含的所有条件表达式进行调用,且此处的所有表达式包括分配权限之后新增的条件表达式,即使用者能够调用当前时刻所有隶属于该应用系统的条件表达式。In one of the embodiments, the administrator can directly assign the calling authority of a single conditional expression. In one of the embodiments, the administrator can assign permissions based on the conditional expressions contained in each application system, that is, if the user is assigned the conditional expression call permission of any application system, the user can All the conditional expressions included are called, and all the expressions here include the newly added conditional expressions after the permission is assigned, that is, the user can call all the conditional expressions belonging to the application system at the current moment.

步骤S302,根据所述身份信息及所述目标条件表达式的标识代码判断所述请求者是否具备所述目标条件表达式的调用权限。Step S302, judging whether the requester has the calling authority of the target conditional expression according to the identity information and the identification code of the target conditional expression.

基于管理员分配的调用权限进行权限验证,根据目标条件表达式的标识代码查找到目标条件表达式,并根据身份信息验证请求者是否被分配有目标条件表达式的调用权限。在其中一个实施例中,若根据标识代码未能查询到对应的条件表达式,则直接返回调用失败结果。Permission verification is performed based on the call permission assigned by the administrator, the target condition expression is found according to the identification code of the target condition expression, and whether the requester is assigned the call permission of the target condition expression is verified according to the identity information. In one of the embodiments, if the corresponding conditional expression cannot be queried according to the identification code, the call failure result is returned directly.

步骤S303,若所述请求者具备所述目标条件表达式的调用权限,则根据所述目标条件表达式的标识代码调用所述目标条件表达式。Step S303, if the requester has the calling authority of the target conditional expression, call the target conditional expression according to the identification code of the target conditional expression.

步骤S304,根据所述目标条件表达式中对象参数的来源代码获取对象参数。Step S304, obtaining the object parameter according to the source code of the object parameter in the target condition expression.

步骤S305,基于所述目标条件表达式及所述对象参数创建后缀表达式进行计算得到条件计算结果。Step S305, creating a suffix expression based on the target conditional expression and the object parameter to perform calculation to obtain a conditional calculation result.

本实施例中,根据请求者发起的条件计算请求触发条件计算,条件计算请求包括请求者需要使用的目标条件表达式的标识代码以及请求者的身份信息,目标条件表达式为用户根据需要基于条件表达式动态配置方法预先配置生成,接收到条件计算请求时,基于请求者的身份信息验证其是否具备目标条件表达式的调用权限,在验证请求者具备调用权限是,执行目标条件表达式的调用,根据目标条件表达式中的对象参数的来源代码获取对象参数,并创建后缀表达式进行计算即可得到条件计算结果,能够根据不同的计算需要快速实现条件计算,使用方便且计算准确,能够提高会计分录的效率。In this embodiment, the condition calculation is triggered according to the condition calculation request initiated by the requester. The condition calculation request includes the identification code of the target condition expression that the requester needs to use and the identity information of the requester. The expression dynamic configuration method is pre-configured and generated. When a condition calculation request is received, it is verified based on the identity information of the requester whether it has the calling authority of the target conditional expression. When the requester has the calling authority, the call of the target conditional expression is executed. , get the object parameter according to the source code of the object parameter in the target conditional expression, and create a suffix expression for calculation to get the conditional calculation result, which can quickly realize the conditional calculation according to different calculation needs, easy to use and accurate calculation, and can improve Efficiency of accounting entries.

应该理解的是,虽然如上所述的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上所述的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flow charts involved in the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flow charts involved in the above-mentioned embodiments may include multiple steps or stages, and these steps or stages are not necessarily executed at the same time, but may be performed at different times For execution, the execution sequence of these steps or stages is not necessarily performed sequentially, but may be performed in turn or alternately with other steps or at least a part of steps or stages in other steps.

下面对本申请实施例提供的条件表达式动态配置装置进行描述,下文描述的条件表达式动态配置装置与上文描述的条件表达式动态配置方法可相互对应参照。The following describes the device for dynamically configuring conditional expressions provided by the embodiment of the present application. The device for dynamically configuring conditional expressions described below and the method for dynamically configuring conditional expressions described above can be referred to in correspondence.

如图4所示,本申请提供了一种条件表达式动态配置装置400,所述装置包括:As shown in Figure 4, the present application provides a conditional expression dynamic configuration device 400, the device includes:

页面显示模块401,用于响应于条件表达式创建请求,显示表达式编辑页面,并解析所述条件表达式创建请求确定目标应用系统;A page display module 401, configured to display an expression editing page in response to a conditional expression creation request, and analyze the conditional expression creation request to determine a target application system;

识别模块402,用于识别用户通过所述表达式编辑页面配置的单体条件式中的内部运算符、对象参数的来源代码、条件值类型和条件值常量,以及所述条件表达式的标识代码;所述内部运算符包括算术运算符和/或关系运算符;The identification module 402 is used to identify the internal operator in the single conditional expression configured by the user through the expression editing page, the source code of the object parameter, the conditional value type and the conditional value constant, and the identification code of the conditional expression ; the internal operators include arithmetic operators and/or relational operators;

条件式创建模块403,用于根据所述内部运算符、对象参数的来源代码、条件值类型和条件值常量创建单体条件式;A conditional expression creation module 403, configured to create a single conditional expression according to the internal operator, the source code of the object parameter, the conditional value type, and the conditional value constant;

第一获取模块404,用于在识别到多个单体条件式时,识别用户配置的用于连接各单体条件式的逻辑运算符及结合符号;The first acquisition module 404 is used to identify the logical operators and combination symbols configured by the user for connecting the individual conditional expressions when multiple individual conditional expressions are identified;

表达式构建模块405,用于根据逻辑运算符、结合符号以及各单体条件式的排序将各单体条件式构建所述条件表达式;An expression construction module 405, configured to construct the conditional expressions for each individual conditional expression according to logical operators, combination symbols, and the ordering of each individual conditional expression;

关联模块406,用于将所述标识代码与所述条件表达式进行关联;An association module 406, configured to associate the identification code with the conditional expression;

保存模块407,用于将所述条件表达式保存至所述目标应用系统对应的表达式数据库。The saving module 407 is configured to save the conditional expression to an expression database corresponding to the target application system.

在其中一个实施例中,所述表达式构建模块还用于在仅识别到一个单体条件式时,将所述单体条件式作为所述条件表达式。In one of the embodiments, the expression building block is further configured to use the single conditional expression as the conditional expression when only one single conditional expression is recognized.

在其中一个实施例中,所述装置还包括:In one of the embodiments, the device also includes:

第四获取模块,用于获取条件表达式编辑请求;所述条件表达式编辑请求包括待编辑条件表达式的标识代码;The fourth obtaining module is used to obtain a conditional expression editing request; the conditional expression editing request includes an identification code of the conditional expression to be edited;

条件式编辑模块,用于根据所述待标记条件表达式的标识代码获取所述待编辑条件表达式,并在表达式编辑页面显示编辑项;所述编辑项包括结合符号、内部运算符、对象参数的来源代码、条件值类型、条件值常量及逻辑运算符;The conditional editing module is used to obtain the conditional expression to be edited according to the identification code of the conditional expression to be marked, and display the editing item on the expression editing page; the editing item includes a combination symbol, an internal operator, an object Parameter source code, conditional value type, conditional value constant and logical operator;

条件式更新模块,用于在任意编辑项发生修改时,根据修改后编辑项更新所述待编辑条件表达式。A conditional updating module, configured to update the conditional expression to be edited according to the modified edited item when any edited item is modified.

在其中一个实施例中,所述装置还包括:In one of the embodiments, the device also includes:

预览模块,用于在所述表达式编辑页面预览所述条件表达式;A preview module, configured to preview the conditional expression on the expression editing page;

模拟计算模块,用于响应于用户输入模拟计算请求,基于所述模拟计算请求中的模拟对象参数和模拟条件值常量,根据所述条件表达式构建后缀表达式进行模拟计算;A simulation calculation module, configured to respond to a user input simulation calculation request, based on the simulation object parameters and simulation condition value constants in the simulation calculation request, construct a suffix expression according to the conditional expression to perform simulation calculation;

展示模块,用于将所述条件表达式及模拟计算结果在所述表达式编辑页面进行展示。The display module is used to display the conditional expression and simulation calculation results on the expression editing page.

在其中一个实施例中,所述装置还包括:In one of the embodiments, the device also includes:

第五获取模块,用于获取条件表达式删除请求;所述条件表达式删除请求包括待删除条件表达式的标识代码;The fifth obtaining module is used to obtain a conditional expression deletion request; the conditional expression deletion request includes an identification code of the conditional expression to be deleted;

表达式删除模块,用于根据所述待删除条件表达式的标识代码查找所述待删除条件表达式并执行删除操作。An expression deletion module, configured to search for the conditional expression to be deleted according to the identification code of the conditional expression to be deleted and perform a deletion operation.

下面对本申请实施例提供的会计条件计算装置进行描述,下文描述的会计条件计算装置与上文描述的会计条件计算方法可相互对应参照。The accounting condition calculation device provided in the embodiment of the present application is described below, and the accounting condition calculation device described below and the accounting condition calculation method described above can be referred to in correspondence.

如图5所示,本申请实施例提供了一种会计条件计算装置500,包括:As shown in Figure 5, the embodiment of the present application provides an accounting condition calculation device 500, including:

第二获取模块501,用于获取条件计算请求;所述条件计算请求包括目标条件表达式的标识代码及请求者的身份信息;其中,所述目标条件表达式为根据如上述任一项实施例所述的条件表达式动态配置方法预先配置生成的至少一个条件表达式;The second obtaining module 501 is used to obtain a condition calculation request; the condition calculation request includes the identification code of the target condition expression and the identity information of the requester; wherein, the target condition expression is according to any one of the above-mentioned embodiments The conditional expression dynamic configuration method pre-configures at least one conditional expression generated;

权限识别模块502,用于根据所述身份信息及所述目标条件表达式的标识代码判断所述请求者是否具备所述目标条件表达式的调用权限;An authority identification module 502, configured to judge whether the requester has the calling authority of the target conditional expression according to the identity information and the identification code of the target conditional expression;

调用模块503,用于在所述请求者具备所述目标条件表达式的调用权限时,根据所述目标条件表达式的标识代码调用所述目标条件表达式;A calling module 503, configured to call the target conditional expression according to the identification code of the target conditional expression when the requester has the calling authority of the target conditional expression;

第三获取模块504,用于根据所述目标条件表达式中对象参数的来源代码获取对象参数;The third obtaining module 504 is used to obtain the object parameter according to the source code of the object parameter in the target condition expression;

计算模块505,用于基于所述目标条件表达式及所述对象参数创建后缀表达式进行计算得到条件计算结果。Calculation module 505, configured to create a suffix expression based on the target conditional expression and the object parameter to perform calculation to obtain a conditional calculation result.

上述条件表达式动态配置装置及会计条件计算装置中各个模块的划分仅仅用于举例说明,在其他实施例中,可将条件表达式动态配置装置、会计条件计算装置按照需要划分为不同的模块,以完成上述条件表达式动态配置装置、会计条件计算装置的全部或部分功能。上述条件表达式动态配置装置及会计条件计算装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。The division of each module in the above-mentioned conditional expression dynamic configuration device and the accounting condition calculation device is only for illustration. In other embodiments, the conditional expression dynamic configuration device and the accounting condition calculation device can be divided into different modules according to needs. To complete all or part of the functions of the above-mentioned conditional expression dynamic configuration device and accounting condition calculation device. Each module in the above-mentioned conditional expression dynamic configuration device and accounting condition calculation device can be fully or partially realized by software, hardware and combinations thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.

在一个实施例中,本申请还提供了一种存储介质,所述存储介质中存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行如上述任一项实施例所述的条件表达式动态配置方法或会计条件计算方法的步骤。In one embodiment, the present application also provides a storage medium, in which computer-readable instructions are stored, and when the computer-readable instructions are executed by one or more processors, one or more processing The controller executes the steps of the method for dynamically configuring conditional expressions or the method for calculating accounting conditions as described in any one of the above embodiments.

在一个实施例中,本申请还提供了一种计算机设备,所述计算机设备中存储有计算机可读指令,所述一个或多个处理器执行所述计算机可读指令时,执行如上述任一项实施例所述的条件表达式动态配置方法或会计条件计算方法的步骤。In one embodiment, the present application also provides a computer device, where computer-readable instructions are stored in the computer device, and when the one or more processors execute the computer-readable instructions, any one of the above-mentioned The steps of the condition expression dynamic configuration method or the accounting condition calculation method described in the embodiment.

示意性地,在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图6所示。该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质和内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种条件表达式动态配置方法或会计条件计算方法。Schematically, in an embodiment, a computer device is provided, the computer device may be a server, and its internal structure may be as shown in FIG. 6 . The computer device includes a processor, memory and a network interface connected by a system bus. Wherein, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs and databases. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for dynamically configuring conditional expressions or a method for calculating accounting conditions is realized.

本领域技术人员可以理解,图6中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 6 is only a block diagram of a part of the structure related to the solution of this application, and does not constitute a limitation on the computer equipment to which the solution of this application is applied. The specific computer equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-OnlyMemory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic RandomAccess Memory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the computer programs can be stored in a non-volatile computer-readable memory In the medium, when the computer program is executed, it may include the processes of the embodiments of the above-mentioned methods. Wherein, any reference to storage, database or other media used in the various embodiments provided in the present application may include at least one of non-volatile and volatile storage. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive variable memory (ReRAM), magnetic variable memory (Magnetoresistive Random Access Memory, MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (Phase Change Memory, PCM), graphene memory, etc. The volatile memory may include random access memory (Random Access Memory, RAM) or external cache memory. As an illustration and not a limitation, the RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM). The databases involved in the various embodiments provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a blockchain-based distributed database, etc., but is not limited thereto. The processors involved in the various embodiments provided by this application can be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, data processing logic devices based on quantum computing, etc., and are not limited to this.

最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。Finally, it should also be noted that in this text, relational terms such as first and second etc. are only used to distinguish one entity or operation from another, and do not necessarily require or imply that these entities or operations, any such actual relationship or order exists. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。同时,在本说明书中使用的术语“和/或”包括相关所列项目的任何及所有组合。In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In the description of the present application, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined. Meanwhile, the term "and/or" used in this specification includes any and all combinations of the related listed items.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间可以根据需要进行组合,且相同相似部分互相参见即可。Each embodiment in this specification is described in a progressive manner. Each embodiment focuses on the difference from other embodiments. The various embodiments can be combined as needed, and the same and similar parts can be referred to each other. .

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the application. Therefore, the present application will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for dynamically configuring a conditional expression, comprising:
responding to a conditional expression creation request, displaying an expression editing page, and analyzing the conditional expression creation request to determine a target application system;
identifying an internal operator, a source code of an object parameter, a condition value type and a condition value constant in a single conditional expression configured by a user through the expression editing page, and an identification code of the conditional expression; the internal operators include arithmetic operators and/or relational operators;
Creating a monomer conditional expression according to the internal operator, the source code of the object parameter, the condition value type and the condition value constant;
if a plurality of monomer conditional expressions are identified, identifying a logic operator and a combination symbol which are configured by a user and are used for connecting each monomer conditional expression;
constructing each monomer conditional expression according to the logic operator, the combination symbol and the ordering of each monomer conditional expression;
associating the identification code with the conditional expression;
and saving the conditional expression to an expression database corresponding to the target application system.
2. The conditional expression dynamic configuration method according to claim 1, further comprising:
if only one monomer conditional expression is identified, taking the monomer conditional expression as the conditional expression;
associating the identification code with the conditional expression;
and saving the conditional expression to an expression database corresponding to the target application system.
3. The conditional expression dynamic configuration method according to claim 1, further comprising:
acquiring a conditional expression editing request; the conditional expression editing request comprises an identification code of a conditional expression to be edited;
Acquiring the conditional expression to be edited according to the identification code of the conditional expression to be marked, and displaying an editing item on an expression editing page; the editing item comprises a combination symbol, an internal operator, source codes of object parameters, a condition value type, a condition value constant and a logic operator;
and if any editing item is modified, updating the conditional expression to be edited according to the modified editing item.
4. A conditional expression dynamic configuration method according to any one of claims 1 to 3, further comprising:
previewing the conditional expression on the expression editing page;
responding to a user input simulation calculation request, constructing a suffix expression according to the condition expression based on simulation object parameters and simulation condition value constants in the simulation calculation request, and performing simulation calculation;
and displaying the conditional expression and the simulation calculation result on the expression editing page.
5. The conditional expression dynamic configuration method according to claim 1, further comprising:
acquiring a conditional expression deletion request; the conditional expression deleting request comprises an identification code of the conditional expression to be deleted;
Searching the conditional expression to be deleted according to the identification code of the conditional expression to be deleted and executing the deleting operation.
6. A method of accounting condition calculation, the method comprising:
acquiring a condition calculation request; the condition calculation request comprises an identification code of a target condition expression and identity information of a requester; wherein the target conditional expression is at least one conditional expression generated by pre-configuring according to the conditional expression dynamic configuration method according to any one of claims 1 to 5;
judging whether the requester has the calling authority of the target conditional expression according to the identity information and the identification code of the target conditional expression;
if the requester has the calling authority of the target conditional expression, calling the target conditional expression according to the identification code of the target conditional expression;
obtaining object parameters according to source codes of the object parameters in the target conditional expression;
and creating a suffix expression based on the target conditional expression and the object parameter, and calculating to obtain a conditional calculation result.
7. A conditional expression dynamic configuration apparatus, comprising:
The page display module is used for responding to a conditional expression creation request, displaying an expression editing page and analyzing the conditional expression creation request to determine a target application system;
the identification module is used for identifying an internal operator, a source code of an object parameter, a condition value type and a condition value constant in a single conditional expression configured by a user through the expression editing page, and an identification code of the conditional expression; the internal operators include arithmetic operators and/or relational operators;
the conditional creating module is used for creating a monomer conditional expression according to the internal operator, the source code of the object parameter, the condition value type and the condition value constant;
the first acquisition module is used for identifying logic operators and combination symbols which are configured by a user and are used for connecting all the monomer conditional expressions when identifying a plurality of the monomer conditional expressions;
the expression construction module is used for constructing each monomer conditional expression into the conditional expression according to the logic operator, the combination symbol and the ordering of each monomer conditional expression;
the association module is used for associating the identification code with the conditional expression;
and the storage module is used for storing the conditional expression into an expression database corresponding to the target application system.
8. An accounting condition calculation device, comprising:
the second acquisition module is used for acquiring the condition calculation request; the condition calculation request comprises an identification code of a target condition expression and identity information of a requester; wherein the target conditional expression is at least one conditional expression generated by pre-configuring according to the conditional expression dynamic configuration method according to any one of claims 1 to 5;
the permission identification module is used for judging whether the requester has the calling permission of the target conditional expression according to the identity information and the identification code of the target conditional expression;
the calling module is used for calling the target conditional expression according to the identification code of the target conditional expression when the requester has the calling right of the target conditional expression;
the third acquisition module is used for acquiring object parameters according to source codes of the object parameters in the target conditional expression;
and the calculation module is used for creating a suffix expression based on the target conditional expression and the object parameter to calculate so as to obtain a conditional calculation result.
9. A storage medium, characterized by: the storage medium has stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the conditional expression dynamic configuration method of any one of claims 1 to 6 or the accounting condition calculation method of claim 7.
10. A computer device, comprising: one or more processors, and memory;
the memory has stored therein computer readable instructions which, when executed by the one or more processors, perform the steps of the conditional expression dynamic configuration method of any one of claims 1 to 6 or the accounting condition calculation method of claim 7.
CN202310191889.5A 2023-03-01 2023-03-01 Conditional expression dynamic configuration method, accounting condition calculation method and accounting condition calculation device Pending CN116167882A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310191889.5A CN116167882A (en) 2023-03-01 2023-03-01 Conditional expression dynamic configuration method, accounting condition calculation method and accounting condition calculation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310191889.5A CN116167882A (en) 2023-03-01 2023-03-01 Conditional expression dynamic configuration method, accounting condition calculation method and accounting condition calculation device

Publications (1)

Publication Number Publication Date
CN116167882A true CN116167882A (en) 2023-05-26

Family

ID=86418168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310191889.5A Pending CN116167882A (en) 2023-03-01 2023-03-01 Conditional expression dynamic configuration method, accounting condition calculation method and accounting condition calculation device

Country Status (1)

Country Link
CN (1) CN116167882A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116560665A (en) * 2023-07-05 2023-08-08 京东科技信息技术有限公司 Method and device for generating and processing data and credit card marketing rule engine system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116560665A (en) * 2023-07-05 2023-08-08 京东科技信息技术有限公司 Method and device for generating and processing data and credit card marketing rule engine system
CN116560665B (en) * 2023-07-05 2023-11-03 京东科技信息技术有限公司 Method and device for generating and processing data and credit card marketing rule engine system

Similar Documents

Publication Publication Date Title
US20200065313A1 (en) Extensible content object metadata
WO2019019769A1 (en) Service function implementation method, device, computer apparatus and storage medium
CN110727687A (en) Material list conversion method and system
US11775348B2 (en) Managing custom workflows for domain objects defined within microservices
CN110780970A (en) Data screening method, apparatus, device, and computer-readable storage medium
CN109308258A (en) Construction method, device, computer equipment and storage medium of test data
CN115858487A (en) A data migration method and device
CN116167882A (en) Conditional expression dynamic configuration method, accounting condition calculation method and accounting condition calculation device
CN114047855B (en) Form editing method and device and terminal equipment
CN113076086B (en) Metadata management system and method for modeling model object using the same
CN114782125A (en) Product configuration method, apparatus, computer equipment and storage medium
CN116051056A (en) Front-end project management method, front-end project management device, computer equipment and storage medium
CN116701215A (en) Interface test case generation method, system, device and storage medium
CN115756495A (en) Code generation method, device, storage medium and computer equipment
CN114969056A (en) Data screening method and device, storage medium and computer equipment
CN114385630A (en) Blood relationship sorting method, device, equipment, storage medium and program product
CN115617774A (en) Data processing method and device based on configuration management system and computer equipment
CN113867975B (en) A command line quick response method, device and computer equipment
CN116756022A (en) Data preparation methods, devices, computer equipment and storage media
CN119200908A (en) Quality control method, device, computer equipment and storage medium
CN116880927A (en) Rule management method, device, computer equipment and storage medium
CN118535535A (en) File management method, device, computer equipment, storage medium and program product
CN119292694A (en) Configuration checking method, device, computer equipment, readable storage medium and program product for software components
CN114281836A (en) Method and device for managing general data, electronic equipment and computer storage medium
CN119052735A (en) Instruction issuing method, apparatus, computer device, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination