CN112306498A - Code generation method, ERP system and readable storage medium - Google Patents

Code generation method, ERP system and readable storage medium Download PDF

Info

Publication number
CN112306498A
CN112306498A CN202011268708.7A CN202011268708A CN112306498A CN 112306498 A CN112306498 A CN 112306498A CN 202011268708 A CN202011268708 A CN 202011268708A CN 112306498 A CN112306498 A CN 112306498A
Authority
CN
China
Prior art keywords
code
information
template
application
generation method
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
CN202011268708.7A
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.)
Yonyou Network Technology Co Ltd
Original Assignee
Yonyou Network 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 Yonyou Network Technology Co Ltd filed Critical Yonyou Network Technology Co Ltd
Priority to CN202011268708.7A priority Critical patent/CN112306498A/en
Publication of CN112306498A publication Critical patent/CN112306498A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a code generation method, an ERP system and a readable storage medium, wherein the code generation method comprises the following steps: acquiring a code template and application parameter information to be converted; and generating a code file according to the application parameter information and the code template. According to the technical scheme, the application parameter information to be converted can be subjected to standardized conversion through the code template in the development process of the application code, so that the writing style of the application code is consistent, the error of manual code writing is avoided, the application code is standardized, convenience is brought to later maintenance, and the development time of the application is saved.

Description

Code generation method, ERP system and readable storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a code generation method, an ERP system and a readable storage medium.
Background
In the related art, an ERP (Enterprise Resources Planning) system needs to adopt a new Web (internet) technology to reconstruct and develop interface interaction. In the development process of a user, due to the fact that front-end technologies are different, the encoding style can be disordered, and maintenance of subsequent products is affected. And when the front end and the rear end are developed in parallel, the whole development process inevitably needs to be determined by repeated communication, so that the development process is low in efficiency.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art or the related art.
To this end, a first aspect of the present invention proposes a code generation method.
A second aspect of the present invention provides an ERP system.
A third aspect of the invention is directed to a readable storage medium.
In view of this, a first aspect of the present invention provides a code generation method, including: acquiring a code template and application parameter information to be converted; and generating a code file according to the application parameter information and the code template.
According to the code generation method provided by the invention, after the application parameter information to be converted is received, the code template corresponding to the application parameter information to be converted is determined firstly. The application parameter information to be converted is parameter information of the user deployment application, namely parameters required for creating the application code. The code template may be understood as a template used when generating a code of an application, and different application parameter information corresponds to different code templates. And bringing the application parameter information into the code template to convert the application parameter information into a code file, wherein if no special requirements are required on service functions, the generated code file can be directly used for application deployment. And furthermore, in the development process of the application code, the application parameter information to be converted is subjected to standardized conversion through the code template, the possibility of code error of manual code writing is avoided, the development time of the code is saved, and meanwhile, the code template is used for generating the code file corresponding to the application parameter information, so that the writing style of the application code is consistent, the normalization of the application code is improved, and convenience is brought to later maintenance.
Further, after the code file is generated, the code file is stored in a database in a compressed package mode so as to be called or downloaded by a user.
In addition, according to the code generation method in the above technical solution provided by the present invention, the following additional technical features may also be provided:
in the above technical solution, further, the obtaining a code template specifically includes: determining target code information in the application parameter information; acquiring a preset code directory; and acquiring a code template corresponding to the target code information according to the preset code directory based on the fact that the target code information belongs to the preset code directory.
In the technical scheme, target code information, namely a code format required by a user, is extracted from application parameter information. The system provides a preset code directory comprising code templates with different code formats, and the target code information is matched with the preset code directory. And if the target code information belongs to the preset code directory, the system or the cloud end is indicated to store the code template corresponding to the target code information, and the code template corresponding to the target code information is extracted according to the preset code directory. Therefore, by setting the preset code directory and matching the target code information, the corresponding code template can be automatically searched, unified code output is carried out, the normalization and the correctness of the generated code are effectively ensured, the time consumed in the subsequent debugging and running process is reduced, the development efficiency is improved, and the development cost is reduced. And the code templates are classified and sorted through the preset code catalog, so that the existing code templates can be favorably checked by a user, and the user operation is reduced.
In any of the above technical solutions, further, obtaining a code template corresponding to the target code information according to a preset code directory specifically includes: determining a template path corresponding to the target code information according to the code directory; and loading the code template from the database according to the template path.
In the technical scheme, code templates with different code formats are stored in a database, and a preset code directory comprises a corresponding relation between a template path of the code template and target code information. And when the target code information is determined to belong to the preset code directory, finding the template path specified by the target code information according to the corresponding relation between the template path in the code directory and the target code information, and then loading the corresponding code template from the database according to the template path. In the application development process, a user can quickly and accurately obtain the code template corresponding to the target code information so as to generate a corresponding code file, and the application development efficiency is greatly improved.
Specifically, the database includes a local database and an online database. The local database stores the code template in the device, thereby reliably acquiring the code template even when the network is interrupted, further shortening the time required for generating the code file, being applicable to the device in an off-line state, and improving the practicability. The online database stores the code template through the cloud, so that the large-capacity storage of the code template is realized, the synchronous real-time performance and the usability of the code are improved, the use experience of a user is improved, the code template is prevented from occupying the storage space of the local equipment, and the operation efficiency of the equipment is improved. And for the online database, the template path is a download address of the code template.
In any of the above technical solutions, further, the code generation method further includes: acquiring updating information of the code template; modifying the code template and the code catalog according to the updating information; and storing the modified code template in a database.
In the technical scheme, if it is detected that the target code information does not belong to a preset code directory, that is, a code template in a format currently required by a user is not pre-stored in the system, or the user needs to modify the pre-stored code template, the user inputs update information of the code template. And after the system acquires the updating information, updating the existing code template or adding a new code template according to the updating information, storing the modified code template into a database, and updating the code catalog. The code template is improved by expanding and updating the code template, so that the code template is more perfect, the personalized customization of the code template is realized, the automatic generation of codes in different scenes is met, the workload of a user is reduced, and the development efficiency is improved.
In any of the above technical solutions, further, the database includes an Oracle database and/or a MySql database.
In the technical solution, the database includes an Oracle database and/or a MySql database, and specifically, the Oracle database may provide a distributed processing function. When the code template is stored, a corresponding storage queue is firstly established in an Oracle database, an external code template is inserted into the Oracle repository, and the code template is inserted into the Oracle database for storage, so that the large-capacity storage of the code template is realized, the storage speed of the code template is improved, and the storage reliability of the code template is ensured by utilizing the mature technology of the Oracle database. The MySql database has the characteristics of small volume, high speed, low cost and the like, and the code templates are stored by using the MySql database, so that the reading performance of the code generation system is ensured not to be reduced along with the increasing of the code templates. By means of the distributed storage of the code templates, the code templates can be automatically switched into corresponding database connection drivers according to the database types selected by users, different database connection methods can be executed according to the current connection drivers, and the response speed of obtaining the code templates is improved.
In any of the above technical solutions, further, the acquiring of the application parameter information to be converted specifically includes: acquiring retrieval information of the application parameter information; determining application service information according to the retrieval information; and determining the application parameter information according to the application service information.
In the technical scheme, retrieval information of application parameter information input by a user is acquired, and the retrieval information is used for retrieving application service information corresponding to development application. The application service information can be quickly and accurately matched from a large amount of redundant application related information, and then the application parameter information is determined according to the application service information. By retrieving the application parameter information and extracting the effective parameter information, the user is prevented from inputting standardized parameters repeatedly, the workload of the user is effectively reduced, the operation convenience of code file generation and the development efficiency of application are improved, and the use experience of the user is improved.
In any of the above technical solutions, further, the application parameter information includes: target code information, page information, button information; the code file includes: code structure information, interface rendering information, and interaction event information.
In the technical scheme, the application parameter information comprises target code information, page information and button information, the information contained in the application parameter information is a parameter required by codes during application development, and the part required by the parameter information can be directly converted into the codes by extracting the parameter information matched with the codes in the application parameter information, so that the application parameter information to be converted conforms to a preset specification, the coding workload of a user is reduced, and the front-end page development efficiency is improved. The generated code file includes: code structure information, interface rendering information, and interactivity event information. The method and the device have the advantages that the required information in the code file is extracted according to the application requirement, so that a user only needs to perform adaptive development on the generated code file, the complexity of manually inputting the functional information represented by the code after the code file is generated is omitted, the development time of the application is saved, the development period of the application program is shortened, and the development efficiency of the application is improved.
In any of the above technical solutions, further, generating a code file specifically includes: generating a code file by adopting a Spring boot frame; wherein the code file comprises a React code file.
In the technical scheme, the code file is generated by adopting the Spring boot frame, so that the independent operation of the Servlet container is realized, the scene conditions required by the generation of the code file are reduced, the cost is reduced, and the practicability of the code generation equipment is improved. The code files comprise React code files which support ES6 grammar, the method is widely applied to developing user interfaces of Web applications, functional programming is adopted, flexibility is high, and application program development is efficient.
According to a second aspect of the present invention, an ERP system is provided, comprising: a memory having a program or instructions stored thereon; a processor configured to implement the code generation method proposed by the first aspect when executing a program or instructions. Therefore, the ERP system has all the advantages of the code generation method proposed by the first aspect.
Further, the ERP system further includes a display screen, where the display screen is used to display a human-computer interaction interface, and the display screen may be a liquid crystal display or a touch display, and if the display screen is a touch display, the display screen may be a capacitive touch screen or a resistive touch screen that supports single-point and multi-point touch operations. The support of single-point and multi-point touch operations means that the touch display can sense touch operations simultaneously generated from one or more positions on the touch display, and the sensed touch operations are sent to the processor for calculation and processing. The input device of the system can be a touch layer covered on a display screen, a key, a track ball or a touch pad arranged on a system shell, an external keyboard, a touch pad or a mouse and the like.
In addition, the processor can be independently arranged with other components in the ERP system, no additional hardware equipment is needed, and the use by users is convenient.
According to a third aspect of the present invention, there is provided a readable storage medium having stored thereon a program or instructions which, when executed by a processor, performs the control method of the data management system set forth in the first aspect. Therefore, the readable storage medium has all the advantages of the control method of the data management system in the first aspect, and redundant description is omitted to avoid redundancy.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 shows one of the code generation method flow diagrams of one embodiment of the present invention;
FIG. 2 is a second flowchart of a code generation method according to another embodiment of the present invention;
FIG. 3 is a third flowchart of a code generation method according to another embodiment of the present invention;
FIG. 4 is a fourth flowchart of a code generation method according to yet another embodiment of the invention;
FIG. 5 is a fifth flowchart of a code generation method according to yet another embodiment of the invention;
fig. 6 is a schematic flow chart illustrating a read code generation method of the ERP system according to an embodiment of the present invention;
FIG. 7 illustrates an ERP system schematic of a specific embodiment of the present invention;
FIG. 8 illustrates a schematic block diagram of an ERP system, in accordance with an embodiment of the present invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
Code generation methods, ERP systems, and readable storage media according to some embodiments of the present invention are described below with reference to fig. 1 to 8.
Example 1:
fig. 1 shows one of the flowcharts of a code generation method according to an embodiment of the present invention, and specifically, as shown in fig. 1, the code generation method includes:
102, acquiring a code template and application parameter information to be converted;
and 104, generating a code file according to the application parameter information and the code template.
In this embodiment, after receiving the application parameter information to be converted, a code template corresponding to the application parameter information to be converted is first determined. The application parameter information to be converted is parameter information of the user deployment application, namely parameters required for creating the application code. The code template may be understood as a template used when generating a code of an application, and different application parameter information corresponds to different code templates. And then, bringing the application parameter information into a code template to convert the application parameter information into a code file, wherein if no special requirements are required on service functions, the generated code file can be directly used for application development. And furthermore, in the development process of the application code, the application parameter information to be converted is subjected to standardized conversion through the code template, the possibility of code error of manual code writing is avoided, the development time of the code is saved, and meanwhile, the code template is used for generating the code file corresponding to the application parameter information, so that the writing style of the application code is consistent, the normalization of the application code is improved, and convenience is brought to later maintenance.
Further, after the code file is generated, the code file is stored in a database in a compressed package mode so as to be called or downloaded by a user.
Example 2:
fig. 2 shows a second flowchart of a code generation method according to an embodiment of the present invention, and specifically, as shown in fig. 2, the code generation method includes:
step 202, acquiring application parameter information to be converted;
step 204, determining target code information in the application parameter information;
step 206, acquiring a preset code directory;
step 208, judging whether the target code information belongs to a preset code directory, if so, entering step 210, and if not, entering step 202;
step 210, obtaining a code template corresponding to the target code information according to a preset code directory;
and 212, generating a code file according to the application parameter information and the code template.
In this embodiment, the object code information, i.e. the code format required by the user, is first extracted from the application parameter information. Further, the system provides a preset code directory comprising code templates with different code formats, and the target code information is matched with the preset code directory. And if the target code information belongs to the preset code directory, the system or the cloud end is indicated to store the code template corresponding to the target code information, and the code template corresponding to the target code information is extracted according to the preset code directory. Therefore, by setting the preset code directory and matching the target code information, the corresponding code template can be automatically searched, unified code output is carried out, the normalization and the correctness of the generated code are effectively ensured, the time consumed in the subsequent debugging and running process is reduced, the development efficiency is improved, and the development cost is reduced.
Example 3:
fig. 3 shows a third flowchart of a code generation method according to an embodiment of the present invention, and specifically, as shown in fig. 3, the code generation method includes:
step 302, acquiring application parameter information to be converted;
step 304, determining target code information in the application parameter information;
step 306, acquiring a preset code directory;
step 308, judging whether the target code information belongs to a preset code directory, if so, entering step 310, and if not, entering step 302;
step 310, determining a template path corresponding to the target code information according to the code directory;
step 312, loading a code template from the database according to the template path;
and step 314, generating a code file according to the application parameter information and the code template.
In this embodiment, code templates of different code formats are stored in the database, and the preset code directory includes a correspondence between a template path of the code template and the target code information. After the target code information is determined to belong to the preset code directory, the template path specified by the target code information can be found according to the corresponding relation between the template path in the code directory and the target code information, and then the corresponding code template is loaded from the database according to the template path, so that a user can quickly and accurately obtain the code template corresponding to the target code information in the application development process, a corresponding code file can be generated conveniently, and the application development efficiency is greatly improved.
Specifically, the database includes a local database and an online database. The local database stores the code template in the device, thereby reliably acquiring the code template even when the network is interrupted, further shortening the time required for generating the code file, being applicable to the device in an off-line state, and improving the practicability. The online database stores the code template through the cloud, so that the large-capacity storage of the code template is realized, the synchronous real-time performance and the usability of the code are improved, the use experience of a user is improved, the code template is prevented from occupying the storage space of the local equipment, and the operation efficiency of the equipment is improved. And for the online database, the template path is a download address of the code template.
Further, if the target code information does not belong to the preset code directory, it indicates that the code template in the format currently required by the user is not pre-stored in the system database, and at this time, a reminding message may be sent to inform the user to re-input new application parameter information or create a new code template.
Example 4:
fig. 4 shows a fourth flowchart of a code generation method according to an embodiment of the present invention, specifically, as shown in fig. 4, the code generation method includes:
step 402, acquiring application parameter information to be converted;
step 404, determining target code information in the application parameter information;
step 406, acquiring a preset code directory;
step 408, judging whether the target code information belongs to a preset code directory, if so, entering step 410, and if not, entering step 402;
step 410, determining a template path corresponding to the target code information according to the code directory;
step 412, loading a code template from the database according to the template path;
step 414, generating a code file according to the application parameter information and the code template;
step 416, acquiring the update information of the code template;
step 418, modifying the code template and the code catalog according to the updating information;
step 420, storing the modified code template in a database.
In this embodiment, if it is detected that the target code information does not belong to the preset code directory, that is, the code template in the format currently required by the user is not pre-stored in the system, or the user needs to modify the pre-stored code template, the user inputs the update information of the code template. And after the system acquires the updating information, updating the existing code template or adding a new code template according to the updating information, updating the code catalog, and storing the modified code template into the database. The code template is improved by expanding and updating the code template, so that the code template is more perfect, the personalized customization of the code template is realized, the automatic generation of codes in different scenes is met, the workload of a user is reduced, and the development efficiency is improved.
Further, the database includes an Oracle database and/or MySql database, which may provide, in particular, distributed processing functionality. When the code template is stored, a corresponding storage queue is firstly established in an Oracle database, an external code template is inserted into the Oracle repository, and the code template is inserted into the Oracle database for storage, so that the large-capacity storage of the code template is realized, the storage speed of the code template is improved, and the storage reliability of the code template is ensured by utilizing the mature technology of the Oracle database. The MySql database has the characteristics of small volume, high speed, low cost and the like, and the code templates are stored by using the MySql database, so that the reading performance of the code generation system is ensured not to be reduced along with the increasing of the code templates.
By means of the distributed storage of the code templates, the code templates can be automatically switched into corresponding database connection drivers according to the database types selected by users, different database connection methods can be executed according to the current connection drivers, and the response speed of obtaining the code templates is improved.
Particularly, the connection work of the database is completed by adopting the Spring Data technology, so that the Data access count based on the Spring frame application can be simplified, and the Data access is more convenient and faster.
Example 5:
fig. 5 shows a fifth flowchart of a code generation method according to an embodiment of the present invention, specifically, as shown in fig. 5, the code generation method includes:
step 502, acquiring retrieval information and a code template of application parameter information;
step 504, determining application service information according to the retrieval information;
step 506, determining application parameter information according to the application service information;
and step 508, generating a code file according to the application parameter information and the code template.
In this embodiment, retrieval information of application parameter information input by a user is acquired, and the retrieval information is used for retrieving application service information corresponding to a development application. The method can quickly and accurately match the application service information from a large amount of redundant application related information, and further determine the application parameter information according to the application service information. By retrieving the application parameter information and extracting the effective parameter information, the user is prevented from inputting standardized parameters repeatedly, the workload of the user is effectively reduced, the operation convenience of code file generation and the development efficiency of application are improved, and the use experience of the user is improved.
For example, an application code (search information) input by a user is acquired, application service information is acquired from a data source according to the application code, and application parameter information required for developing an application is called according to the application service information.
Furthermore, the application parameter information comprises target code information, page information and button information, the information contained in the application parameter information is the parameter required by the code during application development, and the part required by the parameter information can be directly converted into the code by extracting the parameter information matched with the code in the application parameter information, so that the application parameter information to be converted conforms to the preset specification, the coding workload of a user is reduced, and the front-end page development efficiency is improved.
The generated code file includes: code structure information, interface rendering information, and interactivity event information. The method and the device have the advantages that the required information in the code file is extracted according to the application requirement, so that a user only needs to perform adaptive development on the generated code file, the complexity of manually inputting the functional information represented by the code after the code file is generated is omitted, the development time of the application is saved, the development period of the application program is shortened, and the development efficiency of the application is improved.
Specifically, the Spring boot frame is adopted to generate the code file, so that the independent operation of the Servlet container is realized, the scene conditions required by the generation of the code file are reduced, the cost is reduced, and the practicability of the code generation equipment is improved. The code files comprise React code files which support ES6 grammar, the method is widely applied to developing user interfaces of Web applications, functional programming is adopted, flexibility is high, and application program development is efficient.
Example 6:
fig. 6 is a schematic flowchart illustrating a read code generation method of the ERP system according to a specific embodiment of the present invention, where the code generation method includes:
step 602, acquiring application parameter information in an interactive interface;
step 604, inputting application parameter information into a database;
step 606, loading a code template in the database and determining a template file;
step 608, importing the template file to a code generator;
step 610, generating a front-end code file.
In this embodiment, as shown in FIG. 7, the processors of ERP system 810 include a static resource server 816, a code generator 822, a directory structure template module 818, and a code template module 820. Wherein the system is provided with an interactive interface through the static resource server 816. The catalog structure template module 818 is used for the preset React code catalog structure of the system, and simultaneously supports personalized customization of the template to generate different catalog structures (preset code catalogs). The code template module 820 is used for the system to load a code template according to a template path configured by the target file in the directory structure, and generate an actual template file according to the analysis of the code module. The code generator 822 is configured to obtain application parameter information specified by a user according to an interactive interface of the apparatus, load detailed application information (application parameter information) from the database 900 according to information input by the user, and fill application parameter information required in the read template file into the read template file to generate a read code file, that is, a front end code, of the target application. And finally returning to the browser for downloading by the user in a compressed package mode. Therefore, the React code can be automatically generated in an interface mode without additional hardware equipment, the workload of developers is reduced, the coding style is unified, the subsequent product maintenance is facilitated, errors caused by manual coding are avoided, and meanwhile the communication cost with the rear end is reduced, so that the developers can better pay attention to specific service logic, and the subsequent product maintenance is facilitated.
In particular, the user may specify an application, such as an application code, on the front-end interactive interface. The system obtains application service information, such as service components and domain modules to which the application belongs, from a data source according to retrieval information of application parameter information specified by a user, such as application codes. And inquiring all page information of the application according to the application service information, such as a page template, the area code of the template and the button information.
Wherein, the connection work of the database is completed by adopting the Spring Data technology. The method adopts the Spring Boot technology to generate codes so as to separate Servlet containers to operate independently, realizes cross-platform deployment without Web containers, and is simple and convenient. And by adopting the React technology, a front-end interactive interface is provided based on the very component, and a friendly interactive interface can be provided. And generating a React code structure through a json file, and customizing a front-end code template through a js file.
Example 7:
as shown in fig. 8, according to a second aspect of the present invention, an ERP system 810 is provided, comprising: a memory 812 and a processor 814.
In detail, the ERP system 810 is configured as a storage 812, on which a program or an instruction is stored, the processor 814 is connected to the storage 812, and when the processor 814 executes the program or the instruction, the code generation method proposed by the first aspect is implemented. Therefore, the ERP system 810 has all the advantages of the code generation method proposed in the first aspect, and details are not described herein.
Further, the ERP system 810 further includes a display screen, where the display screen is used to display a human-computer interaction interface, and the display screen may be a liquid crystal display or a touch display, and if the display screen is a touch display, the display screen may be a capacitive touch screen or a resistive touch screen that supports single-point and multi-point touch operations. Supporting single-point and multi-point touch operations means that the touch display can sense touch operations from one or more locations on the touch display at the same time, and the sensed touch operations are sent to the processor 814 for calculation and processing. The input device of the system can be a touch layer covered on a display screen, a key, a track ball or a touch pad arranged on a system shell, an external keyboard, a touch pad or a mouse and the like.
Specifically, a front-end interactive interface is provided based on a very component, wherein the very component is a component library realized based on a UI Design language iUAP Design and fact, and can provide a complete ecology from product interface Design to front-end development for a user.
In addition, processor 814 may be provided separately from other components in ERP system 810, eliminating the need for additional hardware devices and facilitating user access.
Example 8:
according to a third aspect of the present invention, there is provided a readable storage medium having stored thereon a program or instructions which, when executed by a processor, performs the control method of the data management system set forth in the first aspect. Therefore, the readable storage medium has all the advantages of the control method of the data management system in the first aspect, and will not be described herein again.
In the description of the present invention, the terms "plurality" or "a plurality" refer to two or more, and unless otherwise specifically defined, the terms "upper", "lower", and the like indicate orientations or positional relationships based on the orientations or positional relationships illustrated in the drawings, and are only for convenience in describing the present invention and simplifying the description, but do not indicate or imply that the referred device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present invention; the terms "connected," "mounted," "secured," and the like are to be construed broadly and include, for example, fixed connections, removable connections, or integral connections; may be directly connected or indirectly connected through an intermediate. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the description of the present invention, the description of the terms "one embodiment," "some embodiments," "specific embodiments," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In the present invention, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A code generation method, comprising:
acquiring a code template and application parameter information to be converted;
and generating a code file according to the application parameter information and the code template.
2. The code generation method according to claim 1, wherein the obtaining of the code template specifically includes:
determining object code information in the application parameter information;
acquiring a preset code directory;
and acquiring the code template corresponding to the target code information according to the preset code directory based on the fact that the target code information belongs to the preset code directory.
3. The code generation method according to claim 2, wherein the obtaining the code template corresponding to the target code information according to the preset code directory specifically includes:
determining a template path corresponding to the target code information according to the code directory;
and loading the code template from a database according to the template path.
4. The code generation method according to claim 3, characterized by further comprising:
acquiring the update information of the code template;
modifying the code template and the code catalog according to the update information;
and storing the modified code template in the database.
5. The code generation method according to claim 3 or 4,
the database includes an Oracle database and/or a MySql database.
6. The code generation method according to any one of claims 1 to 4, wherein the acquiring application parameter information to be converted specifically includes:
acquiring retrieval information of the application parameter information;
determining application service information according to the retrieval information;
and determining the application parameter information according to the application service information.
7. The code generation method according to any one of claims 1 to 4,
the application parameter information includes: target code information, page information, button information;
the code file includes: code structure information, interface rendering information, and interaction event information.
8. The code generation method according to any one of claims 1 to 4, wherein the generating a code file specifically includes:
generating the code file by adopting a Spring boot frame;
wherein the code file comprises a React code file.
9. An ERP system, comprising: a memory, a processor, the memory storing a program or instructions, the processor implementing the code generation method of any one of claims 1 to 8 when executing the program or instructions.
10. A readable storage medium on which a program or instructions are stored, characterized in that the program or the instructions, when executed by a processor, implement the code generation method of any one of claims 1 to 8.
CN202011268708.7A 2020-11-13 2020-11-13 Code generation method, ERP system and readable storage medium Pending CN112306498A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011268708.7A CN112306498A (en) 2020-11-13 2020-11-13 Code generation method, ERP system and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011268708.7A CN112306498A (en) 2020-11-13 2020-11-13 Code generation method, ERP system and readable storage medium

Publications (1)

Publication Number Publication Date
CN112306498A true CN112306498A (en) 2021-02-02

Family

ID=74335823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011268708.7A Pending CN112306498A (en) 2020-11-13 2020-11-13 Code generation method, ERP system and readable storage medium

Country Status (1)

Country Link
CN (1) CN112306498A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117453229A (en) * 2023-12-26 2024-01-26 天津戎行集团有限公司 Output code analysis method for automatic code generation database

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105511865A (en) * 2015-11-30 2016-04-20 大连文森特软件科技有限公司 Method and system using multi-language or multi-engine to do code development
CN111581920A (en) * 2020-05-12 2020-08-25 深圳前海微众银行股份有限公司 Document conversion method, device, equipment and computer storage medium
WO2020173128A1 (en) * 2019-02-27 2020-09-03 平安科技(深圳)有限公司 Method and device for generating software development kit, and terminal device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105511865A (en) * 2015-11-30 2016-04-20 大连文森特软件科技有限公司 Method and system using multi-language or multi-engine to do code development
WO2020173128A1 (en) * 2019-02-27 2020-09-03 平安科技(深圳)有限公司 Method and device for generating software development kit, and terminal device
CN111581920A (en) * 2020-05-12 2020-08-25 深圳前海微众银行股份有限公司 Document conversion method, device, equipment and computer storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117453229A (en) * 2023-12-26 2024-01-26 天津戎行集团有限公司 Output code analysis method for automatic code generation database
CN117453229B (en) * 2023-12-26 2024-02-23 天津戎行集团有限公司 Output code analysis method for automatic code generation database

Similar Documents

Publication Publication Date Title
CN109918607B (en) Page construction method and device, medium and computing equipment
US10521223B1 (en) Systems and methods of a metadata orchestrator augmenting application development
Brambilla et al. Extending the interaction flow modeling language (IFML) for model driven development of mobile applications front end
CN109308254B (en) Test method, test device and test equipment
CN111126019B (en) Report generation method and device based on mode customization and electronic equipment
US11010138B2 (en) System and method for programmatically converting interface specification to generic plug-in code
CN109710250B (en) Visualization engine system and method for constructing user interface
CN111596965A (en) Project engineering initialization method, device, computer equipment and storage medium
CN111506300A (en) Applet generation method, device, equipment and storage medium
CN111581920A (en) Document conversion method, device, equipment and computer storage medium
CN114036439A (en) Website building method, device, medium and electronic equipment
CN114253537A (en) Form generation method and device, electronic equipment and storage medium
CN113791765A (en) Resource arranging method, device and equipment of cloud service and storage medium
CN113742628A (en) Form processing method and device, computer readable storage medium and electronic equipment
CN111427577A (en) Code processing method and device and server
CN114968192A (en) Project creation method and device, computer equipment and storage medium
CN114048415A (en) Form generation method and device, electronic equipment and computer readable storage medium
US10394529B2 (en) Development platform of mobile native applications
CN112306498A (en) Code generation method, ERP system and readable storage medium
CN114371845A (en) Form generation method and device
CN111506594A (en) Big data query platform, management method thereof and data query method
CN111061522A (en) Method, device, equipment and storage medium for generating front-end card assembly based on back end
CN112416746A (en) Test case generation method, device, equipment and medium
CN115421770A (en) Resource information processing method and device, storage medium and electronic equipment
CN112306694B (en) Memory analysis method and device, computer readable storage medium and electronic equipment

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