🚀 BSNL Field Visit Report System - Complete Setup Guide

⚡ Quick Start: This guide will help you set up the complete Field Visit Report workflow system with your actual data from User.csv and connectons.csv.

✅ QUICK SETUP (Recommended)

Step 1: Create Database and Load Schema

Open MySQL command line:

mysql -u root -p

Execute these SQL commands:

CREATE DATABASE bsnl_fvr_workflow CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; USE bsnl_fvr_workflow; SOURCE d:/AntGrvt_projects/FVR/database/schema.sql; SOURCE d:/AntGrvt_projects/FVR/database/quick_setup.sql; exit

Step 2: Configure Database Connection

Edit config/database.php with your MySQL credentials:

define('DB_HOST', 'localhost'); define('DB_NAME', 'bsnl_fvr_workflow'); define('DB_USER', 'root'); define('DB_PASS', 'your_mysql_password');

Step 3: Extract Exchanges from User.csv

Run this command to create all exchanges from your CSV:

php database/extract_exchanges.php

This will create approximately 140 exchanges mapped to their divisions.

Step 4: Login and Upload CSVs

  1. Open your browser and go to: http://localhost/FVR/login.php
  2. Login with:
    • Username: admin
    • Password: 12345
  3. Go to Admin → User Management and upload User.csv
  4. Go to Upload Connections and upload connectons.csv

📝 What Gets Created

After quick_setup.sql:

5 Divisions (DE-U1, DE-U2, DE-U3, DE-R1, DE-R2)
Admin user: admin / 12345
TRA Accounts user: tra_accounts / tra123

After extract_exchanges.php:

~140 Exchanges mapped to divisions

After uploading User.csv:

Field Officers (PANKAJ, SABIDA K, GAJENDRA SING, SWATHI, RADHA SHARMA)
Divisional Engineers (MADAIAH, SANOOP T NAIR, KUMAR, VALARMATHY, JEIGANESH)
All mapped to their exchanges per User.csv

After uploading connectons.csv:

20+ connections with customer details
Auto-created field visit reports
All in PENDING_ASSIGNMENT state

🔐 Default Credentials

Username Password Role Notes
admin 12345 ADMIN Main administrator account
tra_accounts tra123 TRA_ACCOUNTS TRA Accounts section
fo_1111 field123 FIELD_OFFICER Auto-created from User.csv
fo_4111 field123 FIELD_OFFICER Auto-created from User.csv
de_1000 de123 DIVISIONAL_ENGINEER Auto-created from User.csv
de_4100 de123 DIVISIONAL_ENGINEER Auto-created from User.csv

🎯 User.csv Mapping Explanation

Your User.csv file already contains the complete mapping structure:

CSV Column Purpose
Exchange_Code Creates/Maps exchange (e.g., MYSNAR, MYSAJI)
Exchange_Name Exchange display name (e.g., AIR FORCE DLC-NZB)
DIVISION Maps to division (DE-U1, DE-R1, etc.)
Field_Officer_HR HR ID used to create username: fo_{HR_ID}
Field_Officer_Name Full name of the field officer
Divisional_Engineer_HR HR ID used to create username: de_{HR_ID}
Divisional_Engineer_Name Full name of the divisional engineer
📌 Note: The upload process will automatically:

⚡ Super Fast Setup (Copy-Paste)

If you prefer a single command approach:

# 1. Create database mysql -u root -p -e "CREATE DATABASE IF NOT EXISTS bsnl_fvr_workflow CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" # 2. Load schema and initial data cd d:/AntGrvt_projects/FVR mysql -u root -p bsnl_fvr_workflow < database/schema.sql mysql -u root -p bsnl_fvr_workflow < database/quick_setup.sql # 3. Extract exchanges (requires PHP in system path) php database/extract_exchanges.php # 4. Done! Now upload CSVs via web interface

🚀 You're Ready!

After setup, access the system:

URL: http://localhost/FVR/login.php

Login as: admin / 12345

Next Steps:

  1. Go to Admin → User Management → Upload User.csv
  2. Go to Upload Connections → Upload connectons.csv
  3. Go to Connection List → See all imported data
  4. Start assigning field visit reports to field officers!

⚡ Improved Auto-Assignment Workflow

🔄 Automatic Assignment System

The system now automatically processes uploaded connections:

📞 System Features

✓ TRA Accounts

  • Upload connections with auto-assignment
  • Handle "Manual Required" exceptions
  • View all reports
  • Generate PDFs

✓ Field Officers

  • View assigned reports
  • Fill 12-section forms
  • Add digital signatures
  • Submit to DE

✓ Divisional Engineers

  • Review FO reports
  • Fill section 13
  • Approve/Reject
  • Add digital signature

✓ Admin

  • Manage divisions
  • Manage exchanges
  • Create/edit users
  • System configuration

BSNL Field Visit Report Workflow System

Mysore Division - Digital Workflow Management