For Developers:

Complain Assigning Process

In The Complaint Assignment Process, Complaints Are Handled Based On A FIFO (first-in-first-out) Principle. Each Complaint Is Added To A Queue And Is Dequeued One By One To Available Mechanics, As Determined By Their Supervisor. This Process Is Facilitated By The CRON Action In The Mechanic Controller.

CRON JOB

The CRON Action In Mechanic Controller Runs In Every 5 Seconds From A Powershell Script Started By Task Scheduler On S12. This Action Runs Many Functions That Are Important To Run The Application. The Powershell Script Is Located In C:\anisiis\test.cartzlink.com\httpdocs\mechanic\assigntask.ps1

Notification System

FCM (Firebase Cloud Messaging)

  1. We use Firebase Cloud Messaging (FCM) as the main notification system in our application.
  2. FCM Key is saved in the Settings table in the database with the column name FCM_KEY.
  3. The FCM user tokens are stored in the subscribed_users table, along with their corresponding user IDs.

CUSTOM NOTIFICATION SYSTEM FROM CRM

  • Our custom notification system relies on a mobile application to check for notifications on the server.
  • The pending notification files are stored in the Pending folder, labeled with the corresponding user ID.
  • These pending notification files are moved to either the Processed or Unprocessed folder based on the user’s interaction with the notification.
    • If a user has missed a notification within the declared time period and another notification is already generated, the older notifications will be moved to the Unprocessed folder.
  • Our system utilizes the following functions in the Mechanic Controller:
    • GenerateNotification function: This function is responsible for generating new notifications.
    • CheckNotification function: It is used to check the status of notifications and determine if any pending notifications exist for the user.
    • ProcessNotification function: This function handles the processing of notifications, marking them as processed or unprocessed based on the system logic.

Tables / Views Used In This Application

Table / View / Procedure / Function Name Description
TaskThis Table Acts As A Repository For Storing All Launched Complaints, Parts Requests, And Preventive Complaints.
V_Mechanic_ComplaintsThis View Is Created On Top Of The Task Table, Incorporating Timers And Additional Data. It Is Recommended To Utilize This View Whenever Possible Instead Of Directly Querying The Task Table. This Approach Helps Avoid The Need For Making Changes To Queries Throughout The System.
AuditTrailThis Table Serves As A Repository For Storing All Application Logs, And Many Reports Are Derived From This Table. It Is Essential To Log Any Actions Performed On The Application In This Table For Tracking And Analysis Purposes.
TaskProgressThis Table Is Used For Logging Multiple Actions Like Complain Transfer And Work Done As Well As Auditor Review.
M_PriceThis Table Serves The Purpose Of Allocating Mechanics To Multiple Entities Such As Machine Types, Supervisors, And Different Departments.
M_FlagThis Table Serves As A Central Repository For Storing Various Types Of Flags Used In This Application.
ITL_ComputerThis Table Is Utilized To Store User Sessions Along With Their Current Device Information. It Enforces A Single User To Be Logged In To Only One Device At A Time.
ITL_EventThis Table Is Utilized To Log The Internet Connectivity Status Of Users. The User’s Device Sends Periodic Pings To The Server Every 5-10 Seconds, Indicating Whether It Is Connected To The Internet Or Not.
Subscribed_UsersThis Table Is Used To Save The User’s Token Generated By Fcm (Firebase Cloud Messaging). The Token Is Utilized For Sending Notifications And Other Related Functionalities.
TaskSumThis View Is Created To Calculate The Total Time Spent By Users On Their Assigned Complaints. It Provides A Sum Of The Time For Each User And Their Respective Assigned Complaints. This View Is Also Utilized For Generating Reports Within The Mobile Application.
M_ShiftThis Table Is Used To Set The Work Timings For The Company. It Allows For Defining The Start And End Times Of The Workday.
PM_CalendarThis Table Is Used To Mark Holidays, Which Form The Basis For Calculating Downtime. By Specifying Specific Dates Or Criteria, This Function Helps Identify Holidays That Should Be Excluded From Downtime Calculations. It Ensures That These Designated Holidays Are Not Considered As Part Of The Working Hours When Determining The Duration Of Downtime For A Complaint.
dbo.CalculateTime()This Function Is Utilized To Calculate The Downtime Of A Complaint By Taking Into Account Holidays And The Work Timings. It Considers The Scheduled Work Hours And Excludes Holidays To Determine The Actual Duration Of Downtime For The Complaint.
PROC Transfer_ComplaintThis Procedure Is Executed By A Cron Job And Is Responsible For Transferring A Complaint From One Mechanic To Another Based On The Mechanic Allocation Specified In The M_price Table. It Ensures That The Complaint Is Reassigned To The Appropriate Mechanic According To The Defined Allocation Criteria.

Modules

Leave a Reply

Your email address will not be published. Required fields are marked *