[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN117634427A - Configuration method for automatically generating codes, form code generation method and form code generation equipment - Google Patents

Configuration method for automatically generating codes, form code generation method and form code generation equipment Download PDF

Info

Publication number
CN117634427A
CN117634427A CN202311372857.1A CN202311372857A CN117634427A CN 117634427 A CN117634427 A CN 117634427A CN 202311372857 A CN202311372857 A CN 202311372857A CN 117634427 A CN117634427 A CN 117634427A
Authority
CN
China
Prior art keywords
code
rule
coding
code generation
information
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
CN202311372857.1A
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.)
Shenzhen Zhuoliang Technology Co ltd
Original Assignee
Shenzhen Zhuoliang Technology 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 Shenzhen Zhuoliang Technology Co ltd filed Critical Shenzhen Zhuoliang Technology Co ltd
Priority to CN202311372857.1A priority Critical patent/CN117634427A/en
Publication of CN117634427A publication Critical patent/CN117634427A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Stored Programmes (AREA)

Abstract

The application provides a configuration method for automatically generating codes, a form code generation method and a form code generation device, wherein the configuration method comprises the following steps: receiving input notes, and storing the input notes as note information of a form; generating a subsystem tree table of a form according to the annotation information; selecting a target tree node from the subsystem tree table to obtain a coding rule configuration template of the target tree node; and receiving an input field corresponding to the coding rule configuration template, and obtaining a coding generation rule according to the input field. According to the embodiment of the application, different coding rules can be configured aiming at different forms, different organizations and the like, so that non-development implementation, operation and maintenance or users can conveniently adjust coding by themselves, user experience is improved, and operation and maintenance cost is reduced.

Description

Configuration method for automatically generating codes, form code generation method and form code generation equipment
Technical Field
The invention relates to the technical field of computer data processing, in particular to a configuration method for automatically generating codes, a form code generation method and form code generation equipment.
Background
The existing form coding mode mainly comprises a hard coding mode and an automatic form coding mode aiming at the whole system, wherein the form coding mode needs to code a new bill, has a complicated process and is not easy to dynamically adjust, so that the generated coding format and the like cannot be adjusted in real time; the latter defines the coding mode automatically generated by the whole system through configuration, different coding generation rules cannot be set for different forms, and some useful information such as information for distinguishing forms and the like is difficult to obtain from codes. In some large-scale systems, the isolation generated by automatic coding cannot be performed on different sub-modules under the form coding mode.
Disclosure of Invention
In view of the above drawbacks of the prior art, a main objective of an embodiment of the present application is to propose a configuration method for automatically generating codes, a form code generating method and a device, which are intended to facilitate non-development implementation, operation and maintenance or adjustment of codes by a user, improve user experience, and reduce operation and maintenance costs.
In a first aspect, an embodiment of the present application provides a configuration method for automatically generating a code, where the method includes the following steps: receiving input notes, and storing the input notes as note information of a form; generating a subsystem tree table of a form according to the annotation information; selecting a target tree node from the subsystem tree table to obtain a coding rule configuration template of the target tree node; and receiving an input field corresponding to the coding rule configuration template, and obtaining a coding generation rule according to the input field.
With reference to the first aspect, in one possible implementation manner of the first aspect, the subsystem tree table is updated in the following manner: scanning the annotation information existing currently in a reflection mode; and updating the data information in the subsystem tree table according to the scanning result.
With reference to the first aspect, in a possible implementation manner of the first aspect, the field of the encoding rule configuration template includes at least one of the following: a segment separator, a business object, a priority policy, an application field, a coding instance, a rule definition sub-table, and an application organization sub-table.
With reference to the first aspect, in a possible implementation manner of the first aspect, the receiving the input annotation, storing the input annotation as annotation information of the form includes: setting an annotation template; and receiving input notes corresponding to the note templates, and storing the input notes as note information of the form.
With reference to the first aspect, in a possible implementation manner of the first aspect, the subsystem tree table includes at least one of the following: module unique identification code, module alias, form unique identification code, form alias, form background name information.
With reference to the first aspect, in a possible implementation manner of the first aspect, the generating step of the encoding rule configuration data includes: configuring fields required by coding rules of the form; and obtaining the coding rule configuration data according to the combination of the fields.
In a second aspect, the present application provides a form code generating method, which is characterized by including: when a form is newly added or saved, annotation information corresponding to the form is obtained; acquiring a code generation rule corresponding to the form according to the annotation information; generating a form code according to the code generation rule; wherein the annotation information is used to distinguish forms.
With reference to the second aspect, in a possible implementation manner of the second aspect, the obtaining, according to the annotation information, a code generation rule corresponding to the form includes: and acquiring the code generation rule corresponding to the form according to the form unique identification code in the annotation information.
With reference to the second aspect, in a possible implementation manner of the second aspect, the generating a form code according to the code generation rule includes: acquiring a form background table name corresponding to the code generation rule; determining a background table of the form according to the background table name of the form; inquiring the background table according to the fixed value and the date field of the code generation rule to obtain the maximum sequence number of the table; setting a step value of the form according to the code generation rule; and obtaining the form code according to the step value and the maximum sequence number.
In a third aspect, the present application provides an electronic device, which includes a memory and a processor, where the memory stores a computer program or instructions, and where the processor, when executing the computer program or instructions, implements a general configuration method for automatically generating a code as in the first aspect or a form code generation method as in the second aspect.
The embodiment of the application provides a general configuration method for automatically generating codes, and different coding rules can be configured for different forms through the general configuration method for automatically generating the codes. The automatic generation of codes is realized by configuring a subsystem tree table and coding rules, logic for generating codes is not required to be developed again when a form is newly added in the later period, annotation information of a corresponding form is only required to be added, and then the corresponding coding rules are configured according to own service. The user can also adjust the assembly rule for generating the code by himself in the configuration of the coding rule. In summary, the invention can configure different coding rules aiming at different forms, different organizations and the like, is convenient for non-development implementation, operation and maintenance or the user to adjust the codes by himself, improves user experience and reduces operation and maintenance cost.
Drawings
In order to more clearly illustrate the embodiments of the invention 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, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a general configuration method for automatically generating codes according to an embodiment of the present application;
FIG. 2 is a flowchart of a specific method of step S100 in FIG. 1;
FIG. 3 is a flow chart of an automatically generated code provided in another embodiment of the present application;
FIG. 4 is a flowchart of a form code generation method according to another embodiment of the present disclosure;
FIG. 5 is a flowchart of a specific method of step S700 in FIG. 4;
FIG. 6 is a schematic diagram of a subsystem tree interface provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of an encoding rule configuration interface provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The embodiments described in the embodiments of the present application are for more clearly describing the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application, and as those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
It should be noted that although functional block division is performed in a device diagram and a logic sequence is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the block division in the device, or in the flowchart. The terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the structures, proportions, sizes, etc. shown in the drawings are for illustration purposes only and should not be construed as limiting the invention to the extent that it can be practiced, since modifications, changes in the proportions, or adjustments of the sizes, which are otherwise, used in the practice of the invention, are included in the spirit and scope of the invention which is otherwise, without departing from the spirit or scope thereof. Also, the terms such as "upper," "lower," "left," "right," "middle," and "a" and the like recited in the present specification are merely for descriptive purposes and are not intended to limit the scope of the invention, but are intended to provide relative positional changes or modifications without materially altering the technical context in which the invention may be practiced.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the present application.
First, several nouns referred to in this application are parsed:
computer data processing: and (3) collecting and recording data by using a computer, and processing to generate a new information form. Data refers to a collection of numbers, symbols, letters, and various words. The processing involved in data processing is much more extensive than general arithmetic operations. Computer data processing consists essentially of 8 aspects, including: collecting data, namely collecting needed information; data conversion: converting the information into a form receivable by the machine; data packet: designating codes, and effectively grouping according to related information; data organization: collating data or arranging data in some way for processing; and (3) data calculation: performing various arithmetic and logical operations to obtain further information; and (3) data storage: storing the original data or the calculated result for later use; searching data, namely finding out useful information according to the requirements of users; data sorting: the data are ordered according to certain requirements. The process of data processing is roughly divided into 3 stages of data preparation, processing and output. During the data preparation phase, the data is entered offline into a punched card, punched tape, tape or disk. This phase may also be referred to as the data entry phase. After data entry, the data is processed by the computer, for which purpose the user programs the data in advance and inputs the program into the computer, which processes the data as instructed and required by the program. By process is meant a combination of one or several of the above 8 aspects of operation. Finally, various alphanumeric tables and reports are output.
@ interface: for defining a custom annotation. In Java, the definition of an annotation is actually to define the interface just by adding a @ symbol before interface, i.e. "@ interface Zhujie { }, which indicates that an annotation named @ Zhujie is defined.
@ Aspect: AOP facet-oriented programming can be used to configure transactions, log, verify rights, do some processing upon user request, and so forth. The method can be directly realized by using @ Aspect as a tangent plane. The current class is identified as a cut plane for reading by the container.
Class: an abstraction of an object that has the same properties (data elements) and behavior (functions) is a class. Thus, a snapshot of an object is a class, which is a concrete object, or an instance of a class is an object, which is actually a data type. A class has attributes, which is an abstraction of the state of an object, with a data structure describing the attributes of the class. A class has an operation, which is an abstraction of the behavior of an object, described by an operation name and a method of implementing the operation.
AOP (Aspect Oriented Programming shorthand): the method is a technique for realizing unified maintenance of program functions by means of precompiled mode and run-time dynamic proxy. AOP is a continuation of OOP, a hotspot in software development, and an important content in Spring framework, and is a derivative model of functional programming. The AOP is utilized to isolate each part of the business logic, so that the coupling degree among the parts of the business logic is reduced, the reusability of the program is improved, and the development efficiency is improved.
The existing form coding mode mainly comprises a hard coding mode and an automatic form coding mode aiming at the whole system, wherein the form coding mode needs to code a new bill, has a complicated process and is not easy to dynamically adjust, so that the generated coding format and the like cannot be adjusted in real time; the latter defines the coding mode automatically generated by the whole system through configuration, different coding generation rules cannot be set for different forms, and some useful information such as information for distinguishing forms and the like is difficult to obtain from codes. In some large-scale systems, the isolation generated by automatic coding cannot be performed on different sub-modules under the form coding mode.
In view of the above drawbacks of the prior art, a main objective of an embodiment of the present application is to propose a configuration method for automatically generating codes, a form code generating method and a device, which are intended to facilitate non-development implementation, operation and maintenance or adjustment of codes by a user, improve user experience, and reduce operation and maintenance costs.
The embodiments of the present application are specifically described by the following embodiments, and first, a general configuration method for automatically generating codes in the embodiments of the present application is described.
The embodiment of the application provides a general configuration method for automatically generating codes and a form code generation method, and relates to the technical field of computer data processing. The method provided by the embodiment of the application can be applied to the terminal, the server side and software running in the terminal or the server side. In some embodiments, the terminal may be a smart phone, tablet, notebook, desktop, etc.; the server side can be configured as an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and a cloud server for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligent platforms and the like; the software may be an application or the like that implements a general configuration method for automatically generating form codes, but is not limited to the above form.
The subject application is operational with numerous general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In the embodiments of the present application, when related processing is required according to user information, user behavior data, user history data, user location information, and other data related to user identity or characteristics, permission or consent of the user is obtained first, and the collection, use, processing, and the like of the data comply with related laws and regulations and standards of related countries and regions. In addition, when the embodiment of the application needs to acquire the sensitive personal information of the user, the independent permission or independent consent of the user is acquired through a popup window or a jump to a confirmation page or the like, and after the independent permission or independent consent of the user is explicitly acquired, necessary user related data for enabling the embodiment of the application to normally operate is acquired.
Referring to fig. 1, fig. 1 is a flow chart of a general configuration method for automatically generating codes according to an embodiment of the present application. As shown in fig. 1, a general configuration method for automatically generating codes according to an embodiment of the present application includes, but is not limited to, steps S100 to S400, and each step is described in the following sequence.
Step S100: an input annotation is received and stored as annotation information for the form.
It should be noted that, the input annotation is an important way to distinguish different forms, and the annotation information at least includes one of the following: module unique identification code, module alias, form unique identification code, form alias, form background name information.
In a possible embodiment, before storing the input annotation as annotation information for the form, the annotation needs to be made in the form control layer that is being prepared for the automatic generation of the encoding. Specifically, a custom annotation is added with "@ interface" first, which at least comprises one of the following: the module unique identification code, the module alias, the form unique identification code, the form alias and the form background name information are annotated in a form control layer which needs to automatically generate codes. It should be noted that, when annotating in the form control layer, a developer may modify the content of the custom annotation according to the user requirement. The embodiment of the application does not excessively limit the content, format and the like of the input information.
In a possible embodiment, if other forms are added later, only the developer needs to add the input annotation corresponding to the form when developing, and then the subsystem tree is updated, so that the coding rule required to be automatically generated can be directly configured in the coding rule.
It will be appreciated that after adding custom annotations and updating the subsystem tree, no changes to the relevant annotations and encoding rules of other forms are involved, while the newly added form is not limited in the ordering of the subsystem tree.
Step S200: a subsystem tree table of the form is generated based on the annotation information.
In this step, the subsystem tree table includes at least one of: module unique identification code, module alias, form unique identification code, form alias, form background name information. The subsystem tree table is used to store annotation information for the form and as a list of automatically encoded numbers for configuration.
In a possible embodiment, the association between the parent and child nodes may be performed according to the module unique identification code and the form unique identification code, and the subsystem tree is generated according to the hierarchy, and accordingly, the tree corresponding to the form is generated, and each tree node corresponds to one form.
In a possible embodiment, the subsystem tree table may store a plurality of form annotation information, and when a form is newly added or stored, the subsystem tree table performs annotation scanning on a form control layer currently existing in the system in a reflection manner, and updates data information in the subsystem tree table according to a scanning result.
It should be noted that the above operation does not destroy the original data of the sub-table, and similarly, the auto-coded tree list corresponding to the sub-table does not destroy the original data.
Step S300: and selecting a target tree node from the subsystem tree table to obtain a coding rule configuration template of the target tree node.
In this step, the subsystem tree table is a table added in the system for storing configuration corresponding input notes, and the stored content also at least comprises one of the following: module unique identification code, module alias, form unique identification code, form alias, form background name information.
In a possible embodiment, before selecting the target tree node from the subsystem tree table, further comprises: a tree interface may be generated for selection by the user based on the subsystem tree table. Wherein, the process of generating the tree according to the subsystem tree table may include: traversing each level data in the subsystem tree table, and if a father node in the subsystem tree table is found, adding the node into a child node list of the father node; if the parent node is not found, the node is described as a root node (or an isolated node), which is added to the result set, and subsequent child nodes are hierarchically ordered according to the relation with the parent node, so as to generate a tree.
In this embodiment, a developer may perform association between parent and child nodes according to the module unique identification code and the form unique identification code, and generate a subsystem tree according to the hierarchy, and accordingly, generate a tree corresponding to a form, where each tree node corresponds to one form.
Step S400: and receiving an input field corresponding to the coding rule configuration template, and obtaining a coding generation rule according to the input field.
In this step, it is understood that the input fields of the encoding rule configuration template may be used to configure different encoding generation rules for the form. Before configuring the coding rule of the corresponding form, the tree node corresponding to the form needs to be selected in the subsystem tree table, and in addition, the user can add a plurality of different coding rule configurations to the corresponding form by performing the operations of adding, deleting, searching and modifying the coding rule in the coding rule configuration template.
In a possible embodiment, as shown in fig. 7, fig. 7 is a schematic diagram of an encoding rule configuration interface, a user may perform field input on the encoding rule configuration template, for example, a segment separator, a fixed value, a date, a sequence number, a rule definition sub-table, a fixed value of the rule definition sub-table may be set to a text or english corresponding to a form, for example, a client is set to a Customer, a system date is set to a display format according to needs, user interface component data corresponding to the segment separator is a text box, user interface component data corresponding to the fixed value is a text box, a sequence number bit, an initial value step size and the like can also be configured by the user, and a corresponding encoding rule is constructed according to field information of the encoding configuration of the form.
In a possible embodiment, different encoding rules may be configured for different forms according to the input fields. For example, the existing business trip bill and reimbursement bill can be directly configured into the forms of 'chuchai-20230101-000001' and 'baoxiao-20230101-000001' by configuring the generated coding formats, and if a new form is newly added in the follow-up process, only a developer needs to add subsystem tree table notes during development, and then the subsystem tree is updated, so that the coding rules needing to be automatically generated can be directly configured in the coding rules.
In a possible embodiment, the user may set an organization that needs to apply this encoding rule configuration if the user selects an organization priority in the priority policy of the input field.
According to the embodiment of the application, the automatic generation of the codes is realized through the annotation of the subsystem tree table and the configuration of the coding rules, the logic for generating the codes is not required to be developed again when the form is newly added in the later period, only one subsystem tree annotation mark is required to be added, then the corresponding coding rules are configured according to own business, and the user can also adjust the assembly rules for generating the codes by himself in the configuration of the coding rules, so that the effects of facilitating non-development implementation, operation and maintenance or the user can adjust the codes by himself, improving user experience and reducing operation and maintenance cost are achieved.
Referring to fig. 2, a further illustration of step S100 may include, but is not limited to, step S110 and step S120.
Step S110: setting an annotation template.
In this step, the field of the annotation template includes at least one of the following: module unique identification code, module alias, form unique identification code, form alias, form background name information. The method comprises the steps of obtaining a form corresponding to an identification code according to the form unique identification code, wherein the configured coding rule of the form corresponding to the identification code and the form background name of the corresponding form can be obtained. It will be appreciated that the primary fields in the annotation template, e.g., form unique identification codes, need to be filled in to satisfy subsequent form queries and form coding rules.
Step S120: receiving input notes corresponding to the note templates, and storing the input notes as note information of the forms.
In a possible embodiment, all fields in the annotation information of a form are initially set to be null until the annotation is performed in the form control layer that needs to make the automatic generation code, and in this embodiment, the format of the field information filling content is not specifically required. For example, the field module uniquely identifies the code name as moduleName, the field module alias name as moduleaias, the field form uniquely identifies the code name as controlllername, the field form alias name as controlllerlias, the field form background name information is tableName, and the corresponding form information is input to each field to annotate in the form control layer, so that the effect of distinguishing different forms is achieved.
Referring to fig. 3, an embodiment of the present application may include, but is not limited to, step S310 and step S320 before performing step S300.
Step S310: the fields required to configure the coding rules of the form.
In this step, the field of the coding rule of the form includes at least one of: a segment separator, a business object, a priority policy, an application field, a coding instance, a rule definition sub-table, and an application organization sub-table.
Wherein the segment separator is used for distinguishing separation function in each segment rule; the business object is used for selecting a form corresponding to the node by the subsystem tree table; the priority strategy is used for selecting organization priority or group priority, and for some large-scale companies, the system can be differentiated by organization and groups, so that the corresponding forms can be selected to uniformly use the same coding rules in the whole group, and different organizations can be selected to use different coding rules; the application field is used for selecting a field needing to be set with an automatic code value generation, so that the code rule can be conveniently applied to other fields in the follow-up process; coding examples the final effect of coding rules for preview configuration; the rule definition sub-table is used for providing options such as a fixed value, a system date, a sequence number and the like, the fixed value can be set as characters or English and the like corresponding to the form, if a client is set as a Customer, the system date is set as a Customer, and the display format, the sequence number, the initial value step length and the like of the system date can be configured by the client according to the needs, so that the data generation information of the corresponding form, such as the time for generating the data, can be clearly seen from the generated codes; applying the organization sub-table, if the priority policy selects the organization priority, an organization that needs to apply the configuration of the encoding rule can be set.
In a possible embodiment, the user may configure different form coding rules using the fields as desired.
Step S320: and obtaining the coding rule configuration template according to the combination of the fields.
In this step, it can be understood that each form has its corresponding coding rule configuration template, and the combination of the input fields of the template is configured according to the coding rule, so as to obtain the corresponding code of the form.
In a possible embodiment, the encoding rule configuration form template may generate an encoding rule configuration interface for the user to select for filling.
In addition, referring to fig. 4, fig. 4 is a flow chart of a form code generating method according to an embodiment of the present application. As shown in fig. 4, the form code generating method provided in the embodiment of the present application is based on the above-mentioned automatic generating coding rule, including, but not limited to, steps S500-S700, and each step is described in the following sequence.
Step S500: and when the form is newly added or saved, acquiring annotation information of the corresponding form.
In this step, it is understood that the annotation information is used to distinguish forms. It should be noted that, when a form is newly added or saved, only one valid form rule configuration is allowed to be started at the same time, and real-time switching or adjustment can be performed in different form rule configurations.
In a possible embodiment, the encoding rule can be generated when the form is newly added and stored in a manner of programming an "@ Aspect" section. The current class can be directly identified as a section for reading by a container through a section programming mode of "@ Aspect".
Step S600: and acquiring the coding generation rule of the corresponding form according to the annotation information.
In an embodiment, before acquiring the code generation rule of the corresponding form, the method further includes: and acquiring a form unique identification code in the annotation information, and acquiring a code generation rule of a corresponding form according to the form unique identification code.
In a possible embodiment, the client may query the corresponding form configuration coding rule and the form background name according to the form unique identifier code in the template annotation information, the queried content is displayed on the coding rule configuration page of the form, and then the server outputs form information data to the client through the template interface, where the form information data may include all field information of the coding rule of the corresponding form. The form information data can use JSON data, the JSON uses JavaScript grammar, any JavaScript object can be converted into JSON, and then the JSON is sent to a server; any JSON received from the server may also be converted into JavaScript objects. The format of the JSON is a text format, and the communication data is configured by using the JSON data transmission without complex analysis and translation, and the JSON can be read and used as data in any programming language, so that the universal configuration method for automatically generating the form codes provided by the invention can be applied to multi-terminal scenes, such as an APP terminal, a PC terminal, an H5, a compact framework and a vue framework.
Step S700: form codes are generated according to code generation rules.
In this step, it should be noted that, when the form is newly added, the configured coding rule may be invoked to obtain the automatically generated code and display the code on the form, or when the form is stored, the coding rule may be obtained and set.
Referring to fig. 5, further describing step S700, step S700 may include, but is not limited to, steps S710 to S750.
Step S710: and obtaining the background table name of the form corresponding to the code generation rule.
In a possible embodiment, the corresponding background table name of the form may be obtained according to the unique identifier code in the corresponding annotation information of the form.
Step S720: and determining a background table of the form according to the background table name of the form.
In this step, it may be understood that the background table of the form corresponding to the background table name of each form is unique and determined, and multiple sets of data information exist in the background table of the form, for example, a fixed value, a date, etc. corresponding to the form coding rule, and the data content stored in the background table is not limited in this application.
Step S730: and according to the fixed value and the date field of the code generation rule, inquiring the background table to obtain the maximum sequence number of the table.
In this step, the corresponding date can be searched by the background table corresponding to the fixed value and the date, and the maximum sequence number of the current table can be found.
Step S740: and setting the step value of the form according to the code generation rule.
In a possible embodiment, in the rule definition sub-table of the encoding generation rule, the initial step value of the sequence number may be configured by itself, for example, the step value of the sequence number is set to 1.
Step S750: and obtaining the form code according to the step value and the maximum sequence number.
In this step, the latest code can be obtained by adding the set step value to the maximum sequence number, and the code is returned.
In a possible embodiment, as shown in fig. 6, fig. 6 is a schematic view of a subsystem tree interface, a user selects a "client" menu of a subsystem tree table, and enters a coding rule configuration interface corresponding to the "client" menu, where the user may set a segment separator, such as "-", to distinguish each segment rule, set a fixed value in a rule definition table of the form as "Customer", set a system date as "yyymmdd", set a sequence number as 8, set an initial value as 1, set a step value as 1, and obtain a coding generation rule according to the input field, where the available coding is "Customer-20230821-00000001".
In some embodiments, in the encoding rule configuration template, the user can check the rule final generation effect of the corresponding form, the background table corresponding to the fixed value and the date can be used for inquiring the maximum sequence number of the current form in the corresponding date, the latest encoding of the corresponding form can be obtained by adding the set step value to the maximum sequence number, and the encoding is returned.
In addition, the embodiment of the application also provides electronic equipment, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the automatic generation code general configuration method or the form code generation method when executing the computer program. The electronic equipment can be any intelligent terminal including a tablet personal computer, a vehicle-mounted computer and the like.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device includes:
the processor 1010 may be implemented by a general-purpose central processing unit (Central Processing Unit, CPU), a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc. for executing related programs to implement the technical solutions provided in the embodiments of the present application;
the Memory 1020 may be implemented in the form of a Read Only Memory (ROM), a static storage device, a dynamic storage device, or a random access Memory (Random Access Memory, RAM). Memory 1020 may store an operating system and other application programs, and when the technical solutions provided by the embodiments of the present application are implemented by software or firmware, relevant program codes are stored in memory 1020, and the general configuration method for form coding of the embodiments of the present application is invoked by processor 1010;
an input/output interface 1030 for implementing information input and output;
the communication interface 1040 is configured to implement communication interaction between the device and other devices, and may implement communication in a wired manner (such as USB, network cable, etc.), or may implement communication in a wireless manner (such as mobile network, WIFI, bluetooth, etc.);
a bus 1050 that transfers information between the various components of the device (e.g., processor 1010, memory 1020, input/output interface 1030, and communication interface 1040);
wherein processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 implement communication connections therebetween within the device via a bus 1050.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the automatic generation code general configuration method or the form code generation method when being executed by a processor.
The memory, as a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory remotely located relative to the processor, the remote memory being connectable to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
According to the embodiment of the application, the automatic generation of the codes is realized through the annotation of the subsystem tree table and the configuration of the coding rules, the logic for generating the codes is not required to be developed again when the form is newly added in the later period, only one subsystem tree annotation mark is required to be added, then the corresponding coding rules are configured according to own business, and the user can also adjust the assembly rules for generating the codes by himself in the configuration of the coding rules, so that the effects of facilitating non-development implementation, operation and maintenance or the user can adjust the codes by himself, improving user experience and reducing operation and maintenance cost are achieved.
The embodiments described in the embodiments of the present application are for more clearly describing the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application, and as those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
It will be appreciated by those skilled in the art that the technical solutions shown in the figures do not constitute limitations of the embodiments of the present application, and may include more or fewer steps than shown, or may combine certain steps, or different steps.
Those of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
The terms "first," "second," "third," "fourth," and the like in the description of the present application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in this application, "at least one" means one or more, and "a plurality" means two or more. "and/or" for describing the association relationship of the association object, the representation may have three relationships, for example, "a and/or B" may represent: only a, only B and both a and B are present, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: "a", "b", "c", "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the above-described division of units is merely a logical function division, and there may be another division manner in actual implementation, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including multiple instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the various embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing a program.
Preferred embodiments of the present application are described above with reference to the accompanying drawings, and thus do not limit the scope of the claims of the embodiments of the present application. Any modifications, equivalent substitutions and improvements made by those skilled in the art without departing from the scope and spirit of the embodiments of the present application shall fall within the scope of the claims of the embodiments of the present application.

