Drupal module 7. Transmission of meter readings

    I suggest that you familiarize yourself with the Transfer meter readings module. This module is highly specialized and most readers may not be interested. The module allows a resident of an apartment building to transmit the readings of individual metering devices in a convenient form on the website of the managing organization, and the managing organization in semi-automatic mode to process this data.



    Address selection form



    User part


    First, the resident is asked to fill in the address and personal account number. If the address and personal account match correctly, the user switches to the testimony input form:


    If new readings were not indicated for one of the counters, the form appears again, but the previously entered values ​​will no longer be editable:


    When readings are transmitted for all counters, relevant notice:


    Administrative part




    The administrator has the opportunity:
    1. Set the format of the imported file (file with the main data):
      • The sequence of correspondence of the fields in the database and in the file;
      • Specify field delimiters, escapes, etc .;
    2. Set the format of the exported file (with the transmitted readings);
    3. Unlock or block any entered counter reading;


    List of required fields that must be present in the file with the main data:


    I want to note that the “required” fields are not checked, if one of the fields is unavailable or empty, the row with this field will not get into the table with the general data. An example of what the correct file with the main data should look like (for import):
    "2014-05-01";"7200008701";"1";"ул. Циолковского ";"12345";"5";"7";"Петров Иван Сидорович";1;8702;"Водомер ХВ";25
    "2014-05-01";"7200008701";"1";"ул. Циолковского ";"12345";"5";"7";"Петров Иван Сидорович";2;8703;"Водомер ГВ";10
    

    Keep in mind that for each meter there should be a separate line with information about the address, month of accounting, and the number of drugs.
    In the month of accounting, only the month and year are important; the day can be any (within the month). For example, the value "2014-05-12" is quite suitable.

    Import Export

    At the moment, import and export of data passes only through delimited text files. Meters are exported in CSV format. For import, any text file with delimiters is suitable.

    Work algorithm

    • Entered readings are blocked for modification by users. Lock code 1 ;
    • By default, readings with a lock code of 1 are exported;
    • After export, readings are marked as “unloaded”. Lock code 2 ;


    The module is licensed under BSD.
    The source code can be viewed on GitHub . Drupal.org will publish in the sandbox soon.

    I will accept any comments on the code and translation of the module.

    Thanks for attention.

    UPD 1 from 03 Sep 2014 02:40
    In hook_permission () there was an error due to which users did not have access to the form. If you suddenly already set yourself a test, you need to upgrade.

    UPD 2 03/20/2015
    Version 1.0.2

    Also popular now: