Summary of the invention
Problem to be solved of the present invention is under prior art, and voltage management report is browsed inconvenience on computers, and it is not too convenient that report pattern is revised.
For addressing the above problem, the method that the present invention adopts is as follows:
A voltage management report-generating method, is characterized in that, comprises server and terminal, and described server is preserved voltage management report template, and described terminal is provided with Word disposal system, and described voltage management report template is XML format module; The method comprises the following steps:
S1: terminal to server sends the request of voltage management report generation, and described voltage management report generation request comprises parameter: the type of report, the time of report, the region of report;
S2: server finds corresponding voltage management report template according to the type of the report in the request of voltage management report generation, obtains corresponding voltage data according to the time of report in the request of voltage management report generation and the region of report; Server generates the voltage management report of XML form according to voltage management report template and voltage data;
S3: server is sent to terminal by the voltage management report of the XML form of generation;
S4: terminal, according to the Word disposal system of the voltage management report of XML form and installation, generates the voltage management report document corresponding with this Word disposal system and processes for Word disposal system;
S5: the voltage management report document after terminal is processed Word disposal system is sent to server and preserves.
Technique effect of the present invention: the present invention utilizes the generation report of Word disposal system to check in different computers and to print, and adopt XML form can define very easily dissimilar report.
Embodiment
Under claim of the present invention and summary of the invention are described in further details.
Framework of the present invention is on electric power management system software.Server comprises database module and the voltage management report list generation module that has voltage data, and voltage management report list generation module has the report template of variant XML form.Terminal is provided with client modules and the Word disposal system of electric power management system.This Word disposal system is generally the Word process software in the Office system of being developed by Microsoft, and this client manager module includes terminal report generation module.Terminal report generation Module-embedding Word process software.Processing procedure of the present invention is as follows:
First terminal report generation module (being terminal) sends the request of voltage management report generation to voltage management report list generation module (being server).In the request of voltage management report generation, comprised various parameters, these parameters include but not limited to: the type of report, the time of report, the region of report.The request of voltage management report generation has adopted XML form.Following is an example of the voltage management report generation request of XML form:
<?xml?version=”1.0”?encoding=”utf-8”?>
<command>
<cmdname>generate?report</cmdname>
<cmdid>8734612498</cmdid>
<cmdpara>
<reportType>monthly?voltage?statictics</reportType>
<reportTime>
<startTime>2013-06-01</startTime>
<endTime>2013-06-30</endTime>
</reportTime>
<reportData>10KV</reportData>
<reportRange>
<range num=" 1 " > Nanming District </range>
<range num=" 2 " > Yunyan District </range>
<range num=" 3 " > Wudang District </range>
</reportRange>
</cmdpara>
</command>
The request of above-mentioned voltage management report generation can be expressed as the voltage report of request in June, 2013 Nanming District, Yunyan District, Wudang District 10KV.
Voltage management report list generation module is received after the request of above-mentioned voltage management report generation, resolves the request instruction of above-mentioned XML form, obtains type, the time of report and the parameters such as region of report of report.Voltage management report list generation module (being server) is searched and is obtained corresponding voltage management report template according to the type that obtains report.Voltage management report template is XML form.Following is an example of voltage management report template:
<?xml?version=”1.0”?encoding=”utf-8”?>
<reportTemplate>
<reportType>monthly?voltage?statictics</reportType>
The monthly voltage statistic </reportTitle> of <reportTitle>< $ reportRanges></ $ reportRanges>< $ reportData></ $ reportData>< $ reportTime></ $ reportTime>
<reportContent>
<table>
<thead>
<tr>
<th?> </th>
<th > measuring point is counted </th>
<th > average voltage </th>
<th > voltage intermediate value </th>
The poor </th> of <th > voltage standard
</th> of the super upper limit time of <th > voltage
</th> of super lower limit time of <th > voltage
</th> of super lower limit time of <th > voltage
<th > rate of qualified voltage </th>
</tr>
</thead>
<tbody>
<$copiedRows?related=”rangenum”>
<tr>
<td><$rangeName></$rangeName></td>
<td><$testPointCount></$testPointCount></td>
<td><$avgVoltage></$avgVoltage></td>
<td><$midVoltage></$midVoltage></td>
<td><$standDevVoltage></$standDevVoltage?></td>
<td><$exceedTimeOfVoltage></$exceedTimeOfVoltage></td>
<td><$underTimeOfVoltage></$underTimeOfVoltage></td>
<td><$passPercentOfVoltage></$passPercentOfVoltage></td>
</tr>
</$copiedRows>
</tbody>
</table>
</reportContent>
</?reportTemplate?>
In template, < $ XXX></ $ XXX> label is to require the content inserted.In above-mentioned voltage management report template, < $ reportRanges></ $ reportRanges> is report region, < $ reportData></ $ reportData> is the data of statistics, < $ reportTime></ $ reportTime> is report time, < $ copiedRows related=" rangenum " ></ $ copiedRows> represents the region of repeating according to regional number, < $ rangeName></ $ rangeName> represents zone name, < $ testPointCount></ $ testPointCount> represents measuring point number, < $ avgVoltage></ $ avgVoltage> represents average voltage, < $ midVoltage></ $ midVoltage> represents voltage intermediate value, < $ standDevVoltage></ $ standDevVoltage> represents that voltage standard is poor, < $ exceedTimeOfVoltage></ $ exceedTimeOfVoltage> represents the time of the super upper limit of voltage, < $ underTimeOfVoltage></ $ underTimeOfVoltage> represents the time of the super lower limit of voltage, < $ passPercentOfVoltage></ $ passPercentOfVoltage> represents the qualification rate of voltage.
Voltage management report list generation module (being server) is according to obtaining the time of reporting, then the voltage data of the corresponding time periods of parameter acquiring such as region of report inserts voltage management report template formation voltage control report list according to the value in the above-mentioned corresponding report of voltage management report template statistics.Formation voltage control report list is also XML form.Following is according to an object lesson of the request of aforesaid voltage management report generation and voltage management report template generation XML form voltage management report:
<?xml?version=”1.0”?encoding=”utf-8”?>
<autoReport>
<reportType>monthly?voltage?statictics</reportType>
<reportTitle> Nanming District, Yunyan District, the monthly voltage statistic </reportTitle> of Wudang District 10KV2013 > in June
<reportContent>
<table>
<thead>
<tr>
<th?> </th>
<th > measuring point is counted </th>
<th > average voltage </th>
<th > voltage intermediate value </th>
The poor </th> of <th > voltage standard
</th> of the super upper limit time of <th > voltage
</th> of super lower limit time of <th > voltage
</th> of super lower limit time of <th > voltage
<th > rate of qualified voltage </th>
</tr>
</thead>
<tbody>
<tr>
<td> Nanming District </td>
<td>320</td>
<td>10030.3V</td>
<td>10006.5V</td>
<td>50.23</td>
<td>110</td>
<td>207</td>
<td>95.7%</td>
</tr>
<tr>
<td> Yunyan District </td>
<td>227</td>
<td>10010.7V</td>
<td>10001.3V</td>
<td>40.23</td>
<td>110</td>
<td>107</td>
<td>96.5%</td>
</tr>
<td> Wudang District </td>
<td>263</td>
<td>10005.1V</td>
<td>9997.3V</td>
<td>40.23</td>
<td>85</td>
<td>310</td>
<td>93.8%</td>
</tr>
</tbody>
</table>
</reportContent>
</?autoReport>
The voltage management report of the list form that above-mentioned example generates, in practical application, can also generate figure, such as the voltage management report of the forms such as histogram, picture mosaic.
Server is sent to terminal after generating above-mentioned voltage management report, that is, and and terminal report generation module.Terminal report generation module, by Embedded Word disposal system, is inserted corresponding Word document by voltage management report, generates the report of Word document form.The content of above-mentioned voltage management report is actually html format data, is therefore inserted Word document not difficult.
Terminal report generation module generates and is sent to server after the voltage management report file of above-mentioned Word document form and preserves.In the time need to generating the voltage management report file of identical parameters, if there is report file in server, terminal only need to be downloaded the document.The voltage management report file generating is Word document form, can print also and can send by mailbox, very convenient.
Above-described embodiment adopts embedding Microsoft Office Word to realize the present invention, can adopt other office package softwares in practical application, such as the WordPro of IBM Lotus, or the Word of Kingsoft Co..
The Word process software that the present invention installs by terminal is realized final voltage management and is reported, also has an advantage to be, without server, Word process software is installed, and to reduce server, the potential security risks that Word produces is installed.