Claims (10)

1. A configuration method for automatically generating codes, comprising:
receiving input notes, and storing the input notes as note information of a form;
generating a subsystem tree table of a form according to the annotation information;
selecting a target tree node from the subsystem tree table to obtain a coding rule configuration template of the target tree node;
and receiving an input field corresponding to the coding rule configuration template, and obtaining a coding generation rule according to the input field.
2. The configuration method according to claim 1, wherein the subsystem tree table is updated in the following manner:
scanning the annotation information existing currently in a reflection mode;
and updating the data information in the subsystem tree table according to the scanning result.
3. The configuration method according to claim 1, wherein the encoding rule configures a field of a template, comprising at least one of: a segment separator, a business object, a priority policy, an application field, a coding instance, a rule definition sub-table, and an application organization sub-table.
4. The configuration method according to claim 1, wherein the receiving the input annotation, storing the input annotation as annotation information of a form, includes:
setting an annotation template;
and receiving input notes corresponding to the note templates, and storing the input notes as note information of the form.
5. The configuration method according to claim 1, wherein the subsystem tree table comprises at least one of: module unique identification code, module alias, form unique identification code, form alias, form background name information.
6. The configuration method according to claim 1, wherein the encoding rule configuration template generating step includes:
configuring fields required by coding rules of the form;
and obtaining the coding rule configuration template according to the combination of the fields.
7. The form code generation method based on the automatic generation code is characterized by comprising the following steps:
when a form is newly added or saved, annotation information corresponding to the form is obtained;
acquiring a code generation rule corresponding to the form according to the annotation information;
generating a form code according to the code generation rule;
wherein the annotation information is used to distinguish forms.
8. The form code generation method according to claim 7, wherein the acquiring code generation rules corresponding to the form based on the annotation information includes: and acquiring the code generation rule corresponding to the form according to the form unique identification code in the annotation information.
9. The form code generation method according to claim 7, wherein the generating a form code according to the code generation rule includes:
acquiring a form background table name corresponding to the code generation rule;
determining a background table of the form according to the background table name of the form;
inquiring the background table according to the fixed value and the date field of the code generation rule to obtain the maximum sequence number of the table;
setting a step value of the form according to the code generation rule;
and obtaining the form code according to the step value and the maximum sequence number.
10. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program or instructions that when executed by the processor implement the method of automatically generating a code according to any one of claims 1 to 6 or the method of generating a form code according to any one of claims 7 to 9.
CN202311372857.1A 2023-10-20 2023-10-20 Configuration method for automatically generating codes, form code generation method and form code generation equipment Pending CN117634427A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311372857.1A CN117634427A (en) 2023-10-20 2023-10-20 Configuration method for automatically generating codes, form code generation method and form code generation equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311372857.1A CN117634427A (en) 2023-10-20 2023-10-20 Configuration method for automatically generating codes, form code generation method and form code generation equipment

