CN110750553A - Method for self-defining export of data in service management system - Google Patents

Method for self-defining export of data in service management system Download PDF

Info

Publication number
CN110750553A
CN110750553A CN201910822667.2A CN201910822667A CN110750553A CN 110750553 A CN110750553 A CN 110750553A CN 201910822667 A CN201910822667 A CN 201910822667A CN 110750553 A CN110750553 A CN 110750553A
Authority
CN
China
Prior art keywords
data
export
management system
user
sql
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
CN201910822667.2A
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.)
CHENGDU ZHIYONG TECHNOLOGY Co Ltd
Original Assignee
CHENGDU ZHIYONG 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 CHENGDU ZHIYONG TECHNOLOGY Co Ltd filed Critical CHENGDU ZHIYONG TECHNOLOGY Co Ltd
Priority to CN201910822667.2A priority Critical patent/CN110750553A/en
Publication of CN110750553A publication Critical patent/CN110750553A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06F16/2448Query languages for particular applications; for extensibility, e.g. user defined types
    • 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/245Query processing
    • G06F16/2455Query execution
    • 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/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • 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/258Data format conversion from or to a database

Abstract

The invention discloses a method for self-defining export of data in a service management system, which comprises a first stage, a client transmits a complete class name to a server; b. the server side carries out dynamic loading and obtains an attribute information list in a reflection mode; c. obtaining annotation and extension information by the field list; d. generating a user interaction interface; in the second stage, a, selecting on an interactive interface by a user; b. the server side carries out SQL splicing; c. and exporting the inquired result. Compared with the prior art, the invention has the advantages that: the invention extracts the export function module, decouples the export function module from a specific service system, and realizes the functions of field selection, user-defined query condition and sequencing mode which are visual and understandable for users. The method saves a large amount of repeated workload, improves the working efficiency, reduces the development cost, improves the perception and satisfaction of the user, and more flexibly meets the query requirements of the user in various aspects.

Description

Method for self-defining export of data in service management system
Technical Field
The invention relates to the field of software development and application development, in particular to a method for self-defining and exporting data in a service management system.
Background
Users often have a need to export service data when using a service system. The traditional mode is that a export module is independently developed for each service system, the workload is large and complicated, the query conditions are always fixed and not flexible enough, and the user-defined requirements cannot be met.
Disclosure of Invention
The present invention aims to provide a method for designing and implementing a functional component for custom exporting data in a service management system, which solves the above problems.
In order to achieve the purpose, the invention adopts the technical scheme that: a method for custom export of data in a service management system,
first stage
a. The client transmits the complete class name of the service model to the server;
b. the server dynamically loads the complete class name and acquires an attribute information list contained in the class in a reflection mode;
c. iterating the field list to obtain a field name and a class name to which the field belongs, obtaining the annotation of the field, and obtaining the extension information of the field from the annotation;
d. returning field list information, and generating a user interaction interface by the client according to the field list information;
second stage
a. The user selects fields, query conditions and sorting modes on the interactive interface, and transmits the full names of the service model classes, the full names of the service data operation classes and the selection result data to the server;
b. the server side carries out SQL splicing on the request parameters (can carry out user-defined processing on the SQL), and then obtains an entity of the business data operation class in a reflection mode, and the entity accesses the database by the spliced SQL and inquires data;
c. and converting the inquired result into a service model list (or performing user-defined conversion on the inquired result), and exporting the data through an Excel related tool operation class.
Preferably, the SQL can be processed in a self-defined mode before the database is accessed in the second step of the second stage, the method comprises the following steps of compiling extension classes, and compiling logic for processing the SQL according to business requirements; the client transmits the extension class name; the server dynamically loads the class according to the class name and generates an entity, and then the SQL is processed through the entity.
Preferably, before the data is exported in the third step of the second stage, the data can be subjected to custom conversion, the method comprises the following steps of compiling an extension class, and compiling a logic for processing a query result according to business requirements; the client transmits the extension class name; the server dynamically loads the class according to the class name and generates an entity, and then the entity converts the query result.
Preferably, the method comprises a function component derived by self-definition, and the function component has the functions of field selection, query condition selection, sorting mode selection, service module decoupling, SQL self-definition preprocessing and query result self-definition conversion.
Preferably, the field selection function is selected from the client visually, and the fields can be adjusted up, down, top and bottom sequentially.
Preferably, the query condition selection function is visually selected from the client, and a plurality of query conditions can be selected.
Preferably, the sorting mode selecting function is selected from a client in a visual mode, and a plurality of sorting modes can be selected.
Preferably, the service module is decoupled, service data is queried through dynamically splicing SQL by JAVA reflection in a mode of designating class names, and a related service data query module is not required to be written in advance, so that the service module is decoupled from the service function module, and any service module can have a function of self-defining data export without additional modification.
Preferably, the SQL self-defining preprocessing function can be used for dynamically generating an entity according to the class name and calling the method to perform the reprocessing on the SQL by a JAVA reflection mode before querying data through specifying the class name (the class realizes the self-defining method for performing the reprocessing on the automatically generated SQL) when more complex query is needed.
Preferably, the user-defined pre-conversion function is used, when more complex processing needs to be performed on the query result, the user-defined pre-conversion function can dynamically generate an entity according to the class name and call the entity to perform the re-processing on the query result in a JAVA reflection mode before returning data by specifying the class name (the class realizes a user-defined method for performing the re-processing on the automatically queried result), so that the requirement of a client is met.
Compared with the prior art, the invention has the advantages that: the invention extracts the export function module, decouples the export function module from a specific service system, and realizes the functions of field selection, user-defined query condition and sequencing mode which are visual and understandable for users. The method saves a large amount of repeated workload, improves the working efficiency, reduces the development cost, improves the perception and satisfaction of the user, and more flexibly meets the query requirements of the user in various aspects.
Drawings
FIG. 1 is a screenshot of a client interface of the present invention;
FIG. 2 is a screenshot of a client selecting a field, selecting a query condition, and selecting a sorting mode according to the present invention;
FIG. 3 is a client export data screenshot of the present invention;
FIG. 4 is a flow chart of the method of the present invention.
Detailed Description
The present invention will be further explained below.
Example 1: a method for custom export of data in a service management system, see fig. 4:
the first stage:
1. the client transmits the java complete class name of the service model to the server in the request.
2. The server data processing process comprises the following steps:
dynamically loading classes according to the complete class name of the business model;
obtain the list of fields of the class by reflection;
obtaining the field name, the name of the class to which the field belongs and obtaining the annotation of the field by iterating the field list, and obtaining the extension information of the field from the annotation (such as English name, Chinese name, derivation, query, sorting, database column name and the like);
return field list information (each entry in the list contains the english name of the field, the chinese name of the field, if exportable, if queryable, if orderable attributes, the corresponding database column name of the field, the name of the class to which the field belongs).
The client generates a user interaction interface according to the field list information, as in fig. 1.
Second, second stage:
1. the user selects fields, query conditions and sorting modes on the interactive interface, and finally transmits the full names of the service model classes, the full names of the service data operation classes and the selection results to the server, as shown in fig. 2.
2. The server side carries out SQL splicing on the request parameters and then generates an entity of the type through dynamic loading of the data operation type, and the entity accesses the database and queries data through the spliced SQL.
3. And finally, exporting the data of the inquired result through an Excel related tool operation class. As shown in fig. 3.
Thirdly, custom expansion:
1. before accessing the database in the second step of the second stage, the SQL can be processed by self-defining, and the method comprises the following steps:
compiling an extension class, and compiling logic for processing the SQL according to business requirements; the client transmits the extension class name; the server dynamically loads the class according to the class name and generates an entity, and then the SQL is processed through the entity.
2. Before the data is exported in the third step of the second stage, the data can be subjected to custom conversion, and the method comprises the following steps:
compiling an extension class, and compiling logic for processing a query result according to business requirements; the client transmits the extension class name; the server dynamically loads the class according to the class name and generates an entity, and then the entity converts the query result.
The invention has the main functions as follows: the service module has the data export function of selectable fields, customizable query conditions and customizable sequencing conditions.
The main characteristics are as follows: 1. the service code is decoupled, the service code is not coupled, and the user-defined data export function of the service can be realized without adding extra codes, so that the development efficiency is improved, and the development workload is reduced. 2. The interface is friendly: the user does not need to have the knowledge of database operation languages, and the fields, the query conditions and the selection sorting are selected in a visual mode at the client.
Name interpretation:
SQL: structured Query Language (SQL), a special purpose programming Language, is a database Query and programming Language for accessing data and querying, updating, and managing relational database systems.
Reflection the JAVA reflection mechanism is in the run state, for any one class, all the properties and methods of this class can be known; any method and attribute of any object can be called; this dynamically acquired information and the functionality of the method of dynamically invoking objects is referred to as the reflection mechanism of the java language.
The method for self-defining export of data in a service management system provided by the present invention is described in detail above, and a specific example is applied in the description to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method of the present invention and the core idea thereof; while the invention has been described in detail and with reference to specific embodiments thereof, it will be apparent to one skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A method for self-defining export of data in a service management system is characterized in that:
first stage
a. The client transmits the complete class name of the service model to the server;
b. the server dynamically loads the complete class name and acquires an attribute information list contained in the class in a reflection mode;
c. iterating the field list to obtain a field name and a class name to which the field belongs, obtaining the annotation of the field, and obtaining the extension information of the field from the annotation;
d. returning field list information, and generating a user interaction interface by the client according to the field list information;
second stage
a. The user selects fields, query conditions and sorting modes on the interactive interface, and transmits the full names of the service model classes, the full names of the service data operation classes and the selection result data to the server;
b. the server side carries out SQL splicing on the request parameters and then obtains an entity of the business data operation class in a reflection mode, and the entity accesses a database and inquires data through the spliced SQL;
c. and converting the inquired result into a service model list, and exporting the data through an Excel related tool operation class.
2. A method of custom export of data in a traffic management system according to claim 1, wherein: before accessing the database in the second step of the second stage, the SQL can be processed in a user-defined mode, the method comprises the following steps of compiling extension classes, and compiling logic for processing the SQL according to business requirements; the client transmits the extension class name; the server dynamically loads the class according to the class name and generates an entity, and then the SQL is processed through the entity.
3. A method of custom export of data in a traffic management system according to claim 1, wherein: before the data is exported in the third step of the second stage, the data can be subjected to custom conversion, the method comprises the following steps of compiling extension classes, and compiling logic for processing the query result according to business requirements; the client transmits the extension class name; the server dynamically loads the class according to the class name and generates an entity, and then the entity converts the query result.
4. A method of custom exporting data in a traffic management system according to claim 2 or 3, wherein: the method comprises a self-defined derived functional component, wherein the functional component has the functions of field selection, query condition selection, sorting mode selection, service decoupling module, SQL self-defined preprocessing and query result self-defined conversion.
5. A method of custom export of data in a traffic management system according to claim 4, wherein: and the field selection function is selected visually from the client, and can perform sequential adjustment operations of moving up, moving down, setting top and setting bottom on the fields.
6. A method of custom export of data in a traffic management system according to claim 4, wherein: and the query condition selection function is used for visually selecting from the client and selecting a plurality of query conditions.
7. A method of custom export of data in a traffic management system according to claim 4, wherein: and the sorting mode selecting function is used for visually selecting from the client and selecting a plurality of sorting modes.
8. A method of custom export of data in a traffic management system according to claim 4, wherein: the service module function is decoupled, and any service module can have the function of self-defining data export without editing extra codes.
9. A method of custom export of data in a traffic management system according to claim 4, wherein: the SQL self-defining preprocessing function can perform self-defining expansion on the automatically generated SQL according to specific service requirements so as to realize a more complex query function.
10. A method of custom export of data in a traffic management system according to claim 4, wherein: the user-defined pre-conversion function can perform user-defined conversion on the queried data result according to specific service requirements so as to meet the requirements of the client.
CN201910822667.2A 2019-09-02 2019-09-02 Method for self-defining export of data in service management system Pending CN110750553A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910822667.2A CN110750553A (en) 2019-09-02 2019-09-02 Method for self-defining export of data in service management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910822667.2A CN110750553A (en) 2019-09-02 2019-09-02 Method for self-defining export of data in service management system

Publications (1)

Publication Number Publication Date
CN110750553A true CN110750553A (en) 2020-02-04

Family

ID=69276001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910822667.2A Pending CN110750553A (en) 2019-09-02 2019-09-02 Method for self-defining export of data in service management system

Country Status (1)

Country Link
CN (1) CN110750553A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367976A (en) * 2020-02-28 2020-07-03 平安医疗健康管理股份有限公司 Method and device for exporting EXCEL file data based on JAVA reflection mechanism
CN113239106A (en) * 2021-06-04 2021-08-10 平安科技(深圳)有限公司 Excel file export method and device, electronic equipment and storage medium
CN113760486A (en) * 2020-08-03 2021-12-07 北京沃东天骏信息技术有限公司 Task processing method and task processing device
CN115291850A (en) * 2022-08-11 2022-11-04 广州芯德通信科技股份有限公司 Method, system and storage medium for managing customized interactive data based on java language

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339559A (en) * 2008-07-18 2009-01-07 北京航空航天大学 Long lasting implementing method for data
CN103093000A (en) * 2013-02-25 2013-05-08 用友软件股份有限公司 Database query modeling system and database query modeling method
CN106202283A (en) * 2016-06-30 2016-12-07 国云科技股份有限公司 A kind of custom field derives the data method to Excel
CN107480537A (en) * 2017-06-28 2017-12-15 北京小度信息科技有限公司 Authority the Resources list automatic generation method and device
CN108446344A (en) * 2018-03-06 2018-08-24 政采云有限公司 Custom condition querying method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339559A (en) * 2008-07-18 2009-01-07 北京航空航天大学 Long lasting implementing method for data
CN103093000A (en) * 2013-02-25 2013-05-08 用友软件股份有限公司 Database query modeling system and database query modeling method
CN106202283A (en) * 2016-06-30 2016-12-07 国云科技股份有限公司 A kind of custom field derives the data method to Excel
CN107480537A (en) * 2017-06-28 2017-12-15 北京小度信息科技有限公司 Authority the Resources list automatic generation method and device
CN108446344A (en) * 2018-03-06 2018-08-24 政采云有限公司 Custom condition querying method and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367976A (en) * 2020-02-28 2020-07-03 平安医疗健康管理股份有限公司 Method and device for exporting EXCEL file data based on JAVA reflection mechanism
CN113760486A (en) * 2020-08-03 2021-12-07 北京沃东天骏信息技术有限公司 Task processing method and task processing device
CN113239106A (en) * 2021-06-04 2021-08-10 平安科技(深圳)有限公司 Excel file export method and device, electronic equipment and storage medium
CN113239106B (en) * 2021-06-04 2023-12-19 平安科技(深圳)有限公司 Excel file export method and device, electronic equipment and storage medium
CN115291850A (en) * 2022-08-11 2022-11-04 广州芯德通信科技股份有限公司 Method, system and storage medium for managing customized interactive data based on java language
CN115291850B (en) * 2022-08-11 2023-03-07 广州芯德通信科技股份有限公司 Method, system and storage medium for managing custom interactive data based on java language

