Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- For emsd_report,
- there are two reports done:
- 1.user performance daily report
- 2.calllog report
- The source can be found in
- emsd_report\servlet_report_emsd_crm\src\servlet
- ---------------------------------------------------------------------------------------------------------------------
- 1.user performance daily report
- The entry point of the report is generateReport method in DailyReportWorkbook class,
- which is defined in
- emsd_report\servlet_report_emsd_crm\src\servlet\DailyReportWorkbook.java
- it then call the Report.getInstance method,
- defined in
- emsd_report\servlet_report_emsd_crm\src\servlet\report\userperformancemonthly\bean\Report.java
- Inside the Report class,
- the agent id and name will be retrieved from db table `hanphone_crm_csc`.`user` first.
- Afterward, the agent id list is used as key to search the `hanphone_crm_csc`.`presence_log` to retrieve all the records within the date range corresponding to the agents.
- The Report.getInstance method will call different method defined in the Report class to calculate different field related to status in the excel for each agent and each day on the data retrieved from db table `presence_log`.
- The Report.getInstance method also call method in
- emsd_report\servlet_report_emsd_crm\src\servlet\report\userperformancemonthly\bean\CallDBconnecter.java
- for getting data about calls, doing calculation related to call count and call duration.
- Finally, the Report.getInstance method will save all the calculated result to bean AgentDaily and AgentSummary
- At the end, the generateAgentRows method in DailyReportWorkbook class will retrieve the fields from bean AgentDaily and AgentSummary for showing them in an excel.
- ---------------------------------------------------------------------------------------------------------------------
- 2.calllog report
- The entry point of the report is generateReport method in CallLogReportWorkbook class,
- which is defined in
- emsd_report\servlet_report_emsd_crm\src\servlet\CallLogReportWorkbook.java
- it then call the Report constructor in
- emsd_report\servlet_report_emsd_crm\src\servlet\report\calllog\Report.java
- The Report class is used for storing all the excel calllog rows.
- Each calllog fields are calculated by using the data retrieved from db tables `oscc_dababase`.`callrecord`, `oscc_dababase`.`agentrecord` and `oscc_dababase`.`users`.
- There is only one loop to retrieve data from db tables and do the calculation for each call.
- The initiated calllog rows in the Report is eventually read by generateCallLogRows method in the CallLogReportWorkbook class to assign to the corresponding excel cells.
- =====================================================================================================================
- For the web portal,
- two items, 'User Performance Daily Report' and 'CallLog Report', are created under the 'Reports' tab of the top navigation bar.
- Here, we need to create two rows inside the db table `hanphone_crm_csc`.`menu`.
- We first find that the id of the Reports is 34 in this case.
- To add more items under the 'Reports', we just need to create the item with the parent field to be 34, that is ths id of the 'Reports
- id label parent sequence controller action
- 155 User Performance Daily Report 34 10 report userPerformanceDailyReport
- 156 CallLog Report 34 11 report callLogReport
- the sequence number is the position under the tab. So 'CallLog Report' will appear under 'User Performance Daily Report' on web portal.
- the controller and action field store the name of the controller and action in this yii webapp for handling the page.
- The main page of the web portal is generated by
- protected\views\layouts\main.php,
- which call the MenuUtil class to read menu table.
- The final thing is to set the access right for these pages under the System tab to display the pages.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement