Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

An example Analysis of timely Storage of Business data

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces you the example analysis of business data input in time, the content is very detailed, interested friends can refer to, I hope it can be helpful to you.

Business scenario:

The unified report template issued by the superior unit contains five fields, and the subordinate may add fields to the original table at any time during operation, and the added fields do not need to be backfilled to the central database, considering that the business personnel do not have the ability to develop the report. therefore, it is realized by filling in the report form. But at this time, there will be a practical problem that we have to consider, that is, the business report can not timely input the data into the database, the need to manually deal with the database, which is likely to be the phenomenon of data omission.

Difficulties and ways to deal with the problems:

1. How to store out-of-memory files (json/binary) generated by business report?

Use the aggregator to read out-of-memory files into the library through a script.

2. How to ensure that the data is stored in time after the report is submitted?

Through the callback function, call a program to execute the aggregator script dfx.

Taking the statistical table of current assets as an example, the operation is as follows:

After the release of the report, enter the data, submit the data will be automatically saved to the result file, the result file to "fill in the report file name .json" name, save path for the report preview settings dialog box in the home directory / autoDataFiles/, result file format defaults to json.

Next, the key point is to write a script to store json data. The script is as follows:

After the script is written, save it as json.dfx

Finally, the operation of dfx is bound to the submission operation. Here, the callback function is used to automatically execute json.dfx for data storage operation after submission.

1. The method of adding callback to the jsp displayed in the report is as follows:

two。 Create a new other.jsp, call dfx and execute, as follows:

This is the end of the example analysis on the timely storage of business data. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report