Publications (1)

Publication Number Publication Date
CN117634427A true CN117634427A (en) 2024-03-01

Family

ID=90025996

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311372857.1A Pending CN117634427A (en) 2023-10-20 2023-10-20 Configuration method for automatically generating codes, form code generation method and form code generation equipment

Country Status (1)

Country Link
CN (1) CN117634427A (en)

Similar Documents

Publication Publication Date Title
CN111209004B (en) Code conversion method and device
US20220035600A1 (en) API Specification Generation
EP2943859B1 (en) System, method, and computer-readable medium for managing edge devices
CN111580884B (en) Configuration updating method, device, server and electronic equipment
US9535966B1 (en) Techniques for aggregating data from multiple sources
CN104731589A (en) Automatic generation method and device of user interface (UI)
CN110888842A (en) File storage method, file query method, file storage device, file query device and file query equipment
CN110007906B (en) Script file processing method and device and server
EP2521043A1 (en) Method for establishing a relationship between semantic data and the running of a widget
CN110245128B (en) Meta-model establishing method and device, storage medium and electronic device
CN113641414A (en) Internet of things equipment access method and device, computer equipment and storage medium
US9626346B2 (en) Method of implementing structured and non-structured data in an XML document
CN116992081A (en) Page form data processing method and device and user terminal
CN115016784B (en) Low code application multiplexing method, application analysis system, equipment and storage medium
CN112052011A (en) Method and device for combining small programs, electronic equipment and medium
CN109471957B (en) Metadata conversion method and device based on uniform tags
CN108959294A (en) A kind of method and apparatus accessing search engine
CN112131239B (en) Data processing method, computer equipment and readable storage medium
CN113268232B (en) Page skin generation method and device and computer readable storage medium
CN117634427A (en) Configuration method for automatically generating codes, form code generation method and form code generation equipment
CN113515715B (en) Buried point event code generation method, buried point event code processing method and related equipment
CN109408577A (en) ORACLE database JSON analytic method, system, device and can storage medium
Le Zou et al. On synchronizing with web service evolution
CN115712411A (en) Method and device for generating user-defined serial number
CN115562993A (en) Test script recording method and device, electronic 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