FS 328780 EPOD Server-Side Settings

From Calidus HUB
Revision as of 16:31, 19 August 2015 by Anw (talk | contribs) (Minor formatting changes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)





Aptean Logo.png







OBS Logistics Ltd

EPOD Server-Side Settings


CALIDUS EPOD

19th August 2015 - 0.2
Reference: FS 328780












































Functional Overview

Client Requirement

The Device style settings should not be available to other clients to view. This needs changing with a matter of urgency. (Julie Scott) Feeds into discussions about moving device settings onto the server to allow standardisation of APK and settings across the fleet.


Solution Overview

  • The mobile device Style preference will now be maintained in the Site screen in the Admin system, showing only those that are applicable to that system (i.e. hiding all other customers' styles).
  • The POD, POC and Service reports available for the customers to configure will now be limited to only those that are applicable to that system.
  • The mobile device will start with the default OBS style and logo, until the user successfully connects to the server. At this time, the style set on the server will update the style on the device, and the device will refresh.


Scope

Changes will be made to the latest version (3) of CALIDUS EPOD.


Set-up

Pre-requisites

Menu Structure

Data

Create values on EPOD_LISTS for the following items:

  • EPL_DELIVERY_POD_FORMAT
  • EPL_COLLECTION_POD_FORMAT
  • EPL_SERVICE_POD_FORMAT
  • PDAStyles

Create values for all lists above as follows:

  • EPL_DELIVERY_POD_FORMAT
  • EPL_COLLECTION_POD_FORMAT
    • Description "Unassigned", no Value isDefault 1
    • Description "Generic" Value="Generic"
    • Description "Generic Container" Value="GenContnr"
    • Description "CDL Format" Value="CDL_COL"
    • Description "SM Fleet" Value="SMFLEET"
    • Description "WhiteLine" Value="WHITELINE"
    • Description "LFS" Value="LFS"
    • Description "LFS (AU/NZ)" Value="LFS_AUNZ"
    • Description "Proctor POD" Value="ProctorPOD"
    • Description "Proctor STN" Value="ProctorSTN"
    • Description "Prolog POD" Value="PrologPOD"
    • Description "Eulos POC" Value="EulosPOC"
    • Description "Eulos POD" Value="EulosPOD"
    • Description "Eulos POC 2" Value="EulosPOC2"
    • Description "Pentland" Value="Pentland"
    • Description "TDL" Value="TDLPOD"
    • Description "Koo" Value="Koo"
    • Description "Andrew Porter 1" Value="Porter1"
    • Description "Andrew Porter 2" Value="Porter2"
    • Description "Bag it Up" Value="BIU"
    • Description "Brett Martin" Value="BRM"
    • Description "Hewicks POC" Value="HewicksPOC"
    • Description "Hewicks POD/POC" Value="HewPODPOC"
    • Description "Cooper Callas POD" Value="Cooper-POD"
    • Description "Cooper Callas POC" Value="Cooper-POC"
  • EPL_SERVICE_POD_FORMAT
    • Description "Unassigned", no Value, isDefault 1.
    • Description "SM Fleet" Value "SMFLEET"
    • Description "ALS" Value "ALS"
    • Description "Lanemark" Value "Lanemark"
  • PDAStyles
    • Description "Default OBS Styling" Value "" isDefault 1
    • Description "Red" Value "RED"
    • Description "Green" Value "GREEN"
    • Description "Partnerlink" Value "PLINK"
    • Description "Lanemark" Value "LANE"
    • Description "Bag It Up" Value "BIU"
    • Description "Brett Martin" Value "BRETT"
    • Description "LFS" Value "LFS"
    • Description "Andrew Porter" Value "AP"
    • Description "NHSBT" Value "NHSBT"
    • Description "Greene King" Value "GK"
    • Description "Proctors" Value "PROC"
    • Description "Matrix" Value "MATRIX"
    • Description "Fowler Welch" Value "FOWLER"
    • Description "Cooper Callas" Value "COO"
    • Description "Manheim" Value "MANHEIM"

Note Note: For each implementation of the system, these values will be modified so that only the values relevant to that implementation are present, so that the customer using the system has no visibility of other customers' styles or formats.


Description of Changes

Database/DAL

Table EPOD_SITE requires the following modifications:

  • EPL_PDA_STYLE_ID [nvarchar](10) NOT NULL

Existing packages will be modified to allow the creating, editing and selecting of the new field, including but not limited to:

  • EPOD_SITE_INSERT
  • EPOD_SITE_SELECT
  • EPOD_SITE_SELECT_UPDATED_DATA
  • EPOD_SITE_UPDATE

The existing EPOD_SITE DAL object will be changed to:

  • Read the new field. Note Note: It is not necessary to add the field as search-able items.
  • Export the new field as XML.


A new Database package GetListItemsByVal will be created to allow list items to be selected by type and value.

   CREATE Procedure [dbo].[GetListItemsByVal]

   @ListName varchar(30),
   @ItemValue varchar(20)

   as

   Select I.Description,I.Value,IsDefault from EPOD_LISTS L
   inner join EPOD_LIST_ITEMS I on I.ListID=L.ListID
   Where L.ListName=@ListName And L.Value=@ItemValue


Webservices

The adding of PDA_Style_ID to the Site section of the login response will be handled by the changes being made to the DAL object shown above.


Admin

Job Groups

FS 328780 Job Group Maint1.PNG

The changes are:

  • To implement lists for POD/POC/Service report
  • POD/POC/Service Report description in the table to be looked up from the list

All drop-down list values should not be hard-coded, but set and maintained through the EPOD Lists configuration (through tables EPOD_LIST_ITEMS and EPOD_LISTS in the database). See the Data section of this document for this configuration.

Remove all asp:ListItem tags from the asp:DropDownList tags in job_group.aspx for the affected fields:

  • EPL_DELIVERY_POD_FORMAT
  • EPL_COLLECTION_POD_FORMAT
  • EPL_SERVICE_POD_FORMAT

On Page_Load, a call should be made to populate the drop-down lists in the pop-up entry/amend screen, for the following field IDs:

  • EPL_DELIVERY_POD_FORMAT
  • EPL_COLLECTION_POD_FORMAT
  • EPL_SERVICE_POD_FORMAT

An example is as follows:

EPODUtils.LoadDDL(this.EPL_DELIVERY_POD_FORMAT, "EPL_DELIVERY_POD_FORMAT", EPOD_DBCONNECTION, null);


The text on the table for the report types is translated via the existing function TranslateReportType. An example of this call is as follows:

TranslateReportType(Eval("EPL_SERVICE_POD_FORMAT").ToString())

This function (in job_group.aspx.cs) will be changed to receive the parameters differently. The declaration of the new function will be as follows:

public string TranslateReportType(String Type, String Report)

The parameters are as follows:

  • String Type will now be the report type being looked up, one of:
    • "EPL_DELIVERY_POD_FORMAT"
    • "EPL_COLLECTION_POD_FORMAT"
    • "EPL_SERVICE_POD_FORMAT"
  • String Report will be the value from the data e.g. Eval("EPL_SERVICE_POD_FORMAT").ToString().

The final call will be as per the following example:

TranslateReportType("EPL_SERVICE_POD_FORMAT", Eval("EPL_SERVICE_POD_FORMAT").ToString())

The function will call a new function in EPOD_UTILS called GetListItemsByVal

       public static DataTable GetListItemsByVal(string sListName, string sItemValue, EPOD_DBCONNECTION EPOD_DBCONNECTION)
       {
           DataTable dt = new DataTable();
           EPOD_DBCONNECTION.Connect();

           try
           {
               using (DbCommand cmd = EPOD_DBCONNECTION.GetDbCommand())
               {
                   cmd.CommandType = CommandType.StoredProcedure;
                   cmd.CommandText = "GetListItemsByVal";
                   cmd.Connection = EPOD_DBCONNECTION.DBConnection;

                   DbParameter pListName = EPOD_DBCONNECTION.GetDbParameter(cmd);
                   pListName.ParameterName = EPOD_DBCONNECTION.getDBParamPrefix() + "ListName";
                   pListName.DbType = DbType.String;
                   pListName.Value = sListName;
                   cmd.Parameters.Add(pListName);

                   DbParameter pItemValue = EPOD_DBCONNECTION.GetDbParameter(cmd);
                   pItemValue.ParameterName = EPOD_DBCONNECTION.getDBParamPrefix() + "ItemValue";
                   pItemValue.DbType = DbType.String;
                   pItemValue.Value = sItemValue;
                   cmd.Parameters.Add(pItemValue);

                   dt = EPOD_DBCONNECTION.SelectDataTable(cmd);
               }
           }
           finally
           {
               EPOD_DBCONNECTION.Disconnect();                
           }
           return dt;
       }

The calling function will then return the matching value. If none is found, the function will return "Unassigned".


Site

FS 328780 Site Maint2.PNG

The changes are:

  • To implement lists for POD/POC/Service report

All drop-down list values should not be hard-coded, but set and maintained through the EPOD Lists configuration (through tables EPOD_LIST_ITEMS and EPOD_LISTS in the database). See the Data section of this document for this configuration.

Remove all asp:ListItem tags from the asp:DropDownList tags in site_header.aspx for the affected fields:

  • EPL_DELIVERY_POD_FORMAT
  • EPL_COLLECTION_POD_FORMAT
  • EPL_SERVICE_POD_FORMAT

On Page_Load, a call should be made to populate the drop-down lists in the pop-up entry/amend screen, for the following field IDs:

  • EPL_DELIVERY_POD_FORMAT
  • EPL_COLLECTION_POD_FORMAT
  • EPL_SERVICE_POD_FORMAT

An example is as follows:

EPODUtils.LoadDDL(this.EPL_DELIVERY_POD_FORMAT, "EPL_DELIVERY_POD_FORMAT", EPOD_DBCONNECTION, null);


The text on the table for the report types is translated via the existing function TranslateReportType. An example of this call is as follows:

TranslateReportType(Eval("EPL_SERVICE_POD_FORMAT").ToString())

This function (in site_header.aspx.cs) will be changed to receive the parameters differently. The declaration of the new function will be as follows:

public string TranslateReportType(String Type, String Report)

The parameters are as follows:

  • String Type will now be the report type being looked up, one of:
    • "EPL_DELIVERY_POD_FORMAT"
    • "EPL_COLLECTION_POD_FORMAT"
    • "EPL_SERVICE_POD_FORMAT"
  • String Report will be the value from the data e.g. Eval("EPL_SERVICE_POD_FORMAT").ToString().

The final call will be as per the following example:

TranslateReportType("EPL_SERVICE_POD_FORMAT", Eval("EPL_SERVICE_POD_FORMAT").ToString())

The function will call a new function in EPOD_UTILS called GetListItemsByVal (defined above), and will then return the matching value. If none is found, the function will return "Unassigned".


A new field will be added to the PDA tab, for maintenance of the PDA Style:

FS 328780 Site Maint1.PNG


This will be a drop-down list item and will be labelled as "PDA Style".

The item will be created as <asp:DropDownList ID="ddlEPL_PDA_STYLE_ID" ..>.

The item will be populated with values at Page_Load, as follows:

EPODUtils.LoadDDL(this.ddlEPL_PDA_STYLE_ID, "PDAStyles", EPOD_DBCONNECTION, null);

The value of this DDL will be saved when the save button is clicked (through the event saveBTN_Clicked):

EPOD_SITE.EPL_PDA_STYLE_ID =  ddlEPL_PDA_STYLE_ID.SelectedValue;


Mobile Android Application

Note Note: All changes to methods and functions below should have the JSDoc comments changed to reflect changes to functionality, if appropriate.


Database/DAL

Add new field to EPOD_SITE (PDA_Style_ID)

This should be achieved as follows:

\Resources\Database\DBConnection.js

Change the definition of the EPOD_SITE table in function CreateDB to add new fields to the end of the table:

  • EPL_PDA_STYLE_ID nvarchar(10) NOT NULL DEFAULT \'\'

Change the last version changed in function InstallDB to the build number of this change (set in \TiApp.xml).


\Resources\Database\PDA_SITE.js

Add new fields to the DAL object in all places affected:

New fields:

  • EPL_PDA_STYLE_ID


Functions/methods affected:

  • function PDA_SITE(EPL_SITE_ID)
    • Add properties for the new fields, defaulted to .
    • When selecting data from the database table EPOD_SITE, populate the values of the new fields. If the record does not exist, these should default to .
  • method Update
    • Add the new fields to the database update SQL and parameters, and to the database insert SQL and parameters.
  • function InsertPDASite
    • Add the new fields as parameters to the function.
    • Add the new fields to the database insert SQL and parameters.
  • function UpdatePDASite
    • Add the new fields as parameters to the function.
    • Add the new fields to the database update SQL and parameters.
  • function InsertAllPDASites
    • Change the sample comment to show the new fields
    • Add the new fields as parameters to the call to InsertPDASite (through a call to the GetXMLItem function).
  • function InsertAllPDASitesJSON
    • Change the sample comment to show the new fields
    • Add the new fields as parameters to the call to InsertPDASite (through a call to the GetJSONItem function).


App Load

Set style and ID on the device from the parsed data in the site table

This should be achieved as follows:

\Resources\ui\common\Login.js

After the object Ti.App.PDA_SITE has been loaded, check the settings of the new fields and action as follows:

  • Set Ti.App.style._style to the value in EPL_PDA_STYLE_ID.


Preferences

Remove the Style preference from the mobile device preferences.

This should be achieved as follows:

\platform\android\res\values\array.xml
Remove the styleNames string-array.


\platform\android\res\xml\preferences.xml
Remove the STYLE ListPreference.


Logon

All changes relating to receiving Settings and Styles in the logon response message are handled by the PDA_SITE changes specified above.


All changes to set the style ID on the device from the parsed data received are handled by the PDA_SITE changes specified above.


Store the original value of the style ID field from the site before processing. If the value has changed after loading the Site, refresh the Login display, by calling Ti.App.style.restyleItemsEx(win, true);


Appendix A: TEST PLAN

Test Script / Scenario ReferenceEPOD Server-Side SettingsCall Number(s): 328780
Test Script / Scenario Descriptiondescription of what is to be achievedPASS / ISSUES / FAIL
Menu AccessWhere on the menus the item can be found 
Pre-requisitesThe prerequisites of the testTested By:
 
Test ObjectiveThe details of what each group of tests is to achieveDate:
 


Step Action Result Remarks P/F
1 Admin      
       
1.01 Find Job Groups POD/POC/Service report formats are displayed correctly in the grid    
1.02 Edit a Job Group. POD/POC/Service report formats are displayed correctly in the pop-up screen    
1.03 Change a POD, POC and Service format. Only the values set up in the lists are visible or selectable in the drop-down lists. The values are saved correctly.    
1.04 Open the Site screen POD/POC/Service report formats are displayed correctly in the screen    
1.05 Edit a site PDA Style is present and selectable. Only the values set up in the lists are visible or selectable in the drop-down lists for POD, POC, Service and PDA Style. The values are saved correctly.    


Step Action Result Remarks P/F
2 Mobile Device      
  Ensure the site is set up with the default style      
2.01 Start the application. Select Preferences. No Style is displayed.    
2.02 Exit preferences. Data uploads from the site. The device displays in the default style.    
2.03 Exit the device application. Change the style server side to a client style. Log on. The device displays in the client style.    


Appendix B: Quote & Document References

Cost Details
Activity Estimate
No. of Days
No. of Days Rate per Day (£) Cost (£ Exc. VAT)
Requirements 0.00 0.00 0 £0.00
Change Request Evaluation 0.00 0.00 0 £0.00
Functional Specification 2.00 2.00 0 £0.00
Technical Specification 0.00 0.00 0 £0.00
Development 6.00 6.00 0 £0.00
Testing and Release 1.75 1.75 0 £0.00
Implementation 1.00 1.00 0 £0.00
Project Management 0.50 0.50 0 £0.00
 
TOTAL 11.25 11.25   £0.00
Estimate excludes training, release to live and go live support.

B.1 References

Ref NoDocument Title & IDVersionDate
1   


B.2 Glossary

Term Definition
EPOD Electronic Proof of Delivery. The OBS EPOD system is CALIDUS ePOD.
CALIDUS eSERV The OBS mobile system to complete Service functionality in the field. This is part of the CALIDUS ePOD system.
PDA The mobile device on which the C-ePOD system will run in the field. This can be a Phone, EDA or industrial PDA, running Android.
DAL Data Access Layer. A mechanism for accessing data by the system that is removed from the application, allowing for simplified access and providing protection to the data, as only approved DAL methods can be used to modify it.
GPS Global Positioning System. A mechanism of retrieving accurate positioning information in the form of Latitude and Longitude (Lat-Long) co-ordinates from a device.
GPRS, 3G, HSDPA, Data Service All terms referring to mobile device network connectivity, and the speed at which the device connects to the internet.


B.3 Authorised By


Murray Middleton

OBS Development Manager
_____________________________

Julie Scott

Sponsor
_____________________________