Similar Documents

Publication Publication Date Title
CN110750553A (en) Method for self-defining export of data in service management system
CN106874388B (en) Relational database-based heterogeneous system data cascade operation automatic construction method
US20160299745A1 (en) Development method for web development system, and web development system
CN105447122A (en) Implementation method for autonomously creating file system based on multi-table association
CN102012945B (en) User-oriented database management system
CN105677323A (en) Method for automatically generating database operation layer codes
JPH05342006A (en) Object directed programming system
KR20140121145A (en) BIM based Integrated Management System for Constrcution Data
CN106407170A (en) Rapid generation method and system for data report
CN113886362A (en) Data storage system and storage method based on workflow engine and low-code platform
CN110543303A (en) Visual business platform
Wadge et al. Intensional html
CN108228762B (en) Method and system for configuring master database universal templates
KR20070090045A (en) Method and system for query generation in a task based dialog system
CN110069248A (en) Call method, device, equipment and the computer readable storage medium of interface data
US6493704B1 (en) Method and apparatus for using metadata to dynamically generate a display page to solicit input from a user
CN112214236B (en) Method for building management system of application architecture of software rapid development platform
CN116450246A (en) Event stream configurable method based on state machine
CN115794038A (en) Software engineering development system based on Internet and method thereof
CN111177234A (en) Device and method for rapidly processing document type data file
CN115469849A (en) Service processing system, method, electronic device and storage medium
CN104731597A (en) Method for applying SQL statements to engineering software compiling platform
US20030233373A1 (en) Method, computer program product, and system for automatic class generation with simultaneous customization and interchange capability
CN112685435A (en) Table query method and system based on Vue and Mybatis
CN113138760A (en) Page generation method and device, electronic equipment and 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