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 PDFInfo
- 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
- monomer
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/12—Accounting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/31—User authentication
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/177—Editing, e.g. inserting or deleting of tables; using ruled lines
- G06F40/18—Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing 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
The application provides a conditional expression dynamic configuration method, an accounting condition calculation method and an accounting condition calculation device. The conditional expression dynamic configuration method comprises the following steps: 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 editing items configured by a user through an expression editing page; creating a monomer conditional expression according to an internal operator, source codes of object parameters, a conditional value type and a conditional 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 a conditional expression of 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. The method and the device can dynamically configure the conditional expression according to the accounting work requirement to perform conditional calculation.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a dynamic configuration method of a conditional expression, and a calculation method and apparatus of accounting conditions.
Background
In the accounting entry, a large number of condition calculations including accounting definitions, line types, account deduction rules, journal line definitions and the like are required to be performed, complex condition expression calculations are required, the existing calculation tools cannot provide condition calculations capable of being dynamically adjusted, accounting staff are required to perform manual calculation for the condition calculations, and then the system is required to be input, so that a large amount of time is required, and errors are easy to occur.
Disclosure of Invention
The embodiment of the application provides a dynamic configuration method of a conditional expression, an accounting condition method and a device, which can dynamically configure the conditional expression according to the accounting work requirement to perform condition calculation and accurately and rapidly realize accounting condition calculation.
In a first aspect, the present application provides a method for dynamically configuring a conditional expression, including:
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.
In one embodiment, the method further comprises:
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.
In one embodiment, the method further comprises:
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.
In one embodiment, the method further comprises:
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.
In one embodiment, the method further comprises:
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.
In a second aspect, the present application provides 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 the embodiments described above;
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.
In a third aspect, the present application provides a conditional expression dynamic configuration apparatus, the apparatus including:
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.
In a fourth aspect, the present application provides an accounting condition calculation device, including:
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 the embodiments described above;
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.
According to the conditional expression dynamic configuration method and device, when a user initiates a conditional expression creation request, the conditional expression creation is triggered, an expression editing page is displayed, the user configures the single conditional expression through the expression editing page, an arithmetic operator and a relational operator are utilized to configure the single conditional expression which uses object parameters as calculation objects and is subjected to conditional calculation with a conditional value constant of various conditional value types, a plurality of single conditional expressions can be combined through configuration logic operators and combination symbols, when a plurality of single conditional expressions exist, the single conditional expressions are combined according to the sequencing of the single conditional expressions, a conditional expression required by the user is constructed, identification codes configured by the user are associated with the conditional expressions and stored in a target application system to which the conditional expression selected by the user when the conditional expression creation request is initiated, the subsequent conditional expression management and use are facilitated, and the conditional expression can be dynamically configured according to requirements to help accountant achieve the conditional calculation.
On the other hand, according to the accounting condition calculation method and device provided by the application, condition calculation is triggered according to the condition calculation request initiated by the requester, the condition calculation request comprises the identification code of the target condition expression required to be used by the requester and the identity information of the requester, the target condition expression is generated by the user in advance according to the dynamic configuration method of the condition expression, when the condition calculation request is received, whether the requester has the calling authority of the target condition expression or not is verified based on the identity information of the requester, the calling authority of the target condition expression is verified, the object parameter is executed according to the source code of the object parameter in the target condition expression, and the suffix expression is created to calculate, so that the condition calculation result can be obtained, the condition calculation can be quickly realized according to different calculation requirements, the use is convenient, the calculation is accurate, and the accounting recording efficiency can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a flow diagram of a conditional expression dynamic configuration method in one embodiment;
FIG. 2 is a flowchart illustrating steps involved in a dynamic configuration method of conditional expressions according to one embodiment;
FIG. 3 is a flow chart of a method for accounting condition calculation according to one embodiment;
FIG. 4 is a block diagram of a conditional expression dynamic configuration apparatus in one embodiment;
FIG. 5 is a block diagram of an accounting condition calculation device in one embodiment;
FIG. 6 is an internal block diagram of a computer device, in one embodiment.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
As shown in fig. 1, an embodiment of the present application provides a conditional expression dynamic configuration method, including:
step S101, 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.
When a user needs to create a new conditional expression, a conditional expression creation request is initiated to trigger, the conditional expression creation request contains information of a target application system selected by the user, the target application system refers to an application system to which the conditional expression created by the user needs to be applied, and the conditional expression is bound with the target application system during creation, so that subsequent management and use are facilitated. The expression editing page is used for the user to configure the conditional expression.
Step S102, 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.
Wherein the internal operators include arithmetic operators including, but not limited to "+", "-", "/", and/or relational operators including, but not limited to ">", "<", "=", "+", ".gtoreq", ". The monomer conditional expression is a calculation expression comprising only one condition calculation, and editing of each monomer conditional expression can be realized by configuring source codes of object parameters, internal operators, condition value types and condition value constants. The condition value is a reference constant configured in advance for performing condition calculation, and the condition value type includes a constant, a constant list, and a constant map. The identification code of the conditional expression is the unique identification defined by the user for the conditional expression, and the operations such as searching, calling, editing and the like can be performed through the identification code later.
Step S103, 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 construction of the monomer conditional expression is completed based on the internal operator of the single monomer conditional expression configured by the user, the source code of the object parameter, the condition value type and the condition value constant.
For example, the source code of the object parameter of the configured monomer conditional expression is yy, the internal operator is >, the condition value type is constant, the condition value constant is 22, the monomer conditional expression is yy > 22, the object parameter is obtained according to the source code, if the object parameter corresponding to yy is 30, the output result of the monomer conditional expression is wire; if the object parameter corresponding to yy is 10, the single conditional output result is fuse.
Step S104, whether a plurality of monomer conditional expressions exist or not is identified.
In step S105, if only one monomer conditional expression is identified, the monomer conditional expression is used as the conditional expression.
For the case that the user only creates one single conditional expression, namely, the conditional expression to be created by the user at this time is considered to be composed of only one single conditional expression, the single conditional expression is directly used as the conditional expression to be processed in the subsequent steps.
In step S106, if a plurality of monomer conditional expressions are identified, a logical operator and a combination symbol configured by a user to connect each monomer conditional expression are identified.
For the case that the user creates a plurality of monomer conditional expressions, the user is considered to be required to create a conditional expression formed by combining the plurality of monomer conditional expressions, and at this time, logic operators and combination symbols configured by the user are required to be identified. Wherein the logical operators include "and", "or", and the conjunctive symbols refer to operators for changing the conditional priority of each monomer, including but not limited to "(" and ")".
And step S107, constructing each monomer conditional expression according to the logic operator, the combination symbol and the ordering of each monomer conditional expression.
The sorting of the monomer conditional expressions can be configured by a user, if the sorting is not configured, the sorting is performed according to the creation sequence of the monomer conditional expressions, and the connection of adjacent monomer conditional expressions is performed by combining logic operators configured by the user from front to back according to the creation sequence of the monomer conditional expressions.
Illustratively, as shown in Table 1, the user configures two monomer conditional expressions as follows:
TABLE 1
The conditional expression formed by combining the two monomer conditional expressions is as follows:
(yy=11and rt>22)
The different conditional expressions can also be mutually combined, when the conditional expression is combined with other conditional expressions, the conditional expression is calculated as a whole by combining symbols, so that calculation errors caused when the conditional expression is combined with other conditional expressions are avoided.
Step S108, the identification codes are associated with the constructed conditional expressions.
Each created conditional expression has a unique identification code by which management of the conditional expression can be performed by associating a user-defined identification code with the conditional expression at the time of creation.
And 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 to which each application system belongs are respectively stored, and after the conditional expressions are created, the conditional expressions are stored in an expression database corresponding to the target application system selected by the user.
In this embodiment, when a user initiates a conditional expression creation request, the creation of a conditional expression is triggered, an expression editing page is displayed, a user configures a single conditional expression through the expression editing page, an arithmetic operator and a relational operator are utilized to configure the single conditional expression which uses object parameters as calculation objects and performs conditional calculation with a conditional value constant of various conditional value types, and when a plurality of single conditional expressions exist, a plurality of single conditional expressions can be combined through configuration logic operators and combination symbols, according to the ordering of the single conditional expressions, a conditional expression required by the user is constructed, identification codes configured by the user are associated with the conditional expressions, and stored in a target application system to which the conditional expression selected by the user when initiating the conditional expression creation request belongs, so that the subsequent conditional expression management and use are facilitated, and the conditional expression can be dynamically configured according to requirements to help accountant realize the conditional calculation.
As shown in fig. 2, in one embodiment, the method further comprises:
step S201, a conditional expression editing request is acquired.
The conditional expression editing request is an operation request initiated by a user and aiming at the created conditional expression, the conditional expression editing request comprises an identification code of the conditional expression to be edited, the user can obtain the identification code to automatically generate the conditional expression editing request based on the selected conditional expression by selecting the conditional expression to be edited in the expression management catalog, or manually input the identification code of the conditional expression to be edited, and then the conditional expression editing request is generated.
Step S202, acquiring the conditional expression to be edited according to the identification code of the conditional expression to be marked, and displaying editing items 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.
Each editing item of the conditional expression to be edited is identified, and the editing item is displayed on an expression editing page, namely, displayed in an editable state, so that a user can edit part or all of the conditional expression. For example, only the internal operator may be modified, or all editing items may be modified.
Step S203, if any editing item is modified, the conditional expression to be edited is updated according to the modified editing item.
If the user is identified to modify any one or more editing items of the conditional expression to be edited, when the user confirms the modification, the modified editing items are used for replacing the original corresponding editing items, and the conditional expression to be edited is updated and then stored.
In the embodiment, a user can dynamically modify the existing conditional expression as required at any time, and when the calculation rule changes or the conditional expression is found to have errors and needs to be modified, the modification can be directly performed on the established conditional expression without recreating and manually deleting the original conditional expression, so that the flexibility is high and the use is convenient.
In one embodiment, the method further comprises:
editing the page preview conditional expression in the expression;
responding to a user input simulation calculation request, constructing a suffix expression based on simulation object parameters and simulation condition value constants in the simulation calculation request, and performing simulation calculation according to the condition expression;
and displaying the conditional expression and the simulation calculation result on the expression editing page.
According to the embodiment, when the conditional expression is created or modified, the conditional expression in the current edition can be previewed, the user can check the conditional expression of the page preview of the expression edition, if errors exist, the user can timely modify the conditional expression, the simulation calculation request is used for triggering the simulation calculation of the conditional expression of the current edition, the simulation calculation request initiated by the user comprises simulation object parameters and simulation condition value constants configured by the user, namely, when the simulation calculation is performed, the call of the object parameters and the condition value constants is not performed, and the simulation object parameters and the simulation condition value constants are used as operation numbers of the calculation. And constructing a suffix expression based on the current previewed conditional expression, the simulated object parameters and the simulated condition value constant for calculation.
The calculation process of the conditional expression is as follows: traversing the suffix expression from front to back, performing stack pushing calculation through a constant stack and an operator stack, skipping if traversing to a space, pushing an operand stack if traversing to an operand, pushing the operator stack if traversing to an internal operator, combining a symbol or a logic operator, pushing the operator stack if the operator in the stack has higher priority or equal priority than the currently traversed operator, popping the operand in the constant stack out of the stack for operation, pushing a calculation result into the constant stack, and continuing traversing until the calculation result is obtained and then outputting.
In one embodiment, the method further comprises:
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.
In this embodiment, a user performs a deletion operation on a conditional expression to be deleted by initiating a conditional expression deletion request, and the user may automatically generate the conditional expression deletion request by selecting a conditional expression to be deleted from the expression management directory, acquiring an identification code based on the selected conditional expression, or manually input the identification code of the conditional expression to be deleted, thereby generating the conditional expression deletion request, and performing the deletion operation on the conditional expression to be deleted found in the database based on the identification code of the conditional expression to be deleted in the conditional expression deletion request.
As shown in fig. 3, an embodiment of the present application provides an accounting condition calculation method, which includes:
step S301, a condition calculation request is acquired.
Wherein the conditional computation request includes an identification code of a target conditional expression and identity information of a requester; 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 the embodiments described above.
When a requester initiates a condition calculation request, identity information is carried in the condition calculation request, the identity information is an account number or an identity ID of the requester, and an administrator can allocate calling rights of a condition expression to each user through the identity information.
In one embodiment, an administrator may directly assign call rights to a single conditional expression. In one embodiment, the administrator may allocate rights with the conditional expressions included in each application system, that is, allocate conditional expression call rights of any application system to the user, so that the user may call all the conditional expressions included in the application system, where all the expressions include the conditional expressions added after the allocation rights, that is, the user may call all the conditional expressions belonging to the application system at the current moment.
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.
And verifying the authority based on the invoking authority distributed by the administrator, searching the target conditional expression according to the identification code of the target conditional expression, and verifying whether the requester is distributed with the invoking authority of the target conditional expression according to the identity information. In one embodiment, if the corresponding conditional expression cannot be queried according to the identification code, a call failure result is directly returned.
Step S303, if the requester has the calling authority of the target conditional expression, the target conditional expression is called according to the identification code of the target conditional expression.
Step S304, obtaining the object parameters according to the source codes of the object parameters in the target conditional expression.
And step S305, creating a suffix expression based on the target conditional expression and the object parameter, and calculating to obtain a conditional calculation result.
In this embodiment, the condition calculation is triggered according to a condition calculation request initiated by a requester, where the condition calculation request includes an identification code of a target condition expression required to be used by the requester and identity information of the requester, the target condition expression is configured and generated in advance by a user according to a dynamic configuration method of the condition expression, and when the condition calculation request is received, it is verified whether the requester has a calling authority of the target condition expression based on the identity information of the requester, and when the requester is verified that the requester has the calling authority, the calling of the target condition expression is executed, the object parameter is obtained according to a source code of the object parameter in the target condition expression, and a suffix expression is created to perform calculation, so that the condition calculation result can be obtained quickly according to different calculation requirements, the use is convenient, the calculation is accurate, and the accounting entry efficiency can be improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
The conditional expression dynamic configuration device provided in the embodiments of the present application is described below, and the conditional expression dynamic configuration device described below and the conditional expression dynamic configuration method described above may be referred to correspondingly.
As shown in fig. 4, the present application provides a conditional expression dynamic configuration apparatus 400, which includes:
The page display module 401 is configured to respond to a conditional expression creation request, display an expression editing page, and parse the conditional expression creation request to determine a target application system;
an identification module 402, configured to identify 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 editing page through the expression, and an identification code of the conditional expression; the internal operators include arithmetic operators and/or relational operators;
a conditional creation module 403, configured to create 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;
a first obtaining module 404, configured to identify a logic operator and a combination symbol configured by a user and used for connecting each monomer conditional expression when identifying a plurality of monomer conditional expressions;
the expression construction module 405 is configured to construct each monomer conditional expression into the conditional expression according to a logic operator, a combination symbol, and the ordering of each monomer conditional expression;
an association module 406, configured to associate the identification code with the conditional expression;
and a saving module 407, configured to save the conditional expression to an expression database corresponding to the target application system.
In one embodiment, the expression construction module is further configured to take a monomer conditional expression as the conditional expression when only one monomer conditional expression is identified.
In one embodiment, the apparatus further comprises:
the fourth acquisition module is used for acquiring a conditional expression editing request; the conditional expression editing request comprises an identification code of a conditional expression to be edited;
the conditional editing module is used for acquiring the conditional expression to be edited according to the identification code of the conditional expression to be marked and displaying editing items 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 the conditional updating module is used for updating the conditional expression to be edited according to the edited item after modification when any editing item is modified.
In one embodiment, the apparatus further comprises:
the preview module is used for previewing the conditional expression on the expression editing page;
the simulation calculation module is used for 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 carrying out simulation calculation;
And the display module is used for displaying the conditional expression and the simulation calculation result on the expression editing page.
In one embodiment, the apparatus further comprises:
a fifth acquisition module for acquiring a conditional expression deletion request; the conditional expression deleting request comprises an identification code of the conditional expression to be deleted;
and the expression deleting module is used for searching the conditional expression to be deleted according to the identification code of the conditional expression to be deleted and executing deleting operation.
The following describes an accounting condition calculation device provided in the embodiments of the present application, and the accounting condition calculation device described below and the accounting condition calculation method described above may be referred to correspondingly.
As shown in fig. 5, an embodiment of the present application provides an accounting condition calculation device 500, including:
a second obtaining module 501, configured to obtain 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 the embodiments described above;
The permission identification module 502 is configured to determine whether the requester has a call permission of the target conditional expression according to the identity information and the identification code of the target conditional expression;
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 right of the target conditional expression;
a third obtaining module 504, configured to obtain an object parameter according to a source code of the object parameter in the target conditional expression;
the calculating module 505 is configured to calculate based on the target conditional expression and the object parameter creating suffix expression to obtain a conditional calculation result.
The above-mentioned division of each module in the conditional expression dynamic configuration apparatus and the accounting condition calculating apparatus is only for illustration, and in other embodiments, the conditional expression dynamic configuration apparatus and the accounting condition calculating apparatus may be divided into different modules according to the needs, so as to complete all or part of the functions of the conditional expression dynamic configuration apparatus and the accounting condition calculating apparatus. The above-mentioned conditional expression dynamic configuration apparatus and each module in the accounting condition calculation apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, the present application also provides a storage medium having 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 or accounting condition calculation method as described in any one of the embodiments above.
In one embodiment, the present application further provides a computer device having computer readable instructions stored therein, which when executed by the one or more processors, perform the steps of the conditional expression dynamic configuration method or the accounting condition calculation method according to any one of the embodiments above.
Illustratively, in one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in FIG. 6. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing 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 a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by the processor, implements a conditional expression dynamic configuration method or accounting condition calculation method.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "plurality" is at least two, such as two, three, etc., unless explicitly defined otherwise. Also, the term "and/or" as used in this specification includes any and all combinations of the associated listed items.
In the present specification, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and may be combined according to needs, and the same similar parts may be referred to each other.
The previous 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 generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to 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.
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)
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 |
-
2023
- 2023-03-01 CN CN202310191889.5A patent/CN116167882A/en active Pending
Cited By (2)
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 |
---|---|---|
CN112036736B (en) | Workflow creation method and device | |
CN112650766B (en) | Database data operation method, system and server | |
CN116167882A (en) | Conditional expression dynamic configuration method, accounting condition calculation method and accounting condition calculation device | |
US20220261288A1 (en) | Managing custom workflows for domain objects defined within microservices | |
CN110569315B (en) | Data processing method and device based on data warehouse | |
CN114118770A (en) | Index calculation method and device | |
JP6679491B2 (en) | System and method for managing additional calendar periods in retail | |
CN116204554A (en) | Data processing method, system, electronic device and storage medium | |
CN113076086B (en) | Metadata management system and method for modeling model object using the same | |
JP6422346B2 (en) | Program generation apparatus and program generation method | |
CN111191057A (en) | User-defined retrieval method and device, electronic equipment and storage medium thereof | |
CN112800030A (en) | Process component data management method and device and computer readable storage medium | |
US20150066574A1 (en) | Business operation processing system, method of generating processing related to a business operation, and computer-readable non-transitory storage medium | |
CN114781346B (en) | Audit model sharing method, audit model sharing device, audit model sharing computer equipment and audit model sharing computer program product | |
US12032589B2 (en) | Bypassing database automations | |
JP6756337B2 (en) | Estimate support devices, methods and programs | |
CN116880927A (en) | Rule management method, device, computer equipment and storage medium | |
CN116756022A (en) | Data preparation method, device, computer equipment and storage medium | |
CN116401029A (en) | Software development scheduling method, device, system, computer equipment and medium | |
CN115756495A (en) | Code generation method and device, storage medium and computer equipment | |
CN116909538A (en) | User screening method, device, computer equipment, storage medium and product | |
CN116401323A (en) | Index data processing method and device and computer equipment | |
CN116415914A (en) | Service data processing method, device, computer equipment and storage medium | |
CN116483532A (en) | Scheduling processing method, device, computer equipment and storage medium | |
CN114780561A (en) | Entity attribute editing method and device, computer equipment and storage medium |
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 |