.

Friday, March 29, 2019

The Existing System For Payslip Generation

The Existing musical arrangement For deliverslip genesisThe purpose of the proposed project is to automate the Payslip generation move which replaces the traditionalistic clay of Payslip generation that utilize to print the employee hire detail onto a paper.This project includes a single drug exploiter who is clear to initiate the finishing. The privileges argon given exclusively to the individual in a department who is trusty for generating the Pay misidentifys for the employees.The occupation takes in the jump Sp bring opinion poll as input and generates an graveed PDF PaySlip for from individually one employee. This PDF PaySlip is get off to the respective employee by employ their ring armour-id which is provided in the jump score.This industriousness generates PaySlips of each employee e actually month. The PaySlip cattle ranch woodworking plane is uploaded to the outline. The application uses an go past parser to hear this spread saddlery. The exc el parser parses the excel sheet in a row-wise fashion and generates an xml string for each row. This xml string contains the salary selective information of each employee. The salary data is converted into a pass enunciate-protected PDF memorandum as per a pre- be template. These salary statements (in PDF) ar e charge to respective users. The electronic mail process is logged.1.2 Existing carcassThe existing System for PaySlip generation includes manual of arms instauration of the pay details of all the employees in an excel sheet and converting them to sound out put down. Each row from the excel sheet is taken and then converted into the word document. This word document contains the Pay details of the employee. This document is printed on to a paper and then distributed to all the employees.The Existing System requires manual effort in converting the excel sheet data into the word document. The word document which contains the salary details should be generated for all th e employees which in let go of delays the whole process of distributing the payslips. As the paper is used in distributing the payslips this take down includes the wastage of paper. This is till the part of generation of pyslips itself. When talking about distribution each and every paslip has to be signed by the authority, stamped and then folded which is placed in the envelope.this has to be distributed to all the employees near the desk has to take an acknowledgement that the employee has received by signing on paper. If the employee is not at the desk or out of rank then distribution has to be postponed for that employee till he is available. That is he lingo check it immediately after its been issued. Making it remotely get-at-able is besides an early(a) aspect of it.1.3 Proposed SystemThe proposed System for generating the PaySlips is a Web establish Automated System for generation and distribution of PaySlips.Proposed System is efficient becoming as it includes Less Ma nual effort. Manual effort is needed in only logging into the application and uploading the appropriate excel sheet into the application. notwithstanding a click on the upload button is sufficient, then the application itself will generate the payslips and distribute them to the respective employees mailid. Optimal performance of the application is achieved as delay is reduced in generation of Payslips with the existing trunk. opus conservation is achieved, as the PaySlips argon displace to the employees through mails, This makes the payslip remotely accessible2.1 Functional RequirementsModulesAuthentication/Authorization transfer File surpass ParserPDF GenerationEmailModule DescriptionAuthentication/Authorization ModuleThis application is used to generate payslips of the employees for every month. Payslips, that depict all the salary details, is very confidential and hence this work should be carried out by an authorized person. For this purpose the user is presented with a log in and is granted access to the application only after supplying a valid username and give-and-take. This needs data alkali connectivity that stores all the details of the users who lavatory use the application with their parole.This module is implemented exploitation Struts. As this partitions the presentation and implementation the login UI is built using Java server pages. When the user submits the user name and password the servlet gets invoked handling the process that connects to the database, verifies and accordingly an doing is taken that forwards to another UI. transfer FileThis module uploads the outgo spread sheet into the application in which details of all the employees are present with the present months salary details. The details of the employee includes the name, empid, shapeation etc .The Excel spread sheet that is needed to be uploaded should be in a specify format i.e., all the details should be in the same chronological order according to the specifica tions. The uploaded spread sheet will not be keepd any where as the data in the Excel sheet is very confidential.This module is implemented using Struts. The File Upload UI is built using Java server pages. When the user uploads an Excel file a servlet gets invoked handling the process that directs an operation.Excel ParserThis module takes the uploaded excel sheet as input and parses it in a row wise fashion, organizes the data in xml format For this a special software package tool is used In this module we alike retrieve the employee-id, mail-id and month for which the payslip is generated.The software tool used for parsing the Excel document is POI. This needs a POI.jar added in the library where roughly predefined methods are defined. The POI consists of APIs for manipulating various file formats found upon Microsofts OLE 2 complicated Document format, and mightiness OpenXML format, using pure Java. In short, you can read and write MS Excel files using Java. In addition, you can read and write MS Word and MS PowerPoint files using Java. POI is your Java Excel solution (for Excel 97-2007).However, we have a complete API for porting other OLE 2 Compound Document formats and welcome others to participate.OLE 2 Compound Document arrange based files include most Microsoft Office files such as XLS and medical student as well as MFC serialization API based file formats. Office OpenXML Format based files include the new (2007+) xml based file formats, including Microsoft slip files such as XLSX, DOCX and PPTX.PDF GenerationThis module creates a PDF file per employee based on pre-defined template and a randomly generated Password is used to encrypt the PDF file. This password is used by the employees to retrieve the PaySlips. The template is designed using XSL independently and values are taken from the Excel and make full into PDF using burnt umber. The PDF is encrypted using a random generated password and the password is attached to the mail. The en crypted PDF document is mailed to the employee.The software tool used for generating a PDF document is XSL-FO. XSL-FO is a nomenclature for formatting XML data . XSL-FO stands for Extensible Stylesheet Language Formatting Objects . XSL-FO is a W3C Recommendation . XSL-FO is now formally named XSL . XSL-FO is an XML-based markup language describing the formatting of XML data for fruit to screen, paper or other media. Styling is both about transforming and formatting information. When the origination Wide Web Consortium (W3C) made their first XSL Working Draft, it contained the language syntax for both transforming and formatting XML documents. Later, the XSL Working Group at W3C discriminate the original draft into separate Recommendations. XSLT, a language for transforming XML documents . XSL or XSL-FO, a language for formatting XML documents. XPath, a language for navigating through elements and attributes in XML documents.This is more(prenominal) advantageous because this sep erates the presentation or template of the PDF and the implementation how the data is filled in.Email ModuleThis Module emails the Payslips (Password protected PDF files) to the respective employee by using their mail id. The mailing details are drive homed in a batch log with the time and date at which the mail is sent to the employee for verification. This module denounces the mail attributes like the subject, from_address, to_address and message body. in like manner a incomplete random generated password is sent in the mails which need to be personalize by the employee. This module also inserts values into the email log with the details of mailing.The Protocol used for mailing the PDF document to a particular employee is SMTP. The JavaMail API provides a platform-independent and protocol-independent framework to build mail and messaging applications.This is binded with Simple Mail fare Protocol for mailing.2.2 Non-Functional RequirementsAccessibilityThis application is easi ly accessible by the user who is authorized to use the system for generating PaySlips every month.PerformanceThis system can generate PaySlips for any number of employees considering the same speed.ReliabilityThis system is consistent and performs required regions under stated conditions.SecurityUnauthorized access to the system and its data is not allowed.The person who wants to access the system is authenticated against a username and password. The PaySlip mailed to the employee is also password protected. This ensures unauthorized access of the PaySlip.UsabilityThis system enhances usability by incorporating well structured user interfaces, end-user interactions, informative error messages etc.2.3 System Requirement SpecificationSoftware RequirementsLanguage Java/J2EEOperating system Win 2000/XP or higherWeb innkeeper Apache Tomcat ServerExcel Parsers POI(Poor Obfuscation Implementation)PDF Generator Tools XSL-FO(Extensible Style sheet Language-Formatting Object)Back blockade MySQL DatabaseHardware RequirementsProcessor P4 or higherRAM 1 GB or higherHard disk 10 GB3.1 technical ArchitectureA Technical Architecture breaks down operational (business) processes into operable components and capabilities. It describes the structure and behaviour of the technology infrastructure of an enterprise, solution or system.The sideline diagram depicts functional components of the application.BrowserWeb Container(Tomcat)MySQLPaySlip Generation SystemThe weathervane container in detail handles the following operations as depicted in the following diagramAs the web container receives the request from the browser it invokes the parser functionality and does the excel parsing row-wise and generates an xml line. The string data is used in generating the PDF. These PDFs which are generated are mailed to the respective employees by the mailer component. The entire email process is logged in a file.Once the application is deployed in the server we can access it topi skir ty or from remote using cosmos IP or tolerant some domain name to the application.3.2 Software ArchitectureSoftware computer architecture alludes to the overall structure of the software and the ways in which the structure provides abstract integrity for a system. In the simplest form software architecture is the hierarchical structure of social class components (modules), the manner in which these components interact and structure of data that are used by these components. The software architecture of a program or computing system is the structure or structures of the system, which comprise software components, the externally visible properties of those components, and the relationships between them.4.1 Design ObjectivesDesign is the first spirit in the development phase of a process or system in sufficient details to permit its physical realization.Without design specifications, the design will be unguided.It is difficult to know when the process is complete and to account the progress.Design is used to plan what information needs to be displayed and entered and how it relates to other information.Design is the only way to translate the requirements into a finished system.A well designed program will be easier to implement, distribute and maintain.4.2 UML plots4.2.1 Usecase Diagram4.2.2 Class Diagram4.2.3 Sequence Diagram4.2.4 Collaboration Diagram4.2.5 occupation Diagram4.3 Data Flow DiagramsLevel 14.4 Database Design4.4.1 E-R Diagrams4.4.2 Database TablesDatabase Tables5.1 phony CodeLogin ModuleLogin form habitual class LoginForm extends litigateForm/**Declare dickens string inconsistents that holds the username and password values entered in the formDefine getter and typesetter methods **/Login Action earthly concern class LoginAction extends ActionPublic ActionForward execute(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception/** shape an quarry to the login formRetrieve the username and password entered in the form and save in some variables give rise an object for the implementation and call the function validate() with the retrieved username and password as argumentsSavetoken()Depending on its remember value forward the action to success page or bankruptcy page**/Login Interface frequent interface LoginDAO/**Declare th method validate(string , string)**/Interface Implementationpublic class LoginDAOimpl extends BaseDAO implements LoginDAOConstructor()Validate ()/**Declare two string variables that holds the values of the username and password from he databaseGet the connection to the database using the predefined method in javaRetrieve the username and password from the database using a SQL query(select)Compare both username, password from form and databaseReturn a Boolean value according to the comparision**/Login.jspCTE Pay Slip Generation System Employee Loginfunction validateLogin()if(document.loginForm.username.value=&& document.loginForm.p assword.value=)return trueelsealert( interest Enter UserName and Password.)return false LoginUserName Password Copyright 2009 Cambridge Technology Enterprises. each rights reserved.Upload File ModuleUpload formpublic class UploadForm extends ActionForm/**Define a variable file of type fileAlso define the getter and setter methods **/Upload Actionpublic class StrutsUploadAction extends Actionpublic ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) throws Exception/** If the token is valid thenCreate an object for upload form to retrieve parameters like contentType, file name, fileSize.Create an object to interface to all the method parseExcel(file)Return successElseReturn failure **/Upload.jspCTE Pay Slip Generation System Employee Loginfunction isFileName()var fileName = document.forms0.theFile.value // uploadform is the form nameif (fileName ==)alert(Please select a file)return falseElseif(fileName.substr((fileN ame.duration)-3,fileName.length) == xls)document.forms0.action = FileUpload.dodocument.forms0.method = postdocument.forms0.submit()return trueElsealert(Please Upload an Excel file)return falseFile Upload value= study FileCopyright 2009 Cambridge Technology Enterprises. in all rights reserved.window.NREUM(NREUM=)NREUM.info=beaconbam.nr-data.net,licenseKeyde6e6cfad9,applicationID221047987,transactionNamebl0HMhMFDEYCWhJeWlcXMBQISwdGEFgfRBpYShEPAggHGxNRFg==,queueTime0,applicationTime1,attsQhoERFsfH0g=,errorBeaconbam.nr-data.net,agentUpload interfacepublic interface PaySlipDAO declare a method parseExcel()/**Upload interface implementation(Excel Working and PDF Generation Modules **/)public class PaySlipDAOImpl extends BaseDAO implements PaySlipDAOConstructor()public draw and quarter parseExcel(String fileName) throws ExceptionDefine a String range str=sno,month,NoofDays,empid,empname,desg,Basic,HRA,That defines the sequence in which Excel file should be in./**Define a string va riable that holds the root tag declare an input stream and initialize it to zilch now define a new input stream and initialize it to file (Excel file)initialize POIFSFileSystem to inputstream define a new HSSFworkbookget the sheet count get the sheet with count zeroiterate the rows if the sheet has rows theniterate the cadres from that retrieve the 4th,2nd and 21st cell values.4-mployeeid 2-month 21-Email idFor every cell value make up the opening tag using the string array**//**According to the cell value get the valueLikenumericFormulaStringAfter adding the value append the closing tagLike wise iterate till all the cells are completeAt the end append the closing root tagWith this we are ready with our xml string.Using this xml string as the argument make the call to the generatPDF()Return empids of employees for whom the mail is sent and to whom the mail is not sent with a appended in between.**/PDF Generation Modulepublic int genPDF( HSSFCell empid,HSSFCell mailid,HSSFCell monthyear,String xmlStr )/** secure the pass of the base directory to the current directoryDefine a file in which we save the xslt file that is used in designing the payslipAlso define a PDF file with parameters like where to save(current directory),with what name(employee-id) and with what extension(.pdf)Create new instances for fop factory and fo user agentGet the random generated password which is of six characters lengthNow define two random numbers and retrieve th characters at that ndex in the employee idAppend these two characters to the random generated password write in code the pdf using method PDFEncryptionParams() and set the Boolean parameters like allow print, allowCopyContent, allowEditContent, allowEditAnnotations and also the keys to encryptconfigure foUserAgent as craved.Setup output.Construct fop with desired output formatSetup XSLTSetup input for XSLT transformationResulting sax events (the generated FO) must be piped through to tribal sheikhStart XSLT transfo rmation and FOP processing**//**Call the sendmail method by creating its objectSave the returnvalue in a variableIf that is equal to one then save that email id as sentmailid and append all other of this kind in the Excel sheet to this**//**If thats is equal to zero save that email id as failedmailid and append all others of this kind in the Excel sheet to thisAfter mail is sent save that in the log using the user defined methodinsertIntoEmailLog (mailid, monthYear,status)**/ private void insertIntoEmailLog(HSSFCell mailid, String monthYear, int status)/**Get the data base connectionInsert into table the values of status,month nd the mailed**/public static String getPassword(int n)/**Generate n random characters may it be alphabets(upper and lower),numbers and symbolsReturn a string of length n characters**/MailService Modulepublic class MailServiceMailService ()/**Define the host, transport_protocol, authentication needed, debugging needed etc.**/public int sendMail(String empId,St ring monthYear,String emailid,byte pdfBytes,String randompwd,int randomposition1,int randomposition2)/**Set the parameters like frommail, tomail, subject, messagetext, content type etcDefine a new mail sessionDeclare a new MIMEmessage() for this mail sessionset the source to PDF bytessend that message as mail to the tomailid**/Failure.jspCTE Pay Slip Generation System Employee Loginresponse.setHeader(Cache-Control,no-cache) //HTTP 1.1response.setHeader(Pragma,no-cache) //HTTP 1.0response.setDateHeader (Expires, 0) //prevents caching at the proxy serverresponse.setHeader(Cache-Control,no-store) //HTTP 1.1%Invalid username or password Please Try Again Copyright 2009 Cambridge Technology Enterprises. All rights reserved.Uploadsuccess.jspCTE Pay Slip Generation System Employee Loginresponse.setHeader(Cache-Control,no-cache) //HTTP 1.1response.setHeader(Pragma,no-cache) //HTTP 1.0response.setDateHeader (Expires, 0) //prevents caching at the proxy serverresponse.setHeader(Cache-Contr ol,no-store) //HTTP 1.1%File Successfully UploadedEMail sent to String maildata = (String)request.getAttribute(emailEmpId)int splitCount= maildata.indexOf()String sentEmailIds=maildata.substring(0,splitCount)String failedEmailIds=maildata.substring(splitCount+1,maildata.length())%EMail failed to

No comments:

Post a Comment